Commit 1d5c725320
1d5c7253202b03717f9410a2646583b1310b2f63
parent: b754784fc6
Verified · cmc
cmc <hello@cleberg.net> · 2026-08-25T15:24:12Z
Render dashboard pins as compact name pills
Pinned repos are familiar by definition; the full repo row's
description, topics, and meta are noise there. A wrapped row of
owner/name pills replaces the list, and the dashboard no longer
computes descriptions or licenses for pinned repos.
internal/httpd/web.go
+2 −2
| @@ -136,10 +136,10 @@ func (s *Server) dashboard(w http.ResponseWriter, r *http.Request, viewer store. |
| 136 | 136 | s.render(w, "dashboard.html", struct { |
| 137 | 137 | Site string |
| 138 | 138 | Viewer string |
| 139 | | Pinned []describedRepo |
| 139 | Pinned []store.Repo |
| 140 | 140 | MRs []store.DashboardItem |
| 141 | 141 | Issues []store.DashboardItem |
| 142 | | }{s.siteName(), viewer.Username, s.describeAll(visible), mrs, issues}) |
| 142 | }{s.siteName(), viewer.Username, visible, mrs, issues}) |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | func (s *Server) explore(w http.ResponseWriter, r *http.Request) { |
internal/web/static/style.css
+18
| @@ -342,6 +342,24 @@ ul.repolist { |
| 342 | 342 | overflow: hidden; |
| 343 | 343 | } |
| 344 | 344 | ul.repolist li { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--faint); } |
| 345 | /* pinned repos: a compact wrap of name pills, no description or meta */ |
| 346 | ul.pinlist { |
| 347 | list-style: none; |
| 348 | margin: var(--sp-3) 0 var(--sp-5); |
| 349 | padding: 0; |
| 350 | display: flex; |
| 351 | flex-wrap: wrap; |
| 352 | gap: var(--sp-2); |
| 353 | } |
| 354 | ul.pinlist li { |
| 355 | border: 1px solid var(--line); |
| 356 | border-radius: var(--r-md); |
| 357 | padding: var(--sp-1) var(--sp-3); |
| 358 | } |
| 359 | ul.pinlist li:hover { background: var(--surface); } |
| 360 | ul.pinlist li a { color: var(--fg); } |
| 361 | ul.pinlist li a:hover { color: var(--accent); text-decoration: none; } |
| 362 | ul.pinlist .sep { color: var(--muted); margin: 0 0.15em; } |
| 345 | 363 | ul.repolist li:last-child { border-bottom: none; } |
| 346 | 364 | ul.repolist li:hover { background: var(--surface); } |
| 347 | 365 | ul.repolist li.empty { color: var(--muted); } |
internal/web/templates/dashboard.html
+2 −2
| @@ -6,8 +6,8 @@ |
| 6 | 6 | <p class="toolbar">logged in as <a href="/{{.Viewer}}">{{.Viewer}}</a></p> |
| 7 | 7 | </div> |
| 8 | 8 | {{if .Pinned}}<h2>pinned</h2> |
| 9 | | <ul class="repolist"> |
| 10 | | {{range .Pinned}}{{template "reporow" .}} |
| 9 | <ul class="pinlist"> |
| 10 | {{range .Pinned}}<li><a href="/{{.OwnerName}}/{{.Name}}">{{.OwnerName}}<span class="sep">/</span><strong>{{.Name}}</strong></a>{{if eq .Visibility "private"}} <span class="chip chip-neutral">private</span>{{end}}</li> |
| 11 | 11 | {{end}} |
| 12 | 12 | </ul>{{end}} |
| 13 | 13 | <h2>open merge requests <span class="count">{{len .MRs}}</span></h2> |