feat(assistant): confirmation card for proposed writes, and the configured persona #94

Merged
KofTwentyTwo merged 4 commits from feature/assistant-pending-actions into main 2026-10-13 21:08:58 +00:00
KofTwentyTwo commented 2026-10-13 18:59:23 +00:00 (Migrated from github.com)

Pairs with QRun-IO/qbit-assistant#14 (tools via the /qqq/v1 UI API, with writes that are only proposed) and #15 (profiles and skills).

Confirmation card

  • A new pending_action render: AssistantPendingActionCard shows the summary and the proposed values, with Confirm (labelled Create / Save / Delete) and Cancel.
  • Confirm calls POST /assistant/actions/{id}/confirm, and the server runs the write through the UI API with this session. Cancel calls .../reject, and nothing runs.
  • On mount the card loads GET /assistant/actions/{id}, so a reloaded conversation shows the outcome.
  • It is code-split, uses theme tokens (works in light and dark), wraps at narrow widths and meets the coarse-pointer minimum.

Persona

  • /assistant/config → profile: the header and empty state use the display name and greeting, and the starter prompts are buttons that send.
  • The empty state says the assistant sees and does only what the user can, through the same API as the screens.

Tests

  • AssistantPendingActionCard.test.tsx: confirm runs once, cancel never confirms, the result link is shown, axe passes.
  • AssistantPanel.test.tsx: the persona name, the greeting, and a starter prompt that sends.
  • pnpm typecheck and pnpm lint (0 errors) are green, and the assistant suites pass.

🤖 Generated with Claude Code

Pairs with QRun-IO/qbit-assistant#14 (tools via the `/qqq/v1` UI API, with writes that are only proposed) and #15 (profiles and skills). **Confirmation card** - A new `pending_action` render: `AssistantPendingActionCard` shows the summary and the proposed values, with **Confirm** (labelled Create / Save / Delete) and **Cancel**. - Confirm calls `POST /assistant/actions/{id}/confirm`, and the server runs the write through the UI API with this session. Cancel calls `.../reject`, and nothing runs. - On mount the card loads `GET /assistant/actions/{id}`, so a reloaded conversation shows the outcome. - It is code-split, uses theme tokens (works in light and dark), wraps at narrow widths and meets the coarse-pointer minimum. **Persona** - `/assistant/config` → `profile`: the header and empty state use the display name and greeting, and the starter prompts are buttons that send. - The empty state says the assistant sees and does only what the user can, through the same API as the screens. **Tests** - `AssistantPendingActionCard.test.tsx`: confirm runs once, cancel never confirms, the result link is shown, axe passes. - `AssistantPanel.test.tsx`: the persona name, the greeting, and a starter prompt that sends. - `pnpm typecheck` and `pnpm lint` (0 errors) are green, and the assistant suites pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.