Skip to content

fix(commands): construct complete synthetic key events - #774

Open
nightcityblade wants to merge 1 commit into
modem-dev:mainfrom
nightcityblade:fix/issue-767
Open

fix(commands): construct complete synthetic key events#774
nightcityblade wants to merge 1 commit into
modem-dev:mainfrom
nightcityblade:fix/issue-767

Conversation

@nightcityblade

Copy link
Copy Markdown

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 KeyEvent with the existing chord fields plus explicit press / raw synthetic 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.md
  • bunx oxlint src/lib/commandKeys.ts src/lib/commandKeys.test.ts --deny-warnings
  • bun run typecheck

Tested on macOS. No visual evidence is applicable because this changes the internal event contract without altering rendering.

Fixes #767

@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Modem Team on Vercel.

A member of the Team first needs to authorize it.

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.

Construct complete OpenTUI KeyEvent instances for synthetic command events

1 participant