From 9f901ec50d5de87798562ed1189b45fdfb101bad Mon Sep 17 00:00:00 2001 From: Maddox Date: Tue, 16 Jun 2026 17:40:39 -0400 Subject: [PATCH] feat: store-level "Group bursts" toggle + idle-window field Adds group_burst (0/1) + burst_window_sec to the Store type and the StoreModal editor. Drives finbot's Amazon burst-grouping: when ON, finbot collapses rapid same-merchant charge bursts into one Firefly transaction group; the optional idle window (blank = 180s) closes the group. Backend INSERT/UPDATE carry the fields; GET is SELECT * so reads are free. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/components/StoreModal.tsx | 37 +++++++++++++++++++++++++++++++++++ src/types.ts | 5 +++++ 2 files changed, 42 insertions(+) diff --git a/src/components/StoreModal.tsx b/src/components/StoreModal.tsx index 2f0473d..2863bde 100644 --- a/src/components/StoreModal.tsx +++ b/src/components/StoreModal.tsx @@ -23,6 +23,8 @@ export function StoreModal({ store, categories, availableTags, onSave, onClose } tagList: parseTags(store?.tags ?? ''), route: (store?.route ?? 'auto') as Route, display_order: store?.display_order ?? 0, + group_burst: store?.group_burst ?? 0, + burst_window_sec: store?.burst_window_sec ?? null, }) // Keep category default once categories load @@ -137,6 +139,41 @@ export function StoreModal({ store, categories, availableTags, onSave, onClose } /> + {/* Burst grouping */} +
+ + + {form.group_burst ? ( +
+ + set('burst_window_sec', e.target.value === '' ? null : Number(e.target.value))} + placeholder="180" + className="w-24 bg-surface-800 border border-white/8 rounded-lg px-2.5 py-1.5 text-sm text-slate-200 placeholder:text-slate-600 focus:outline-none focus:border-blue-500/60" + /> + blank = 180s +
+ ) : null} +
+ {/* Actions */}