1.4 KiB
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 |
|
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 astool: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.tsapps/web/components/task/chat/use-tiptap-editor.test.tsapps/web/components/task/chat/use-chat-input-container.test.tsapps/web/components/task/chat/chat-input-body.test.tsx
Dependencies
Task 01.
Inputs
formatSlashCommandInsertionor 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.