Align dialog-command test keybind typing #6847

Closed
opened 2026-02-16 18:05:25 -05:00 by yindo · 1 comment
Owner

Originally created by @adolago on GitHub (Jan 19, 2026).

Originally assigned to: @rekram1-node on GitHub.

Problem

packages/agent-core/test/cli/tui/dialog-command.test.ts defines CommandOption.keybind as a generic string, which no longer matches the production type union. Typecheck fails.

Proposed fix

  • Import the CommandOption type from dialog-command in the test, or
  • Update the local test type to use keyof KeybindsConfig | "input_dictation_toggle" | "model_fallback_toggle".

Acceptance criteria

  • Typecheck passes for dialog-command.test.ts.
  • The test still validates option filtering and footer rendering.

Test plan

  • bun test test/cli/tui/dialog-command.test.ts
  • bun run typecheck
Originally created by @adolago on GitHub (Jan 19, 2026). Originally assigned to: @rekram1-node on GitHub. ## Problem `packages/agent-core/test/cli/tui/dialog-command.test.ts` defines `CommandOption.keybind` as a generic string, which no longer matches the production type union. Typecheck fails. ## Proposed fix - Import the `CommandOption` type from `dialog-command` in the test, or - Update the local test type to use `keyof KeybindsConfig | "input_dictation_toggle" | "model_fallback_toggle"`. ## Acceptance criteria - Typecheck passes for `dialog-command.test.ts`. - The test still validates option filtering and footer rendering. ## Test plan - `bun test test/cli/tui/dialog-command.test.ts` - `bun run typecheck`
yindo closed this issue 2026-02-16 18:05:25 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 19, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9466: TUI command dialog should ignore undefined options - Related issue addressing similar crash scenarios in dialog-command.tsx and suggests exporting a createCommandDialog factory for testing, which is relevant to this test typing issue.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 19, 2026): This issue might be a duplicate of existing issues. Please check: - #9466: TUI command dialog should ignore undefined options - Related issue addressing similar crash scenarios in dialog-command.tsx and suggests exporting a createCommandDialog factory for testing, which is relevant to this test typing issue. Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6847