Why
The repository header shows how many issues and change requests are open, but those numbers are only as fresh as the page load. A reader who is watching a repository — waiting for a report, a review, a fix — has to reload to find out that something new arrived.
Scope
- Poll the two open counts from the repository header while the page is visible, so a new issue or change request appears in the tabs without a reload.
- Replace only the count badges. The current tab, the clone menu, an open search field, and any form the reader has half-filled must stay where they are.
- Make a count that moved noticeable: a number changing behind the reader is easy to miss.
- Stop polling while the page is hidden, so a forgotten tab does not keep asking.
- The new endpoint keeps the same rule as every other
/r/{name}route: a private repository answers 404 to a viewer who cannot read it.
Acceptance criteria
GET /r/{name}/countsreturns just the two badges as out-of-band updates, and 404 for a repository the viewer cannot read.- A page left open on
/r/{name}/issuesshows a newly opened issue’s count within roughly half a minute. - The poll and the page agree on the badge ids, and a badge that changes is briefly highlighted.
go vetandgo testpass with the tags the verify workflow uses.