diff --git a/src-tauri/src/database/consolidated_schema.sql b/src-tauri/src/database/consolidated_schema.sql index de73462..83a08a9 100644 --- a/src-tauri/src/database/consolidated_schema.sql +++ b/src-tauri/src/database/consolidated_schema.sql @@ -288,6 +288,12 @@ INSERT OR IGNORE INTO user_preferences (key, value) VALUES ('theme', 'light'); INSERT OR IGNORE INTO user_preferences (key, value) VALUES ('currency', 'EUR'); INSERT OR IGNORE INTO user_preferences (key, value) VALUES ('date_format', 'DD/MM/YYYY'); INSERT OR REPLACE INTO user_preferences (key, value) VALUES ('categories_schema_version', 'v1'); +-- Suppress StarterAccountsModal on first /balance visit for new profiles +-- (Issue #179). The 4 starter accounts are already seeded above, so the +-- modal would only show 4 collision rows with no actionable choice. Pre- +-- writing the pref skips that briefly-empty UX entirely. Suggestion S1 +-- from PR #185 review (#187). +INSERT OR IGNORE INTO user_preferences (key, value) VALUES ('balance_starter_proposed', '{"shown_at":"seed","accepted":[]}'); -- ============================================================================ -- Seed v1 — IPC Statistique Canada-aligned, 3 levels, Canada/Québec diff --git a/src/pages/BalancePage.tsx b/src/pages/BalancePage.tsx index 456ea2b..4a15f33 100644 --- a/src/pages/BalancePage.tsx +++ b/src/pages/BalancePage.tsx @@ -58,10 +58,9 @@ export default function BalancePage() { // Issue #179 — one-shot starter-accounts modal for existing profiles. The // pref `balance_starter_proposed` is written once (confirmed or dismissed), - // so the modal never re-appears. New profiles get the 4 starters seeded - // directly via consolidated_schema.sql and never hit this branch (the - // first /balance visit will write the pref with accepted=[] silently - // since collisions match all 4). + // so the modal never re-appears. New profiles get both the 4 starters AND + // the pref pre-seeded via consolidated_schema.sql, so they never hit this + // branch at all (S1 fix from #187). const [showStarterModal, setShowStarterModal] = useState(false); useEffect(() => { let cancelled = false;