• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

karellen / textual-vision / 26700187739

31 May 2026 01:39AM UTC coverage: 76.683% (+4.4%) from 72.316%
26700187739

push

github

web-flow
Architectural refactor and bug fixes: dispatch, resize, focus, new controls (#1)

## Summary

### Architecture
- **Hotkey dispatch**: `tv_get_hotkey`/`tv_handle_hotkey` on
`TVViewMixin`, implemented in `Label` and `Button`, hotkey scan phase in
`Group._three_phase_dispatch`. Fixes broken Alt+hotkey dispatch that
only worked when the target widget was focused.
- **Resize unification**: Frame posts `ResizeStart` (with `left` flag)
instead of capturing mouse. Window is the sole resize state machine via
`_start_resize()`, handling both `Frame.ResizeStart` and
`ScrollBar.CornerPressed`.
- **Window/DeskTop decoupling**: `_raise_self()` → `tv_select_self()`,
duck-typing in `close()` replaces `isinstance(parent, DeskTop)`.
- **Flag-driven Program dispatch**: `Program.on_key` scans screen
children by `PRE_PROCESS`/`POST_PROCESS` flags instead of hardcoding
`_menu_bar`/`_status_line`.
- **MenuBar focus delegation**: `MenuBox` gets `can_focus=True` and
Textual focus after mounting, removing manual key forwarding.
- **ComboBox as Group**: `ComboBox` extends `Group` for proper TV focus
chain integration.

### New Controls
- **ListViewer**: abstract scrollable list — keyboard/mouse nav,
`scroll_target` auto-linkage with `ScrollBar`, multi-column support
- **ListBox**: concrete `ListViewer` backed by a Python list
- **ComboBox**: `InputLine` + dropdown popup, editable and read-only
modes, `_DropDownPopup` as floating `ListBox` on menus layer

### Bug Fixes
- **ListBox scroll broken**: `ScrollBar.scroll_target` provides direct
notification to `ListViewer`, replacing broken manual message wiring
- **All InputLine cursors blink simultaneously**:
`Group._is_focus_chain()` ensures `FOCUSED` only propagates through
Groups in the active focus chain; `on_tv_focus`/`on_tv_blur` propagate
state changes
- **Bottom-left corner resize not working**:
`Frame._hit_resize_corner()` now returns `"left"`/`"right"`/`False`;
`ResizeStart` carries `left` flag forwarded to
`_start_resize(... (continued)

557 of 882 branches covered (63.15%)

Branch coverage included in aggregate %.

643 of 828 new or added lines in 16 files covered. (77.66%)

6 existing lines in 3 files now uncovered.

2222 of 2742 relevant lines covered (81.04%)

4.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

73.99
/src/main/python/textual_vision/scroll_bar.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc