From 92c8f222703146020943ff2c07c23b84ad7ee43f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 7 Jun 2026 00:37:47 +0100 Subject: [PATCH] Alternate Gjallar gutter marquee blocks --- docs/architecture.md | 5 +++-- src/Gjallar/Program.cs | 16 ++++++++++++++-- state/gjallar-state.md | 13 +++++++++---- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index ad8d320..9a462ea 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -17,8 +17,8 @@ regions may use different text resolutions. - Outputs: `gjallar.overview` composition state, visible framebuffer frames, and renderer telemetry. - Derived state: pane weights, pixel rectangles, chosen font sizes, one-row - gutter routes, marquee glyph positions, dirty rectangles, glyph runs, and - compact agent-readable projections. + gutter blocks, alternating serpentine marquee glyph positions, dirty + rectangles, glyph runs, and compact agent-readable projections. - Forbidden writers: discovery systems do not decide Gjallar layout; providers do not tune themselves for Nightwing; framebuffer backends do not invent provider truth; Gjallar does not derive marquee content from provider status @@ -40,6 +40,7 @@ Odin provider catalog -> EveNode panel extraction -> weighted AABB packing -> one-row gutter cell plan + -> alternating serpentine marquee block path -> per-panel text pressure estimate -> PSF font selection -> frame draw commands diff --git a/src/Gjallar/Program.cs b/src/Gjallar/Program.cs index 15cac68..ffd1545 100644 --- a/src/Gjallar/Program.cs +++ b/src/Gjallar/Program.cs @@ -503,6 +503,7 @@ internal sealed class GjallarRenderer : IDisposable gutterCells = sceneCache?.GutterCells.Count ?? 0, gutterRows = sceneCache?.GutterCells.Select(static cell => cell.Row).Distinct().Count() ?? 0, gutterPolicy = "single-row-top-between-panels-bottom", + gutterFlow = "alternating-serpentine-blocks", marqueeChars = sceneCache?.MarqueeTape.Length ?? 0, marqueeSample = Sample(sceneCache?.MarqueeTape ?? "", 160), }, @@ -885,6 +886,7 @@ internal sealed class FrameDocument private static void AddHorizontalGutterRow(List cells, int columns, PsfFont font, int width, int row, int y) { var textY = Math.Max(0, y); + var forward = row % 2 == 0; for (var laneColumn = 0; laneColumn < columns; laneColumn++) { var x = laneColumn * font.Width; @@ -893,7 +895,7 @@ internal sealed class FrameDocument continue; } - cells.Add(new GutterCell(x, textY, row, laneColumn, true)); + cells.Add(new GutterCell(x, textY, row, laneColumn, forward)); } } @@ -906,7 +908,17 @@ internal sealed class FrameDocument const int framesPerScrollCell = 8; var scroll = (frameIndex / framesPerScrollCell) % Math.Max(1, tape.Length); - var orderedCells = cells.OrderBy(static cell => cell.Row).ThenBy(static cell => cell.LaneColumn).ToArray(); + var orderedCells = cells + .GroupBy(static cell => cell.Row) + .OrderBy(static group => group.Key) + .SelectMany(static group => + { + var rowCells = group.OrderBy(static cell => cell.LaneColumn); + return group.First().Forward + ? rowCells + : rowCells.Reverse(); + }) + .ToArray(); var glyphs = new List(); for (var index = 0; index < orderedCells.Length; index++) { diff --git a/state/gjallar-state.md b/state/gjallar-state.md index 0ac5aa7..52e0bf3 100644 --- a/state/gjallar-state.md +++ b/state/gjallar-state.md @@ -45,6 +45,7 @@ Observed live status after marquee/gutter cut: "panels": 6, "gutterRows": 3, "gutterPolicy": "single-row-top-between-panels-bottom", + "gutterFlow": "alternating-serpentine-blocks", "marqueeChars": 3101 } } @@ -61,8 +62,8 @@ Observed live status after marquee/gutter cut: - Outputs: `gjallar.overview` composition state, framebuffer frames, sparse refresh streams, and agent-readable panel captures. - Derived state: pane weights, pixel rectangles, selected fonts, one-row gutter - cells, marquee glyph positions, dirty rectangles, glyph runs, and compact text - projections. + blocks, alternating serpentine marquee glyph positions, dirty rectangles, + glyph runs, and compact text projections. - Forbidden writers: discovery systems must not decide Gjallar layout; providers must not tune themselves for Nightwing; framebuffer backends must not invent provider truth; Gjallar must not synthesize status-noise marquee content from @@ -152,8 +153,9 @@ Source: `https://en.wikipedia.org/wiki/Linux_framebuffer` - `FontAtlas.ForTextBox` picks a font per panel based on available pixel area and text pressure. - `FrameDocument` draws text, panels, gutters, marquee glyphs, and fills. It - lowers the incoming marquee as one continuous stream across the ordered gutter - cells instead of assigning independent text to each gutter row. + lowers the incoming marquee as one continuous stream across gutter blocks. + Adjacent gutter blocks alternate scroll direction, and the tape path reverses + at each block boundary so text can be followed between gutters. - `FramebufferDevice` maps or writes the Linux framebuffer. - 2026-06-06 live fix: rooted provider endpoints such as `/eve/deck/bifrost` must be resolved against the configured Odin deck authority before opening a @@ -167,6 +169,9 @@ Source: `https://en.wikipedia.org/wiki/Linux_framebuffer` ticker segments. Odin publishes the canonical tape; Gjallar consumes it from the provider catalog and enforces one glyph row for top padding, one per inter-panel gutter band, and one for bottom padding. +- 2026-06-07 gutter flow correction: the marquee is split into gutter blocks + again. Blocks alternate direction and share one serpentine tape path, rather + than flattening every gutter row into the same left-to-right stream. - Transport debt remains explicit: the live Nightwing body still consumes the compatibility Eve deck bridge. The target input organ is native CultNet / CultMesh typed state over the real GameCult transport, not a web-shaped