Skip to content

fix(fleet-view): clip sidebar entries to a glanceable headline - #4

Merged
ecloin merged 1 commit into
mainfrom
fm/sidebar-label-clipping
Aug 11, 2026
Merged

fix(fleet-view): clip sidebar entries to a glanceable headline#4
ecloin merged 1 commit into
mainfrom
fm/sidebar-label-clipping

Conversation

@ecloin

@ecloin ecloin commented Aug 11, 2026

Copy link
Copy Markdown
Owner

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

  • An entry headline is the work item number plus the first sentence of its title (up to the first ., ;, or newline), clipped to a codepoint-aware TITLE_CAP, closed with a single whenever anything was dropped.
  • The assembled headline is bounded again by 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.
  • The same clipping covers every section - NEEDS YOU, IN FLIGHT, WAITING, DONE TODAY - so no section renders a note body, verdict list, findings, or raw worker report.
  • The action line stays deliberately 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.
  • Decision and declared-wait notes moved from ad-hoc cap(90) / cap(70) onto the shared NOTE_CAP constant.

The change is confined to the sidebar classifier. bin/fm-fleet-snapshot.sh is 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.
  • --wide and --json output diffed byte-for-byte before and after against a long-title fixture home: identical, and --wide still carries the full title.
  • bin/fm-lint.sh could 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 -n is clean on both changed scripts; CI owns the ShellCheck gate.

Docs

docs/fleet-view.md gains a "What an entry looks like" section describing the clipping contract, the never-clipped action line, and the fact that --wide / --json are unaffected.

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.
@ecloin
ecloin merged commit fb8d8dd into main Aug 11, 2026
10 of 12 checks passed
@ecloin

ecloin commented Aug 11, 2026

Copy link
Copy Markdown
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.

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.

1 participant