fix(bin): wrap long meta-row badges in the generated kanban board - #5
Merged
Merged
Conversation
added 2 commits
July 31, 2026 09:14
DaisyUI's .badge has a fixed height and does not wrap, so a card's metadata badge whose text runs past one line has that text clipped. The effort-map card's fog: and out of scope: badges hit this today, but any long .meta-row badge can. Add a stylesheet override in the generated board that lets .meta-row badges grow and wrap. Presentation only: truncation logic and badge markup are unchanged, and badges outside .meta-row keep their default fixed height.
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
Fix vertically clipped badge text in the kanban board generated by bin/fm-board.sh. The board renders card metadata as DaisyUI badges inside .meta-row; DaisyUI's .badge has a fixed height and does not wrap, so a badge whose text runs longer than one line has its text clipped. A real browser layout audit of a generated board reported two severe clipped-text failures (vertical, 6.5px overflow, viewport 1152): the 'fog:' and 'out of scope:' badges on an effort-map card in the top band. Their text is long by nature - the generator already truncates it with an ellipsis and even truncated it exceeds one badge line. The captain asked to fix the CLASS of defect (any long .meta-row badge), not just those two spans.
Deliberate decisions, so a reviewer reading only the diff has the context:
Test coverage: tests/fm-board.test.sh gains an assertion inside the existing render test that extracts the emitted .meta-row .badge rule from the GENERATED HTML (the executable interface, per this repo's rule that tests must never assert implementation-source bytes) and checks height:auto and white-space:normal, so the defect cannot silently return. It matches the file's existing assert_contains conventions rather than adding a new runner.
Verification already performed: the full tests/fm-board.test.sh suite passes (4/4). A board generated from live fleet data was opened in a real browser and all 60 .meta-row badges measured - zero clipped; the previously-clipped fog badge now renders 31px tall against 29px of content, wrapping to two lines. docs/board.md was checked and documents no styling behavior, so per the task it was correctly left untouched.
Two established environment facts: (1) local lint cannot run on this machine - the pinned shellcheck is linux-x86_64 only and this is Apple Silicon macOS; bin/fm-lint.sh correctly refuses. (2) origin is the captain's own fork Lcxiv/firstmate with push access, and that fork has no CI configured, so no GitHub Actions run will ever appear for this PR.
What Changed
.meta-row .badgerule to the inline stylesheet emitted bybin/fm-board.sh(height:auto; min-height:1.1rem; white-space:normal; text-align:left; line-height:1.3;plus small vertical padding), so card metadata longer than one line wraps instead of being vertically clipped by DaisyUI's fixed-height, no-wrap.badge. The selector is deliberately scoped to.meta-rowso header count badges keep their current rendering, and the rule is inline so the board stays a single self-contained HTML file.fog:andout of scope:text on effort-map cards exceeds one badge line, so this is a presentation-layer fix on top of truncation, not a replacement for it.tests/fm-board.test.shto extract the emitted.meta-row .badgerule from the generated HTML and assertheight:autoandwhite-space:normal, and documented the invariant in thebin/fm-board.shheader comment beside the existing clipping-bug note. The full board suite passes 4/4, and a browser layout audit of a generated board measured zero clipped.meta-rowbadges after the change.Risk Assessment
✅ Low: A single presentation-only CSS rule tightly scoped to
.meta-row .badge, with no logic, markup, or data-path changes, plus a generated-HTML regression assertion that fails correctly if the rule is removed.Testing
Ran the targeted suite
tests/fm-board.test.sh(4/4 pass) and verified its new assertion actually catches the defect by removing the CSS rule and watching it fail. For end-user evidence I generated a real board with long effort-map metadata, produced a pre-fix baseline of the identical HTML minus the one new rule, and opened both in Chrome: before the fix 1-2.meta-rowbadges clip with 8px of vertical overflow depending on viewport, after the fix zero of 12 clip at 1600, 1152, and 500px, with the fog badge growing to 31px and wrapping to two fully readable lines. The 1600px pair also shows a ticket card'sstage:badge — not one of the two originally reported spans — going from clipped to wrapped, which is the direct evidence that the class of defect is fixed rather than the two instances. Header count badges measured an unchanged 24px fixed height throughout, and the rendered output still shows the ellipsis truncation, so the scoping and out-of-scope constraints both hold. Screenshots and the rendered board are in the evidence directory; the worktree is clean and temp fixtures were removed./var/folders/gp/phywrkfd3kj2jp2f764xmldw0000gn/T/no-mistakes-evidence/01KYWFCVGYZXGXP8SP4JH2HFAJ/01-before-clipped-badges.png)/var/folders/gp/phywrkfd3kj2jp2f764xmldw0000gn/T/no-mistakes-evidence/01KYWFCVGYZXGXP8SP4JH2HFAJ/02-after-wrapped-badges.png)/var/folders/gp/phywrkfd3kj2jp2f764xmldw0000gn/T/no-mistakes-evidence/01KYWFCVGYZXGXP8SP4JH2HFAJ/03-before-1600-ticket-badge-clipped.png)/var/folders/gp/phywrkfd3kj2jp2f764xmldw0000gn/T/no-mistakes-evidence/01KYWFCVGYZXGXP8SP4JH2HFAJ/04-after-1600-ticket-badge-wrapped.png)Evidence: Generated board HTML used for the post-fix measurements (self-contained, no added assets)
Evidence: Browser clipping measurements across three viewports (scrollHeight - clientHeight over every .meta-row .badge)
Evidence: New assertion fails when the fix is removed (non-vacuity proof)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
🔧 **Rebase** - 1 issue found → auto-fixed ✅
.agents/skills/afk/SKILL.md- branch carries 20 commit(s) that exist on your local main branch but were never pushed to origin/main; rebasing would bundle this unrelated work (59 file(s)) into the PR:Push main to origin, or rebase your branch onto origin/main, before gating.
🔧 Fix applied.
✅ Re-checked - no issues remain.
bin/fm-board.sh:428- bin/fm-board.sh:428 —white-space:normalonly breaks at whitespace, so a.meta-rowbadge whose text is a single unbreakable token wider than the card (e.g. a URL landing in an effort-map fog/out-of-scope item) would overflow horizontally rather than wrap. No current badge source produces such a token (fog/out-of-scope are joined with "; ",stage:is prose, repo/kind/crew/blocked-by are short), so this is not a reachable defect today — addingoverflow-wrap:anywhereto the same rule would close the residual case if it ever appears. Flagged as an observation only; it does not affect the reported clipping class.✅ **Test** - passed
✅ No issues found.
bash tests/fm-board.test.sh— full board suite, 4/4 passNon-vacuity check: deleted the.meta-row .badgeline from bin/fm-board.sh, re-ranbash tests/fm-board.test.sh→not ok - meta badges must grow past one line (missing: 'height:auto'), thengit checkout bin/fm-board.shGenerated a board viaFM_HOME=<fixture> bin/fm-board.sh --out after.htmlfrom a fixture whose effort map has longNot yet specified/Out of scopeentries, sofog:andout of scope:truncate to more than one badge lineBuilt the pre-fix baseline by stripping only the.meta-row .badgerule from the same generated HTML (grep -v→ before.html; diff confirms a 1-line delta)Opened both files in real Chrome viachrome-devtools-axi open file://…and measured every.meta-row .badgewithscrollHeight - clientHeightat viewports 1600, 1152, and 500 — before: 1/2/2 clipped at +8px; after: 0/0/0Measuredheader .badgecomputed height in every before/after pair (24px in all cases) to confirm the fix does not restyle badges outside.meta-rowCapturedchrome-devtools-axi screenshotbefore/after pairs at 1152 (effort-map fog and out-of-scope badges) and 1600 (a ticket card's longstage:badge)✅ **Document** - passed
✅ No issues found.
⏭️ **Lint** - skipped
✅ **Push** - passed
✅ No issues found.