From 9330ce4782d080e47ae205188ea7ab74d10f2395 Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Sat, 25 Apr 2026 00:08:50 -0400 Subject: [PATCH] fix(pilot): two Phase 9 layout/state bugs surfaced by QA fixtures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. EscalateInterceptDialog clipped off-screen. The dialog was positioned with `absolute bottom-full mb-2 left-0` under the assumption the Escalate button would have room above it. In practice the button lives in the chat-page action bar near y≈105, so the 302 px dialog overflows the top of the viewport and only the last option is visible. Switch to `top-full mt-2 right-0` — anchors the dialog below the button and aligns its right edge with the button (avoids overflow off the right when the button is in the right-side action cluster). 2. TemplateMatchPanel never renders on a fresh session. `handleApplyFix` for the script_template_id branch only sets `scriptPanelOpen=true`, but TemplateMatchPanel is mounted inside `TaskLane.bottomSlot`. On sessions with no questions/facts the lane defaults closed, so the panel exists in the React tree but inside an unrendered TaskLane — the user clicks Apply fix and nothing visibly changes. Fix: also `setShowTaskLane(true)` in that branch so the lane opens alongside the panel. The ai_drafted_script branch is fine (InlineNoTemplateDialog renders in the chat region, not in the lane), so it's left alone. Both bugs were latent — they only surface on sessions that haven't accumulated TaskLane state yet (questions/facts). Fresh sessions created from the StartSessionInput hide them because the AI's first turn populates questions and the lane auto-opens. Caught using the new seed_phase9_qa_fixtures.py harness. Co-Authored-By: Claude Opus 4.7 --- frontend/src/components/pilot/EscalateInterceptDialog.tsx | 2 +- frontend/src/pages/AssistantChatPage.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/pilot/EscalateInterceptDialog.tsx b/frontend/src/components/pilot/EscalateInterceptDialog.tsx index bb9b9f34..4ccd99a3 100644 --- a/frontend/src/components/pilot/EscalateInterceptDialog.tsx +++ b/frontend/src/components/pilot/EscalateInterceptDialog.tsx @@ -41,7 +41,7 @@ export function EscalateInterceptDialog({
{!partialStep ? ( <> diff --git a/frontend/src/pages/AssistantChatPage.tsx b/frontend/src/pages/AssistantChatPage.tsx index d1101ff6..aac1ae6a 100644 --- a/frontend/src/pages/AssistantChatPage.tsx +++ b/frontend/src/pages/AssistantChatPage.tsx @@ -552,7 +552,11 @@ export default function AssistantChatPage() { const handleApplyFix = useCallback(() => { if (!activeFix) return if (activeFix.script_template_id) { - setScriptPanelOpen(true) // existing TemplateMatchPanel flow in task lane + // TemplateMatchPanel is mounted inside TaskLane.bottomSlot, so the + // lane must be visible for the panel to render. On fresh sessions + // (no questions/facts) the lane defaults closed, so we open it here. + setShowTaskLane(true) + setScriptPanelOpen(true) return } if (activeFix.ai_drafted_script) {