feat(day-planner): refetch on app/window foreground #467

Merged
admin-mrrm merged 2 commits from feat/day-planner-refresh-on-focus into main 2026-06-12 17:26:43 +02:00
Collaborator

Fixes #465

Summary

  • Web: useDayPlan opts into refetchOnWindowFocus: true (overrides global default).
  • Mobile: apps/mobile/app/_layout.tsx wires AppState → react-query focusManager.setFocused so coming back from background triggers a refetch.

Why

Day-Planner stale data persisted across foreground transitions on mobile because the global QueryClient has refetchOnWindowFocus: false and mobile has no inherent window-focus event. Bridging AppState makes the bahavior consistent across web and mobile.

Test plan

  • tsc --noEmit mobile + feature-day-planner
  • Manual: web — switch tab, return, verify network call to /planner/today
  • Manual: mobile — background app via home gesture, return, verify network call

🤖 Generated with Claude Code

Fixes #465 ## Summary - Web: `useDayPlan` opts into `refetchOnWindowFocus: true` (overrides global default). - Mobile: `apps/mobile/app/_layout.tsx` wires `AppState` → react-query `focusManager.setFocused` so coming back from background triggers a refetch. ## Why Day-Planner stale data persisted across foreground transitions on mobile because the global QueryClient has `refetchOnWindowFocus: false` and mobile has no inherent window-focus event. Bridging AppState makes the bahavior consistent across web and mobile. ## Test plan - [x] `tsc --noEmit` mobile + feature-day-planner - [ ] Manual: web — switch tab, return, verify network call to `/planner/today` - [ ] Manual: mobile — background app via home gesture, return, verify network call 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(day-planner): refetch on app/window foreground
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
e8ff20d703
Fixes #465

Web: useDayPlan opts into refetchOnWindowFocus. Mobile: bridge
AppState 'active' to react-query focusManager so foreground brings
the plan up to date even when the device was offline mid-session.
Merge branch 'main' into feat/day-planner-refresh-on-focus
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
333c749361
admin-mrrm deleted branch feat/day-planner-refresh-on-focus 2026-06-12 17:26:43 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
admin-mrrm/mrrmlabapp!467
No description provided.