Skip to content

feat(cli): colorize sync timeline lanes per unit#27164

Draft
SasSwart wants to merge 1 commit into
sas/sync-graphfrom
sas/sync-timeline-colors
Draft

feat(cli): colorize sync timeline lanes per unit#27164
SasSwart wants to merge 1 commit into
sas/sync-graphfrom
sas/sync-timeline-colors

Conversation

@SasSwart

Copy link
Copy Markdown
Contributor

Summary

Retrofits the per-unit color idea from coder exp sync graph onto coder exp sync timeline. Each unit (lane) now gets its own color, cycled from a fixed palette by lane index (git-log style):

  • Lane glyphs (*, |, \, /) are drawn in their lane's color.
  • The unit name in each row is drawn in the same color.

This makes it much easier to follow a single unit across the timeline graph.

Stacked on top of #27162 (the graph command).

Golden stability

Color is resolved via cliui.Color, which returns a colorless profile in tests and on non-TTY output. The existing timeline golden files are therefore unchanged, and no output gating is required. Color renders only on an interactive terminal.

Testing

  • go build ./cli/...
  • go test ./cli -run 'TestSyncCommands_Golden/timeline' (goldens unchanged, confirming colorless-in-test)
  • make lint/emdash, gofmt clean
Note on placement

The timeline command itself lives further down the stack (#27150). To avoid rebasing the entire stack, this enhancement is stacked on top of the current tip as its own small PR. It can instead be folded into #27150 if a single cohesive timeline PR is preferred, at the cost of a stack rebase.

Generated by Coder Agents on behalf of @SasSwart.

Give each unit in `coder exp sync timeline` its own color, cycled from a
fixed palette by lane index (git-log style). The lane glyphs (*, |, \, /)
and the unit name in each row are drawn in the lane's color, making it
easier to follow a unit across the graph.

Color is resolved via cliui.Color, which returns a colorless profile in
tests and on non-TTY output, so golden files are unaffected and no gating
is required.

Generated by Coder Agents on behalf of @SasSwart.
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