Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Refresh the repository tab counts while the page is open

a2ec95616f4216c743cb1ae358ef8e9449ad8d1f · Keenan Nemetz · 9d ago · parent 0789f22e

Refresh the repository tab counts while the page is open

The header's open counts were only as fresh as the page load, so a reader
watching a repository had to reload to find out that an issue or a change had
been opened.

The tabs now poll /r/{name}/counts every 30s while the page is visible. The
response is the two badges as out-of-band updates, so the current tab, the
clone menu and anything the reader has typed stay where they are. A badge that
moves keeps one short ring, because a number changing elsewhere on the screen
is easy to miss. The endpoint answers 404 for a repository the viewer cannot
read, like every other page under /r/{name}.

server/routes.go +3−1

@@ -105,8 +105,10 @@ func (s *Server) adminRoutes(mux *http.ServeMux) {
105 105 func (s *Server) repoRoutes(mux *http.ServeMux) {
106 106 w := s.Web
107 107
108 // Repository summary and feed.
108 // Repository summary and feed, and the header's open counts. The tabs poll
109 // the counts while the page is visible.
109 110 mux.HandleFunc("GET /r/{name}", w.Overview)
111 mux.HandleFunc("GET /r/{name}/counts", w.RepoCounts)
110 112 mux.HandleFunc("GET /r/{name}/activity", w.Activity)
111 113
112 114 // Code browsing: one route per view of a ref, with the path as a wildcard