xonecas.io
8356
Wx

www-xonecas-io / commit b01acaf

drop GitHub star counts from the data and every page (1017)

Co-Authored-By: Claude Opus 5.5

Sean Caetano Martin2026-11-08 b01acafa74c459b2b281e8710584d2b67f7fbe6a parent 3219a18

8 files changed

internal/project/describe.go+1−4
@@ -23,7 +23,6 @@ type Info struct {
2323 Commits int `json:"commits"` // mine
2424 Total int `json:"total"` // everyone's
2525 Months map[string]int `json:"months"` // my commits per YYYY-MM
26- Stars int `json:"stars"`
2726 Files int `json:"files"`
2827 Languages []Language `json:"languages"`
2928 Readme string `json:"readme"`
@@ -44,10 +43,8 @@ func Describe(p *Project, metas map[string]store.Meta, o Overrides) error {
4443 in := &p.Info
4544 *in = Info{First: h.First, Last: h.Last, Commits: h.Mine, Total: h.Total, Months: h.Months, Files: f.Count, Languages: f.Languages, Readme: f.Readme}
4645 fork := false
47- for i, s := range p.Sources {
46+ for _, s := range p.Sources {
4847 m := metas[s.URL]
49- p.Sources[i].Stars = m.Stars
50- in.Stars += m.Stars
5148 fork = fork || m.Fork
5249 if in.Description == "" {
5350 in.Description = m.Description
internal/project/project.go+0−1
@@ -18,7 +18,6 @@ type Source struct {
1818 Branch string `json:"branch"`
1919 Commits int `json:"commits"`
2020 First string `json:"first"` // date of the oldest commit, YYYY-MM-DD
21- Stars int `json:"stars"`
2221 Roots []string `json:"-"`
2322 }
2423
internal/site/templates/index.html+1−1
@@ -24,7 +24,7 @@
2424 <div class="flex items-center gap-3">{{template "element" (dict "El" .Row.El "Size" "sm")}}<b class="text-lg truncate">{{.P.Name}}</b><span class="ml-auto text-xs text-soft">{{.Row.Lang}}</span></div>
2525 <p class="mt-2 text-sm text-soft line-clamp-2 min-h-10">{{or .P.Description "No description"}}</p>
2626 <div class="grid grid-cols-12 gap-[2px] mt-2">{{range .Strip}}<span class="h-2.5 rounded-[1px] bg-h{{.Heat}}" title="{{.Month}}: {{.Count}}"></span>{{end}}</div>
27- <p class="mt-2 text-xs text-soft">{{.P.Commits}} commits · {{.P.Stars}} stars · {{range $i, $t := .P.Tags}}{{if $i}} {{end}}{{$t}}{{end}}</p>
27+ <p class="mt-2 text-xs text-soft">{{.P.Commits}} commits · {{range $i, $t := .P.Tags}}{{if $i}} {{end}}{{$t}}{{end}}</p>
2828 </a>{{end}}
2929 </div>
3030 <p class="mt-4 font-semibold"><a href="/projects/">All {{.Projects}} projects →</a></p>
internal/site/templates/project.html+2−2
@@ -8,7 +8,7 @@
88 <div class="flex flex-wrap gap-1 mt-3">{{range .P.Tags}}{{template "tag" .}}{{end}}</div>
99 <p class="mt-3 text-sm text-soft">
1010 <a href="commits/" class="text-ink"><b>{{.P.Commits}}</b> commits{{if ne .P.Commits .P.Total}} of {{.P.Total}}{{end}}</a> ·
11- {{.P.First}} to {{.P.Last}} · {{.P.Files}} files{{if .P.Stars}} · {{.P.Stars}} ★{{end}}
11+ {{.P.First}} to {{.P.Last}} · {{.P.Files}} files
1212 </p>
1313 </div>
1414 </header>
@@ -32,7 +32,7 @@
3232 <h2 class="font-bold border-b-[3px] border-ink pb-1 mb-2">Sources</h2>
3333 {{range .P.Sources}}<div class="py-1.5 border-b border-line">
3434 <a href="https://{{web .URL}}" class="font-semibold break-all">{{web .URL}}</a>
35- <div class="text-soft">{{.Branch}} · {{.Commits}} commits{{if .Stars}} · {{.Stars}} ★{{end}}</div>
35+ <div class="text-soft">{{.Branch}} · {{.Commits}} commits</div>
3636 </div>{{end}}
3737 </section>
3838 <section>
internal/store/meta.go+1−4
@@ -10,7 +10,6 @@ import (
1010 // Meta is what a host says about a remote, fetched at import time.
1111 type Meta struct {
1212 Fork bool `json:"fork"`
13- Stars int `json:"stars"`
1413 Description string `json:"description"`
1514 }
1615
@@ -38,8 +37,6 @@ func FetchMeta(urls []string) (map[string]Meta, error) {
3837 HTTPURL string `json:"http_url_to_repo"`
3938 Fork bool `json:"fork"`
4039 ForkedFrom any `json:"forked_from_project"`
41- Stars int `json:"stargazers_count"`
42- StarCount int `json:"star_count"`
4340 Description string `json:"description"`
4441 }
4542 resp, err := http.Get(api)
@@ -55,7 +52,7 @@ func FetchMeta(urls []string) (map[string]Meta, error) {
5552 return nil, fmt.Errorf("%s: 100 repos, the list needs paging", api)
5653 }
5754 for _, r := range rows {
58- metas[r.CloneURL+r.HTTPURL] = Meta{r.Fork || r.ForkedFrom != nil, r.Stars + r.StarCount, strings.TrimSpace(r.Description)}
55+ metas[r.CloneURL+r.HTTPURL] = Meta{r.Fork || r.ForkedFrom != nil, strings.TrimSpace(r.Description)}
5956 }
6057 }
6158 return metas, nil
tickets/1015-remotes-show-github-should-show-correctly-from.md+3−1
@@ -5,7 +5,7 @@ type: bug
55 status: review
66 priority: p2
77 created: 2026-11-08T03:48:13Z
8-updated: 2026-11-08T04:09:42Z
8+updated: 2026-11-08T04:09:56Z
99 source: devnote
1010 area: site
1111 moves: 2026-11-08T04:02:21Z inbox doing drag; 2026-11-08T04:04:19Z doing blocked agent; 2026-11-08T04:07:25Z blocked doing agent; 2026-11-08T04:09:42Z doing review agent
@@ -43,3 +43,5 @@ Filed from `http://192.168.122.10:8080/projects/dotfiles/`, on `pre.bg-pre.text-
4343 CHECKED: go vet, go test pass. Full build: 82 public/<name>.git. From the dev server: 'git clone http://192.168.122.10:8080/irvc.git' and dotfiles.git both clone (dotfiles: 99 commits). The local clone hard-links objects (pack link count 2), and disk use did not change. A rebuild with no changes takes 5.4s.
4444
4545 NOT CHECKED / WATCH OUT: (1) Off this disk, e.g. rsync to the VPS, public/ carries the full repos, about 351 MB today. (2) A project that becomes hidden keeps its old public/<name>.git until public/ is wiped. The build does not prune; I did not check whether old HTML pages behave the same. (3) Nothing serves xonecas.io yet (1011), so the printed URL works only once public/ is hosted there.
46+
47+- 2026-11-08 04:09Z (agent): Filed the leftover-output issue from point (2) as a separate bug, since it predates this ticket: hidden or renamed projects stay in public/.
tickets/1017-stars-is-github-data-not-git-let-s-remove-this.md+10−3
@@ -2,13 +2,13 @@
22 id: 1017
33 title: Stars is github data, not git. let's remove. This is a github replacement for my projects, not a reference to other repos.
44 type: feature
5-status: doing
5+status: review
66 priority: p2
77 created: 2026-11-08T03:50:50Z
8-updated: 2026-11-08T04:02:18Z
8+updated: 2026-11-08T04:11:47Z
99 source: devnote
1010 area: site
11-moves: 2026-11-08T04:02:18Z inbox doing drag
11+moves: 2026-11-08T04:02:18Z inbox doing drag; 2026-11-08T04:11:47Z doing review agent
1212 ---
1313
1414 ## Context
@@ -24,3 +24,10 @@ Filed from `http://192.168.122.10:8080/projects/mini-coder/`, on `p.mt-3.text-sm
2424 Stars appear in 3 places: the project page header (project.html:11), each source under Sources (project.html:35), and the homepage cards ('N stars', index.html:27). They come from the GitHub/GitLab API in internal/store/meta.go, through project.Stars (internal/project/project.go:21, describe.go).
2525
2626 Question: the same API call also gives each repo's fork flag and description. Remove only stars, as written, or every GitHub/GitLab API field? Related: 1015, also about showing upstream hosts instead of the site.
27+
28+- 2026-11-08 04:11Z (agent): Done. Star counts are gone from the site and the data, and nothing else changed. Fork flags and descriptions still come from the host APIs (my triage question; I kept to the ticket).
29+
30+ - Templates: removed from the project header (project.html:11), each Sources entry (project.html:35), and the homepage cards (index.html:27).
31+ - Data: removed Meta.Stars and the API fields in internal/store/meta.go, and Source.Stars and Info.Stars in internal/project, so data/projects.json has no 'stars' key.
32+
33+ CHECKED: go vet, go test pass. make index, then make build. data/projects.json has 0 'stars' keys. mini-coder header reads '2026-02-20 to 2026-10-02 · 31 files'; homepage cards read '875 commits · post-AI big'. The only '★'/'stars' left in public/ HTML is a commit message in creativejs-threejs-part1 ('Made the stars move sideways').
tickets/1023-hidden-or-renamed-projects-stay-in-public-after.md+15−0
@@ -0,0 +1,15 @@
1+---
2+id: 1023
3+title: Hidden or renamed projects stay in public/ after a rebuild
4+type: bug
5+status: inbox
6+priority: p2
7+area: site
8+created: 2026-11-08T04:09:56Z
9+updated: 2026-11-08T04:09:56Z
10+source: agent
11+---
12+
13+Build (internal/site/build.go) writes only shown projects and never removes others. When a project becomes hidden (overrides.txt 'hide', a fork flag) or is renamed, its old public/projects/<name>/ pages, and since 1015 its public/<name>.git clone, stay in public/ and keep being served.
14+
15+Seen in the code: the only removals are browse.go:55 (tree/ and blob/ inside a shown project) and clone.go (its own <name>.git). Not reproduced: I did not hide a project and rebuild to watch it.