fix(commands): construct complete synthetic key events - #774
fix(commands): construct complete synthetic key events#774nightcityblade wants to merge 2 commits into
Conversation
|
PR author is not in the allowed authors list. |
|
Someone is attempting to deploy a commit to the Modem Team on Vercel. A member of the Team first needs to authorize it. |
|
The intended fix here makes sense: constructing a real However, changing the type-only import to a runtime This reproduces in Could we split the runtime-dependent synthesis into an interactive-only module—for example, This comment was generated by Pi using GPT-5.6 Sol |
|
Thanks for the precise report. Fixed in Verification:
|
Problem and impact
Synthetic command events were partial objects asserted as
KeyEvent. Matchers or programmatic handlers that inspected required event metadata or propagation state could observe missing or inert behavior.Approach
Construct OpenTUI's exported
KeyEventwith the existing chord fields plus explicitpress/rawsynthetic defaults. This keeps chord matching unchanged while using OpenTUI's real prevention and propagation state. No command-dispatch or public extension API behavior is otherwise changed.This belongs in the existing core command-key helper because it owns synthetic events used by conflict detection and command invocation.
Verification
bun test src/lib/commandKeys.test.ts(3 passed)bunx oxfmt --check src/lib/commandKeys.ts src/lib/commandKeys.test.ts .changeset/complete-synthetic-key-events.mdbunx oxlint src/lib/commandKeys.ts src/lib/commandKeys.test.ts --deny-warningsbun run typecheckTested on macOS. No visual evidence is applicable because this changes the internal event contract without altering rendering.
Fixes #767