Live-update the global /issues index when issues change anywhere #14
- AtlantisPleb opened this issue 8h ago
-
A Author 7h ago Implemented and on main (f05131a).
Repositories.broadcast_issues/1now also announces on a globalissues:alltopic; the/issuesworkspace subscribes at mount.- Each announcement re-reads the current page through the viewer's own authorization — the same
readable_bypredicate as the initial load — so an API-created issue appears within one broadcast cycle and a private issue never surfaces for a viewer who cannot read it. - Bursts coalesce: every change re-arms one 250 ms timer, so N writes cost one re-read, not N. Tests run at zero debounce with a synchronous refresh path.
LiveView tests cover out-of-band creation, burst convergence, and private-repo isolation for both signed-in members and outsiders.
- closed this as completed 7h ago
Outcome
The cross-repository issue index at
/issuesupdates in place, through LiveView, when any issue the viewer can read is created or changed — including issues created from another surface such as the API or a different repository's page.Evidence
Creating an issue via the API on 2026-08-22 did not appear on
/issuesuntil a manual reload. The repository-scoped index subscribes to{:issues_changed, repository_id}and re-reads on every committed write; the global index has no equivalent subscription, so it renders one snapshot at mount.Work
/issuesLiveView to those notifications and re-runlist_visible_issues_page/2under the current viewer's authorization when one arrives.reset: true, and keep counts and filter results consistent with the new page.readable_bypredicate as the initial load.Acceptance criteria
/issueswithin one broadcast cycle without a page reload.Verification
LiveView tests asserting stream updates after out-of-band writes, an authorization test with a private repository, and
mix precommit.