Skip to content

tui: improve tmux experience and simplify keyboard enhancements#2017

Open
dgageot wants to merge 1 commit intodocker:mainfrom
dgageot:board/nicer-tmux-462c76e9
Open

tui: improve tmux experience and simplify keyboard enhancements#2017
dgageot wants to merge 1 commit intodocker:mainfrom
dgageot:board/nicer-tmux-462c76e9

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Mar 9, 2026

Enable ReportFocus and KeyboardEnhancements.ReportEventTypes in the fullscreen view so that tmux pane focus events and Kitty keyboard protocol features (shift+enter, key disambiguation) are requested from supporting terminals.

Simplify keyboard enhancement tracking:

  • Remove redundant keyboardEnhancementsSupported bool field; derive it via hasKeyboardEnhancements() from the cached message instead.
  • Stop forwarding KeyboardEnhancementsMsg to chatPage, which has no handler for it. Only the editor uses it for keybinding config.

Enable ReportFocus and KeyboardEnhancements.ReportEventTypes in the
fullscreen view so that tmux pane focus events and Kitty keyboard
protocol features (shift+enter, key disambiguation) are requested
from supporting terminals.

Simplify keyboard enhancement tracking:
- Remove redundant keyboardEnhancementsSupported bool field; derive
  it via hasKeyboardEnhancements() from the cached message instead.
- Stop forwarding KeyboardEnhancementsMsg to chatPage, which has no
  handler for it. Only the editor uses it for keybinding config.

Assisted-By: docker-agent
@dgageot dgageot requested a review from a team as a code owner March 9, 2026 19:43
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Assessment: 🟢 APPROVE

This PR cleanly improves tmux/Kitty terminal support by enabling ReportFocus and KeyboardEnhancements.ReportEventTypes in fullscreen mode. The refactoring to remove the redundant keyboardEnhancementsSupported boolean field in favor of the hasKeyboardEnhancements() method is sound—it correctly derives the state from the cached message pointer and flags.

The removal of KeyboardEnhancementsMsg forwarding to chatPage is intentional and correct, since only the editor component uses keyboard enhancements for keybinding configuration.

No bugs found. All message handling, state management, and control flow changes follow correct patterns without introducing nil pointer dereferences, race conditions, or logic errors.

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.

1 participant