feat(ui): render the status chips and their split-flap labels from a store

ShellFeedback publishes the loading status and the road network chip, and
CctvControls the camera grid chip, to the gev-status store; the scene
chrome renders them. SplitFlapText plays the departure-board cascade that
splitFlap.js plans, writing only the label's one text node, and rests when
its owner is destroyed. setSplitFlapText and disposeSplitFlap are gone.
This commit is contained in:
Sameh Khamis committed 2026-10-31 19:51:39 -07:00
1 parent 492b719f19
commit 3c391482f6
21 files changed
+838 -428

No files matched your search

+4 -14
View File
@@ -209,7 +209,7 @@ test('universal notice lifecycle clears on dispose and uses the one top-center l
const disposeEnd = ui.indexOf('\n }\n', disposeStart);
const dispose = ui.slice(disposeStart, disposeEnd);
assert.match(dispose, /this\._feedback\._globalStatusNotice = null;/);
assert.match(dispose, /this\._feedback\.clearLoadingStatus\(\);/);
assert.match(dispose, /this\._shareRestoration\.destroy\(\)/);
assert.match(ShareRestoration.prototype.destroy.toString(), /this\._shareTrackingNoticeGeneration \+= 1;/);
assert.match(html, /<div id="global-loading-status" role="status" aria-live="polite" aria-atomic="true" hidden>/);
@@ -539,20 +539,10 @@ test('the settled traffic chip shows exactly one percentage — the coverage it
assert.doesNotMatch(rendered, /100%/);
});
test('the chip renderer clears the progress slot instead of stranding the last value', () => {
const ui = readFileSync(new URL('./ui/shellFeedback.js', import.meta.url), 'utf8');
test('an emptied progress slot collapses rather than leaving a min-width stub', () => {
// ShellFeedback publishes the empty settled progress
// (src/ui/statusChipOwners.test.mjs); the slot must then take no room.
const css = readStylesheet(new URL('../style.css', import.meta.url));
const start = ui.indexOf(' _updateTrafficSyncChip(');
assert.ok(start > 0, '_updateTrafficSyncChip is missing');
const body = ui.slice(start, ui.indexOf('\n }', start));
// A truthiness guard here would leave the busy "..." sitting beside the
// settled label, which is the contradiction wearing a different hat.
assert.doesNotMatch(body, /if \(presentation\.progressText\s*\n?\s*&&/);
assert.match(
body,
/if \(this\._trafficSyncProgress\.textContent !== presentation\.progressText\) \{/,
);
// …and the emptied slot must collapse rather than leave a min-width stub.
assert.match(css, /#traffic-sync-progress:empty \{\s*display: none;\s*\}/);
});