Skip to content

🐛 fix(matrix): keep freshness HUD and kiosk CTA above the terminal effect - #16444

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
fix-16441-terminal-hud
Nov 3, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
fix-16441-terminal-hud

Conversation

@clubanderson

@clubanderson clubanderson commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Fixes #16440

In ?kiosk=1&view=matrix&mx.effect=terminal the bottom-left freshness HUD (.matrix-labels) and the bottom-right get-started QR CTA (#kiosk-cta) were not visible on a 1920x1080 capture, while rain/cascade showed them.

Cause. The overlays relied on DOM order alone: the canvas was unpositioned (inline, 100% height, overflowing #hive-matrix), .matrix-labels was position: absolute without a z-index, and the CTA's pinning only came from kiosk.css. The terminal effect paints the whole canvas opaque each frame and draws rows up from height - 100, so anything that lost its stacking order was simply covered.

Fix (one concern, surgical):

  • matrix.css: canvas is now an explicit position: absolute; inset: 0; z-index: 0 backdrop; .matrix-labels/.matrix-notice are position: fixed with a z-index above it (HUD capped at min(60vw, 48rem) so it doesn't run under the CTA); #kiosk-cta is pinned fixed bottom-right at z-index: 100001 inside the existing body.matrix-mode rule.
  • matrix.js: ghost/terminal baselines use hudBand() (max(100, labels.offsetHeight + 32)) instead of a hard-coded 100 so typed rows stop above the HUD in every effect.
  • Tests: TestMatrixUI asserts the overlay CSS; the Node DOM harness in TestMatrixUIBehavior asserts 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.js string updated for the merged CTA rule.
  • static/index.html regenerated via make dashboard-gen; changelog fragment added.

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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 3, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#16443 🐛 fix: keep Matrix overlays above terminal rendering CONFLICT src/pkg/dashboard/kiosk_cta.test.js
src/pkg/dashboard/matrix_ui_test.go
src/pkg/dashboard/static-src/css/matrix.css
src/pkg/dashboard/static-src/js/matrix.js
src/pkg/dashboard/static/index.html

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 3, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hivecommons-hive

hivecommons-hive Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the review swarm requested changes

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`.

@hivecommons-hive
hivecommons-hive Bot merged commit 19f60c6 into v5 Nov 3, 2026
88 of 92 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix-16441-terminal-hud branch November 3, 2026 16:48
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 3af33b2.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Matrix terminal effect hides the freshness HUD and get-started CTA overlay

1 participant