From 1d2d548fc8138143067e13133b7d7ac0a9227461 Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Thu, 23 Apr 2026 23:54:04 -0400 Subject: [PATCH] =?UTF-8?q?docs(pilot):=20Phase=209=20spec=20=E2=80=94=20f?= =?UTF-8?q?inal=20consistency=20polish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Frontend scriptBuilder API client inventory now matches the backend schema: createSession accepts BOTH origin and ai_session_id (both required together for inline callers, both omitted for standalone). - 'If template -> unchanged' sharpened: render location is unchanged, but run stamping moves into the panel's new 'I ran this' action per the §5 apply lifecycle correction. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/FlowAssist_Migration/phase-9-script-builder-tab.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/FlowAssist_Migration/phase-9-script-builder-tab.md b/docs/FlowAssist_Migration/phase-9-script-builder-tab.md index 8deb441d..40afea67 100644 --- a/docs/FlowAssist_Migration/phase-9-script-builder-tab.md +++ b/docs/FlowAssist_Migration/phase-9-script-builder-tab.md @@ -259,7 +259,7 @@ Reset in `resetSessionDerivedState`: both back to defaults. Banner's Apply handler (`handleApplyFix`) updated: - If no script + no template → set `chatTab = 'script_builder'` (and show tab strip). - If drafted script → open NoTemplateDialog in the chat region (new state or existing `scriptPanelOpen` reused). -- If template → existing TemplateMatchPanel flow (unchanged). +- If template → open `TemplateMatchPanel` in the task lane (render location unchanged); run stamping happens via the new "I ran this" action inside the panel (see §5), not on Apply click. ### Tab strip visibility @@ -358,7 +358,7 @@ Manual verification (no component test harness in this codebase per CLAUDE.md): **Frontend — modified:** - `frontend/src/api/sessionSuggestedFixes.ts` — add `patchScript(sessionId, fixId, body, parameters)` method. -- `frontend/src/api/scriptBuilder.ts` (or equivalent) — `createSession` accepts an optional `origin` argument. +- `frontend/src/api/scriptBuilder.ts` (or equivalent) — `createSession` accepts optional `origin` and `ai_session_id` arguments (both required together when the caller is `ScriptBuilderTab`; both omitted for the legacy standalone caller). - `frontend/src/components/script-builder/ScriptBuilderChat.tsx` — **unchanged**. Stays a pure display component. - `frontend/src/pages/ScriptBuilderPage.tsx` — **unchanged on the session-creation path** (defaults to `origin='standalone'`). - `frontend/src/pages/AssistantChatPage.tsx` — wire tab strip, mount `ScriptBuilderTab`, banner Apply routing (no `applied_at` stamp on click), NoTemplateDialog chat-region render. Move the `sessionSuggestedFixesApi.applyFix(...)` call from `handleApplyFix` to `handleScriptDecision('one_off' | 'draft_template')` and `TemplateMatchPanel`'s new "I ran this" handler.