feat(hud): complete Wave 3 integration for 1-D/2-A/2-D/2-E (Wave 3b)#1488
Merged
Conversation
Commit bd78195 ("integrate Wave 2-B/2-C in format_status_line") wired velocity and cache-savings into the cost segment but left four sibling Wave modules as dead code: hud_buddy, hud_rainbow, hud_context_bar, and hud_layout. Their unit tests passed, but format_status_line never called them — the statusLine rendered with a static buddy face, no adaptive layout, text-only context percentage, and no mode coloring. This commit closes that gap by hoisting all four modules as top-level imports (matching the velocity/cache_savings pattern) and refactoring format_status_line to build (name, priority, text) segments consumed by fit_segments. Wave 2-A — breathing buddy face BUDDY_FACE constant → select_face_from_state(hud_state). The face now reflects phase/blockerCount: ready/None → ◕‿◕ (idle) planning/evaluating → ◔‿◔ (thinking) executing/cycling → ◕◡◕ (active) blockerCount > 0 → ◕︵◕ (error, wins over phase) lastEvent=victory → ◕ᴗ◕ (victory, wins over phase) Wave 2-D — mode rainbow ANSI coloring (opt-in) Gated on CODINGBUDDY_HUD_RAINBOW=1 because Claude Code statusLine's ANSI support is environment-dependent; default OFF keeps existing terminals clean. Transitively honours NO_COLOR (https://no-color.org) via hud_rainbow.is_color_enabled. Only real modes (PLAN/ACT/EVAL/AUTO) are colored — the "Ready" fallback label stays plain so tests and logs don't see it uppercased. Coloring is applied POST-fit_segments (string replace on the already-assembled line1) so the ANSI escapes don't break hud_layout.visible_len width accounting during layout. Wave 2-E — smart context bar "Ctx:{pct}%" segment → format_context_bar_segment(stdin_data), rendering e.g. "[████░░░░░░] 42%" or "[████████▓░] 92%⚠" above the warning threshold. Legacy "Ctx:" prefix is gone; the three existing tests asserting "Ctx:45%"/"Ctx:10%" have been updated to check for the new bar + percentage combination. Wave 1-D — adaptive layout Final " | ".join(segments) → fit_segments(layout_segments, terminal_width()). Low-priority segments (worktree, rate_limits, model, cache, ctx) are dropped first on narrow terminals; face_version and mode_health are sacred and always render. shorten_model_label trims the "(1M context)" suffix so Opus display names fit mid-width terminals without being dropped. test_full_telemetry gained monkeypatch.setenv("COLUMNS", "300") because its "all segments render" assertion would otherwise flake against the pytest 80-col default now that adaptive layout actually runs. Test coverage: - 14 new tests split across four classes: TestWave2ABreathingFaceIntegration (4) TestWave2EContextBarIntegration (3) TestWave2DRainbowIntegration (4) TestWave1DAdaptiveLayoutIntegration (3) - 3 existing tests updated to match the Wave 2-E "[bar] 45%" format - 1 existing test (test_full_telemetry) hardened with COLUMNS=300 Local runs: 1077 passed (full plugin test suite). Manual CLI reproductions confirmed: - Default: ◕‿◕ CB v5.6.0 | Ready 🟢 | ... | [████░░░░░░] 42% | ... - 92% context: ... | [████████▓░] 92%⚠ | ... - RAINBOW=1 PLAN: ... | \x1b[38;2;64;128;255m◇ PLAN\x1b[0m 🟢 | ... - COLUMNS=60: ◕‿◕ CB v5.6.0 | Ready 🔴 | $1.50... | 12m (sacred + cost + duration only)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JeremyDev87
added a commit
that referenced
this pull request
Apr 11, 2026
Bump the workspace version from 5.6.0 to 5.6.1 and publish the CHANGELOG entry for the HUD hotfix cycle. v5.6.1 is a hotfix closing the remaining gaps in the v5.6.0 HUD Statusbar Wave cycle: - Wave 1-B heal timestamp leak (#1487) — heal_stale_state preserved sessionStartTimestamp for "audit / forensics", but resolve_duration read the same field as a fallback when stdin lacked total_duration_ms. A manual-fix marker + stale timestamp therefore rendered enormous durations like 322h52m for brand-new sessions. The timestamp is now relocated into _healedFromSessionStartTimestamp. - Wave 3b — complete Wave 3 integration (#1488) — commit bd78195 wired Wave 2-B velocity and 2-C cache savings into format_status_line but left four sibling Wave modules as dead code: hud_buddy, hud_rainbow, hud_context_bar, and hud_layout. Their unit tests passed, but format_status_line never called them. v5.6.1 hoists all four as top-level imports and refactors format_status_line to build (name, priority, text) segments consumed by fit_segments, finally delivering the Wave 2-A breathing face, Wave 2-D rainbow coloring (opt-in via CODINGBUDDY_HUD_RAINBOW=1), Wave 2-E smart context bar, and Wave 1-D adaptive layout features that v5.6.0 advertised. Bump surface: - apps/mcp-server/package.json, src/shared/version.ts - packages/rules/package.json - packages/claude-code-plugin/package.json (+ peerDependencies), .claude-plugin/plugin.json, README.md, namespace-manifest.json - .claude-plugin/marketplace.json - yarn.lock - CHANGELOG.md (new [5.6.1] section)
7 tasks
JeremyDev87
added a commit
that referenced
this pull request
Apr 11, 2026
Bump the workspace version from 5.6.0 to 5.6.1 and publish the CHANGELOG entry for the HUD hotfix cycle. v5.6.1 is a hotfix closing the remaining gaps in the v5.6.0 HUD Statusbar Wave cycle: - Wave 1-B heal timestamp leak (#1487) — heal_stale_state preserved sessionStartTimestamp for "audit / forensics", but resolve_duration read the same field as a fallback when stdin lacked total_duration_ms. A manual-fix marker + stale timestamp therefore rendered enormous durations like 322h52m for brand-new sessions. The timestamp is now relocated into _healedFromSessionStartTimestamp. - Wave 3b — complete Wave 3 integration (#1488) — commit bd78195 wired Wave 2-B velocity and 2-C cache savings into format_status_line but left four sibling Wave modules as dead code: hud_buddy, hud_rainbow, hud_context_bar, and hud_layout. Their unit tests passed, but format_status_line never called them. v5.6.1 hoists all four as top-level imports and refactors format_status_line to build (name, priority, text) segments consumed by fit_segments, finally delivering the Wave 2-A breathing face, Wave 2-D rainbow coloring (opt-in via CODINGBUDDY_HUD_RAINBOW=1), Wave 2-E smart context bar, and Wave 1-D adaptive layout features that v5.6.0 advertised. Bump surface: - apps/mcp-server/package.json, src/shared/version.ts - packages/rules/package.json - packages/claude-code-plugin/package.json (+ peerDependencies), .claude-plugin/plugin.json, README.md, namespace-manifest.json - .claude-plugin/marketplace.json - yarn.lock - CHANGELOG.md (new [5.6.1] section)
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.
Summary
Commit
bd78195(Wave 3) wired Wave 2-B velocity and 2-C cache savings intoformat_status_linebut left four sibling Wave modules as dead code:hud_buddy,hud_rainbow,hud_context_bar, andhud_layout. Their unit tests passed, butformat_status_linenever called them — v5.6.0 shipped with half of the Wave features inert.This PR closes the gap by hoisting all four modules as top-level imports (matching the existing velocity/cache_savings pattern) and refactoring
format_status_lineto build(name, priority, text)segments consumed byfit_segments.Wave 2-A — breathing buddy face
BUDDY_FACEconstant →select_face_from_state(hud_state). Face now reflectsphase/blockerCount:ready/Noneplanning/evaluatingexecuting/cyclingblockerCount > 0lastEvent=victoryWave 2-D — mode rainbow ANSI coloring (opt-in)
Gated on
CODINGBUDDY_HUD_RAINBOW=1— Claude Code statusLine ANSI support is environment-dependent so default OFF keeps existing terminals clean. Transitively honoursNO_COLORstandard. Only real modes (PLAN/ACT/EVAL/AUTO) are colored — the "Ready" fallback stays plain.Coloring is applied post-
fit_segmentsvia string replace on the assembled line1, so ANSI escapes don't breakvisible_lenwidth accounting during layout.Wave 2-E — smart context bar
Ctx:{pct}%→format_context_bar_segment(stdin_data):[████░░░░░░] 42%[████████▓░] 92%⚠(warning threshold)The three existing tests asserting
"Ctx:45%"/"Ctx:10%"are updated to match the new[bar] NN%combination.Wave 1-D — adaptive layout
Final
" | ".join(segments)→fit_segments(layout_segments, terminal_width()). Low-priority segments drop first on narrow terminals;face_versionandmode_healthare sacred.shorten_model_labeltrims"(1M context)"so Opus fits mid-width terminals.test_full_telemetrygainedmonkeypatch.setenv("COLUMNS", "300")because its "all segments render" assertion would otherwise flake against the pytest 80-col default.Test plan
TestWave2ABreathingFaceIntegration(4)TestWave2EContextBarIntegration(3)TestWave2DRainbowIntegration(4)TestWave1DAdaptiveLayoutIntegration(3)[bar] NN%formattest_full_telemetry) hardened withCOLUMNS=300◕‿◕ CB v5.6.0 | Ready 🟢 | ... | [████░░░░░░] 42% | ...... | [████████▓░] 92%⚠ | ...RAINBOW=1PLAN:... | \x1b[38;2;64;128;255m◇ PLAN\x1b[0m 🟢 | ...COLUMNS=60:◕‿◕ CB v5.6.0 | Ready 🔴 | $1.50... | 12m(sacred + cost + duration only)Relates to
Companion PR: fix/hud-heal-timestamp-leak (Wave 1-B heal timestamp leak).
Target: v5.6.1 hotfix release.