From 3582b252bb557bff04d38788a85152f3d481d5da Mon Sep 17 00:00:00 2001 From: Blomios Date: Sat, 15 Aug 2026 18:58:08 +0200 Subject: [PATCH 1/2] =?UTF-8?q?fix(cli):=20affiche=20les=20progress=20re?= =?UTF-8?q?=C3=A7us=20apr=C3=A8s=20Final=20sans=20rouvrir=20le=20tour=20?= =?UTF-8?q?=E2=80=94=20#216?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../features/agents/CustomAgentChatView.test.tsx | 7 +++++-- .../src/features/agents/CustomAgentChatView.tsx | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/frontend/src/features/agents/CustomAgentChatView.test.tsx b/frontend/src/features/agents/CustomAgentChatView.test.tsx index 4e7357e9..f9d45687 100644 --- a/frontend/src/features/agents/CustomAgentChatView.test.tsx +++ b/frontend/src/features/agents/CustomAgentChatView.test.tsx @@ -1598,7 +1598,7 @@ describe("CustomAgentChatView", () => { expect(screen.getByText("Progress").parentElement?.textContent).toContain("Terminé"); }); - it("does not append late progress chunks after the final answer", async () => { + it("renders late progress chunks after the final answer without reopening the turn", async () => { let emitChunk: ((chunk: unknown) => void) | null = null; const agent = { launchAgentChat: vi.fn(), @@ -1672,7 +1672,10 @@ describe("CustomAgentChatView", () => { }); }); - expect(screen.queryByText("idea_ticket_read")).toBeNull(); + expect(screen.getByText("done")).toBeTruthy(); + expect(screen.getByText("idea_ticket_read")).toBeTruthy(); + expect(screen.getByRole("button", { name: "Envoyer" })).toBeTruthy(); + expect(screen.queryByRole("button", { name: "Stop" })).toBeNull(); }); it("shows slash-command suggestions from the gateway, filters by prefix, and inserts the selected command", async () => { diff --git a/frontend/src/features/agents/CustomAgentChatView.tsx b/frontend/src/features/agents/CustomAgentChatView.tsx index 126f5c33..113f9ada 100644 --- a/frontend/src/features/agents/CustomAgentChatView.tsx +++ b/frontend/src/features/agents/CustomAgentChatView.tsx @@ -425,19 +425,21 @@ function isRecoverableNoResponseTurn(turn: ChatTurn | undefined): boolean { } function turnsIndicateBusy(state: ChatViewState): boolean { + let sawOpenActivity = false; for (let index = state.turns.length - 1; index >= 0; index -= 1) { const turn = state.turns[index]; if (turn.role === "final" || turn.role === "error") return false; - if (turn.role === "agent" && turn.pending) return true; + if (turn.role === "user") return sawOpenActivity; + if (turn.role === "agent" && turn.pending) sawOpenActivity = true; if ( turn.role === "progress" && !turn.settled && progressStageBucket(turn.progress) !== "completed" ) { - return true; + sawOpenActivity = true; } } - return false; + return sawOpenActivity; } function insertTextAtSelection( @@ -610,6 +612,14 @@ function foldChunk( if (isRecoverableNoResponseTurn(last) && raw.kind !== "error") { return foldChunk({ ...state, turns: turns.slice(0, -1) }, raw, receivedAtMs); } + if (raw.kind === "progress") { + return appendProgress(state, normalizeProgress(raw.progress) ?? { + source: "ideaLocal", + kind: "other", + stage: "info", + label: unknownChunkLabel(raw), + }); + } return state; } switch (raw.kind) { From 7fd47b339a4c8427142dedfa32f9e18dc9d0890f Mon Sep 17 00:00:00 2001 From: Blomios Date: Sat, 15 Aug 2026 18:58:08 +0200 Subject: [PATCH 2/2] =?UTF-8?q?chore(idea):=20bookkeeping=20#216=20QA=20ve?= =?UTF-8?q?rte=20+=20cl=C3=B4tures=20#214/#215?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .ideai/tickets/214/carnet.md | 11 ++++++++-- .ideai/tickets/214/issue.md | 6 +++--- .ideai/tickets/215/carnet.md | 22 ++++++++++++++++++++ .ideai/tickets/215/issue.md | 17 +++++++++++++++ .ideai/tickets/216/carnet.md | 40 ++++++++++++++++++++++++++++++++++++ .ideai/tickets/216/issue.md | 17 +++++++++++++++ .ideai/tickets/counter.json | 2 +- .ideai/tickets/index.json | 30 ++++++++++++++++++++++++++- 8 files changed, 138 insertions(+), 7 deletions(-) create mode 100644 .ideai/tickets/215/carnet.md create mode 100644 .ideai/tickets/215/issue.md create mode 100644 .ideai/tickets/216/carnet.md create mode 100644 .ideai/tickets/216/issue.md diff --git a/.ideai/tickets/214/carnet.md b/.ideai/tickets/214/carnet.md index fc152b3a..b55d0a2a 100644 --- a/.ideai/tickets/214/carnet.md +++ b/.ideai/tickets/214/carnet.md @@ -1,8 +1,8 @@ --- issueRef: "#214" -version: 5 +version: 7 updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"} -updatedAt: 1786808846046 +updatedAt: 1786809011367 --- ## Triage 2026-08-15 - Symptôme: sur l'interface web PC, l'accès aux fichiers échoue avec `missing Origin header`. @@ -27,3 +27,10 @@ updatedAt: 1786808846046 - Commande validante principale: `cargo test -p web-server origin_header -- --nocapture` => VERT (4/4) - Rejeu ciblé: `cargo test -p web-server non_get_project_file_route_still_requires_origin_header -- --nocapture` => VERT - Conclusion: `GET /api/project-files*` sans `Origin` accepté; `POST /api/pair`, WebSocket et route fichier non-GET sans `Origin` refusés. + +## Git +- Commit fix: `b3fe1d5` — `fix(web): accepte GET /api/project-files* sans Origin (allow_missing ciblé) — #214` +- Commit bookkeeping partagé: `76f2202` — `chore(idea): bookkeeping #214 QA verte + clôtures index #212/#213` +- Merge local: `a369993` — `merge(web): accès fichiers sans Origin header — #214 (QA verte)` +- Branche finale active: `develop` +- Aucun push effectué. diff --git a/.ideai/tickets/214/issue.md b/.ideai/tickets/214/issue.md index 5c385790..e9e816be 100644 --- a/.ideai/tickets/214/issue.md +++ b/.ideai/tickets/214/issue.md @@ -2,7 +2,7 @@ id: "05b7dc82-f248-476d-8ae6-c5190b2d9d02" number: 214 title: "Bug web PC: accès fichiers échoue avec 'missing Origin header'" -status: "qa" +status: "closed" priority: "high" sprint: null links: [] @@ -11,7 +11,7 @@ attachments: [] createdBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"} updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"} createdAt: 1786808303548 -updatedAt: 1786808846046 -version: 5 +updatedAt: 1786809011367 +version: 7 --- Sur l'interface web PC, l'accès aux fichiers échoue avec l'erreur 'missing Origin header'. Objectif: identifier la cause, corriger le flux web desktop concerné, puis valider par tests QA réels. \ No newline at end of file diff --git a/.ideai/tickets/215/carnet.md b/.ideai/tickets/215/carnet.md new file mode 100644 index 00000000..6e56f634 --- /dev/null +++ b/.ideai/tickets/215/carnet.md @@ -0,0 +1,22 @@ +--- +issueRef: "#215" +version: 4 +updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"} +updatedAt: 1786811421236 +--- +## Build AppImage 2026-08-15 +- Demande: rebuild de l'AppImage Linux après le correctif web `missing Origin header` (#214). +- Workflow utilisé: skill `build-appimage`. +- Git a identifié la base de build: `develop` @ `a369993`. +- Tag de build posé localement avant build selon la règle projet: `v0.13.0`. +- Aucun push demandé/effectué. + +## Exécution +- Frontend: `npm --prefix frontend run build` => OK +- Bundle Tauri AppImage: `CARGO_HOME=/tmp/idea-cargo-home APPIMAGE_EXTRACT_AND_RUN=1 NO_STRIP=1 ../../frontend/node_modules/.bin/tauri build --bundles appimage` depuis `crates/app-tauri/` => OK + +## Artefact produit +- `/home/anthony/Documents/Projects/IdeA/target/release/bundle/appimage/IdeA_0.3.0_amd64.AppImage` + +## Rappel opérationnel +- Remplacement de l'AppImage installée et relance d'IdeA non effectués volontairement: opération manuelle pour éviter de tuer l'orchestrateur/session en cours. diff --git a/.ideai/tickets/215/issue.md b/.ideai/tickets/215/issue.md new file mode 100644 index 00000000..4726e897 --- /dev/null +++ b/.ideai/tickets/215/issue.md @@ -0,0 +1,17 @@ +--- +id: "3ee20047-e7d5-4047-a72f-83e68c51fb29" +number: 215 +title: "Rebuild AppImage Linux après correctif web Origin header" +status: "closed" +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: 1786811176740 +updatedAt: 1786811421236 +version: 4 +--- +Reconstruire l'AppImage Linux d'IdeA depuis l'état courant du dépôt, puis faire appliquer par Git l'incrément de version via tag selon la branche du commit buildé. Aucun remplacement de l'AppImage installée ni relance automatique. \ No newline at end of file diff --git a/.ideai/tickets/216/carnet.md b/.ideai/tickets/216/carnet.md new file mode 100644 index 00000000..d62684d5 --- /dev/null +++ b/.ideai/tickets/216/carnet.md @@ -0,0 +1,40 @@ +--- +issueRef: "#216" +version: 4 +updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"} +updatedAt: 1786813039107 +--- +## Triage 2026-08-15 +- Symptôme rapporté: dans la CLI custom, impression qu'après le premier `Final`, il n'y a plus de progress remontés. +- Références durables relues: `ticket156-reply-progress-foundation`, `opencode-streaming-progress-mcp-surfacing-157`. +- Cadrage UX: si `Final` clôt strictement le tour, il faut garder des signaux persistants de session/activité; sinon la surface paraît morte. +- Cadrage Architect: distinguer 1) progress réellement reçus après `Final` mais masqués par la vue, 2) événements post-tour passant par un autre canal, 3) rupture réelle du flux adapter/backend. +- Périmètre d'investigation initial: `frontend/src/features/agents/CustomAgentChatView.tsx`, `crates/app-tauri/src/commands.rs`, `crates/app-tauri/src/chat.rs`, puis adaptateurs provider si nécessaire. +- Branche locale créée par Git: `fix/216-custom-cli-progress-after-final` depuis `develop` @ `a369993` (`v0.13.0`). + +## Diagnostic DevFrontend +- Bug confirmé côté frontend. +- `CustomAgentChatView.tsx` ignorait tout chunk reçu après `final/error`, hors prompt utilisateur. +- Correctif appliqué: les `progress` tardifs restent affichés comme activité séparée sans rouvrir le tour ni repasser le bouton en `Stop`. +- Fichiers modifiés: + - `frontend/src/features/agents/CustomAgentChatView.tsx` + - `frontend/src/features/agents/CustomAgentChatView.test.tsx` +- Tests DevFrontend: + - `npm test -- CustomAgentChatView.test.tsx` => OK (49 tests) + - `npm run typecheck` => OK + +## Diagnostic DevBackend +- Pas de bug backend/transport confirmé. +- Le contrat `Final` terminal reste cohérent: tap live/drain/settling n'émettent pas de `Progress` après `Final` comme flux de tour autoritaire. +- Tests DevBackend: + - `cargo test -p app-tauri --test chat_bridge` => OK (31) + - `cargo test -p infrastructure send_with_tap` => OK (3) + - `cargo test -p infrastructure normal_completion_returns_exactly_one_terminal_final` => OK (1) +- Conclusion: si l'UI montre ou masque une activité après `Final`, le correctif doit rester côté frontend, pas en backend. + +## Verdict QA +- Verdict: VERT. +- QA a ajouté une assertion explicite: un `progress` après `Final` s'affiche, le tour ne se rouvre pas, `Stop` reste absent, `Envoyer` reste disponible. +- Tests QA: + - `npm test -- CustomAgentChatView.test.tsx` => OK + - `npm run typecheck` => OK diff --git a/.ideai/tickets/216/issue.md b/.ideai/tickets/216/issue.md new file mode 100644 index 00000000..84857476 --- /dev/null +++ b/.ideai/tickets/216/issue.md @@ -0,0 +1,17 @@ +--- +id: "81ef20fa-57bf-468c-b396-4f1ee2c61c08" +number: 216 +title: "CLI custom: plus de progress remontés après le premier Final" +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: 1786812380073 +updatedAt: 1786813039107 +version: 4 +--- +Investigation et correction du comportement où la CLI custom semble ne plus afficher/remonter les événements de progression après un premier message Final. Vérifier si le bug est purement d'affichage ou si le flux de progress s'arrête réellement. \ No newline at end of file diff --git a/.ideai/tickets/counter.json b/.ideai/tickets/counter.json index 9e222dfb..3e7801df 100644 --- a/.ideai/tickets/counter.json +++ b/.ideai/tickets/counter.json @@ -1,3 +1,3 @@ { - "nextNumber": 215 + "nextNumber": 217 } \ No newline at end of file diff --git a/.ideai/tickets/index.json b/.ideai/tickets/index.json index f354e602..39ab9f1d 100644 --- a/.ideai/tickets/index.json +++ b/.ideai/tickets/index.json @@ -2890,6 +2890,34 @@ "issueRef": "#214", "path": "214", "title": "Bug web PC: accès fichiers échoue avec 'missing Origin header'", + "status": "closed", + "priority": "high", + "sprint": null, + "assignedAgentIds": [], + "createdBy": { + "kind": "agent", + "agent_id": "a6c6ea12-bfc6-4bdc-8031-324102dfa34d" + }, + "updatedAt": 1786809011367 + }, + { + "issueRef": "#215", + "path": "215", + "title": "Rebuild AppImage Linux après correctif web Origin header", + "status": "closed", + "priority": "high", + "sprint": null, + "assignedAgentIds": [], + "createdBy": { + "kind": "agent", + "agent_id": "a6c6ea12-bfc6-4bdc-8031-324102dfa34d" + }, + "updatedAt": 1786811421236 + }, + { + "issueRef": "#216", + "path": "216", + "title": "CLI custom: plus de progress remontés après le premier Final", "status": "qa", "priority": "high", "sprint": null, @@ -2898,7 +2926,7 @@ "kind": "agent", "agent_id": "a6c6ea12-bfc6-4bdc-8031-324102dfa34d" }, - "updatedAt": 1786808846046 + "updatedAt": 1786813039107 } ] } \ No newline at end of file