Conversation
…0.19.0)
- Calendar page at /journal/{id}/calendar with anniversary row + scroll of
month cards highlighting days that have pages. Tap anniversary row or
month card to filter the journal. Scroll offset is preserved per-journal
across in-session navigation via CalendarScrollContext.
- Anniversary filter in useFilter: pages whose UTC month+day match today
from strictly prior years (Feb-29 only surfaces on leap Feb-29s).
Activated from the calendar page via ?anniversary=1 URL param, cleared
via existing FilterBar clear.
- Calendar button with dot badge in JournalHeader when anniversaries exist.
- Calendar -> filtered journal navigation uses router.dismissAll() so the
journal's back button lands on home, not back on the calendar.
- MonthPreview capped at 400px on web so the grid doesn't stretch.
- Camera attach in page editor: AddAttachmentPopup gets Camera and
Encrypted Camera buttons on native; expo-image-picker launchCameraAsync
with permission prompt; photos stored identically to gallery images
(type: 'image'), no data model changes. Added expo-image-picker plugin
with photos+camera permission strings in app.json.
- Route restructure: app/journal/[id].tsx -> app/journal/[id]/index.tsx,
sibling app/journal/[id]/calendar.tsx.
- i18n: new calendar.* namespace + journal.anniversary + page.takePhoto /
takeEncryptedPhoto / cameraPermissionDenied across all 20 locales.
- tests: 37 new tests (20 for src/lib/calendar, 6 useFilter anniversary,
6 CalendarScrollContext, 5 AnniversaryRow, 6 MonthPreview).
924 tests passing across 64 suites.
Carranca AI ReviewPR #10 Review: Per-journal Calendar page, anniversary filter, camera attachSummaryThis PR adds a per-journal calendar screen (with anniversary detection and month-level navigation), a camera image capture option for page attachments, and the associated i18n strings across all 20 locales. The route structure is cleanly reorganized from Findings1. Duplicated anniversary matching logic — maintenance riskSeverity: medium The anniversary filter logic (same UTC month+day, strictly prior year) is implemented independently in both 2.
|
- Extract shared isAnniversary(page, today) predicate in src/lib/calendar.ts; useFilter's matchesFilter now delegates to it, eliminating the duplicated UTC month/day/year comparison. - Fix getMonthsWithPages: sort === 'none' now preserves Map insertion order instead of silently falling through to descending. Added a dedicated test. - MonthPreview highlighted day text uses getContrastText(theme.colors.primary) instead of hardcoded '#fff', matching the danger-button pattern.
Carranca AI ReviewLet me read the rest of the diff and examine the key source files. PR #10 Code ReviewSummaryThis PR adds a per-journal calendar screen with anniversary filtering, scroll preservation across navigation, and camera attachment support. It restructures the journal route from Findings1. [Medium] Unsafe Feather icon type cast —
|
v0.19.0