Skip to content

Implement push notifications and frontend for monthly dumps#110

Merged
fortune710 merged 48 commits into
stagingfrom
dev
Jun 1, 2026
Merged

Implement push notifications and frontend for monthly dumps#110
fortune710 merged 48 commits into
stagingfrom
dev

Conversation

@fortune710

@fortune710 fortune710 commented May 3, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

New Features

  • Monthly Dump Viewing Experience: Introduced monthly dump playback with auto-advancing slides and tap-to-navigate controls for easy browsing
  • Recap Banner: Added a prominent recap banner in the capture screen for quick access to your completed monthly dumps
  • Ready Notifications: Enabled push notifications when your monthly dumps become available for viewing
  • Custom Photo Grids: Added ability to create custom 3x2 photo grids within your monthly dumps
  • Scheduling & Filtering: Implemented monthly dump scheduling with status tracking to ensure reliable delivery

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@fortune710 fortune710 self-assigned this May 3, 2026
@coderabbitai

coderabbitai Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@fortune710, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 55 minutes and 42 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2dc34ac3-4c44-409e-b868-6a63797f8458

📥 Commits

Reviewing files that changed from the base of the PR and between f5acee3 and f051205.

⛔ Files ignored due to path filters (2)
  • frontend/bun.lock is excluded by !**/*.lock
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (48)
  • .agents/skills/frontend-design/SKILL.md
  • .agents/skills/stop-slop/CHANGELOG.md
  • .agents/skills/stop-slop/LICENSE
  • .agents/skills/stop-slop/README.md
  • .agents/skills/stop-slop/SKILL.md
  • .agents/skills/stop-slop/references/examples.md
  • .agents/skills/stop-slop/references/phrases.md
  • .agents/skills/stop-slop/references/structures.md
  • .coderabbit.yaml
  • .github/workflows/frontend-tests.yml
  • backend/.gitignore
  • backend/services/notification_enqueue_service.py
  • backend/services/queues/monthly_dump_queue_service.py
  • backend/tests/test_monthly_dump_queue_notifications.py
  • frontend/AGENTS.md
  • frontend/app/capture/index.tsx
  • frontend/app/index.tsx
  • frontend/app/monthly-dumps/[month].tsx
  • frontend/components/monthly-dumps/__tests__/photo-grid-picker.test.tsx
  • frontend/components/monthly-dumps/grid-image-picker-bottom-tray.tsx
  • frontend/components/monthly-dumps/grid-image-picker-camera-modal.tsx
  • frontend/components/monthly-dumps/grid-image-picker-capture-canvas.tsx
  • frontend/components/monthly-dumps/grid-image-picker-cell.tsx
  • frontend/components/monthly-dumps/grid-image-picker-empty-state.tsx
  • frontend/components/monthly-dumps/grid-image-picker-layout-popover.tsx
  • frontend/components/monthly-dumps/grid-image-picker-right-actions.tsx
  • frontend/components/monthly-dumps/grid-image-picker-selection-pill.tsx
  • frontend/components/monthly-dumps/grid-image-picker.tsx
  • frontend/components/monthly-dumps/monthly-dump-banner.tsx
  • frontend/components/monthly-dumps/monthly-dump-grid-icons.tsx
  • frontend/components/monthly-dumps/monthly-dump-grid-prompt-slide.tsx
  • frontend/components/monthly-dumps/monthly-dump-image-slide.tsx
  • frontend/components/monthly-dumps/monthly-dump-progress-bar-item.tsx
  • frontend/components/monthly-dumps/monthly-dump-status-screen.tsx
  • frontend/components/monthly-dumps/photo-grid-empty-state.tsx
  • frontend/components/monthly-dumps/photo-grid-picker.tsx
  • frontend/hooks/phone-number/use-manage-phone-sheet.ts
  • frontend/hooks/posthog/use-feature-flag.ts
  • frontend/hooks/use-gallery-images.ts
  • frontend/hooks/use-monthly-dump.ts
  • frontend/hooks/use-monthly-entries.ts
  • frontend/lib/validations/monthly-dump.ts
  • frontend/maestro/monthly-dumps/create-grid-from-entries-flow.yaml
  • frontend/maestro/monthly-dumps/create-grid-from-gallery-flow.yaml
  • frontend/package.json
  • frontend/services/__tests__/monthly-dump-service.test.ts
  • frontend/services/monthly-dump-service.ts
  • skills-lock.json

Walkthrough

This PR adds a comprehensive monthly recap feature ("monthly dumps") with backend notification enqueueing and frontend viewing/curation. It introduces a monthly dump queue processor that notifies users of completed dumps, backend services for fetching and caching dumps, frontend components for viewing slides (video/audio/photo/grid), and integration with the capture screen via an animated banner.

Changes

Monthly Dumps Feature

Layer / File(s) Summary
Database & Type Schema
frontend/types/database.ts, frontend/supabase/migrations/20260420043600_init_monthly_dump_next_run.sql, frontend/constants/supabase.ts
Adds monthly_dumps and entry_reports table typings to Database. Profiles now include monthly_dump_next_run field. Supabase constants include MONTHLY_DUMPS table and bucket. Migration comment clarified.
Backend Controller & Notification Service
backend/controllers/monthly_dump_controller.py, backend/services/notification_enqueue_service.py
MonthlyDumpController.get_dump adds status: "completed" filter. New NotificationEnqueueService.enqueue_monthly_dump_notifications(user_ids, month) fetches tokens, constructs month-specific payload with page URL, and enqueues push notifications.
Backend Queue Processing
backend/services/queues/monthly_dump_queue_service.py
process_queue now parses month from messages, collects successful user IDs by month, and batches notification enqueueing via NotificationEnqueueService. _process_message return type changed to Optional[str] (returns user ID on success or None); error handling no longer calls _handle_failure.
Backend Tests
backend/tests/test_monthly_dump_queue_notifications.py
Two async test cases verify empty-entry failure reporting and successful notification enqueueing with correct user batching by month.
Frontend Service & Cache
frontend/services/monthly-dump-service.ts
Introduces MonthlyDumpService with Zod-validated input/response schemas. Provides methods to fetch/cache monthly dumps, manage photo entries, and handle idempotent custom-grid enqueueing with background upload processing. Stores generated grid images to Supabase and syncs cached slide URLs.
Frontend Hook & Phone Sheet
frontend/hooks/use-monthly-dump.ts, frontend/hooks/phone-number/use-manage-phone-sheet.ts
useMonthlyDump computes dump availability window (first/last days of month), fetches via React Query, transforms slide types/URLs, and merges pending local slides. useManagePhoneSheet checks for existing pending phone updates and prompts visibility.
Frontend Slide Components
frontend/components/monthly-dumps/monthly-dump-video-slide.tsx, frontend/components/monthly-dumps/monthly-dump-audio-slide.tsx, frontend/components/monthly-dumps/monthly-dump-grid-prompt-slide.tsx, frontend/components/monthly-dumps/monthly-dump-progress-bar-item.tsx
Video slide with error/loading states; audio slide with month label; grid-prompt slide with "Make your grid" CTA; progress bar item with Reanimated-driven fill width animation.
Frontend Photo Picker & Banner
frontend/components/monthly-dumps/photo-grid-picker.tsx, frontend/components/monthly-dumps/monthly-dump-banner.tsx
PhotoGridPicker renders infinite-scrolled 3-column photo grid with selection limit (6 max), off-screen ViewShot capture, and completion payload. MonthlyDumpBanner animates opacity/width/borderRadius via animationProgress and navigates to dump view on press.
Frontend Header & Date Integration
frontend/components/capture/capture-header.tsx, frontend/components/date-container.tsx
CaptureHeader accepts recap-related props (onDatePress, showRecapChip, recapChipText, highlightDateBorder). DateContainer wraps content in Pressable, conditionally renders recap chip, and applies highlighted border styling.
Frontend Main Screens
frontend/app/capture/index.tsx, frontend/app/monthly-dumps/[month].tsx
CaptureScreen integrates recap banner with animation state and timer-driven reveal/close. MonthlyDumpPage loads dump slides, adds grid-prompt terminal slide, handles slide navigation via taps, prefetches image URLs, manages custom grid creation via mutation, and renders appropriate media components.
Frontend Tests & Configuration
frontend/app/capture/__tests__/banner-visibility.test.tsx, frontend/hooks/__tests__/use-monthly-dump.test.tsx, frontend/jest.setup.js
Added capture-screen banner visibility tests (no dump, recap visible, banner interaction). Added useMonthlyDump tests for month computation, fetch handling, and slide transformation. Jest setup mocks Reanimated, expo-blur, and lucide-react-native icons.
Documentation & Guidelines
frontend/AGENTS.md
Added Zod input-validation requirements before Supabase database calls and backend API invocations.

Sequence Diagram(s)

sequenceDiagram
    participant Backend as Backend Queue
    participant NotifSvc as Notification Service
    participant FrontendHook as Frontend useMonthlyDump
    participant Supabase as Supabase
    participant User as User

    Backend->>Backend: process_queue() reads messages
    Backend->>Backend: _process_message(): fetch entries,<br/>build dump, return user_id
    Backend->>NotifSvc: enqueue_monthly_dump_notifications(user_ids, month)
    NotifSvc->>Supabase: filter users by push_notifications<br/>fetch push tokens
    NotifSvc->>NotifSvc: construct month-specific payload<br/>with page_url = /monthly-dumps/{month}
    NotifSvc->>Supabase: enqueue push notification
    Supabase-->>User: push notification received

    User->>FrontendHook: tap banner / navigate to dump
    FrontendHook->>FrontendHook: isEnabled = true?<br/>(first 4 or last 3 days)
    FrontendHook->>Supabase: fetch monthly_dumps (completed)
    Supabase-->>FrontendHook: return dump + slides
    FrontendHook->>FrontendHook: transform URLs<br/>merge pending local slides
    FrontendHook-->>User: render slides<br/>video/audio/photo/grid-prompt
Loading

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly Related PRs

Poem

🐰 Hops of joy for monthly cheer!
Slides cascade through the year,
Photos dance, grids unite,
Recaps glow with Sparkles bright.
Notifications hop to users true—
Your monthly dump awaits you! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the main changes: implementing push notifications for monthly dumps and building the frontend UI/components to display them.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@fortune710 fortune710 marked this pull request as ready for review May 4, 2026 02:55

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Nitpick comments (5)
frontend/hooks/phone-number/use-manage-phone-sheet.ts (2)

7-7: ⚡ Quick win

Add a docstring to this custom hook.

New hooks in frontend/**/hooks/** should include a docstring explaining purpose and behavior.

As per coding guidelines frontend/**/hooks/**/*.{ts,tsx}: “ALL custom hooks created must have docstrings”.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/hooks/phone-number/use-manage-phone-sheet.ts` at line 7, Add a
JSDoc-style docstring above the custom hook function useManagePhoneSheet
explaining its purpose and behavior: what the hook manages (e.g.,
opening/closing the phone management sheet, form state, side effects), the core
behaviors (inputs, outputs, returned values or handlers), and any important
invariants or lifecycle notes; use a /** ... */ block placed immediately above
the export function useManagePhoneSheet() and include short `@returns` and
`@example` or `@remarks` lines if applicable to clarify the hook's API.

41-41: ⚡ Quick win

Avoid swallowing async errors silently.

The empty catch hides failures and makes prompt-state bugs hard to diagnose. At minimum, set a deterministic fallback and log/report once.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/hooks/phone-number/use-manage-phone-sheet.ts` at line 41, The call
to checkShouldShowPhonePrompt() currently swallows any error; change its catch
to log or report the error and apply a deterministic fallback so failures don't
leave the UI in an indeterminate state — e.g., replace the empty catch with one
that calls your logger/reporting utility (or console.error) with the caught
error and then sets the prompt visibility fallback (for example via whatever
state setter controls the sheet) so the app has a known behavior when
checkShouldShowPhonePrompt() rejects.
frontend/app/capture/__tests__/banner-visibility.test.tsx (1)

106-113: ⚡ Quick win

Assert the toggle outcome, not just that pressing doesn't crash.

Because the banner mock always renders monthly-dump-banner, the third test still passes if the press handler stops toggling anything. Make the mock reflect the banner's visible/open prop (or render conditionally) and assert the before/after state so this catches regressions in the actual interaction.

Also applies to: 152-178

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/app/capture/__tests__/banner-visibility.test.tsx` around lines 106 -
113, The mock for the MonthlyDumpBanner currently always renders the testID
"monthly-dump-banner", so presses can’t fail the visibility assertion; update
the jest.mock block to accept props (e.g., ({ visible, open })) and render
conditionally (return <View testID="monthly-dump-banner" /> only when
visible/open is true), then update the tests that simulate the press to assert
the banner's presence before the press and its absence (or vice versa) after the
press using queryByTestId/getByTestId; locate the jest.mock block and the tests
that press the toggle and replace their current existence-only assertions with
before/after assertions against "monthly-dump-banner".
backend/tests/test_monthly_dump_queue_notifications.py (1)

15-16: ⚡ Quick win

Patch constructor dependencies before creating the service.

MonthlyDumpQueueService() still calls get_supabase_client(), QueueService(), MonthlyDumpService(), and MonthlyDumpController() before the test swaps in mocks, so these cases can fail on env/config setup instead of the queue logic under test.

🧪 Suggested setup
- service = MonthlyDumpQueueService()
+ with patch("services.queues.monthly_dump_queue_service.get_supabase_client", return_value=MagicMock()), \
+      patch("services.queues.monthly_dump_queue_service.QueueService"), \
+      patch("services.queues.monthly_dump_queue_service.MonthlyDumpService"), \
+      patch("services.queues.monthly_dump_queue_service.MonthlyDumpController"):
+     service = MonthlyDumpQueueService()

Also applies to: 56-57

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/tests/test_monthly_dump_queue_notifications.py` around lines 15 - 16,
The test creates a MonthlyDumpQueueService instance before its external
dependencies are patched, causing real calls to get_supabase_client(),
QueueService(), MonthlyDumpService(), and MonthlyDumpController; change the test
(and the other occurrence at lines ~56-57) to patch/monkeypatch/mock these
constructors/functions first (patch get_supabase_client, QueueService,
MonthlyDumpService, MonthlyDumpController) and only then instantiate
MonthlyDumpQueueService in
test_monthly_dump_queue_processes_missing_entries_as_failed so the service uses
the mocked dependencies during the test.
frontend/hooks/use-monthly-dump.ts (1)

58-58: ⚡ Quick win

Add a docstring for this exported hook.

useMonthlyDump has a non-obvious contract: it computes a month window, conditionally enables fetching, and merges cached local slides. A short JSDoc here will save callers from re-deriving those rules.

Suggested docstring
+/**
+ * Returns the current user's monthly dump data.
+ * If `requestedMonth` is omitted, fetching is only enabled during the
+ * first 4 days of a month or the last 3 days of the current month.
+ */
 export function useMonthlyDump(requestedMonth?: string): UseMonthlyDumpResult {

As per coding guidelines "ALL custom hooks created must have docstrings".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/hooks/use-monthly-dump.ts` at line 58, Add a JSDoc block above the
exported hook function useMonthlyDump that documents its public contract:
explain the requestedMonth? parameter (format/expected values and that it will
be used to compute the month window), describe that the hook conditionally
enables data fetching (when/why fetch is skipped), state that it merges cached
local slides with fetched data, and list the shape/meaning of the returned
UseMonthlyDumpResult (key fields consumers will use). Keep it short, focused,
and placed directly above the useMonthlyDump function declaration.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@backend/services/notification_enqueue_service.py`:
- Around line 298-299: Replace interpolated log messages that embed dynamic
values with structured logging using the extra dict: for the logger.info call
that currently uses f"No recipients with push_notifications enabled for
{month_name} dump batch" (and the similar logger calls around the same block at
lines 304-305), pass a static message string and supply the dynamic value(s) via
extra (e.g. logger.info("No recipients with push_notifications enabled for dump
batch", extra={"month_name": month_name})). Locate the calls by searching for
the logger.info statements in the notification enqueue routine (the function
containing the shown lines) and update all such interpolated logs to use extra
with descriptive keys for each dynamic variable.

In `@backend/services/queues/monthly_dump_queue_service.py`:
- Around line 116-119: The current logic calls
NotificationEnqueueService.enqueue_monthly_dump_notifications after the
monthly-dump job is marked completed and the source queue message deleted (in
process_queue()), which can lose notifications if enqueue fails; fix by making
the enqueue durable: either move the enqueue call into the per-message retry
path inside process_queue() so the source message is not acknowledged/deleted
until enqueue_monthly_dump_notifications(user_ids, msg_month) succeeds, or
persist a notification-pending record (e.g., set a "notification_pending"
flag/state tied to the monthly dump/job or each msg_month in the DB) before
deleting/marking the source message and have a separate retry worker that reads
those pending records and calls
NotificationEnqueueService.enqueue_monthly_dump_notifications until success;
update the code paths that currently call enqueue_monthly_dump_notifications
(including where month_to_user_ids is iterated) to implement one of these
durable approaches and ensure failures are retried or retrievable.

In `@frontend/app/capture/index.tsx`:
- Around line 131-132: canShowRecap currently returns true when month is present
and isEnabled is true even if no dump exists; update the boolean expression so
the recap CTA only appears when a dump actually exists by requiring hasDump to
be truthy as well (i.e., change the condition involving canShowRecap to include
hasDump alongside month and isEnabled — reference symbols: canShowRecap, month,
hasDump, isEnabled).

In `@frontend/app/monthly-dumps/`[month].tsx:
- Around line 33-36: The allSlides useMemo always appends a { type:
'grid_prompt' } slide even when there is no monthly dump, causing
MonthlyDumpService.processGridQueueItem() to fail; update the useMemo
(allSlides) to only append the grid_prompt when the dump exists (use the hasDump
flag returned from useMonthlyDump(month) or equivalent) so that when hasDump is
false you return just baseSlides (or an empty state UI) and do not enqueue the
grid prompt.

In `@frontend/hooks/phone-number/use-manage-phone-sheet.ts`:
- Line 1: The import list in use-manage-phone-sheet.ts includes an unused symbol
useCallback; edit the top-level import statement that currently reads "import {
useState, useEffect, useCallback } from 'react';" and remove useCallback so only
used hooks (useState, useEffect) are imported to satisfy lint rules and
eliminate the unused-import error.
- Line 16: The early return in the use-manage-phone-sheet hook (the clause
checking if (!user?.id)) leaves the previous showPhoneSheet state unchanged and
can leave the sheet visible after logout; update that branch to explicitly reset
the visibility (call the state updater that controls showPhoneSheet, e.g.,
setShowPhoneSheet(false) or equivalent) before returning so the sheet is closed
whenever there is no user id.
- Around line 12-36: The Supabase table read inside useEffect (the
supabase.from(TABLES.PHONE_NUMBER_UPDATES).select... call in
checkShouldShowPhonePrompt) must be refactored to use a useQuery hook instead:
create a query (e.g., useQuery(['phone_updates', user?.id], fetcher)) that calls
supabase.from(TABLES.PHONE_NUMBER_UPDATES).select('id').eq('user_id',
user.id).maybeSingle(), import and use that hook outside of useEffect, and read
pendingRecord from the query result inside useEffect; keep getPhonePromptState
and the cancelled/setShowPhoneSheet logic in checkShouldShowPhonePrompt but
replace the inline Supabase call with the query result (handle loading and
undefined user.id by early returning). Ensure the query key includes user.id and
avoid calling setShowPhoneSheet when the effect is cancelled or when the query
is still loading.

In `@frontend/hooks/use-monthly-dump.ts`:
- Around line 61-85: The hook currently trusts requestedMonth and may forward a
malformed value into downstream calls; validate requestedMonth with your
existing zod schema (the same one used by getCachedMonthlyDump) before using it
in the useMemo that computes isEnabled and dumpMonth — if validation fails,
return { isEnabled: false, dumpMonth: '' } (or undefined) so no backend call is
made; update the useMemo block that references requestedMonth and the returned
values isEnabled/dumpMonth accordingly and ensure getCachedMonthlyDump is only
invoked when the validated dumpMonth passes zod.

---

Nitpick comments:
In `@backend/tests/test_monthly_dump_queue_notifications.py`:
- Around line 15-16: The test creates a MonthlyDumpQueueService instance before
its external dependencies are patched, causing real calls to
get_supabase_client(), QueueService(), MonthlyDumpService(), and
MonthlyDumpController; change the test (and the other occurrence at lines
~56-57) to patch/monkeypatch/mock these constructors/functions first (patch
get_supabase_client, QueueService, MonthlyDumpService, MonthlyDumpController)
and only then instantiate MonthlyDumpQueueService in
test_monthly_dump_queue_processes_missing_entries_as_failed so the service uses
the mocked dependencies during the test.

In `@frontend/app/capture/__tests__/banner-visibility.test.tsx`:
- Around line 106-113: The mock for the MonthlyDumpBanner currently always
renders the testID "monthly-dump-banner", so presses can’t fail the visibility
assertion; update the jest.mock block to accept props (e.g., ({ visible, open
})) and render conditionally (return <View testID="monthly-dump-banner" /> only
when visible/open is true), then update the tests that simulate the press to
assert the banner's presence before the press and its absence (or vice versa)
after the press using queryByTestId/getByTestId; locate the jest.mock block and
the tests that press the toggle and replace their current existence-only
assertions with before/after assertions against "monthly-dump-banner".

In `@frontend/hooks/phone-number/use-manage-phone-sheet.ts`:
- Line 7: Add a JSDoc-style docstring above the custom hook function
useManagePhoneSheet explaining its purpose and behavior: what the hook manages
(e.g., opening/closing the phone management sheet, form state, side effects),
the core behaviors (inputs, outputs, returned values or handlers), and any
important invariants or lifecycle notes; use a /** ... */ block placed
immediately above the export function useManagePhoneSheet() and include short
`@returns` and `@example` or `@remarks` lines if applicable to clarify the hook's API.
- Line 41: The call to checkShouldShowPhonePrompt() currently swallows any
error; change its catch to log or report the error and apply a deterministic
fallback so failures don't leave the UI in an indeterminate state — e.g.,
replace the empty catch with one that calls your logger/reporting utility (or
console.error) with the caught error and then sets the prompt visibility
fallback (for example via whatever state setter controls the sheet) so the app
has a known behavior when checkShouldShowPhonePrompt() rejects.

In `@frontend/hooks/use-monthly-dump.ts`:
- Line 58: Add a JSDoc block above the exported hook function useMonthlyDump
that documents its public contract: explain the requestedMonth? parameter
(format/expected values and that it will be used to compute the month window),
describe that the hook conditionally enables data fetching (when/why fetch is
skipped), state that it merges cached local slides with fetched data, and list
the shape/meaning of the returned UseMonthlyDumpResult (key fields consumers
will use). Keep it short, focused, and placed directly above the useMonthlyDump
function declaration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2e549207-f4a9-4faa-bafd-c8ba6a1a7dfb

📥 Commits

Reviewing files that changed from the base of the PR and between 0634744 and f5acee3.

⛔ Files ignored due to path filters (7)
  • supabase/.temp/cli-latest is excluded by !**/.temp/**
  • supabase/.temp/gotrue-version is excluded by !**/.temp/**
  • supabase/.temp/pooler-url is excluded by !**/.temp/**
  • supabase/.temp/postgres-version is excluded by !**/.temp/**
  • supabase/.temp/project-ref is excluded by !**/.temp/**
  • supabase/.temp/rest-version is excluded by !**/.temp/**
  • supabase/.temp/storage-version is excluded by !**/.temp/**
📒 Files selected for processing (24)
  • backend/controllers/monthly_dump_controller.py
  • backend/services/notification_enqueue_service.py
  • backend/services/queues/monthly_dump_queue_service.py
  • backend/tests/test_monthly_dump_queue_notifications.py
  • frontend/AGENTS.md
  • frontend/app/capture/__tests__/banner-visibility.test.tsx
  • frontend/app/capture/index.tsx
  • frontend/app/monthly-dumps/[month].tsx
  • frontend/components/capture/capture-header.tsx
  • frontend/components/date-container.tsx
  • frontend/components/monthly-dumps/monthly-dump-audio-slide.tsx
  • frontend/components/monthly-dumps/monthly-dump-banner.tsx
  • frontend/components/monthly-dumps/monthly-dump-grid-prompt-slide.tsx
  • frontend/components/monthly-dumps/monthly-dump-progress-bar-item.tsx
  • frontend/components/monthly-dumps/monthly-dump-video-slide.tsx
  • frontend/components/monthly-dumps/photo-grid-picker.tsx
  • frontend/constants/supabase.ts
  • frontend/hooks/__tests__/use-monthly-dump.test.tsx
  • frontend/hooks/phone-number/use-manage-phone-sheet.ts
  • frontend/hooks/use-monthly-dump.ts
  • frontend/jest.setup.js
  • frontend/services/monthly-dump-service.ts
  • frontend/supabase/migrations/20260420043600_init_monthly_dump_next_run.sql
  • frontend/types/database.ts

Comment thread backend/services/notification_enqueue_service.py Outdated
Comment thread backend/services/queues/monthly_dump_queue_service.py Outdated
Comment thread frontend/app/capture/index.tsx Outdated
Comment thread frontend/app/monthly-dumps/[month].tsx Outdated
Comment thread frontend/hooks/phone-number/use-manage-phone-sheet.ts Outdated
Comment thread frontend/hooks/phone-number/use-manage-phone-sheet.ts
Comment thread frontend/hooks/phone-number/use-manage-phone-sheet.ts Outdated
Comment thread frontend/hooks/use-monthly-dump.ts
@fortune710 fortune710 merged commit 497d6db into staging Jun 1, 2026
2 of 3 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