fix(fleet-view): clip sidebar entries to a glanceable headline - #4
Merged
Conversation
The captain sidebar rendered each entry's full backlog title. In a real home a backlog title is a body rather than a label, so the first NEEDS YOU entry printed a ~2400-character status dump of pull request verdicts, finding lists, and file paths, filled a 40-column pane, and pushed every later entry off screen. An entry headline is now the work item number plus the first sentence of its title within a codepoint-aware title budget, and the assembled headline is bounded again so N entries always cost about N * 3 lines. The same clipping covers every section, not only NEEDS YOU. The action line stays outside every budget: a pull request URL or review command goes out whole and soft-wraps, because a truncated command is worse to receive than a long one. The change is confined to the sidebar classifier, so --wide and --json render exactly as before and still carry titles in full.
Owner
Author
|
CI: 11 passed, 2 failed.
Everything that covers this change is green, including Lint shell scripts (ShellCheck parity, which could not run locally), Test coverage guard, all six portable behavior shards, Stock macOS Bash snapshot compatibility, and Repo invariants. |
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.
Problem
The captain sidebar rendered every entry's full backlog title (
bin/fm-fleet-view.sh,def short). In a real home a backlog title is a body rather than a label, so the first live render put a ~2400-character status dump - pull request verdicts, finding lists, file paths - into one NEEDS YOU headline, filled the whole 40-column pane, and pushed the second needs-you item off screen.Reproduced against the pre-fix renderer with the new test: a single headline rendered at 471 characters.
Change
.,;, or newline), clipped to a codepoint-awareTITLE_CAP, closed with a single…whenever anything was dropped.HEADLINE_CAP(about two wrapped lines at the default pane width), so N entries always cost about N * 3 lines regardless of what the headline was built from.cap(90)/cap(70)onto the sharedNOTE_CAPconstant.The change is confined to the sidebar classifier.
bin/fm-fleet-snapshot.shis untouched, so its read-only guarantee is unaffected.Tests
Two new fixtures in
tests/fm-fleet-view.test.sh, both driven by a multi-hundred-character title modeled on the live reproduction:test_long_title_stays_glanceable- asserts the headline stays within the cap, that the verdict body / finding list / file paths never reach the pane, that the second needs-you entry survives, and that both a full PR URL and a review command render unclipped.test_long_title_clipping_covers_every_section- asserts in-flight, waiting, and done-today entries clip identically.Both fail against the pre-fix renderer and pass after.
Verification
bash tests/fm-fleet-view.test.sh- 12/12 ok.bash tests/fm-fleet-snapshot-view.test.sh- no failures.bin/fm-doc-audience-check.sh- ok, surfaces=68 local_links=235.--wideand--jsonoutput diffed byte-for-byte before and after against a long-title fixture home: identical, and--widestill carries the full title.bin/fm-lint.shcould not run in this environment: ShellCheck is not installed, and the linter correctly refuses to run under any version other than the pinned 0.11.0.bash -nis clean on both changed scripts; CI owns the ShellCheck gate.Docs
docs/fleet-view.mdgains a "What an entry looks like" section describing the clipping contract, the never-clipped action line, and the fact that--wide/--jsonare unaffected.