Skip to content

fix(tui): restore Playbook menu after keyboard selection - #1289

Merged
edwin-zvs merged 1 commit into
mainfrom
fix-playbook-selection-menu-regression
Aug 19, 2026
Merged

fix(tui): restore Playbook menu after keyboard selection#1289
edwin-zvs merged 1 commit into
mainfrom
fix-playbook-selection-menu-regression

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Summary\n\n- preserve the pending Playbook selection menu between a zero-width C-Space mark and the movement key that makes the selection non-empty\n- add a TestBackend regression through top-level terminal key ingress and rendered frames\n- interleave real renders through the existing mouse Down, Drag, and Up regression\n- retain Tab focus, two-layer Escape, and the no-ghost rule when selection_menu is absent\n\n## Root cause\n\nThe selection-menu key handler runs before editor movement. C-Space created a zero-width mark with a pending menu, but the following movement key saw no non-empty range and cleared the menu before extending the mark. The renderer then correctly honored selection_menu == None, leaving visibly selected text with no action menu.\n\nMouse drag does not pass through that intermediate key-handler transition, so the archived mouse test remained green.\n\n## Web parity\n\nThe web Playbook derives selection from the browser DOM and only shows its menu for a non-collapsed DOM range. It has no analogous pending zero-width mark/menu state, so no web change is needed.\n\n## Verification\n\n- cargo test -p construct-cli --bin construct playbook: 356 passed\n- cargo test -p construct-e2e --test playbook_view: 8 passed\n- cargo build: passed\n- git diff --check: passed\n- full CLI suite: 1,442 passed; only the known environment-sensitive color::tests::truecolor_backend_still_emits_rgb baseline failed, matching PRs #1285 and #1286\n\nNo spec update: spec 0196 already requires a passive menu for a non-empty selection, Tab focus, two-stage Escape, and no ghost menu after dismissal.\n\nReviewer media is omitted because the frame-level regressions directly verify the transient passive, focused, dismissed, and mouse-drag frames.

@edwin-zvs
edwin-zvs merged commit 3749526 into main Aug 19, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the fix-playbook-selection-menu-regression branch August 19, 2026 06:02
@edwin-zvs edwin-zvs mentioned this pull request Aug 19, 2026
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