Commits
2026-07-24
perf: ⚡ visibility-aware polling and deduped shell feed - add src/lib/create-live-poll.ts: interval runs only while the tab is visible, refetches on tab-back (visibilitychange + focus, 1s dedupe), pauses when hidden; colocated test - appointments-page: 30s raw poll → createLivePoll at 10s, so a cross-actor status change (approve/reject/cancel by the other party) is instant on tab-back instead of up to 30s stale - add src/stores/shell-feed-context.tsx: one ShellFeedProvider holding a single poll for messages/events/exams/appointments/homework, fetched once and read via resource.latest; fetch gated on auth.user() - right-nav + notification-center: drop their duplicate per-component resources and local timers, read from useShellFeed instead — shell goes from ~8 GETs/min across two pollers to ~5 from one - notification-center derives unread by filtering the shared inbox instead of a separate read:false fetchAhmet Kaan Gümüş · e70073f
perf: ⚡ visibility-aware polling and deduped shell feed - add src/lib/create-live-poll.ts: interval runs only while the tab is visible, refetches on tab-back (visibilitychange + focus, 1s dedupe), pauses when hidden; colocated test - appointments-page: 30s raw poll → createLivePoll at 10s, so a cross-actor status change (approve/reject/cancel by the other party) is instant on tab-back instead of up to 30s stale - add src/stores/shell-feed-context.tsx: one ShellFeedProvider holding a single poll for messages/events/exams/appointments/homework, fetched once and read via resource.latest; fetch gated on auth.user() - right-nav + notification-center: drop their duplicate per-component resources and local timers, read from useShellFeed instead — shell goes from ~8 GETs/min across two pollers to ~5 from one - notification-center derives unread by filtering the shared inbox instead of a separate read:false fetch