157 lines
4.4 KiB
Markdown
157 lines
4.4 KiB
Markdown
---
|
|
issueRef: "#295"
|
|
version: 2
|
|
updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"}
|
|
updatedAt: 1788971880464
|
|
---
|
|
|
|
## QA - 2026-09-09 - Validation post-restart chat transcript
|
|
|
|
Branche vérifiée : `fix/295-custom-chat-transcript-after-restart`.
|
|
|
|
Diff relu sur les zones déclarées :
|
|
|
|
- `crates/app-tauri/src/chat.rs`, `crates/app-tauri/src/commands.rs`
|
|
- `crates/app-tauri/tests/chat_bridge.rs`, `crates/app-tauri/tests/dto_chat.rs`
|
|
- `crates/backend/src/dto.rs`, `crates/backend/src/stream.rs`
|
|
- `crates/web-server/src/lib.rs`
|
|
- `frontend/src/adapters/agent.ts`, `frontend/src/adapters/http/*`, `frontend/src/ports/index.ts`
|
|
- `frontend/src/features/agents/CustomAgentChatView.tsx`, `CustomAgentChatView.test.tsx`
|
|
|
|
Lecture QA : le fix couvre bien le contrat attendu. Côté Tauri, `ChatBridge` conserve/rekey scrollback, sink et propriétaire stable, et `reattach_agent_chat` peut récupérer une session vivante par `projectId`/`agentId` en renvoyant `sessionId` effectif et `conversationId`. Côté backend partagé, le DTO expose l'id effectif et `ReplayOutputBridge::rekey` préserve le flux logique. Côté web-server, `chat.attach` accepte le fallback stable et enregistre le sink sous le nouveau `sessionId`. Côté frontend, la vue réconcilie `agentRestartCompleted`, retente un stale `NOT_FOUND` avec identité stable, applique le scrollback, met à jour les ids effectifs et évite l'écran vide quand une conversation/run/workstate lié existe.
|
|
|
|
Commandes exécutées :
|
|
|
|
```bash
|
|
git status --short --branch
|
|
```
|
|
|
|
Sortie essentielle :
|
|
|
|
```text
|
|
## fix/295-custom-chat-transcript-after-restart
|
|
M crates/app-tauri/src/chat.rs
|
|
M crates/app-tauri/src/commands.rs
|
|
M crates/app-tauri/tests/chat_bridge.rs
|
|
M crates/app-tauri/tests/dto_chat.rs
|
|
M crates/backend/src/dto.rs
|
|
M crates/backend/src/stream.rs
|
|
M crates/web-server/src/lib.rs
|
|
M frontend/src/adapters/agent.ts
|
|
M frontend/src/adapters/http/agentGateway.test.ts
|
|
M frontend/src/adapters/http/frames.ts
|
|
M frontend/src/adapters/http/streamGateways.ts
|
|
M frontend/src/features/agents/CustomAgentChatView.test.tsx
|
|
M frontend/src/features/agents/CustomAgentChatView.tsx
|
|
M frontend/src/ports/index.ts
|
|
```
|
|
|
|
```bash
|
|
git diff --check
|
|
```
|
|
|
|
Sortie : aucune.
|
|
|
|
```bash
|
|
cargo fmt --all --check
|
|
```
|
|
|
|
Sortie : aucune.
|
|
|
|
```bash
|
|
cargo test -p app-tauri --test chat_bridge --test dto_chat
|
|
```
|
|
|
|
Sortie essentielle :
|
|
|
|
```text
|
|
Running tests/chat_bridge.rs
|
|
running 34 tests
|
|
...
|
|
test result: ok. 34 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
|
|
|
|
Running tests/dto_chat.rs
|
|
running 24 tests
|
|
...
|
|
test result: ok. 24 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
|
|
```
|
|
|
|
```bash
|
|
cargo check -p app-tauri
|
|
```
|
|
|
|
Sortie essentielle :
|
|
|
|
```text
|
|
Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.14s
|
|
```
|
|
|
|
```bash
|
|
cargo test -p backend && cargo check -p backend
|
|
```
|
|
|
|
Sortie essentielle :
|
|
|
|
```text
|
|
Running unittests src/lib.rs
|
|
running 98 tests
|
|
...
|
|
test result: ok. 91 passed; 0 failed; 7 ignored; 0 measured; 0 filtered out
|
|
|
|
Doc-tests backend
|
|
running 0 tests
|
|
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
|
|
|
|
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.13s
|
|
```
|
|
|
|
Note : les 7 tests backend ignorés sont déclarés `ignored` car ils requièrent une permission de bind socket local ; ce n'est pas un échec et ce n'est pas bloquant pour #295.
|
|
|
|
```bash
|
|
cargo test -p web-server websocket_chat_attach && cargo check -p web-server
|
|
```
|
|
|
|
Sortie essentielle :
|
|
|
|
```text
|
|
running 3 tests
|
|
test tests::websocket_chat_attach_emits_chat_attached_and_registers_sink ... ok
|
|
test tests::websocket_chat_attach_recovers_stale_session_from_live_project_agent ... ok
|
|
test tests::websocket_chat_attach_stale_session_without_fallback_stays_not_found ... ok
|
|
|
|
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 109 filtered out
|
|
|
|
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.13s
|
|
```
|
|
|
|
```bash
|
|
npm test -- CustomAgentChatView.test.tsx agentGateway.test.ts
|
|
```
|
|
|
|
Sortie essentielle :
|
|
|
|
```text
|
|
Test Files 2 passed (2)
|
|
Tests 77 passed (77)
|
|
```
|
|
|
|
Note : Vite a émis deux warnings de dépréciation de configuration `esbuild`/`oxc`; non bloquant pour #295.
|
|
|
|
```bash
|
|
npm run build
|
|
```
|
|
|
|
Sortie essentielle :
|
|
|
|
```text
|
|
> idea-frontend@0.3.0 build
|
|
> tsc --noEmit && vite build
|
|
|
|
✓ 515 modules transformed.
|
|
✓ built in 2.61s
|
|
```
|
|
|
|
Note : Vite signale un chunk minifié > 500 kB ; avertissement existant/non bloquant pour #295.
|
|
|
|
Verdict QA : VERT.
|