1
0

fix(ui): give the rail its own short labels instead of the sheet's sentences

The corner rail rendered `Shortcut.meaning`, which is written for the `?` sheet
where a full sentence is exactly right because somebody is reading a reference.
The rail is a glance over a moving 3D board with room for one line, and it is a
`flex-wrap` container: the sentence wrapped, and the wrapped line drew straight
through the chip beneath it. On the deployed build "Fly to a chapter of the tour,
or to a viewpoint inside a studio" and "Walk into the studio, or step back out to
the city" overlapped and neither could be read, over a bright sky with no
background to hide it. Nothing errored — it just looked broken, on every screen.

Two labels for two jobs. `Shortcut.rail` carries the two-or-three-word form for
the nine ids `railHints` can select; `meaning` keeps the sentence for the sheet.

`.hint` also had no `line-height`, so it inherited the body's and a wrapped chip
had nowhere to go, and no `max-width`, so the rail grew leftward until it met the
mode pill. Chips are now `white-space: nowrap`: wrapping belongs between chips,
which the flex container already does, not inside one.

Tested, because this is a defect a test can hold: every id the rail can return
must have a `rail` label, it must fit on a line, and it must not contain a
clause.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-21 19:56:55 -07:00
parent 75908774f7
commit 655848746d
4 changed files with 101 additions and 2 deletions
+4 -1
View File
@@ -565,7 +565,10 @@ export function chromeState(inputs: ChromeInputs): ChromeState {
const hints = railHints(mode, touchFirst).map((entry) => ({
id: entry.id,
keys: entry.keys,
label: entry.meaning,
// `rail`, not `meaning`: the sheet gets the sentence, the rail gets the
// glance. See the field's note in `shortcuts.ts` for what reusing the
// sentence here actually looked like on screen.
label: entry.rail ?? entry.meaning,
}));
// ---- The honesty line ---------------------------------------------------