feat: add multi-run fusion and session change walkthroughs

Fuse two to five completed multi-run entries into one synthesized session,
and explain a session's diff as ordered walkthrough stops cached by diff hash.

- Multi-run fusion service, persistence, routes and FuseRunDialog
- Change walkthrough service, persistence, routes and ChangesWalkthroughDialog
- Shared unified-diff parser plus bounded text generation, json-extract,
  text-truncate and service-error helpers
This commit is contained in:
Chris Scott committed 2026-10-06 15:27:14 -04:00
1 parent 90c6ccf236
commit b36d412ca2
66 files changed
+6228 -468

No files matched your search

+4
View File
@@ -16,6 +16,7 @@ import type { PermissionResponse, SSHHostKeyRequest, Repo } from '@/api/types'
import { showToast } from '@/lib/toast'
import { openCodeEventStream, type EventStreamHealthState } from '@/lib/opencode-event-stream'
import { addToSessionKeyedState, removeFromSessionKeyedState } from '@/lib/sessionKeyedState'
import { changeWalkthroughQueryKey } from '@/hooks/useChangeWalkthrough'
import { busyStatusesFromActiveSessions, useSessionStatus } from '@/stores/sessionStatusStore'
import {
invalidateChildSessionCaches,
@@ -489,18 +490,21 @@ export function EventProvider({ children }: { children: React.ReactNode }) {
useSessionStatus.getState().setOutcome(event.data.sessionID, 'succeeded')
useSessionStatus.getState().setStatus(event.data.sessionID, { type: 'idle' })
invalidateSessionListCachesDebounced(queryClient, event.directory)
queryClient.invalidateQueries({ queryKey: changeWalkthroughQueryKey(event.data.sessionID) })
break
}
case 'session.execution.failed': {
useSessionStatus.getState().setOutcome(event.data.sessionID, 'failed')
useSessionStatus.getState().setStatus(event.data.sessionID, { type: 'idle' })
invalidateSessionListCachesDebounced(queryClient, event.directory)
queryClient.invalidateQueries({ queryKey: changeWalkthroughQueryKey(event.data.sessionID) })
break
}
case 'session.execution.interrupted': {
useSessionStatus.getState().setOutcome(event.data.sessionID, 'interrupted')
useSessionStatus.getState().setStatus(event.data.sessionID, { type: 'idle' })
invalidateSessionListCachesDebounced(queryClient, event.directory)
queryClient.invalidateQueries({ queryKey: changeWalkthroughQueryKey(event.data.sessionID) })
break
}
case 'session.deleted': {