xonecas.io
8356
Wx

www-xonecas-io / commit fb938ee

homepage shows the 12 most recently committed projects, as Recent (1018)

Co-Authored-By: Claude Opus 5.5

Sean Caetano Martin2026-11-08 fb938eeba6ddc56489497582963f8798c1f3df1c parent b01acaf

5 files changed

internal/site/home.go+10−15
@@ -4,6 +4,7 @@ import (
44 "fmt"
55 "slices"
66 "strconv"
7+ "strings"
78 "time"
89
910 "xonecas.io/site/internal/project"
@@ -21,19 +22,19 @@ type WallYear struct {
2122 Cells []Cell
2223 }
2324
24-// Pinned is a project card on the home page, with its months of the latest year.
25-type Pinned struct {
25+// Recent is a project card on the home page, with its months of the latest year.
26+type Recent struct {
2627 Row ProjectRow
2728 P project.Project
2829 Strip []Cell
2930 }
3031
31-// HomeData is the home page: totals, the wall of every month, and the busiest projects of the latest year.
32+// HomeData is the home page: totals, the wall of every month, and the projects with the latest commits.
3233 type HomeData struct {
3334 Commits, Projects, Languages int
34- Busiest, Quietest, Year string
35+ Busiest, Quietest string
3536 Wall []WallYear
36- Pinned []Pinned
37+ Recent []Recent
3738 Tags []string
3839 }
3940
@@ -70,7 +71,7 @@ func homeData(shown []project.Project, rows []ProjectRow) HomeData {
7071 }
7172 first, last = min(first, p.First[:4]), max(last, p.Last[:4])
7273 }
73- d.Languages, d.Year = len(langs), last
74+ d.Languages = len(langs)
7475 busiest, quiet, quietN := "", "", -1
7576 for y := mustAtoi(first); y <= mustAtoi(last); y++ {
7677 year := strconv.Itoa(y)
@@ -92,16 +93,10 @@ func homeData(shown []project.Project, rows []ProjectRow) HomeData {
9293 d.Quietest = fmt.Sprintf("%s · %d", quiet, quietN)
9394
9495 for i, p := range shown {
95- d.Pinned = append(d.Pinned, Pinned{rows[i], p, months(last, p.Months)})
96+ d.Recent = append(d.Recent, Recent{rows[i], p, months(last, p.Months)})
9697 }
97- inYear := func(p Pinned) (n int) {
98- for _, c := range p.Strip {
99- n += c.Count
100- }
101- return n
102- }
103- slices.SortStableFunc(d.Pinned, func(a, b Pinned) int { return inYear(b) - inYear(a) })
104- d.Pinned = d.Pinned[:min(6, len(d.Pinned))]
98+ slices.SortStableFunc(d.Recent, func(a, b Recent) int { return strings.Compare(b.P.Last, a.P.Last) })
99+ d.Recent = d.Recent[:min(12, len(d.Recent))]
105100 return d
106101 }
107102
internal/site/templates/index.html+2−2
@@ -18,8 +18,8 @@
1818 {{range .Wall}}<b class="leading-4">{{.Year}}</b>{{range .Cells}}<span class="h-4 rounded-[2px] bg-h{{.Heat}}" title="{{.Month}}: {{.Count}} commits"></span>{{end}}
1919 {{end}}
2020 </div>
21- <div class="flex items-baseline justify-between mt-8 mb-2"><h2 class="font-bold text-lg">Pinned</h2><span class="text-xs text-soft">busiest in {{.Year}}, by month</span></div>
22- <div class="grid gap-3 sm:grid-cols-2 xl:grid-cols-3">{{range .Pinned}}
21+ <div class="flex items-baseline justify-between mt-8 mb-2"><h2 class="font-bold text-lg">Recent</h2><span class="text-xs text-soft">by last commit</span></div>
22+ <div class="grid gap-3 sm:grid-cols-2 xl:grid-cols-3">{{range .Recent}}
2323 <a href="/projects/{{.P.Name}}/" class="block border-[1.5px] border-ink rounded-[2px] bg-card p-3 no-underline hover:bg-empty">
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>
tickets/1018-the-title-is-pinned-but-i-can-t-pin-or-unpin.md+12−3
@@ -2,13 +2,13 @@
22 id: 1018
33 title: The title is Pinned, but I can't pin or unpin anything. Let's order by most recent commits, and let's show 12 tiles
44 type: feature
5-status: doing
5+status: review
66 priority: p2
77 created: 2026-11-08T03:52:31Z
8-updated: 2026-11-08T04:02:17Z
8+updated: 2026-11-08T04:13:45Z
99 source: devnote
1010 area: site
11-moves: 2026-11-08T04:02:17Z inbox doing drag
11+moves: 2026-11-08T04:02:17Z inbox doing drag; 2026-11-08T04:13:45Z doing review agent
1212 ---
1313
1414 ## Context
@@ -24,3 +24,12 @@ Filed from `http://192.168.122.10:8080/`, on `h2.font-bold.text-lg`.
2424 Today (internal/site/home.go:95-104): the 6 projects with the most commits in the latest year, sorted by that count. The heading says 'Pinned', with 'busiest in {year}, by month' beside it (index.html:21). The ticket asks: sort by most recent commit, show 12.
2525
2626 Question: the heading and its subtitle no longer fit. What should they say, for example 'Recent' and 'by last commit'? Each card's monthly chart for the latest year can stay as is unless you say otherwise.
27+
28+- 2026-11-08 04:13Z (agent): Done, with heading 'Recent' and subtitle 'by last commit' (my call, as you asked). The section shows 12 projects, newest last commit first. Each card's monthly strip for the latest year is unchanged.
29+
30+ - internal/site/home.go: Pinned renamed Recent; sorted by Project.Last, newest first (stable, so ties keep list order); capped at 12, was 6. HomeData.Year is unused now, so I removed it.
31+ - internal/site/templates/index.html: new heading and subtitle, ranges over .Recent.
32+
33+ CHECKED: go vet, go test pass. Rebuilt. In agent-browser, the 12 tiles match data/projects.json sorted by 'last': dotfiles (2026-11-07), macotron-plugin-caffeinate, mini-coding-agent, irvc, nvim-bend-syntax, tiny-c-agent, mini-coder, vim-ai-complete, sacenox.github.io, pi-extensions, cel-tui, learning-ai-lua-code-model (2026-06-16). Screenshot: 3 columns x 4 rows at 1280px.
34+
35+ NOT CHECKED: phone width. irvc is on the homepage now because of 1019.
tickets/1021-frontend-design-pass.md+2−2
@@ -5,13 +5,13 @@ type: feature
55 status: doing
66 priority: p3
77 created: 2026-11-08T03:57:11Z
8-updated: 2026-11-08T04:05:20Z
8+updated: 2026-11-08T04:13:42Z
99 source: human
1010 area: design
1111 moves: 2026-11-08T04:02:10Z inbox todo drag; 2026-11-08T04:04:48Z todo doing drag
1212 ---
1313
14-We have our initial design and style and look. Now let's take it to the next level, polish, alignment, whitespace. Walk the site, end to end with agent browser. Make sure it flows well, the ux is natural and space is being used well at most resolutions sizes. Make sure themes look great, dark and light.
14+We have our initial design and style and look. Now let's take it to the next level, polish, alignment, whitespace. Walk the site, end to end with agent browser. Make sure it flows well, the ux is natural and space is being used well at most resolutions sizes. Make sure themes look great, dark and light. Atention to typography detaui
1515
1616 It's not a rebrand or restructure, it's polishing and refining.
1717
tickets/1024-markdown-code-snippets-are-not-syntax.md+41−0
@@ -0,0 +1,41 @@
1+---
2+id: 1024
3+title: markdown code snippets are not syntax highlighted
4+type: bug
5+status: inbox
6+priority: p2
7+created: 2026-11-08T04:12:36Z
8+updated: 2026-11-08T04:12:36Z
9+source: devnote
10+---
11+
12+## Context
13+
14+Filed from `http://192.168.122.10:8080/projects/cel-tui/`, on `pre`.
15+
16+> import { cel, VStack, Text, TextInput, ProcessTerminal } from "@cel-tui/core";
17+> let input = "";
18+> cel.init(new ProcessTerminal());
19+> cel.viewport(() =>
20+> VStack(
21+> {
22+> height: "100%",
23+> onKeyPress: (key) => {
24+> if (key === "ctrl+q") {
25+> cel.stop();
26+> process.exit();
27+> }
28+> },
29+> },
30+> [
31+> Text("Hello, cel-tui!", { bold: true, fgColor: "color06" }),
32+> Text("─", { repeat: "fill", fgColor: "color08" }),
33+> TextInput({
34+> flex: 1,
35+> value: input,
36+> onChange: (v) => {
37+> input = v;
38+> cel.render();
39+> },
40+> }),
41+> …