v0.10.3 - Monitor TUI Fixes (2025-12-28)¶
What Changed?¶
This release fixes critical bugs in the monitor.py TUI application that occurred when running in pipe mode.
The TUI was receiving spurious keyboard events from stdin, causing premature termination without user input.
Additionally, keyboard bindings now display correctly in the Footer widget for both watch and interactive modes.
What's New¶
Bug Fix: Spurious Action Triggers in Pipe Mode¶
What was happening: When piping data into monitor.py (e.g., kazunoko generate | monitor.py), the TUI was receiving garbage data from stdin interpreted as keyboard keypresses.
This triggered action methods (quit, reset_stats, clear_screen, update_display) spontaneously, causing the application to terminate after ~3 seconds without any user input.
How it's fixed: Keyboard bindings are now disabled in pipe mode, preventing Textual from attempting to read keyboard input when stdin is occupied by piped data.
Users can still terminate the TUI with Ctrl+C (SIGINT), which is handled by Textual's event loop.
Impact: Piped mode now processes all events without interruption until the user explicitly terminates with Ctrl+C.
Bug Fix: Footer Keyboard Bindings Display¶
What was happening: The Footer widget in watch and interactive modes was not displaying the available keyboard commands (q: Quit, r: Reset, c: Clear, u: Update).
How it's fixed: BINDINGS are now properly configured as a class attribute so Textual's Footer can read them during initialization.
The pipe mode override is handled in __init__ before calling super().__init__().
Impact: Users can now see available keyboard shortcuts in the Footer for watch and interactive modes.
Installation¶
Quick Start¶
# Get the release
git checkout v0.10.3
# Setup
uv sync
# Run monitor in pipe mode
uv run kazunoko generate random -c 10 | uv run examples/monitor.py
# Run monitor in watch mode
uv run examples/monitor.py --watch /tmp/detector-data
What's Different from the Last Version?¶
✅ Added¶
- Path normalization for symlink consistency in file monitoring
🔧 Changed¶
- Keyboard bindings now properly display in Footer widget (watch and interactive modes)
- Pipe mode disables keyboard input to prevent stdin conflicts
🐛 Fixed¶
- Critical: Fixed spurious action triggers in pipe mode (garbage stdin data interpretation)
- Fixed Footer widget not displaying available keyboard commands
- Fixed file position tracking with
Path.resolve()normalization
Is It Safe to Upgrade?¶
Backward Compatible: Yes
- No breaking changes to the library API
- Monitor TUI improvements are internal to
examples/monitor.py - Existing workflows (pipe mode, watch mode, interactive mode) all continue to work
Tests Passed¶
- ✅ Builds without errors
- ✅ Pipe mode processes all 100 events without spurious actions
- ✅ Watch mode keyboard bindings display in Footer (q, r, c, u)
- ✅ All keyboard operations work correctly (quit, reset_stats, clear_screen, update_display)
- ✅ Ctrl+C properly terminates the TUI in pipe mode
Release Details¶
- Date: 2025-12-28
- Version: v0.10.3
- Files Changed: 1 (
examples/monitor.py) - Commits:
- a4c13b2: fix(monitor): disable keyboard bindings in pipe mode to prevent spurious actions
- de52f58: fix(monitor): ensure keyboard bindings display in Footer for watch/interactive modes
- fad282a: fix(monitor): normalize file paths to handle symlinks consistently
- c1e0873: fix(monitor): implement real-time TUI updates using Textual reactive attributes
Known Issues¶
- Watch mode real-time updates may have display lag (not yet optimized)
Next Steps¶
- Investigate and optimize real-time update rendering in watch mode
- Consider event batching for better TUI performance with high event rates