Skip to content

Fix TUI modal input precedence over Playbook - #1292

Merged
edwin-zvs merged 2 commits into
mainfrom
fix-playbook-modal-input-routing
Aug 19, 2026
Merged

Fix TUI modal input precedence over Playbook#1292
edwin-zvs merged 2 commits into
mainfrom
fix-playbook-modal-input-routing

Conversation

@edwin-zvs

@edwin-zvs edwin-zvs commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • record the identity of the topmost rendered modal alongside its hit-test bounds
  • route Remote Control keyboard and mouse input before a covered rolled-down Playbook
  • give Help, Tasks, session picker, and Configure consistent pointer precedence while preserving each modal's established dismissal and reroute semantics
  • add rendered-frame unit coverage, a real PTY keyboard/mouse regression, and a focused modal-precedence design spec

Root cause

The layout snapshot stored only one modal rectangle. Keyboard routing checked the focused Playbook before Remote Control, mouse routing called the Playbook editor before consulting the visible dialog, and generic click handling inferred rectangle ownership from whether a Playbook happened to remain mounted. A Remote Control dialog could therefore paint above the Playbook while input still mutated the editor underneath.

Testing

  • env -u NO_COLOR cargo test -p construct-cli
  • focused rendered-frame modal routing tests for Remote Control, Help, session picker, Configure reroute, and operator-view behavior
  • env -u NO_COLOR cargo test -p construct-e2e
  • cargo build
  • git diff --check

The repository e2e package is named construct-e2e; timing and network dependent tests remain ignored by their existing annotations.

@edwin-zvs
edwin-zvs merged commit eac7da6 into main Aug 19, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the fix-playbook-modal-input-routing branch August 19, 2026 16:47
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