fix: recover session submissions and failed turn settlement

This commit is contained in:
amosblomqvist
2026-10-25 19:45:17 +02:00
parent b277ee3e0f
commit 7d65fa8754
21 changed files with 944 additions and 94 deletions
+15
View File
@@ -511,6 +511,21 @@ export interface DockSelection {
export const emptyDockSelection = (): DockSelection => ({ selected: new Set(), otherSelected: false, dontKnow: false });
/** In-memory submission snapshot: survives the question form's optimistic
* unmount, never written to storage. Indices use the call's stable shuffle. */
export interface QuestionFormDraft {
selection: DockSelection;
thinking: string;
other: string;
text: string;
confidenceIndex: number;
}
export interface QuestionDraft {
form?: QuestionFormDraft;
readingThinking?: string;
}
/**
* Toggling a listed option. Single-select: the option becomes THE answer and
* displaces "Other". Multi-select: the option toggles alongside its siblings