The notification feed polls every 60 seconds (src/lib/use-notifications.ts). That is deliberate and cheap, but it means a comment can sit unseen for a minute, and every open tab queries the database on a timer all day.
Supabase Realtime could push these instead.
What to think about before building
This is not a straight win, so the investigation is part of the work:
- The
taskflow schema is not exposed to the Data API, and anon has no grants (supabase/migrations/20260727092031_taskflow_enable_rls.sql). Realtime would need that changed, which is a security decision, not a detail.
- RLS on
Notification already restricts rows to their recipient, which is the right foundation.
- Polling should stay as a fallback for anyone who hasn't enabled Realtime.
Acceptance criteria
Worth commenting on the issue with your approach before writing much code.
The notification feed polls every 60 seconds (
src/lib/use-notifications.ts). That is deliberate and cheap, but it means a comment can sit unseen for a minute, and every open tab queries the database on a timer all day.Supabase Realtime could push these instead.
What to think about before building
This is not a straight win, so the investigation is part of the work:
taskflowschema is not exposed to the Data API, andanonhas no grants (supabase/migrations/20260727092031_taskflow_enable_rls.sql). Realtime would need that changed, which is a security decision, not a detail.Notificationalready restricts rows to their recipient, which is the right foundation.Acceptance criteria
Worth commenting on the issue with your approach before writing much code.