feat(realtime): live admin room list (LC-177) #222
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-177-live-admin-rooms"
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?
Closes LC-177 (split from LC-175). The admin room list (
/admin/rooms) was static-on-load: edit / invite / regenerate-invite changed a#room-{id}row only in the acting admin's response, and archive removed it only there. Mechanically symmetric to the LC-175 admin-user surface.Changes
AdminRoomChanged { room_id, removed }event, broadcast on theadmintopic.render_room_row(called by edit / invite / regenerate) fires it withremoved = false;post_archive_roomfiresremoved = true.#room-{id}row OOB (RoomRowFragmentgains anoobflag) or anhx-swap-oob="delete"tombstone (room_row_delete.html).build_admin_room_viewis factored out ofrender_room_rowand shared with the WS renderer.admin_layout.htmlalready subscribes admin pages to theadmintopic (LC-175), so no template-subscribe change. The WS arm +render_admin_room_roware#[cfg(standalone)](admin routes are standalone-only); in saas the event never fires and falls torender_event(None).admin/rooms.htmlgets{% let oob = false %}before the row loop so the page-render include resolves the new conditional.Verification
just teststandalone green (106 ok).just test-saasgreen except the documentedroutes_uploadsnondeterministic flake (its own parallel test threads race on shared upload-dir state) - confirmed 12/12 passing single-threaded in saas; this change touches only the admin room list + ws.rs + events, nothing upload-related.cargo clippy/cargo fmtclean. Regression test (routes_quotas::admin_room_list_is_wired_for_live_row_updates) asserts the OOB-targetable row id and that page-rendered rows are not themselves OOB.Second admin surface of LC-175, split out. The admin room list (/admin/rooms) was static-on-load: edit / invite / regenerate-invite changed a #room-{id} row only in the acting admin's response, and archive removed it only there. Mechanically symmetric to the LC-175 admin-user surface. - New AdminRoomChanged { room_id, removed } event, broadcast on the `admin` topic. render_room_row (called by edit / invite / regenerate) fires it with removed=false; post_archive_room fires removed=true. - The WS send task renders the matching #room-{id} row OOB (RoomRowFragment gains an `oob` flag) or an hx-swap-oob="delete" tombstone (room_row_delete.html). build_admin_room_view is factored out of render_room_row and shared with the WS renderer. - admin_layout.html already subscribes admin pages to the `admin` topic (LC-175), so no template-subscribe change. The WS arm + render_admin_room_row are #[cfg(standalone)] (admin routes are standalone-only); in saas the event never fires and falls to render_event (None). admin/rooms.html gets `{% let oob = false %}` before the row loop so the page-render include resolves the new conditional. Regression test asserts the room list renders the OOB-targetable row id and that page-rendered rows are not themselves OOB. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>