Skip to content

fix: colour plan migrations and scope output and stop progress lines merging - #836

Closed
kvlonge wants to merge 2 commits into
mainfrom
fix/chi-395-cli-output-colour
Closed

kvlonge wants to merge 2 commits into
mainfrom
fix/chi-395-cli-output-colour

Conversation

@kvlonge

@kvlonge kvlonge commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Why

sqb plan migrations and sqb scope had almost no colour, so what happens to a table or what a move breaks didn't stand out. In a terminal, spinner lines could merge with other output, and several counts used the wrong plural.

Changes

  • sqb plan migrations: bold counted headers, coloured decisions (migrate/redo blue, done dim, replaces yellow, conflict/origin missing red), dim labels and old relation, compatible green. Wording unchanged.
  • sqb scope: coloured sections and markers, and a compact default (name and file:line, empty optional sections hidden, a marker legend). --verbose/-v restores the full detail. JSON output is unchanged. Respects --no-color and NO_COLOR.
  • Progress lines: a shared transient line coordinator serialises spinner/status lines with ordinary line writes, so lines such as ✓ Warehouse connected and statement … START no longer land on a live spinner in a terminal. The projector shares the coordinator's lock, which avoids a lock-order deadlock with the audit reporter.
  • Plurals: 1 match, 1 global collapsed, Archived 1 relation and related scope, browse and janitor counts.
  • Scope docs and the bundled skill references updated.

Verification

  • Unit: colour roles and plain output, compact vs --verbose scope output, --no-color, coordinator ordering, plural helper, janitor wording, concurrent projector/line-lock access (hangs without the fix).
  • E2E: pseudo-terminal runs of sqb plan and sqb test assert no transient line survives in the final screen.
  • make check-ci passes locally.

…merging

Coordinate every transient spinner or status line with persistent terminal
writes through one shared coordinator, so connection, lifecycle, and
diagnostic lines clear and redraw the live line instead of landing on it.

Style plan migration and scope text with the shared colour roles, make scope
rows compact by default with a --verbose flag for full details, and fix
singular nouns in scope and janitor summaries. JSON output is unchanged.
Share the transient line lock with the native progress projector so a
reporter holding it can claim a resource terminal while another worker
projects events. Pass the global --no-color flag through to scope text
rendering, and describe the hollow marker as not used by this resource.
@kvlonge
kvlonge enabled auto-merge (squash) September 26, 2026 12:11
@kvlonge kvlonge closed this Sep 26, 2026
auto-merge was automatically disabled September 26, 2026 12:12

Pull request was closed

@kvlonge
kvlonge deleted the fix/chi-395-cli-output-colour branch September 26, 2026 12:12
@kvlonge

kvlonge commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #837.

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