feat(fleet-view): add the narrow needs-you-first captain sidebar - #2
Merged
Conversation
The fleet view rendered one wide Markdown table set, which reads well in a full-width terminal but not in the split pane a captain keeps open beside a session. This makes the sidebar the default rendering: needs-you first, then work under way, declared waits, and what landed today, in captain-facing wording with a copyable PR URL or review command on the entries that ask for something. The previous tables stay available under --wide, and --json is unchanged. Classification still consumes fm-fleet-snapshot.sh --json rather than reparsing fleet state, so the view keeps the snapshot's read-only guarantee: no lock, no queue drain, no monitoring, no writes under state/ or data/. A render is therefore safe to leave looping under --watch beside a live session, which the tests pin by comparing every file in a fixture home across a render. The snapshot gains the two fields the sidebar needed and had no owner for: the status log's append time and age, so a renderer can age a declared event without stat-ing state files itself, and the per-task review command, which fm-review-diff.sh already owns. Wrapping counts codepoints instead of bytes, because the section glyphs and the em dash are multibyte and a byte-counting wrap folds a 40-column pane early.
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.
What this changes
bin/fm-fleet-view.shrenders one wide Markdown table set today, which reads well in a full-width terminal but not in the narrow split pane a captain keeps open beside a session.This makes the captain sidebar the default rendering:
--watch [seconds]redraws on an interval (default 5s) and exits cleanly on interrupt.--widekeeps the previous Markdown tables;--jsonis unchanged.Read-only
The view still consumes
bin/fm-fleet-snapshot.sh --jsonrather than reparsing fleet state, so it inherits the snapshot's read-only guarantee: no session lock, no queue drain, no monitoring, nothing sent to a worker, and no writes understate/ordata/.That is what makes it safe to leave redrawing beside a live session, and
tests/fm-fleet-view.test.shpins it by comparing every file in a fixture home - including modification times - across a render.Snapshot additions
Two additive fields, both documented in the script header:
paths.status_log.last_event_epoch/.age_secondsdate the last status append, so a renderer can age a declared event without stat-ing state files itself.actions.reviewcarries the per-task review command, whichbin/fm-review-diff.shalready owns.Notes
Verification
bin/fm-lint.shclean (ShellCheck 0.11.0).bin/fm-doc-audience-check.shclean;docs/fleet-view.mdclassifiedoperator-current.bin/fm-test-run.sh --changed- 32 selected scripts, all passing.bin/fm-test-run.sh --family snapshot-bearings- 3/3 passing, including the existing bearings and snapshot coverage.