Place minimized Gjallar panels in top tabs

This commit is contained in:
Meta Vens 2026-06-07 10:17:33 +01:00
commit 4367d2d10d
3 changed files with 22 additions and 14 deletions

View file

@ -16,11 +16,12 @@ regions may use different text resolutions.
font assets, runtime flags, mouse input, Odin's canonical marquee tape, and
eventually direct CultMesh subscriptions.
- Outputs: `gjallar.overview` composition state, visible framebuffer frames,
cursor presentation, minimized panel presentation, and renderer telemetry.
cursor presentation, top-tab minimized panel presentation, and renderer
telemetry.
- Derived state: pane weights, pixel rectangles, chosen font sizes, one-row
gutter blocks, continuous readable marquee ribbon positions, dirty rectangles,
glyph runs, title-bar hit regions, local minimized-panel keys, and compact
agent-readable projections.
glyph runs, title-bar hit regions, top-tab restore affordances, local
minimized-panel keys, 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
@ -42,6 +43,7 @@ Odin provider catalog
-> EveNode panel extraction
-> weighted AABB packing
-> local minimized-state application
-> minimized top-tab strip reservation
-> title-bar hit-region emission
-> one-row gutter cell plan
-> continuous readable marquee ribbon path

View file

@ -670,6 +670,7 @@ internal sealed class GjallarRenderer : IDisposable
panels = sceneCache?.Panels.Count ?? 0,
minimizedPanels = minimizedCount,
minimizedTitles,
minimizedPlacement = "top-tabs",
titleHitRegions = titleHitRegionCount,
gutterCells = sceneCache?.GutterCells.Count ?? 0,
gutterRows = sceneCache?.GutterCells.Select(static cell => cell.Row).Distinct().Count() ?? 0,
@ -727,19 +728,18 @@ internal sealed class GjallarRenderer : IDisposable
var outerY = gutter;
var minimizedProviders = providers.Where(node => minimizedSnapshot.Contains(node.StableKey())).ToArray();
var activeProviders = providers.Where(node => !minimizedSnapshot.Contains(node.StableKey())).ToArray();
var shelfHeight = minimizedProviders.Length == 0 ? 0 : Math.Max(fonts.Edge.LineHeight + 10, GutterSize(fonts.Edge));
var activeRect = new RectI(0, outerY, framebuffer.Width, Math.Max(1, framebuffer.Height - outerY * 2 - shelfHeight));
var packed = AabbPacker.Pack(activeProviders, activeRect, gutter).ToList();
if (minimizedProviders.Length > 0)
{
packed.AddRange(MinimizedShelf(minimizedProviders, new RectI(0, framebuffer.Height - outerY - shelfHeight, framebuffer.Width, shelfHeight), gutter));
}
var tabHeight = minimizedProviders.Length == 0 ? 0 : Math.Max(fonts.Edge.LineHeight + 10, GutterSize(fonts.Edge));
var activeRect = new RectI(0, outerY + tabHeight, framebuffer.Width, Math.Max(1, framebuffer.Height - outerY * 2 - tabHeight));
var packed = minimizedProviders.Length == 0
? []
: MinimizedTabs(minimizedProviders, new RectI(0, outerY, framebuffer.Width, tabHeight), gutter).ToList();
packed.AddRange(AabbPacker.Pack(activeProviders, activeRect, gutter));
var packedArray = packed.ToArray();
sceneCache = new SceneCache(stateJson, packedArray, FrameDocument.BuildGutterCells(framebuffer.Width, framebuffer.Height, fonts.Edge, packedArray, gutter), root.MarqueeText, minimizedSnapshotVersion);
return sceneCache;
}
private static IEnumerable<PackedPanel> MinimizedShelf(IReadOnlyList<EveNode> nodes, RectI rect, int gap)
private static IEnumerable<PackedPanel> MinimizedTabs(IReadOnlyList<EveNode> nodes, RectI rect, int gap)
{
var count = Math.Max(1, nodes.Count);
var width = Math.Max(80, rect.Width / count);

View file

@ -29,6 +29,8 @@ surface sources
- Current feed: Odin provider catalog at `ws://192.168.1.66:8797/eve/deck`
- Current status path on Nightwing: `/var/log/gjallar.status`
- Current cursor input: `/dev/input/mice`, rendered as a framebuffer crosshair.
- Current minimized-panel presentation: a top tab row. Clicking a panel title
minimizes it; clicking its tab restores it.
- Current marquee input: Odin's provider catalog `marqueeText`, built from the
Stonks securities tape interwoven with ordered VoidBot poem lines.
@ -45,6 +47,7 @@ Observed live status after cursor/minimize cut:
"scene": {
"panels": 6,
"minimizedPanels": 0,
"minimizedPlacement": "top-tabs",
"titleHitRegions": 38,
"gutterRows": 3,
"gutterPolicy": "single-row-top-between-panels-bottom",
@ -71,12 +74,12 @@ Observed live status after cursor/minimize cut:
font assets, runtime flags, mouse deltas/buttons, Odin's canonical marquee
tape, and later native CultMesh subscriptions.
- Outputs: `gjallar.overview` composition state, framebuffer frames, sparse
refresh streams, cursor presentation, minimized panel presentation, and
refresh streams, cursor presentation, top-tab minimized panel presentation, and
agent-readable panel captures.
- Derived state: pane weights, pixel rectangles, selected fonts, one-row gutter
blocks, a continuous readable marquee ribbon path, dirty rectangles, glyph
runs, title-bar hit regions, local minimized-panel keys, and compact text
projections.
runs, title-bar hit regions, top-tab restore affordances, local
minimized-panel keys, 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
@ -171,6 +174,9 @@ Source: `https://en.wikipedia.org/wiki/Linux_framebuffer`
lowers the incoming marquee as a continuous ribbon of readable text chunks.
Adjacent gutter blocks alternate direction by changing chunk placement along
the path; letters inside each chunk keep normal left-to-right order.
- Minimized top-level provider panels reserve a tab strip at the top of the
active scene. The tabs are normal title-hit regions, so minimize and restore
use the same local operator state instead of a separate recovery path.
- `visibleMarqueeRows` in `/var/log/gjallar.status` samples the actual gutter
rows produced by the render math. Use it when the framebuffer symptom differs
from the received `marqueeSample`.