Why
The open counts beside the Issues and Changes tabs only moved when the page was loaded, so a reader watching a repository had to reload to learn that new work had arrived.
What changed
- The repository header polls
GET /r/{name}/countsevery 30 seconds while the page is visible. The response is the two badges as out-of-band updates, so the current tab, the clone menu, a search field and any half-filled form stay where the reader left them. RepoCountsreads the sameopenCountsthe page did and answers 404 for a repository the viewer cannot read, like every other route below/r/{name}.- A badge whose number moved keeps one short ring (
app.jscompares the counts after each out-of-band swap), because a number changing elsewhere on the screen is easy to miss. The reduced-motion rule still applies. - The count markup moved into two small templates (
repo_issue_count,repo_request_count) so the page and the poll cannot drift apart on the element ids the swap matches.
Tests
TestRepoTabCountsPollOutOfBand(server): the page carries the poll and both badges, the response is exactly two out-of-band badges, and an unknown repository answers 404.TestRepositoryPagesShareTheTabHeaderandTestRepoTabsCountOpenIssuesAndRequestsupdated for the badge ids.vole workflow checkandvole workflow run verifyboth pass.
Closes #141