Skip to content

Measure the fourth side too, so the verdict clears a bottom-docked card - #83

Merged
aenawi merged 1 commit into
developfrom
fix/hud-overlay-bottom-pad
Sep 13, 2026
Merged

aenawi merged 1 commit into
developfrom
fix/hud-overlay-bottom-pad

Conversation

@aenawi

@aenawi aenawi commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Target

  • This is going into develop: the normal case for a fix, a chapter, a
    lab change, a typo
  • This is a release: develop → main, shipping to the published guide
  • This is a hotfix: straight into main, because published advice is
    currently locking readers out or leaving them exposed

What this changes

The HUD overlay insets itself by whatever the furniture is covering on three
sides and by a flat 12px on the fourth. Since #79 gave a theme a bottom dock,
that fourth side has something under it — so on Warroom the verdict panel was
drawn 30px behind the tally card and the transcript was inside it completely.
The overlay now measures the bottom edge too, against the right rectangle.

--pad-b could not simply be added to the padding, which is why this is not the
one-line calc() the issue hoped for. It is measured against the window,
because the page verdict and the view controls have to clear the rung ladder,
and the ladder sits below the viewport rather than over it. The overlay is
laid out inside the viewport, so reading --pad-b there clears the ladder a
second time and lifts the whole bottom stack one ladder higher than the card it
only had to clear by a gap — 50px of dead air on Warroom, and 50px of dead air
on the default page too, where nothing is docked at all.

So this publishes the number the camera is already handed — what covers the
board, rather than what is occupied at the foot of the window — as
--pad-b-canvas, and the overlay reads that. The other three sides need no
second token: the viewport starts at the top-left corner of the window, so
there the two rectangles agree. replay.html gets the same treatment, where
the thing below the board is the transport rather than a card.

Closes #81

Kind

  • Prose: clarity, typo, dead link
  • The advice was wrong, unsafe, or out of date
  • Lab or sandbox: code, checks, a new scenario
  • A divergence between the lab and the sandbox, closed or newly documented
  • Tests
  • Something else

What it was measured against

Not advice and not a command, so the advice section is deleted — but the issue
is a claim about pixels, and the fix is another one, so here is what both were
measured against.

Host OS:  macOS 26.6.2 (Darwin 25.6.0, arm64)
Docker:   29.7.2, compose 5.5.1
Browser:  Chrome 147 (headless, via CDP)
Go:       1.26-alpine, in the control image
Measured: 2026-09-13, after `docker compose up -d --build --no-deps control`
          and confirming the served style.css carried the change

Warroom, 1440x760, after lab-ubuntu → lab-vps :22:

                     before            after      tally card
  #hud-verdict       393-514           393-514    597-700
  #hud-transcript    670-698  inside   557-585
  overlay padding-bottom  12px         125px

  --pad-b            163px   (window, unchanged — the page verdict reads it)
  --pad-b-canvas     113px   (board, new — the overlay reads it)

The transcript now ends 12px above the card instead of 101px inside it, and the
nc -vz -w 4 100.71.4.3 22 # on lab-ubuntu line is legible.

The default page is untouched. With nothing docked --pad-b-canvas is 0px,
the padding stays at 12px, and the transcript sits at 670-698 exactly as it
did before:

  Chapter, same window:  --pad-b-canvas 0px, padding-bottom 12px,
                         transcript 670-698, identical to develop

replay.html, 1440x950, a 27-frame recording made with make -C lab record:

  #hud-transcript  678-706     tally card  718-821     transport  831-881

The issue asked whether the padding shoves the gauges on a short window, since
.hud-bottom is the last row of a grid-template-rows: auto 1fr auto. It does
not: the padding comes out of the 1fr row. A/B at 1440x625 — one pixel above
the height at which the layout floats and the question stops applying — with the
old rule forced back inline:

                     old rule (12px)   new rule (125px)
  .hud-top           170-362           170-362      <- the gauges do not move
  .hud-bottom        378-570           378-570

At that height the overlay already overflows on develop, and both rules put
the bottom stack in the same place, so this is neither a fix nor a regression
there.

Checks

  • make -C lab check passes — 49 tests, 0 failures
  • gofmt is clean (make check fails on any output at all)
  • New source files carry an SPDX-License-Identifier header — no new files

If this touches the guide's pages

Not applicable: this is lab/control/ui/, which is served by the control
container rather than opened from file://. Nothing under assets/ is touched
and no chapter moved.

If this touches the lab or sandbox engine

  • Nothing is drawn that was not measured — the new token is a
    measurement, taken off the same rectangle the camera is given
  • A failed attack does not render as a green tick
  • danger still outranks ok
  • Time is not faked
  • The engine still returns the rung that decided the outcome, not a bare
    pass/fail
  • If a score moved, the comparison table in lab/README.md moved with it —
    no score moved; this changes where a panel is drawn, not what it says

Licence

  • I have the right to submit this, and I am fine with it going out under
    CC BY-SA 4.0 (guide) or GPL-3.0-or-later (code), per the file I touched

Found while doing this, and not in this change

The page verdict pill (#verdict) is drawn over #hud-transcript. It is not
from #79 and it is not from this change — it already happens on the default
Chapter page on develop, where the pill hides the # on lab-ubuntu tail of
the command:

  Chapter on develop, 1440x760:
    #verdict         660-700   x 580-860
    #hud-transcript  670-698   x 358-662     <- 82px of the tail covered

Both are positioned to clear the same furniture by the same amount — the pill by
--pad-b + 10px against the window, the overlay now by --pad-b-canvas + 12px
against the board, which work out within 2px of each other at every size. So
they share a lane by construction.

This change puts Warroom into exactly the relationship Chapter already has,
which is what #81 asked for — the issue calls the default page unaffected. It
does not make the pill and the transcript stop overlapping. That is its own
idea and wants its own branch.

The HUD overlay insets itself by whatever the furniture is covering on
three sides and by a flat 12px on the fourth. Since #79 gave a theme a
bottom dock, that fourth side has something under it: on Warroom the
verdict panel was drawn 30px behind the tally card and the transcript —
the one line on the board that is a command rather than a rendering of a
number — was inside it completely.

--pad-b could not simply be added to the padding. It is measured against
the window, because the page verdict and the view controls have to clear
the rung ladder, and the ladder sits below the viewport rather than over
it. The overlay is laid out inside the viewport, so reading --pad-b there
clears the ladder a second time and lifts the whole bottom stack a ladder
higher than the card it only had to clear by a gap.

So publish the number the camera already gets — what covers the board,
not what is occupied at the foot of the window — as --pad-b-canvas, and
read that. The other three sides need no second token: the viewport
starts at the top-left corner of the window, so there the two rectangles
agree.

Measured in Chrome 147 at 1440x760 on 2026-09-13, Warroom, after a probe:

                    before            after       tally card
  #hud-verdict      393-514           393-514     597-700
  #hud-transcript   670-698  (inside) 557-585
  overlay pad-b     12px              125px

The default page is untouched: with nothing docked --pad-b-canvas is 0px
and the padding stays at 12px, the transcript at 670-698 exactly as
before. replay.html gets the same treatment, where the thing below the
board is the transport rather than a card.

The gauges do not move. The top row is an `auto` row above a `1fr`, so
the padding comes out of the gap; at 625px — one pixel above the height
where the layout floats and the question stops applying — the overlay
already overflows with the old rule and both rules put the bottom stack
in the same place.

Closes #81
@aenawi
aenawi merged commit e0b7c97 into develop Sep 13, 2026
1 check passed
@aenawi
aenawi deleted the fix/hud-overlay-bottom-pad branch September 13, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] The board's verdict is drawn behind a bottom-docked card, and the transcript is hidden completely

1 participant