feat(realtime): live invitations page (LC-161, first surface) #212
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-161-live-invitations"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
First stale-surface fill for LC-161: the invitations page now updates live.
Problem
The page was static-on-load - a new invite, or an accept/decline in another tab, did not reflect until reload.
How
EnclaveInvitationCreated/EnclaveInvitationResolvedalreadybroadcast_to_user, so every one of the user's tabs already receives them; the only gap was the WS send task had no OOB render arm. Addedrender_invitations(gated oninvitee_id == the connection's user) that re-renders the pending-invitations region as anhx-swap-oobfragment. The dynamic region is extracted into a shared partial (invitations/items.html) used by both the full page (#lc-invitations) and the OOB fragment (ws/invitations_live.html) so they render identically; on tabs not on the invitations page there is no matching id and htmx drops the swap.No topic subscription needed here -
broadcast_to_useralready fans out to all the user's connections. The LC-160 typed-topic channel is for surfaces whose events are not already per-user (e.g. the enclave member list, which needs a newenclave:broadcast) - tracked as follow-ups.Test
just check(Askama templates incl. the shared partial compile),routes_enclave+routes_enclave_navgreen (they render the invitations page through the new partial).just test/test-saasotherwise green (the lone saas failure is the pre-existing nondeterministicroutes_uploadsflake; no upload/room code touched). The WS OOB render path has no unit harness in this repo (consistent with the other send-task arms); the fragment shares the page's partial, so a render regression would fail the page-render route tests.Part of the LC-156 epic / LC-161.
🤖 Generated with Claude Code