feat(FN-3927): persist and restore durable chat recovery state

- Persist in-flight chat generation snapshots in core chat store types and DB plumbing
- Restore durable recovery state through dashboard chat manager and chat hooks on reload
- Add coverage for chat store persistence and chat/useQuickChat recovery behavior
- Document durable chat recovery architecture and dashboard behavior

Fusion-Task-Id: FN-3927
This commit is contained in:
Fusion
2026-05-10 09:31:00 -07:00
committed by gsxdsm
parent eb148124ba
commit f6f7d3f031
13 changed files with 288 additions and 24 deletions

View File

@@ -912,6 +912,7 @@ export const MIGRATION_ONLY_TABLE_SCHEMAS: Record<string, Record<string, string>
createdAt: "TEXT NOT NULL",
updatedAt: "TEXT NOT NULL",
cliSessionFile: "TEXT",
inFlightGeneration: "TEXT",
},
chat_messages: {
id: "TEXT PRIMARY KEY",
@@ -1828,7 +1829,8 @@ export class Database {
modelProvider TEXT,
modelId TEXT,
createdAt TEXT NOT NULL,
updatedAt TEXT NOT NULL
updatedAt TEXT NOT NULL,
inFlightGeneration TEXT
)
`);
this.db.exec(`CREATE INDEX IF NOT EXISTS idxChatSessionsAgentId ON chat_sessions(agentId)`);