From 6ff59a5c5472da1c3a208ae1b9720127b39324db Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 15 Oct 2026 19:55:30 +0000 Subject: [PATCH 1/3] Hide cards from the Overview and alerts A Hide control on each Ready now and Coming up item leaves that card's items (by event focus, timers included) out of the Overview, the pop-ups and browser notifications, with an undo. Settings lists the hidden cards with Show. Hidden cards stay tracked and still count in the totals. State version 14 adds overviewHidden, with its migration. Decision 028. Closes #62 Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 1 + docs/decisions/028-hide-from-overview.md | 23 +++++++ docs/decisions/README.md | 1 + src/App.svelte | 11 ++- src/components/Overview.svelte | 87 +++++++++++++++++++++--- src/components/Settings.svelte | 46 ++++++++++++- src/lib/overview.svelte.ts | 25 +++++-- src/lib/overview.test.ts | 47 ++++++++++++- src/lib/overview.ts | 17 +++++ src/lib/state.test.ts | 78 +++++++++++++++++---- src/lib/state.ts | 19 +++++- 11 files changed, 325 insertions(+), 30 deletions(-) create mode 100644 docs/decisions/028-hide-from-overview.md diff --git a/CLAUDE.md b/CLAUDE.md index 42a832a..b79521a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -32,6 +32,7 @@ Svelte 5 + TypeScript + Vite. Public repository. | Real-time timers: Lucky Wheel, Mansion boost | `data/timers.ts`, `lib/timers.ts` (022) | | Weekly events and the Weekly tab | `data/weekly.ts`, `lib/weekly.ts` (decision 027) | | Overview tab, next events, notifications | `lib/events.ts`, `lib/overview.ts` (dec. 023) | +| Hiding cards from the Overview and alerts | `visibleEvents` in `lib/overview.ts` (dec. 028) | | Theme tokens | `src/app.css` (decision 009) | | Link previews (Open Graph), preview image | `index.html`, `scripts/og-image.html` | | CI, templates | `.github/` | diff --git a/docs/decisions/028-hide-from-overview.md b/docs/decisions/028-hide-from-overview.md new file mode 100644 index 0000000..9792ffa --- /dev/null +++ b/docs/decisions/028-hide-from-overview.md @@ -0,0 +1,23 @@ +# 028: Hiding cards from the Overview and the alerts + +2026-10-15, issue #62. Builds on decision 023. + +## Decision + +- **Per card, not per item.** What is hidden is an event's `focus`, the card it links to: + `car-wash` hides the Money Fronts safe and its heat together, `nightclub` its safe and its + goods. The Lucky Wheel (`lucky-wheel`) and the Mansion boost (`mansion`) hide the same way, + though they belong to no business card. Saved as `overviewHidden` (state version 14). +- **Where:** a small Hide control on each Ready now and Coming up item, with the same Undo as the + quick actions; Settings lists what is hidden ("Hidden from Overview"), each with Show. Not on + the cards' gear menus: the timers have none, and one place to undo is enough. +- **Only the Overview and the alerts leave it out.** The card stays owned and tracked on its + own tab, and its money still counts in the summary strip: the totals say what you have. +- **No alert on showing again.** Hidden items still count as seen by the alerts, so an item + already near or due when it is shown again does not pop up; one that comes near later does. + +## Alternatives + +- Per item (`heat:car-wash` apart from `safe:car-wash`): finer, but a longer list to manage, + and no case asked for it yet. +- Leaving hidden cards out of the totals: the strip would then understate the money waiting. diff --git a/docs/decisions/README.md b/docs/decisions/README.md index a1c0684..5b1706a 100644 --- a/docs/decisions/README.md +++ b/docs/decisions/README.md @@ -38,3 +38,4 @@ free number, add one line below. **Replacing one:** write a new decision, then m - [025](025-bunker-staff.md) Bunker staff on Manufacturing, Both or Research: a stock share (Both 0.5, Research 0) on the sourced rates, supplies used as fast on every option (est.), research progress not tracked - [026](026-movable-cards-everywhere.md) Movable cards on Businesses, Safes and Timers (`ui/CardGrid`): picked up by the title bar; swap by the dragged card's middle, 10% in; orders saved per tab - [027](027-weekly-contents.md) Weekly events: typed `src/data/weekly.ts` (no JSON, no fetch), checked by a test; Weekly tab only (no news bar); out of date: warning over the dimmed old week; contents: multipliers, Weekly Challenge, rotations, discounts, gifts, a less prominent "Also running" list; no GTA+, no daily map-bound items; explicit UTC start/end (Thursday 2:00 AM US Pacific); source gta.wiki weekly page; routine Thursday ~16:00 UTC +- [028](028-hide-from-overview.md) Hide from Overview: per card (event `focus`, timers too), Hide on each item with undo, Settings lists them with Show; still tracked and counted in the totals; showing again brings no alert diff --git a/src/App.svelte b/src/App.svelte index 2cadefb..dffdd9a 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -16,7 +16,14 @@ import { SAFES } from './data/safes' import { WEEK } from './data/weekly' import { clocks } from './lib/clock.svelte' - import { dismissPopup, overview, quick, undoQuick } from './lib/overview.svelte' + import { + dismissPopup, + hideFromOverview, + overview, + quick, + showOnOverview, + undoQuick, + } from './lib/overview.svelte' import './lib/production.svelte' import './lib/safes.svelte' import { setProperties, store } from './lib/store.svelte' @@ -82,6 +89,8 @@ paused={clocks.play.paused} onquick={quick} onundo={undoQuick} + onhide={hideFromOverview} + onshow={showOnOverview} /> {:else if active === 'businesses'}