Repository navigation
fix(bearings): wrap board row text instead of clipping it mid-word - #2
Merged
Merged
Conversation
Underway, Landed and Charted Next rows clipped their title and subtitle
to one line with an ellipsis, so a row reading "Backend wave 1
(deliveries 50..." told the reader nothing about the work. The board is
the captain's main surface for seeing what the fleet is doing, so an
unreadable row defeats its purpose.
Row titles now wrap, bounded at four lines, and subtitles at two; the
Captain's Call PR link wraps to two lines instead of losing its tail, so
the full URL is visible. Every wrapping text rule gained
overflow-wrap:anywhere so a long unbroken identifier breaks instead of
pushing the page sideways, and the renderer hands each row's full text
to its own tooltip for the rare line that still hits the clamp.
The section head's muted sub-label ("2 items wait on you, captain") was
nowrap inside a flex head and pushed the page sideways below ~470px;
it now wraps, which was the last horizontal-overflow source. Verified in
Chrome at 320, 500, 900 and 1280 CSS px: document width equals viewport
width at every one, and no element extends past the viewport.
nowrap is kept where it protects short badges, buttons, the eyebrow
labels, the mono task id, the "kunchenguid#1234" PR shorthand, the decision card's
repo name, the context-row keys and the footer provenance line - each is
a short badge, pill or identifier that must not break.
…ed against changes The clamp verdict decided whether a row carries a tooltip, but it was taken once, immediately, against a layout the reader never sees. The board pulls its webfonts with display=swap, so the page lays out in fallback metrics first and the swap reflows every row afterwards with no re-measure; the 900px breakpoint collapses the two columns with the same effect. A title near the four-line boundary could therefore keep a tooltip repeating fully visible text, or lose one whose tail really was hidden. refreshClampTooltips now clears a tooltip whose line no longer measures as clamped, so no verdict outlives its layout, and it re-runs once fonts have settled and on a debounced resize. Both are guarded: the DOM shim in tests/assets/board-render-harness.mjs has neither document.fonts nor a real window, and an unguarded call would fail the whole render. The predicate itself was also wrong. These rows have a fractional 19.5px line-height, so a fully visible two-line title measures a scrollHeight of 40 against a clientHeight of 39 purely from rounding, and a bare `scrollHeight > clientHeight` tooltipped it - the redundant-tooltip regression this was meant to remove. Clamping hides whole lines, so the threshold is half a line: comfortably above the rounding noise, far below one hidden line. Verified in Chrome at 320, 500, 900 and 1280 CSS px: no element extends past the viewport at any of them, only the genuinely clipped row carries a tooltip, narrowing to 320 correctly adds six more, and widening back clears them again.
The decision card's repository name is the first thing read when something needs the captain, but it is a single-line identifier inside a card that clips with overflow:hidden. Without min-width:0 the flex child refused to shrink, so the tail was cut at the card edge with no ellipsis to show it happened. It now shrinks, ellipsises, and carries the full name in a measured tooltip. Two more rules were hiding real content at narrow widths: - The footer provenance stamp held one line in a right-aligned footer, so instead of ellipsising it overhung to the LEFT and pushed the schema name off the viewport below roughly 370px. It now wraps. - The dispatch row could not fit its fixed button label beside the count, so it scrolled sideways with the button cut at the card edge. It now wraps the button onto its own line. isClamped only measured height, so a sideways-truncated identifier never earned a tooltip; it now counts width overflow too. Verified in Chrome from 320px to 1600px: no element scrolls sideways and none sits offscreen at any nesting level.
The dispatch bar and the Captain's Call pager are withdrawn through the
`hidden` attribute, but an author-origin `display: flex` beats the UA
stylesheet's `[hidden] { display: none }`. On a board with nothing
dispatchable the captain therefore saw a "nothing picked" bar carrying a
"Queue dispatch order" button that was neither disabled nor wired to a
click handler, and an empty Captain's Call still showed its pager. One
rule restores the attribute, in the same style the decision card already
uses one section below.
The renderer now states both hidden flags outright instead of setting
only the unhide and leaving the other case to a markup default, so the
invariant lives in one place and is observable without a layout engine.
Measured in Chrome, board with nothing to act on, before and after:
dispatch bar display flex / 58px high with an enabled button, now none /
0px; pager likewise. A board with dispatchable work and one call card
keeps both controls at every width from 320px to 1600px, and no element
scrolls sideways at any of them.
The guard added with the clamp removal asserted that specific declarations are present in the built board's stylesheet, which is what this repo's guidelines forbid - a test must exercise behaviour through an executable or public interface and never assert implementation source, including through a parser. This suite's own header says it asserts what the page renders and never the template's source text, so the guard contradicted the file it sat in, and it bought a guarantee it could not actually provide: it pins what the rules say, not what the board paints. So the stylesheet model comes out of the render harness and the guard comes out of the suite. The CSS that does the actual fixing is unverified by the suite in this change; verifying it needs browser-render machinery this repo does not have, which is filed separately rather than introduced here. The template fix is unchanged: a row title still wraps to as many lines as it needs at every width, with no ceiling, no clipping and no ellipsis. Measured in Chrome at a 320px layout viewport: a 106-character title wraps to 10 fully visible lines and a 91-character unbreakable identifier to 8, neither clipped nor cut sideways, no tooltip needed, and nothing scrolls sideways at any nesting level. At 1400px the same titles take 3 and 2 lines.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
The captain reviewed the interactive fleet board on 2026-09-08 and reported, in his own words: "thanks firstmate this was really helpful. fyi: some text is not visible tho in the lavish document." His screenshot shows the Underway and Recently Landed rows cutting their titles off mid-word with an ellipsis, so a row reading "Backend wave 1 (deliveries 50..." tells the reader nothing about what the work actually is. The board is his main surface for seeing what the fleet is doing, so unreadable rows defeat its purpose.
What Changed
[hidden]was being overridden bydisplay: flex), with the renderer setting their hidden state in both directions.decisions,landed, per-line tooltips and acontrolsfield (plus aclassList.toggle/removeshim), and new tests cover long titles rendering in full in every fleet section without blanket tooltips, the decision card repo name, and controls being withdrawn only when there is nothing to act on.Risk Assessment
✅ Low: The change is well-bounded CSS wrapping plus guarded, idempotent tooltip measurement and explicit hidden-state handling; row titles now wrap uncapped at every width as the intent requires, the withdrawn source-asserting CSS test and harness stylesheet parsing are fully removed, and the remaining tests assert rendered output only.
Testing
Ran the targeted suite tests/fm-bearings-board-render.test.sh and it passed. Then I built real boards with
bin/fm-bearings-board.sh buildfrom a payload with the captain's long "Backend wave 1 ..." title in all three fleet sections plus an unbreakable branch-name title, once with the base-commit template and once with the target template. I rendered both in headless Chrome over CDP at 1280px, 400px and 320px, capturing before/after screenshots and per-title layout measurements (line count, text-overflow, scrollWidth vs clientWidth, document scroll width, computed display of the stack nav and dispatch bar). Base reproduces the mid-word ellipsis at every width; target shows every title in full at every width with no horizontal overflow.Evidence: Browser layout measurements per title, base vs target, at 1280/400/320px
Source: Browser layout measurements per title, base vs target, at 1280/400/320px
Evidence: Measurement digest (real Chrome layout)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
.agents/skills/bearings/assets/board-template.html:740- After the fix round removed the line ceiling from.bb-row__title, titles can no longer clamp (nooverflow: hidden,overflow-wrap: anywhereprevents width overflow), yet all three sections still build them throughrowText("bb-row__title", ...), which registers them inclampWatchand re-measures them on everyrefreshClampTooltips()(initial render, each card flip, fonts ready, resize). Traced: for a titlescrollWidth - clientWidthis 0 andscrollHeight - clientHeightis 0, soisClampedis always false and no tooltip is ever set - behaviour is correct, the watch is just dead work. Using plainel(...)for titles would be a small cleanup, but the user's direction for that round was to keep the template fix exactly as is, so no action is needed here.✅ **Test** - passed
✅ No issues found.
bash tests/fm-bearings-board-render.test.sh- all tests ok, including the long-row, decision-card and withdrawn-controls testsManual:bin/fm-bearings-board.sh build payload.jsonwith a stub lavish-axi, once withFM_BEARINGS_BOARD_TEMPLATEpointing atgit show 259a669:.agents/skills/bearings/assets/board-template.html(base) and once with the shipped template (target)Manual: headless Google Chrome over CDP (Emulation.setDeviceMetricsOverrideat 1280/400/320px,Page.captureScreenshotfull page) for base and target boardsManual:Runtime.evaluateprobe of every.bb-row__title(lines, text-overflow, scrollWidth vs clientWidth, tooltip), document scrollWidth vs innerWidth, and computed display of.bb-stacknav/.bb-dispatchNote: plain--headless --screenshot --window-size=400gave a misleading right-cropped capture, because headless Chrome on macOS laid out wider than 400px; those shots were discarded in favour of CDP device-metrics emulation✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.