Skip to content

feat(engagement): add manual refresh RPC + dashboard e2e test (#175)#235

Merged
Azfe merged 3 commits into
developfrom
feat/n04-03-engagement-dashboard
Jul 11, 2026
Merged

feat(engagement): add manual refresh RPC + dashboard e2e test (#175)#235
Azfe merged 3 commits into
developfrom
feat/n04-03-engagement-dashboard

Conversation

@Azfe

@Azfe Azfe commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Expose public.refresh_post_engagement_daily() (SECURITY DEFINER, guarded by is_manager()) so the dashboard can be refreshed on demand — the materialized view lives in the private schema and was not reachable from a client. It refreshes non-concurrently because PostgREST wraps each request in a transaction; the hourly pg_cron job keeps using CONCURRENTLY.

Add the DoD's end-to-end test: seed sessions, refresh manually and assert the numbers the screen consumes, covering engagement_sessions → materialized view → public view → listPostEngagement(), plus RBAC.

Closes #175

@Azfe
Azfe merged commit 3d156fd into develop Jul 11, 2026
6 checks passed
@Azfe
Azfe deleted the feat/n04-03-engagement-dashboard branch July 11, 2026 13:06
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