Repository navigation
🐛 fix(matrix): keep freshness HUD and kiosk CTA above the terminal effect - #16444
Conversation
Pin .matrix-labels and #kiosk-cta to the viewport with explicit z-index, position the canvas as a z-index 0 backdrop, and make the ghost/terminal baselines reserve the HUD band so typed rows never run under it. Fixes #16441 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Correctness review @ 3af33b2
1. The terminal half of the new baseline assertion is vacuous, and the whole assertion passes on the pre-PR code — src/pkg/dashboard/matrix_ui_test.go:138
draws.filter(a => a.length === 3) only keeps 3-arg fillText calls. drawTerminal draws every row with 4 args (matrix.js:212: ctx.fillText(row.text, 10, y, width - 20)), so no terminal row is ever checked. The 3-arg draws that do survive the filter in the terminal scenario are the buildAtlas glyphs at y = 16 (matrix.js:239), which land in draws because every mock element shares one context (matrix_ui_test.go:91). I instrumented the harness: terminal scenario → 15 three-arg draws, all ["<",0,16]-style atlas glyphs; the real rows ("+ <script>…" at y≈492) are 4-arg and excluded. []-ish .every() → true.
Also, because the mock HUD has no offsetHeight, hudBand() returns the old constant 100 and the assertion compares against innerHeight - 100 — I ran the head harness against the merge-base matrix.js (hard-coded height - 100) and it passes unchanged. So this test neither exercises the terminal path nor would catch a regression of hudBand().
Suggested fix (verified: passes at head, fails at merge-base with rows must stop above the HUD band):
@@ src/pkg/dashboard/matrix_ui_test.go @@
assert.equal(raf.size, 1);
+ byClass('matrix-labels').offsetHeight = 120;
for (const time of [1, 100]) {const fn = [...raf.values()][0]; raf.clear(); fn(time)}
@@
- if (/ghost|terminal/.test(query)) assert(draws.filter(a => a.length === 3).every(a => a[2] <= win.innerHeight - 100));
+ if (/ghost|terminal/.test(query)) assert(draws.every(a => a[2] <= win.innerHeight - 152), 'rows must stop above the HUD band');(152 = 120 + 32 from hudBand(); dropping the arity filter is safe since ghost tab/caption draws sit at y ≤ 48 and atlas glyphs at y = 16.)
Limit of this review: I could not render the page, so I can't confirm the CSS change alone makes the overlays visible on the 1920×1080 Xvfb capture. Note the stated cause ("relied on DOM order alone") doesn't by itself explain why rain showed the overlays and terminal didn't — the pre-PR .matrix-labels { position: absolute } was already a positioned sibling painting above the non-positioned canvas, and the DOM is identical across effects. The new explicit z-index/position: fixed layering is harmless and correct, but a before/after capture from the streamer pod would be the real proof.
— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. Evidence bundle `#164443af33b2` sha256:e62417a3ac07c9d55488134773af466a7d5f60f174c31a078cef32ef0dfceecc — download from the dashboard or `hivectl review evidence #16444`. |
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 3af33b2. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #16440
In
?kiosk=1&view=matrix&mx.effect=terminalthe bottom-left freshness HUD (.matrix-labels) and the bottom-right get-started QR CTA (#kiosk-cta) were not visible on a 1920x1080 capture, whilerain/cascadeshowed them.Cause. The overlays relied on DOM order alone: the canvas was unpositioned (inline, 100% height, overflowing
#hive-matrix),.matrix-labelswasposition: absolutewithout a z-index, and the CTA's pinning only came fromkiosk.css. The terminal effect paints the whole canvas opaque each frame and draws rows up fromheight - 100, so anything that lost its stacking order was simply covered.Fix (one concern, surgical):
matrix.css: canvas is now an explicitposition: absolute; inset: 0; z-index: 0backdrop;.matrix-labels/.matrix-noticeareposition: fixedwith a z-index above it (HUD capped atmin(60vw, 48rem)so it doesn't run under the CTA);#kiosk-ctais pinnedfixedbottom-right atz-index: 100001inside the existingbody.matrix-moderule.matrix.js: ghost/terminal baselines usehudBand()(max(100, labels.offsetHeight + 32)) instead of a hard-coded 100 so typed rows stop above the HUD in every effect.TestMatrixUIasserts the overlay CSS; the Node DOM harness inTestMatrixUIBehaviorasserts for all four effects that the HUD is mounted, unhidden, populated, last in DOM order, and that ghost/terminal draws stay above the HUD band.kiosk_cta.test.jsstring updated for the merged CTA rule.static/index.htmlregenerated viamake dashboard-gen; changelog fragment added.