feat: configurable HUD replacing bash statusline#155
Merged
Conversation
added 3 commits
March 21, 2026 03:45
Replace scripts/statusline.sh with a configurable TypeScript HUD system that supports 14 components across 4 presets (Minimal, Classic, Standard, Full) with smart multi-line layout. Core infrastructure: - src/cli/hud/ — types, config, stdin, colors, git, transcript, cache, usage-api, render, and index (entry point with 2s timeout) - 14 component files in src/cli/hud/components/ - scripts/hud.sh shell wrapper + scripts/build-hud.js distribution CLI integration: - devflow hud --configure/--preset/--status/--enable/--disable - Init phase: HUD preset picker between memory and security - Uninstall: HUD statusLine cleanup - List: shows HUD preset in features Settings: - Template updated: statusline.sh -> hud.sh - addHudStatusLine/removeHudStatusLine/hasHudStatusLine pattern - Automatic upgrade from legacy statusline.sh - Conflict detection for non-DevFlow statusLine Tests: 68 new tests across 3 test files (341 total, all passing)
…naries, reduce duplication
- Consolidate readCache/readCacheStale into shared readCacheEntry helper
- Replace nested ternaries with if/else chains in context-usage and usage-quota
- Remove dead `=== undefined` check in usage-quota (nullish coalescing never produces undefined)
- Simplify agent-activity loop by extracting icon/colorFn before push
- Merge duplicate HUD settings.json branches in init.ts (add/remove unified)
- Consolidate three separate settings.json writes into single pass in uninstall.ts
- Reuse existing settingsPath variable instead of redeclaring hudSettingsPath
- Use const for sessionStartTime (conditional expression instead of let + if)
- Replace dynamic import('node:path') with static import in index.ts
- Use homedir() instead of '~' literal for reliable home directory fallback
- Tighten isDevFlowStatusLine matching to avoid false positives on partial substrings
- Reduce API_TIMEOUT from 15s to 1.5s to fit within 2s overall HUD timeout
- Remove unused GitStatus import from hud-render.test.ts
… layer, update docs
c749439 to
af807c3
Compare
Replace 4-preset system (minimal/classic/standard/full) with a single
component list. HUD is now on or off — no preset picker in init flow.
- Collapse PRESETS into HUD_COMPONENTS (14 components)
- Simplify HudConfig to { enabled, detail }
- Remove --configure, --preset, --hud <preset> flags
- Init flow: p.confirm("Enable HUD?") instead of 5-option selector
- --hud-only installs directly without preset question
- --disable keeps statusLine registered (version badge still renders)
- Version badge always included so upgrade notifications show even
when HUD is disabled
- Remove agent-activity, speed, tool-activity components
- Add release-info, session-cost, worktree-count components
- Manifest hud field: string|false → boolean
af807c3 to
578a08a
Compare
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
statusline.shwith a configurable TypeScript HUD--hud-onlyflag for standalone HUD install without pluginsTest plan
npm run build— clean compilenpm test— 364/364 tests passingdevflow hud --status— shows enabled + 14 componentsdevflow hud --enable/--disable— toggle works