fix(tui): add HUD bridge polling fallback and unify state path (#1198, #1199)#1202
Merged
Conversation
…#1199) When fs.watch emits an error, HudFileBridge now falls back to polling via setInterval + fs.stat instead of silently ignoring the failure. Add CLAUDE_PLUGIN_DATA to HUD state dir resolution order so the TUI reads from the same directory the plugin writes to: 1. CODINGBUDDY_HUD_STATE_DIR (explicit override) 2. CLAUDE_PLUGIN_DATA (plugin convention) 3. ~/.codingbuddy (default) Closes #1198 Closes #1199
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JeremyDev87
commented
Apr 3, 2026
JeremyDev87
left a comment
Owner
Author
There was a problem hiding this comment.
✅ Conductor Review — APPROVE
CI: 25/25 ALL PASS
Review: APPROVE — 0 issues
Plan Verification:
- #1198: HUD file bridge polling fallback on fs.watch error
- #1198: Test for polling fallback behavior
- #1199: run-tui.ts resolveHudStateDir() respects CLAUDE_PLUGIN_DATA
- #1199: Priority order: CODINGBUDDY_HUD_STATE_DIR > CLAUDE_PLUGIN_DATA > ~/.codingbuddy
- #1199: Tests for all 3 resolution paths + priority
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
fs.watchemits an error,HudFileBridgenow closes the watcher and falls back to polling viasetInterval+fs.stat(default 1000ms). Logs a warning to stderr.CLAUDE_PLUGIN_DATAto the HUD state directory resolution order so the TUI reads from the same path the plugin writes to:CODINGBUDDY_HUD_STATE_DIR>CLAUDE_PLUGIN_DATA>~/.codingbuddy.Closes #1198
Closes #1199
Test plan
hud-file-bridge.spec.ts— new test verifies polling fallback triggers on watcher error (7/7 pass)run-tui.spec.ts— 4 new tests forresolveHudStateDirpriority order (12/12 pass)