Description
The TUI Status tab "Live Preview" does not match what the user actually sees in their Claude Code session footer. Two distinct sync issues:
1. Stdin-dependent segments show fake placeholder values
The TUI preview renders hardcoded placeholders for segments that depend on Claude Code's stdin pipe:
context_bar: shows 50% — real session shows 71%
cost: shows $3.45 — real session shows $22.58
duration: shows 1h23m — real session shows 4h03m
daemon_health: shows daemon: ok — may not match
These segments get their data from Claude Code's JSON piped to hookwise status-line via stdin on each render tick. The TUI has no access to this pipe — it only reads the disk cache.
2. Layout mismatch (5-line preview vs 2-line real)
The TUI shows the new 5-line layout with project, calendar, insights, trend, and mantra lines. But the actual Claude Code session may show fewer lines if running an older hookwise version or config.
Root Cause
tui/hookwise_tui/tabs/status.py uses STDIN_PLACEHOLDERS (hardcoded fake values) for context_bar, cost, duration, daemon_health. These values never update because the TUI can't intercept Claude Code's stdin pipe.
Expected Behavior
The TUI preview should either:
- Show actual session data by reading the last-rendered status line output (e.g., cache the output of each
hookwise status-line invocation to a file)
- Clearly mark stdin segments as "live only" — don't show fake numbers that mislead the user into thinking the preview matches reality
- Show the actual layout the user would see based on their installed hookwise version
Screenshots
| TUI Preview |
Actual Session |
50% | $3.45 | 1h23m |
71% | $22.58 | 4h03m |
| 5 lines (project, calendar, insights...) |
2 lines only |
Proposed Fix
Option A (preferred): Have the hookwise status-line command write its last output to a cache file (e.g., ~/.hookwise/cache/last-status-output.txt). The TUI reads this file for the preview instead of re-rendering from cache.
Option B: Replace placeholder values with [live] or -- indicators and add a note "These segments update in real-time during Claude Code sessions".
Description
The TUI Status tab "Live Preview" does not match what the user actually sees in their Claude Code session footer. Two distinct sync issues:
1. Stdin-dependent segments show fake placeholder values
The TUI preview renders hardcoded placeholders for segments that depend on Claude Code's stdin pipe:
context_bar: shows50%— real session shows71%cost: shows$3.45— real session shows$22.58duration: shows1h23m— real session shows4h03mdaemon_health: showsdaemon: ok— may not matchThese segments get their data from Claude Code's JSON piped to
hookwise status-linevia stdin on each render tick. The TUI has no access to this pipe — it only reads the disk cache.2. Layout mismatch (5-line preview vs 2-line real)
The TUI shows the new 5-line layout with project, calendar, insights, trend, and mantra lines. But the actual Claude Code session may show fewer lines if running an older hookwise version or config.
Root Cause
tui/hookwise_tui/tabs/status.pyusesSTDIN_PLACEHOLDERS(hardcoded fake values) forcontext_bar,cost,duration,daemon_health. These values never update because the TUI can't intercept Claude Code's stdin pipe.Expected Behavior
The TUI preview should either:
hookwise status-lineinvocation to a file)Screenshots
50% | $3.45 | 1h23m71% | $22.58 | 4h03mProposed Fix
Option A (preferred): Have the
hookwise status-linecommand write its last output to a cache file (e.g.,~/.hookwise/cache/last-status-output.txt). The TUI reads this file for the preview instead of re-rendering from cache.Option B: Replace placeholder values with
[live]or--indicators and add a note "These segments update in real-time during Claude Code sessions".