Skip to content

Filters persist across sessions; stats airport tiles fixed; "Save everything" ZIP backup - #25

Merged
davd-gzl merged 2 commits into
mainfrom
claude/journal-redesign-spec-kit-ku0l3d
Jul 22, 2026
Merged

davd-gzl merged 2 commits into
mainfrom
claude/journal-redesign-spec-kit-ku0l3d

Conversation

@davd-gzl

Copy link
Copy Markdown
Collaborator

Three fixes from a feedback batch.

Filters persist fully across sessions

Only status/minPop/sort/mode used to survive a reload. Now every filter value persists (date, folder, category, country, continent, and the growth flags), stored in one JSON blob and validated field-by-field on load. The map and the lists both reopen exactly as you left them. (listOnly stays session-scoped — it's a scope mode, not a value.)

Stats "airport" tiles open airports

The airport KPI and the counter-strip airport tile opened the generic "visited" list. They now open Places narrowed to your visited airports via a new airports view. World-level stat tiles also clear any country drill-down before opening, so they never stay stuck on the last country a card opened (relevant now that the country filter persists).

"Save everything" — a ZIP backup with photos as real files

The JSON export already embeds photos as base64, but a single giant file is unwieldy and the images aren't browsable. New "Save everything (.zip)" export writes a dependency-free ZIP (store method — photos are already compressed) holding a compact JSON manifest plus every photo as a real, openable file under photos/. Import understands the .zip (detected by magic bytes), re-inlines the images, and restores through the same validated JSON path (data stays inert). A tiny CRC-32 + zip reader/writer lives in lib/backup/zip.ts — no new dependency.


Gate: tsc --noEmit clean · 451 unit tests (added filter-persistence + zip-archive round-trip incl. a known CRC-32 vector) · e2e green — a11y (axe WCAG 2.1 AA), filter-panel, airports, stats-drill, smoke, import-csv, import-security, durability.

🤖 Generated with Claude Code

https://claude.ai/code/session_014W6tgHRgLEugCsbKC9ccST


Generated by Claude Code

davd-gzl added 2 commits July 22, 2026 19:17
- Every filter VALUE now persists to localStorage, not just status/minPop/sort/
  mode: date, folder, category, country, continent and the growth flags ride in
  one JSON blob, restored + validated field-by-field. The map and the lists both
  reopen exactly as you left them. (listOnly stays session-scoped — it's a mode,
  not a value.)
- Stats "airports" tiles (the KPI and the counter strip) opened the generic
  "visited" list; they now open Places narrowed to your visited AIRPORTS via a
  new "airports" view.
- World-level stats tiles clear any country drill-down before opening, so they
  never stay stuck on the last country a card opened (matters now that the
  country filter persists).
…iles

The JSON export already embeds photos (base64), but a giant single file is
unwieldy and the images aren't browsable. Add a complete, portable archive:

- New "Save everything (.zip)" export → a dependency-free ZIP (store method —
  photos are already compressed) holding a compact JSON manifest plus every
  photo as a real, openable file under photos/. The manifest is the canonical
  portable file with each photo's data URL swapped for a "zip:photos/…" ref, so
  the JSON stays small and readable.
- Import now understands the .zip (detected by magic bytes): it re-inlines the
  referenced image files back into data URLs and restores through the SAME
  validated JSON path (Constitution VI — data stays inert). A missing image
  file drops that photo rather than breaking the restore.
- Tiny CRC-32 + zip reader/writer in lib/backup/zip.ts (no new dependency).

Verified: zip codec round-trip incl. a known CRC-32 vector; archive→import
restores photos byte-identically; existing JSON/CSV import unaffected.
@davd-gzl
davd-gzl merged commit 40a9092 into main Jul 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant