Skip to content

Conversation

@newhook
Copy link
Owner

@newhook newhook commented Jan 21, 2026

Summary

This PR completes the removal of the work overlay from the TUI interface, consolidating its functionality into the existing work tabs bar and work detail panel. This simplification improves the user experience by reducing the number of view modes and making work management more intuitive.

Changes

🗑️ Removed Components

  • Deleted tui_panel_work_overlay.go (617 lines removed)
    • Removed the entire WorkOverlayPanel component and its associated logic
    • Eliminated the ViewWorkOverlay view mode from the TUI
    • Removed the '0' hotkey that previously opened the overlay

✨ Enhanced Work Detail Panel

  • Added work overview information to the detail panel:
    • Creation timestamp display in the header
    • Progress percentage shown prominently
    • Warning badges for issues requiring attention
    • Comprehensive summary section with all relevant work metadata
  • Implemented work destruction capability directly in the detail panel:
    • Added 'd' hotkey handler with confirmation dialog
    • Validation prevents destruction of in-progress works
    • Same safety checks as the original overlay implementation

🔄 Refactored Work Selection

  • Migrated to tab-based selection exclusively:
    • Work selection now handled through work tabs bar (1-9 keys and mouse clicks)
    • Removed redundant overlay-based selection logic
    • Improved Tab/Shift+Tab cycling between panels (tabs → details → issues)

📚 Documentation and Testing

  • Added comprehensive test plan (tui_test_plan.md)
    • Documents all tested scenarios and edge cases
    • Validates keyboard navigation, mouse interactions, and state management
  • Updated help documentation:
    • Added 1-9 keys for work selection to help panel
    • Removed all references to the work overlay
    • Updated function names to better reflect their purpose

🧹 Code Cleanup

  • Removed all overlay-related state variables and references across:
    • tui_plan.go (simplified state management, ~125 lines removed)
    • tui_panel_status.go (removed overlay references)
    • tui_plan_render.go (simplified rendering logic)
    • Other supporting files

Resolved Issues

  • ac-cr3k: We no longer need the work overlay
    • ac-cr3k.1: Remove work overlay panel and associated view mode
    • ac-cr3k.2: Add work destruction capability to work detail panel
    • ac-cr3k.3: Migrate work selection to use work tabs exclusively
    • ac-cr3k.4: Add work overview information to work detail panel
    • ac-cr3k.5: Update hotkey navigation and documentation
    • ac-cr3k.6: Test and validate TUI workflow after overlay removal

Testing Performed

Comprehensive testing was completed (documented in tui_test_plan.md), including:

  • ✅ Work selection via number keys (1-9) and mouse clicks
  • ✅ Work destruction with confirmation dialog and validation
  • ✅ Tab/Shift+Tab navigation between panels
  • ✅ Panel focus states and visual indicators
  • ✅ Edge cases (empty works, multiple works, panel resizing)
  • ✅ Help panel updates and hotkey documentation

Breaking Changes

  • Removed '0' hotkey: Previously opened the work overlay, now has no function
  • Changed navigation flow: Work selection is now exclusively through the tabs bar

Review Notes

The code has undergone a review cycle with no issues identified. The implementation successfully consolidates all overlay functionality while simplifying the codebase by removing ~387 net lines of code.

Screenshots/Demo

The TUI now provides a cleaner, more intuitive interface:

  • Work tabs at the top (1-9 for quick selection)
  • Enhanced work detail panel with all necessary information
  • Simplified navigation without modal overlays

This PR represents a significant simplification of the TUI architecture while preserving all essential functionality.

newhook and others added 6 commits January 21, 2026 17:21
- Delete tui_panel_work_overlay.go file
- Remove PanelWorkOverlay and ViewWorkOverlay enums
- Remove StatusBarContextWorkOverlay enum
- Remove workOverlay field from planModel
- Remove '0' hotkey that opened the overlay
- Update work selection to use 1-9 keys with work tabs
- Add findWorkByID helper to replace overlay methods
- Track work tiles in planModel for tabs bar
- Rename calculateWorkOverlayHeight to calculateWorkPanelHeight
- Update all comments and messages to remove overlay references
- Add 1-9 keys documentation to help text

Work selection now handled through work tabs (1-9 keys) and work details panel.
- Added creation time display to work header section showing age (Xm/Xh/Xd ago)
- Added prominent progress percentage display with color-coded styling
- Added warning badges for unassigned beads and pending PR feedback
- Created comprehensive Work Overview section when root issue is selected
- Enhanced root issue details with work statistics and task breakdown
- Preserved all metadata from removed overlay in accessible format
…anel

- Added WorkDetailActionDestroy to the action enum
- Added 'd' hotkey handler to WorkDetailsPanel.Update()
- Implemented confirmation dialog for work destruction using ViewDestroyConfirm
- Added validation to prevent destroying work that's currently processing
- Added '[d]estroy' button to status bar in work detail context
- Updated button detection for click support
- Added new PanelWorkTabs panel constant for work tabs bar focus state
- Updated Tab/Shift+Tab to cycle through three panels: work tabs, work details, and issues
- Added keyboard navigation when work tabs panel is focused (arrow keys to select different works, enter to jump to details)
- Added visual focus indicator on work tabs bar when it's the active panel
- Updated mouse click handling to set focus to work tabs when clicking on the bar
- Work selection via number keys (1-9) continues to work from all panels
- Mouse support for tab selection continues to work correctly

The work tabs bar now handles all work selection logic exclusively, with proper focus management and three-panel navigation support.
… removal

- Verified work selection via number keys (1-9)
- Verified mouse click selection on tabs
- Verified work destruction from detail panel
- Verified Tab/Shift+Tab navigation between panels
- Verified all work metadata displays correctly
- Verified edge cases (no works, single work, many works)
- Confirmed no orphaned code or dead references
- Created comprehensive test plan documentation

All tests pass - TUI fully functional without work overlay
- Fix work details panel height mismatch between left and right panels
  - Left panel uses Height(contentHeight - 1)
  - Right panel uses Height(contentHeight - 3)
  - Compensates for lipgloss rendering differences with different widths
- Add scrolling capability to work details right panel
  - Track scroll offset and total lines
  - Add keyboard controls (j/k) for scrolling when focused
  - Add scroll indicators showing position
- Add focus management for work details panels
  - Tab/Shift+Tab cycles between left and right panels
  - Visual focus indicator with orange border

The height adjustments ensure both panels render at the same height
despite lipgloss adding different amounts of padding based on panel width.

Co-Authored-By: Claude Opus 4.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants