Files
kandev/docs/plans/slash-command-composer/task-02-unit-tests.md
T
2026-08-24 11:09:03 +00:00

1.4 KiB

id, title, status, wave, depends_on, plan, spec
id title status wave depends_on plan spec
02-unit-tests Unit tests for slash command insertion done 2
01-frontend-selection
plan.md ../../specs/ui/requirements/slash-command-composer.md

Task 02: Unit Tests for Slash Command Insertion

Acceptance

  • A unit test covers slash command insertion text normalization for normal command names, labels that already include /, and command names with punctuation such as tool:read.
  • Existing submit-key tests still prove plain Enter defers while a suggestion menu is open.
  • Chat input tests are updated for the removed auto-submit callback props.

Verification

cd apps
pnpm --filter @kandev/web test -- components/task/chat/slash-command-types.test.ts components/task/chat/use-tiptap-editor.test.ts components/task/chat/use-chat-input-container.test.ts components/task/chat/chat-input-body.test.tsx

Files likely touched

  • apps/web/components/task/chat/slash-command-types.test.ts
  • apps/web/components/task/chat/use-tiptap-editor.test.ts
  • apps/web/components/task/chat/use-chat-input-container.test.ts
  • apps/web/components/task/chat/chat-input-body.test.tsx

Dependencies

Task 01.

Inputs

  • formatSlashCommandInsertion or equivalent helper from Task 01.
  • Spec scenarios covering Enter selection and no auto-submit.

Output contract

Report tests added or updated, focused test command output, and any behavior that remains covered only by E2E.