feat: implement session snapshot creation and history viewing with new pages and components.

This commit is contained in:
Michael committed 2026-02-22 13:29:12 +01:00
1 parent 7765f97a1f
commit c9cf83d4c7
7 files changed
+309 -22

No files matched your search

@@ -24,6 +24,7 @@ interface GridState {
setFilter: (key: keyof GridFilters, value: string | null) => void;
setDisplayDensity: (density: "compact" | "normal" | "comfortable") => void;
setActiveGridQuery: (query: string) => void;
restoreSnapshot: (changes: Record<string, GammeCode>) => void;
}
function computeSummary(rows: ProductRow[], drafts: Record<string, GammeCode>): GridSummary {
@@ -101,6 +102,9 @@ export const useGridStore = create<GridState>()(
},
setDisplayDensity: (density) => set({ displayDensity: density }),
setActiveGridQuery: (query) => set({ activeGridQuery: query }),
restoreSnapshot: (changes) => {
set({ draftChanges: changes, summary: computeSummary(get().rows, changes) });
},
}),
{
name: "collectflow-grid-storage",