Project

General

Profile

Actions

Feature #1552

open
RA

Feature #1513: Implémenter des agents conversationnels spécialisés pour la qualification des demandes sur claude code

Frontend: request-type selector, active-mode badge and mid-conversation switch

Feature #1552: Frontend: request-type selector, active-mode badge and mid-conversation switch

Added by Redmine Admin 1 day ago.

Status:
Spec
Priority:
Normal
Assignee:
-
Start date:
08/03/2026
Due date:
% Done:

0%

Estimated time:
spec_ref:

docs/superpowers/specs/2026-08-03-specialized-intake-agents-design.md

build_status:
build_number:
ci_run_url:
scan_status:
scan_report_url:
deploy_status:
preprod_url:
deployed_at:
branch:
pr_url:
security_key:
severity:
paused:

Description

**Surface:** frontend (`src/`, Next.js 16 App Router, Atomic Design, next-intl)
**Depends on:** #1549 (contract only)
**Blocks:** the checklist/banner child

**Designer first.** This is client-facing UI; the designer agent appends its section to `docs/design/design-system.md` before implementation starts. Build to that section.

Three entry buttons when a conversation starts — *"Signaler un bug"*, *"Demander une évolution"*, *"Problème de sécurité"* — on both the first-run panel (`TicketingFirstRun`) and the new-conversation path. Picking one starts the conversation with that `request_type`.

**A fourth path stays**: the client can just start typing without choosing. That sends no `request_type` (null), which the backend maps to today's generic persona. Do not make the choice mandatory.

Once active, the mode is confirmed visually in the chat header — *"Mode « Signalement de bug » activé"* — and that badge is also the **switch affordance**: a client who picked `bug` and realises they are describing an évolution can change it without losing the transcript.

i18n: add keys to **`en.ts` and `fr.ts`**. `fr.ts` is a real French translation typed `Translated<typeof en>` — tsc fails if the shapes diverge. Keep ICU placeholders identical; translate only the text. (Note: the older #50 convention of "`fr.ts` re-exports" is obsolete.)

## Acceptance criteria
- [ ] The three mode buttons render on first-run and on the new-conversation path, with the labels above (FR) and their EN equivalents.
- [ ] Choosing a mode creates the conversation with that `request_type`.
- [ ] Starting a conversation **without** choosing sends no `request_type` and still works end to end.
- [ ] The active mode is displayed in the chat header for a moded conversation, and **not** displayed for a null-mode one.
- [ ] The mode can be switched mid-conversation; the message history is preserved across the switch.
- [ ] Switching mode updates the badge immediately and persists across a page reload.
- [ ] Keyboard accessible: buttons are reachable and operable by keyboard, and the badge's switch control has an accessible name.
- [ ] FR/EN parity — keys exist in both catalogues with identical placeholders; `tsc` passes.
- [ ] Gates green: `npx vitest run`, `npx tsc --noEmit`, `npx eslint .`, `npm run build` (Node 20.20.2 via nvm). TDD: failing test first.

No data to display

Actions

Also available in: PDF Atom