feat: FlowPilot migration — Phase 1-9 + Phase 9 bug fixes + QA fixture harness #147
@@ -515,6 +515,17 @@ export default function AssistantChatPage() {
|
|||||||
} else if (decision === 'draft_template') {
|
} else if (decision === 'draft_template') {
|
||||||
toast.success('Draft template queued — review after Resolve')
|
toast.success('Draft template queued — review after Resolve')
|
||||||
}
|
}
|
||||||
|
// Phase 9 §5: one_off and draft_template declare a run ("Run now, …").
|
||||||
|
// Stamp applied_at to transition the fix into Verifying.
|
||||||
|
// build_template does NOT run — no stamp.
|
||||||
|
if (decision === 'one_off' || decision === 'draft_template') {
|
||||||
|
try {
|
||||||
|
const updated = await sessionSuggestedFixesApi.applyFix(
|
||||||
|
activeChatId, activeFix.id,
|
||||||
|
)
|
||||||
|
setActiveFix(updated)
|
||||||
|
} catch { /* non-fatal: engineer can still mark outcome later */ }
|
||||||
|
}
|
||||||
// Keep the panel open so the engineer can copy the rendered script.
|
// Keep the panel open so the engineer can copy the rendered script.
|
||||||
} catch {
|
} catch {
|
||||||
toast.error('Failed to record decision')
|
toast.error('Failed to record decision')
|
||||||
@@ -552,6 +563,20 @@ export default function AssistantChatPage() {
|
|||||||
setChatTab('script_builder')
|
setChatTab('script_builder')
|
||||||
}, [activeFix])
|
}, [activeFix])
|
||||||
|
|
||||||
|
// Phase 9 Task 13: TemplateMatchPanel "I ran this" — stamps applied_at so the
|
||||||
|
// ProposalBanner transitions from Proposed to Verifying. Shared useCallback so
|
||||||
|
// both render sites (narrow-drawer + side-panel) are identical.
|
||||||
|
const handleMarkRun = useCallback(async () => {
|
||||||
|
if (!activeFix || !activeChatId) return
|
||||||
|
try {
|
||||||
|
const updated = await sessionSuggestedFixesApi.applyFix(
|
||||||
|
activeChatId, activeFix.id,
|
||||||
|
)
|
||||||
|
setActiveFix(updated)
|
||||||
|
setScriptPanelOpen(false)
|
||||||
|
} catch { /* non-fatal: engineer can still mark outcome later */ }
|
||||||
|
}, [activeFix, activeChatId])
|
||||||
|
|
||||||
// Phase 8: record a terminal outcome for the active fix. Updates local state
|
// Phase 8: record a terminal outcome for the active fix. Updates local state
|
||||||
// on success. For applied_success also opens the Resolve preview.
|
// on success. For applied_success also opens the Resolve preview.
|
||||||
const handleSetOutcome = useCallback(async (outcome: FixOutcome, notes?: string) => {
|
const handleSetOutcome = useCallback(async (outcome: FixOutcome, notes?: string) => {
|
||||||
@@ -1697,6 +1722,7 @@ export default function AssistantChatPage() {
|
|||||||
fix={activeFix}
|
fix={activeFix}
|
||||||
sessionId={activeChatId}
|
sessionId={activeChatId}
|
||||||
onClose={() => setScriptPanelOpen(false)}
|
onClose={() => setScriptPanelOpen(false)}
|
||||||
|
onMarkRun={handleMarkRun}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className="flex items-center gap-3 px-3 mt-1">
|
<div className="flex items-center gap-3 px-3 mt-1">
|
||||||
@@ -1767,6 +1793,7 @@ export default function AssistantChatPage() {
|
|||||||
fix={activeFix}
|
fix={activeFix}
|
||||||
sessionId={activeChatId}
|
sessionId={activeChatId}
|
||||||
onClose={() => setScriptPanelOpen(false)}
|
onClose={() => setScriptPanelOpen(false)}
|
||||||
|
onMarkRun={handleMarkRun}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className="flex items-center gap-3 px-3 mt-1">
|
<div className="flex items-center gap-3 px-3 mt-1">
|
||||||
|
|||||||
Reference in New Issue
Block a user