Session header color flags#609
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…lorFlag Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The flag now renders in the pane header's right quarter, overlapping the status strip, so a flagged agent is spottable while scanning the grid and not only while scanning the Dispatch list. The header row's vertical padding moved onto its label group so the chunk can bleed edge-to-edge without an absolute overlay; rendered height is unchanged. The remote client renders the same header, so it passes sessionId too — it resolves to "no flag" through the frozen settings stub. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The command description, palette module, and picker modal all claimed the flag renders only on a Dispatch row. Also records why the "dispatch"-prefixed command id and settings key keep their historical names. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- pl-3 deleted the header's right inset for unflagged panes, since the chunk that was to stand in for it does not mount without a flag (measured 12px -> 0px at a 100px pane). All row padding now lives on the label group, which also makes w-1/4 a true quarter. - Add a 1px canvas seam: every accent preset shares a hue family with a flag color, so a matching accent swallowed the flag on live panes. - Drop pointer-events-none and add a title on the header chunk; color alone is unreadable for a colorblind user. DispatchColorFlagStrip keeps both, since its row button already owns a richer tooltip. - Cover the two mutations the original tests missed (justify-between, Status Mode group padding) plus a stale persisted flag id. - Set Color Flag... per command-style.md rules 8 and 9. - Document the idle-pane tension and the do-not-rename constraint. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
A color-flagged agent now paints that color into the right quarter of its pane's session header, so a flag is spottable while scanning the grid — not only while scanning the Dispatch list.
The chunk overlaps the status strip by design: liveness is automatic and transient, a flag is manual and sticky, so a user who flagged a pane red wants that red whether or not the agent happens to be running. The flag wins its slice.
What's here
useColorFlag(sessionId)— the per-session lookupDispatchColorFlagStripdid inline, extracted so both surfaces resolve a flag identically. It returns a resolvedColorFlag, so every caller inherits the same "unknown persisted id → no flag" degradation. Geometry stays per-surface: a 10px alignment column and a 25% header chunk are different visual contracts.PaneHeaderColorFlag— the chunk. 25% proportional rather than a fixed width, because panes in a tiled grid vary enormously and a fixed chunk reads as a slab in a narrow lane and a rounding error in a wide one.PaneHeader— takessessionId, renders the chunk as a trailing flex child.Two decisions worth a reviewer's attention
Unflagged renders nothing — deliberately the opposite of
DispatchColorFlagStrip, which always mounts a transparent 10px column. That column exists to hold Dispatch labels in vertical alignment across rows; nothing sits to the right of this chunk, so there's no alignment invariant to protect, and reserving a quarter of every header would permanently squeeze the project dir for a signal that's switched off. The code comment records what would invert that reasoning.The row's vertical padding moved down onto its label group.
self-stretchfills the row's content box, so withpy-1on the row the chunk would float with a 4px gap top and bottom and read as a pill rather than a slice of the header. The same 4px still exists one level down, so rendered header height is unchanged. The row also wentpx-3→pl-3so the chunk reaches the pane edge without an absolute overlay or negative margin — the layout contract fromdocs/plans_and_ideas/2026-07-23-color-flag-layout-follow-up.md.Names kept on purpose
Settings.dispatchColorFlagsand the command iddispatch.color-flag.setstill say "dispatch" though the flag now renders elsewhere. Both are persisted identifiers, not descriptions: the settings key would need aPERSIST_VERSIONmigration, and the command id keysSettings.commandVisibilityOverrides— renaming it silently drops a user's saved visibility choices. Recorded in a comment so the next reader doesn't "fix" it.Verification
npm run typecheck— clean. It caught a secondPaneHeaderconsumer I'd missed: the remote client. It renders the same header and now passessessionIdtoo, resolving to "no flag" through its frozenDEFAULT_SETTINGSstub (dispatchColorFlags: {}). Wired honestly rather than stubbed out, so it lights up for free if the phone ever syncs settings.NODE_ENV=test npx vitest run— 1312/1312, 228 files, no flakes.npm run test:package— build + output verification pass.DispatchColorFlags.renderer.test.tsx(no new test file): flagged header paints the palette color, unflagged renders no element at all, and the padding lives on the label group so the chunk can bleed.Not done: the visual check. I didn't launch the app — a second Agent Code instance shares
~/.config/agent-codewith your running one (sessions, tmux, proxy state), and that's not a risk worth taking unasked. The classes and colors are asserted in tests, but pixels are unconfirmed.Plan:
docs/superpowers/plans/2026-07-26-session-header-color-flag.md.🤖 Generated with Claude Code