3.7 KiB
3.7 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | |
|---|---|---|---|---|---|---|---|
| 03-send-now-queue-controls | Add Send Now queue controls | done | 3 |
|
plan.md | ../../specs/ui/requirements/message-queue-send-now.md |
Task 03: Add Send Now queue controls
Intent
Expose the new action through the shared queue API/hook and add accessible row and header controls that work through hover/focus on desktop and direct touch on coarse-pointer layouts.
Acceptance
- The API and hook send the exact
entry/allpayloads, map stable errors, and refetch authoritative queue state after every result. - Every row exposes hover/focus Send Now on fine pointers and an always- visible 44px touch control on coarse pointers; header Send Now appears immediately before Clear all and sends the whole snapshot.
- Duplicate actions are disabled during local loading or authoritative cancellation, all new copy is localized, and the narrow header wraps without adding another scroll owner or horizontal overflow.
Files likely touched
apps/web/lib/api/domains/queue-api.tsapps/web/lib/api/domains/queue-api.test.tsapps/web/hooks/domains/session/use-queue.tsapps/web/hooks/domains/session/use-queue.test.tsapps/web/components/task/chat/queued-ghost-list.tsxapps/web/components/task/chat/queued-ghost-list.test.tsxapps/web/components/task/chat/queued-ghost-message.tsxapps/web/components/task/chat/queued-ghost-message.test.tsxapps/web/src/locales/en/chat.json- pseudo-locale catalog output if regenerated by the repository script
Dependencies
- Task 02 WebSocket request, response, and error contract.
Parallelism
Sequential. It owns the shared frontend surface required by both E2E scenarios.
Inputs
- Spec: What, API Surface, Responsive and Mobile Behavior.
- Plan: Frontend and Responsive and Mobile Contract.
- Nearest mobile exemplar:
apps/web/e2e/tests/chat/mobile-message-queue-management.spec.ts. - Existing patterns:
drainQueuedMessage,useQueuePanelHandlers,RowActions, and sessioncancellation_pendingselectors.
Verification
Bootstrap once if this worktree has no dependencies:
cd apps && pnpm install --frozen-lockfile
Then run:
cd apps && pnpm --filter @kandev/web test -- --run lib/api/domains/queue-api.test.ts hooks/domains/session/use-queue.test.ts components/task/chat/queued-ghost-message.test.tsx components/task/chat/queued-ghost-list.test.tsx
cd apps/web && pnpm run typecheck
cd apps && pnpm --filter @kandev/web run lint
cd apps && pnpm --filter @kandev/web run i18n:ratchet && pnpm --filter @kandev/web run i18n:check
Output contract
Report files changed, desktop/mobile interaction details, RED and GREEN test
commands/results, typecheck/lint/i18n outcomes, rendered verification evidence
or its exact blocker, risks, and synchronize this task plus plan.md
status/results.
Results
- Added typed
sendQueuedNowAPI errors, exact entry/all payloads, authoritative refetches on every result, andsendEntryNow/sendAllNowqueue-hook actions with loading and cancellation guards. - Added localized row and header Send Now controls. Desktop row actions use hover/focus reveal, coarse-pointer layouts keep 44px controls visible, the header order is Run next / Send Now / Clear all / collapse, and the action group wraps without adding a scroll owner.
- GREEN: focused queue API/hook/list/message suite — 4 files, 97 tests passed;
cd apps/web && pnpm run typecheckpassed; full web lint passed;i18n:pseudo,i18n:check, andi18n:ratchetpassed. - Missing/raced entries reconcile through the authoritative queue state and show focused localized feedback; no optimistic removal is retained.