chore(idea): bookkeeping #217 QA verte + clôture #216

This commit is contained in:
2026-08-15 19:32:56 +02:00
parent 581063cf96
commit 33c6fc6cad
6 changed files with 94 additions and 7 deletions

View File

@ -0,0 +1,49 @@
---
issueRef: "#217"
version: 6
updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"}
updatedAt: 1786815105743
---
## Triage 2026-08-15
- Symptôme rapporté: la conversation disparaît parfois quand l'utilisateur passe de son layout agent au layout Git Graph puis revient.
- Cadrage UX: un switch de layout ne doit jamais réinitialiser la conversation; au retour, il faut restaurer transcript connu + état de réattachement explicite au lieu d'une surface vide.
- Cadrage Architect: cause probable côté projection frontend / corrélation de réattache (`conversationId`/`sessionId`) plus qu'une perte backend réelle.
- Couches à inspecter d'abord: `frontend/src/features/layout/LayoutGrid.tsx`, `frontend/src/features/agents/CustomAgentChatView.tsx`, hooks layout frontend, puis `reattach_*` côté app-tauri si nécessaire.
- Branche locale créée par Git: `fix/217-layout-gitgraph-conversation-loss` depuis `develop` @ `02715a0`.
## Diagnostic DevFrontend
- Bug confirmé côté frontend.
- Cause: au retour de layout, `CustomAgentChatView` savait reprendre via `sessionId`, mais pas via `conversationId` seul. Si le layout revenait avec conversation persistée mais sans session réattachable, la vue repartait vide et la reprise n'appliquait pas le scrollback.
- Correctif initial appliqué:
- cache UI ajouté par `conversationId`, en plus du cache par `sessionId`
- restauration initiale depuis le cache conversation quand `sessionId` manque
- reprise au retour avec `conversationId` connu et scrollback appliqué, sans relance froide implicite
- QA a trouvé un gap: la vue repeignait depuis le cache mais relançait encore `launchAgentChat` quand `sessionId` était nul dans les props.
- Correctif complémentaire livré:
- le cache conversation conserve aussi le `sessionId`
- le cache n'écrase plus une entrée utile par un état vide sans session
- au retour, si le cache conversation porte un `sessionId`, la vue réattache cette session et sort sans appeler `launchAgentChat`
- Fichiers modifiés:
- `frontend/src/features/agents/CustomAgentChatView.tsx`
- `frontend/src/features/agents/CustomAgentChatView.test.tsx`
- `frontend/src/features/layout/LayoutGrid.chat.test.tsx`
- Tests DevFrontend finaux:
- `npm test -- CustomAgentChatView.test.tsx` => OK (50)
- `npm test -- LayoutGrid.chat.test.tsx` => OK (14)
- `npm run typecheck` => OK
## Diagnostic DevBackend
- Pas de bug backend/app-tauri trouvé.
- `detach_agent_chat` préserve session + scrollback; `reattach_agent_chat` relit le scrollback; `set_active_layout` ne détruit pas les conversations/layouts; la perte apparente ne vient pas du backend selon les tests ciblés.
- Tests DevBackend:
- `cargo test -p app-tauri --test chat_bridge reattach` => OK (4)
- `cargo test -p app-tauri --test dto_layouts git_graph` => OK (2)
- `cargo test -p application relaunch_other_cell_with_conversation_id_rebinds` => OK (1)
- `cargo test -p application launch_other_cell_with_conversation_id_rebinds_no_respawn` => OK (1)
- `cargo test -p application attach_` => OK (5)
- `cargo test -p application --test layout_usecases` => OK (27)
- Conclusion: correction frontend, pas backend.
## QA rouge 2026-08-15
- `npm test -- CustomAgentChatView.test.tsx` => ROUGE sur le scénario `conversationId` connu / `sessionId` nul qui déclenchait encore `launchAgentChat`.
- Ce gap a été corrigé dans l'itération frontend suivante.

View File

@ -0,0 +1,17 @@
---
id: "6ea02306-17ba-4085-a8fb-df9e7d061e35"
number: 217
title: "Conversation disparaît parfois au switch layout agent vers Git Graph"
status: "qa"
priority: "high"
sprint: null
links: []
agentRefs: []
attachments: []
createdBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"}
updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"}
createdAt: 1786814259134
updatedAt: 1786815105743
version: 6
---
Investigation et correction du cas où une conversation disparaît parfois lorsqu'on passe du layout agent au layout Git Graph, puis retour vers le layout agent. Vérifier si le problème vient de la persistance UI, de la projection layout, ou d'un problème de réattache conversation/session.