showcase
- v0.2.4
- 37 commits
- 1 branch
- 6 tags
- updated
- CI 2/2
decisions.md
61.1 KB · 1066 lines
1# Decisions23Choices made while building, where the spec was silent or had to bend.4Newest last.56## Heatmap comes from git, not the Gitea heatmap API78The heatmap API leaked private activity before Gitea 28.3.0, and the server9runs 28.2.x. The builder counts commits on the default branch of the10allowlisted repos from the local mirrors instead. Private activity can't leak11whatever Gitea version runs, but only commits are counted (no PRs, issues and12so on). All authors are counted, since the anonymous API hides the user's13email, so merged commits from others show up too.1415## Packages are filtered by the allowlist1617Gitea package visibility follows the owner, not the linked repo, so a package18linked to a private repo is public. Only packages linked to an allowlisted19repo are listed.2021## Change detection: reuse git pages when nothing they show changed2223Repo `updated_at` doesn't reliably change when PRs or releases change, so it24isn't used. Every build re-fetches the API and re-renders the profile, each25repo's root page, the log page and the releases, pulls and packages pages.26File, folder, raw and commit pages are hard-linked from the previous build27when the reuse key is unchanged. The key is HEAD plus the repo header data28(description, website, topics, archived, default branch, latest tag), because29every page shows that header. Keys live in memory, so a restart (which is30also how config or template changes ship) re-renders everything.3132Builds are written to `site/.tmp-<ts>`, renamed to `site/<ts>`, and published33by renaming a fresh `current.new` symlink over `current`. The newest and the34previous build are kept, and anything else (including temp dirs left by a35crash) is removed after each swap.3637## Tailnet URLs never reach the page3839Gitea builds URLs from its `ROOT_URL`, a tailnet address. The avatar is40downloaded into the build. Release assets go through one more allowlisted41proxy route, `/<repo>/releases/download/<tag>/<file>`. The registry proxy42refuses upstream redirects so a storage backend URL is never handed out.4344## Raw files: images keep their type, everything else is text4546README images resolve to `/<repo>/raw/...`, so png, jpg, gif and webp are47served with their real types. SVG and everything else is served as48`text/plain` or as an attachment. `nosniff` and the CSP stay on.4950## Smaller choices5152- `go get` on subpackages: any `/<repo>/...?go-get=1` gets the go-import meta.53- The git proxy forwards `Git-Protocol` so protocol v2 works.54- Git runs with `GIT_TERMINAL_PROMPT=0` and an empty credential helper, so a55 private repo in config fails fast instead of hanging on a prompt.56- Config rejects repo names that clash with routes (`static`, `v2`, `healthz`,57 `api`, `user`).58- Dates are bucketed in UTC.59- README links resolve to `blob/` pages, or to `tree/` pages when they end in60 `/`. Images that aren't relative or https are dropped and their alt text61 kept. Goldmark blanks dangerous link schemes such as `javascript:`.62- The go-import meta is added when the repo root has a `go.mod`.63- The clone box shows only the HTTPS URL for now. Tangled and GitHub links64 need per-repo config, because not every repo is mirrored there.65- Tooling: Go is pinned in `mise.toml`, and commands live in the `justfile`.6667## Theme follows danieldaum.net (saturn)6869The site's look matches saturn instead of a generic Flexoki light/dark theme.70It is dark only and uses saturn's tokens, palettes, fonts and components. The71details are in `docs/theme.md`. This replaces the spec's original72"light and dark via `prefers-color-scheme`".7374## File pages7576- A blob page for `<path>` is stored as `<repo>/blob/<path>.html`, and the77 server maps `/blob/<path>` to it. Raw bytes are stored at `<repo>/raw/<path>`.78- Files over 50 MB get no raw copy, only a note to clone. Files over 512 KB,79 or binary ones (a NUL byte in the first 8 KB, or not valid UTF-8), get no80 highlighted view. png, jpg, gif and webp are shown as images.81- The last commit per entry comes from one `git log --name-only` pass over82 history, not one `git log` per path.83- Folder pages show their own README, if they have one.84- Highlighting: chroma tokens map to saturn's `hl-*` roles in85 `internal/render/highlight.go`. README code blocks use the same mapping.8687## Log and commit pages8889- Only the commits on the log page (the last `max_commits` on the default90 branch) get commit pages. Parent links show only when the parent has a page.91- Diffs are against the first parent (`--diff-merges=first-parent`), with92 rename detection. At most 5,000 diff lines are kept per commit. The rest are93 counted in the stats but not shown.9495## Releases, pulls and packages9697- If Gitea returns 404 for releases, pulls or packages (for example, the98 feature is turned off for that repo), the page is empty. Any other API error99 fails the build.100- Draft releases are never shown. The repo header shows the newest101 non-prerelease tag.102- Release assets link to `/<repo>/releases/download/<tag>/<file>`, which the103 proxy (step 8) forwards.104- PR bodies sit in `<details>`, so they open without JS.105- Packages: container images are listed only when the image is in `images`106 (so every `docker pull` shown actually works), and untagged `sha256:`107 versions are hidden. Other package types are listed with no install command,108 because their registries aren't proxied.109110## Server111112- Routes: `/`, `/healthz`, `/static/…` and `/<repo>/…` for allowlisted repos.113 Inside a repo, `raw/` serves files, `blob/<p>` serves `<p>.html`, paths114 ending in `/` serve `index.html`, and a folder without the slash redirects.115 Everything else, including any path with dot segments, `//`, `\` or NUL, is116 a 404 using the built `404.html`. `/index.html` itself is a 404 too.117- Methods other than GET and HEAD get a 404, and a GET or HEAD with a body118 gets a 400. Step 8 adds the git `POST` route.119- Raw files: png, jpg, gif and webp keep their image types. Files with a NUL120 in the first 512 bytes are `application/octet-stream` with121 `Content-Disposition: attachment`. Everything else, SVG and HTML included,122 is `text/plain`.123- Page responses get a 30s write deadline through `http.ResponseController`.124 The server itself has no `WriteTimeout`, so proxied clones can stream.125- Logs: for peers in `trusted_proxies`, the client IP comes from126 `CF-Connecting-IP`, or else the last `X-Forwarded-For` entry. Otherwise it's127 the TCP peer.128- `-serve-dir DIR` (dev only) serves a finished build without building; `just129 serve` and `just demo` use it.130131## Git and registry proxy132133- Proxy routes are matched before anything else and work before the first134 build. Within the `.git`, `/v2` and `releases/download` prefixes anything not135 explicitly allowed is a 404. Any path or query containing136 `git-receive-pack` is a 403.137- Requests to Gitea never carry `Cookie` or `X-Forwarded-*`. `Authorization`138 passes only when it is a `Bearer` token on a registry manifest or blob139 route, which is the anonymous token Gitea just issued. Basic credentials140 are never forwarded.141- `/v2/token` is forwarded only when every `scope` is a pull of an142 allowlisted image. `_catalog` and `tags/list` are 404.143- Any 3xx from Gitea becomes a 502, so storage or tailnet URLs never reach144 clients. With Gitea's local storage, blobs and assets are served directly,145 so this doesn't happen in practice.146- Release assets are always `application/octet-stream` with147 `Content-Disposition: attachment`.148- The `git-upload-pack` body is capped at 10 MB and must have the git149 request content type.150- Gitea must allow anonymous HTTP git and registry reads151 (`REQUIRE_SIGNIN_VIEW = false`, HTTP git not disabled), or public clones and152 pulls fail.153154## Image155156- Base images are `golang:1.27.4-alpine3.24` and `alpine:3.24.4`, pinned by157 digest. `just digests` prints the current upstream digests for bumping. Go158 is the same version as `mise.toml`.159- apk packages (`git`, `ca-certificates`) aren't version-pinned, since160 Alpine drops old package versions. The base image digest bounds them.161- `HOME=/data`, so nothing tries to write elsewhere on the read-only root.162 Builds only write under `/data`.163- `.dockerignore` is an allowlist: only `go.mod`, `go.sum`, `cmd/`,164 `internal/` and `web/` enter the build context, and tests are excluded.165- `crane` and `hadolint` are project tools in `mise.toml`.166167## Reaching Gitea168169- Today Gitea's HTTPS is public at `git.danieldaum.net`, and only SSH is170 tailnet-only. `gitea_url` is `https://git.danieldaum.net` for now. SSH isn't171 an option, because it needs a key and the builder must stay anonymous.172- Once Gitea goes private, the best option is a shared Docker network on the173 same host (`gitea_url: http://gitea:3000`), so no tailnet hop is needed.174 Otherwise expose Gitea's HTTP port on the tailnet only.175- Gitea 28's packages API requires a token even for public packages, so it176 answers anonymous calls with 401. 401 and 403 now count as "not publicly177 visible", the same as 404. The build logs a warning, and the packages page178 stays empty.179180## Polish pass: design, icons, one small script181182- **Design:** saturn's palettes and tokens stay, but daum.dev has its own type183 and component system, because saturn's all-pixel, all-caps style reads184 poorly in dense listings. Text is Geist, code and hashes are Geist Mono, and185 headings and the brand are Geist Pixel. Labels are sentence case.186 Everything sits in one bordered "box" component. Repo pages are up to 68rem187 wide.188- **File icons:** replaced in polish pass 3 (Phase 3) by Phosphor icons.189- **Copy buttons need JS**, which departs from the spec's "No JavaScript".190 `/static/copy.js` is about 15 lines, same-origin and progressive: without191 it, the buttons stay hidden and the read-only fields can still be copied by192 hand. The CSP gains `script-src 'self'`, and nothing inline is allowed. To193 drop it, delete `copy.js`, its `<script>` tag and the CSP entry.194- **Branches and tags pages** (`/<repo>/branches/`, `/<repo>/tags/`) list refs195 with their last commit. Only the default branch is browsable. Tags link to196 their release.197- **CI checks:** the status of HEAD comes from Gitea's commit status API. The198 check badge links to the commit page's `#checks` list. Gitea's own run199 pages aren't linked, since the Gitea UI is never exposed.200- **Freshness:** ages within a day, week or month get warmer colours.201- **Stylesheet cache-busting:** the CSS (and `copy.js`) URLs carry a hash of202 `style.css`, so caches never serve a stale stylesheet.203204## Polish pass 3205206### Phase 1: contrast and type207208All changes are in part 2 of `style.css`. Saturn's tokens in part 1 are209untouched, and every new value is a `color-mix()` of them, so ink, wine,210plum, teal and flexoki get the same steps as moss.211212- **Layers follow the Paint themes for Gitea** (`gitea/theme/css/`). The213 first try mixed saturn's `--surface` and `--borders` into boxes. They are214 strongly saturated (moss surface is an olive at chroma 0.056), so boxes215 looked off-colour against a near-black page. Paint uses one lightness216 ladder in every palette, tinted only slightly toward the palette's hue: in217 OKLab, page L 0.205, box 0.222, box header 0.245, hover 0.267, border 0.36,218 all at chroma ~0.015. Here each layer is219 `color-mix(in oklab, var(--background-dark) 55%, <neutral grey>)`, which220 lands within 1–2 RGB units of every Paint theme and extends to flexoki,221 which has no Paint theme:222223 | token | grey | moss result | Paint moss |224 | ------------ | --------- | ----------- | ---------- |225 | `--page` | `#141414` | `#171a10` | `#16180e` |226 | `--box` | `#1c1c1c` | `#1b1d14` | `#1a1c12` |227 | `--box-head` | `#282828` | `#202319` | `#1f2217` |228 | `--hover` | `#343434` | `#25281e` | `#25271d` |229 | `--rule` | `#4e4e4e` | dividers inside boxes | |230 | `--edge` | `#6d6d6d` | `#3d4035` | `#3c3f33` |231 | `--line` | `#808080` | controls | |232233 Nothing in part 2 uses `--surface`, `--borders` or `--accent-muted` any234 more. Chips, buttons, the clone menu, code areas, inline code, `hr`, the235 count pills and topic pills now sit on the ladder or on a light mix of the236 accent. Hover borders use `--accent-edge` (the accent mixed into `--edge`).237- **Text:** `--body-text` (45% body, 55% headings) for body copy,238 descriptions and the tree's commit column. File names, repo names, commit239 subjects and counts use `--text-headings` at weight 500–600, and240 `--text-secondary` is kept for metadata. Ages, sizes, counts and stats use241 tabular figures. "No description." on repo cards stays dim242 (`repo-card-desc--none`).243- **Accent:** `--accent-bright` (accent 82%, white 18%) is used for hovers,244 active tabs, breadcrumb links, the profile name, the 404 and one shared245 `:focus-visible` ring (`a`, `button`, `summary`, `input`). `--accent` stays246 for fills: the primary button, the language bar, the top heatmap step and247 the `:target` line edge. Heatmap steps `--heat-1..3` mix the accent into248 `--box` (30/52/76%), like Paint's primary ramp, instead of starting from249 the saturated `--accent-muted`.250- **Depth:** Paint's card shadow (`0 1px 1px` at 25% black) plus a very faint251 top highlight, on boxes, repo cards and box heads. An accent glow behind252 the avatar was tried and dropped: the avatar has a plain 1px ring.253- **Contrast:** `web/contrast_test.go` reads the tokens from `style.css`,254 evaluates the `color-mix()` chains in OKLab and fails below 4.5:1. Run255 `go test -v -run Contrast ./web` to see the ratios. At the time of writing:256257 | text on | moss | ink | wine | plum | teal | flexoki |258 | -------------------- | ----- | ----- | ----- | ----- | ----- | ------- |259 | headings / page | 15.46 | 15.71 | 15.78 | 15.80 | 15.46 | 16.47 |260 | headings / box-head | 14.01 | 14.30 | 14.38 | 14.40 | 14.01 | 15.23 |261 | body / box | 13.49 | 13.74 | 13.80 | 13.82 | 13.49 | 14.49 |262 | body / hover | 11.89 | 12.17 | 12.24 | 12.26 | 11.89 | 13.06 |263 | secondary / page | 6.51 | 6.62 | 6.65 | 6.65 | 6.51 | 6.94 |264 | secondary / box | 6.27 | 6.39 | 6.42 | 6.42 | 6.27 | 6.74 |265 | secondary / box-head | 5.90 | 6.02 | 6.06 | 6.07 | 5.90 | 6.41 |266 | secondary / hover | 5.53 | 5.66 | 5.69 | 5.70 | 5.53 | 6.07 |267 | accent-bright / box | 8.45 | 7.57 | 7.89 | 8.13 | 8.86 | 7.55 |268269 Line numbers keep saturn's dimmed look (opacity 0.55) and are exempt, as270 decoration next to the code.271272### Phase 2: language bar above the file tree273274- The language legend (dot, name, percent) is a compact row between the tabs275 and the code box. The bar is a 4px SVG strip, the first child of the code276 box. The box's `overflow: hidden` clips it to the rounded top corners and277 keeps it inside the border. The segments are the same as before: adjacent278 rects with no extra gap, the six largest languages plus "other". The old279 `.langs` section under the box is gone.280- Empty repos show neither, as before: there's no code box and Gitea reports281 no languages.282283### Phase 3: Phosphor icons284285> Replaced by Gitea's icons, see "Gitea's icons again" at the end. The286> per-page sprite described here stays.287288- **One icon family.** File icons come from the Phosphor Colored set in289 Daniel's dotfiles (`.config/zed/phosphor-colored-icons`). UI icons (tabs,290 stats, clone, copy, CI, people) are Phosphor Regular from291 `@phosphor-icons/core` 2.1.1. Both are MIT. The 47 file glyphs and the set's292 `LICENSE` live in `web/static/icons/phosphor/`, and the 17 UI glyphs in use293 plus core's `LICENSE` live in `ui/` beneath it. The material icons and294 their licence are gone.295- **Mapping:** `scripts/icons.py` (`just icons <colored> <core>`) reads the296 `ICONS` table from the set's `scripts/build.py` with `ast.literal_eval`,297 without running it, and generates `internal/render/icons_gen.go`: exact298 names (`iconStems`) and suffixes (`iconSuffixes`) mapped to (glyph, role).299 When two keys claim the same suffix, the later one wins, as in build.py.300 The UI name map (`book` → `book-bookmark` and so on) is in the script.301 Zed's built-in mappings (`BUILTIN`) have no suffixes of their own in302 build.py, so they aren't used.303- **Lookup order** is Zed's, which build.py follows: the whole file name as304 a stem, then as a suffix, then each part after a dot from the left305 (`a.tar.gz` tries `tar.gz`, then `gz`), then `default` (the neutral306 document). One addition: if nothing matches, the same lookup runs again on307 the lowercased name, so `README.MD` still gets the markdown icon. Folders308 and submodules use `folder-closed`, and the current folder in tree-page309 breadcrumbs uses `folder-open`. Some common names fall through to the310 default icon, because the table doesn't cover them: `go.mod`, `justfile`311 and `.github`.312- **Colour by role, not hex.** `.r-<role>` classes map roles to saturn's313 syntax tokens, the same pairs as `palettes.json`: red → `--syn-variable`,314 orange → `--syn-constant`, yellow → `--syn-type`, green → `--syn-string`,315 cyan → `--syn-builtin`, blue → `--syn-function`, purple → `--syn-keyword`,316 magenta → a mix of variable and keyword, neutral and folder →317 `--text-secondary`. Icons follow `data-theme`.318- **Per-page sprite.** Every icon is `<svg class="ficon r-ROLE"><use319 href="#f-GLYPH">` or `<svg class="icon"><use href="#i-NAME">`. `base.html`320 emits an empty sprite. `render.Write` scans the finished page for `#f-` and321 `#i-` references and fills in only those `<symbol>`s, built once from the322 embedded SVGs. Pages carry just their own icons. Nothing is fetched, there323 are no `data:` URLs, and the CSP is unchanged. Phosphor paths are longer324 than the old hand-drawn strokes, so the repo home went from 16.7 KB to325 21.4 KB before compression, while the profile shrank. `static/icons/` isn't326 copied into the output, since nothing fetches it. The safety test fails if327 a page uses an icon its sprite lacks.328- UI icons are filled paths now, so `.icon` uses `fill: currentColor` and329 the stroke rules are gone. CI pending is `dot-outline`.330331### Extra: document tabs in the README box332333- On the repo root, the README box gets a tab bar when the repo has more than334 the README. In tab order: README, License (named when recognised, such as335 "MIT license"), Security, Contributing, Code of conduct, Support,336 Governance, Funding, Citation, Authors (also `CONTRIBUTORS`,337 `MAINTAINERS`), Notice and Changelog (also `CHANGES`, `HISTORY`, `NEWS`,338 `RELEASES`). Only the ones the repo has are shown. Each is the first file339 matching the stem, in any case (`LICENSE`/`LICENCE`/`COPYING` by prefix),340 with no extension or one of md, markdown, txt, rst, adoc, yml, yaml, cff341 or bib, in the root, then `.github/`, then `docs/`. The table is342 `docKinds` in `internal/build/repo.go`, and the CSS has panel rules for up343 to 13 tabs. Files344 over 512 KB are skipped. Markdown renders like the README, with relative345 links resolved from the file's own folder. Plain text, such as most346 LICENSE files, is a wrapping monospace block. Folder pages keep their347 single README box.348- **No JS:** the tabs are radio inputs (visually hidden) with labels. CSS349 shows the panel whose radio is checked, using `:has()` inside350 `@supports selector(:has(a))`. Without `:has` only the first document351 shows, which is the old README box. Radios also give keyboard switching352 (arrow keys) and a focus ring for free. The CSP is unchanged.353- Known limits: heading anchors inside a hidden tab don't scroll there, and354 two documents may produce the same heading id.355- New UI icons: `shield` (shield-check), `users`, `heart`, `lifebuoy`,356 `bank`, `coins`, `quotes` and `info`.357- The repo-a fixture gains `SECURITY.md`, `CONTRIBUTING.md`,358 `.github/CODE_OF_CONDUCT.md` and `.github/FUNDING.yml` (plain text).359360### Extra: container images read from the registry361362- Gitea 28's packages API wants a token, so anonymously the packages page363 was empty. Container images now come from Gitea's registry itself, which364 serves public images anonymously: `/v2/` answers with a bearer challenge,365 and `/v2/token` hands out a pull token without credentials. That token can366 only do what any `docker pull` can, so the builder stays anonymous (rule367 1). The token is requested from the configured `gitea_url`, never from the368 challenge's realm, kept in memory and never rendered. The test fake Gitea369 allows exactly that one `Authorization` header.370- **Which images:** allowlisted images (`images` in config) named like the371 repo, plus container packages the API links to the repo, when the API372 answers. Images outside `images` never appear. Other package types (npm373 and so on) still come from the API, listed under "Other packages".374- **What's shown:** per image, the `docker pull` of the newest tag. Then up375 to 8 versions, newest first, one per distinct manifest digest, with every376 tag that points at it (the first 30 tags are read). Each version is a377 `<details>`, and the newest is open. It shows the full digest, a378 pull-by-digest command, the created time, the manifest type, and each379 platform (attestation manifests skipped) with its full digest, compressed380 size, layer count and distro.381- **Distro:** read from `etc/os-release` (or `usr/lib/os-release`, which is382 where Alpine's symlink points) in the first three layers. Only gzip or383 plain tar layers up to 64 MB are read, and the stream stops as soon as the384 file is found. Otherwise the page says "No os-release (scratch or385 distroless)".386- **Metadata:** OCI labels for version, revision (linked to its commit page387 when it has one), base image, licenses, authors, vendor, description,388 source, URL and documentation, plus entrypoint, command, ports and user.389 The environment is never even parsed, since it can hold secrets. Gitea's390 hosts are private: the configured host and the challenge realm's host,391 which is `ROOT_URL` and may be a tailnet name. A source or URL on those392 hosts that points at an allowlisted repo becomes a link to its page here.393 Any other value naming them, or a `.ts.net` name, is dropped. Only https394 URLs are linked.395- **Integrity and cost:** manifests fetched by digest and config blobs must396 hash to their digest. Per-platform results are cached in memory by digest,397 since they're content-addressed, so a rebuild only refetches the tag list398 and the tag manifests.399- **Failure:** registry trouble never fails the build. The image is still400 listed with its pull command and a note that details aren't available.401 This differs from the API rule, because a stale packages page is worse402 than a short one.403404### Phase 4: activity on the profile page405406All of it is server-side HTML and SVG, built from data the build already407has: the last year's commits from the mirrors of the allowlisted repos, plus408releases, pulls and repo metadata from API calls already made. The one new409field read is the repo's `created_at` (and `merged_at` on pulls), from the410same responses. No new endpoints are called. Only repos in `config.json`411are in the data, so nothing else can appear.412413- **Weekly bars** (replaced by the activity bar chart, see below) sit in the414 heatmap box, above the heatmap. The box head shows "active in N of the415 last 52 weeks" and the current streak: consecutive weeks with commits,416 ending this week, or last week while this week is still empty.417- **Layout (revised after review):** activity graph at the top, then the418 featured repos, then the activity feed. The separate "Recently active"419 row is gone.420- **Featured repos:** up to six cards in the middle, from `featured` in421 config (in order, each must be in `repos`), or the six most recently422 updated. "All N repositories →" links to `/repos/`, a new top-level page423 that lists every allowlisted repo. The server has one extra route for it,424 and `repos` is now a reserved repo name. A repo with commits in the last425 week gets a "N commits this week" pill and an accent edge (see Phase 5). Cards also carry426 the 12-week sparkline and the latest release tag.427- **Activity feed:** a text timeline, modelled on Tangled's and styled428 after the comment threads on danieldaum.net: no boxes, a dashed rule429 above, and a time column (UTC) that shows the time for today's events and430 the date ("Nov 19") otherwise, with the full time on hover. Day headers431 were tried and dropped to keep it short. Each event has an avatar (yours for your own events, a person icon432 for others) with a small badge icon, a one-line sentence, and nested433 lines on a 1px left rule, like saturn's comment replies. The feed covers434 the last 90 days, at most 6 events, in a compact type size (shortened twice after review):435 - "pushed N commits to `main` on repo": git doesn't record pushes, so436 commits are grouped per repo, author and day. Each shows the newest437 two as short hash (linked when it has a page) plus subject, then a438 "+N more" chip and "Commits →" to the log.439 - "created repository X", "published release `vX` on repo", and440 "opened" or "merged pull <title> on repo", one line each.441 The year's commits come from one `git log` pass per repo (hash, author,442 time, subject), which also feeds the heatmap and the bars. On phones the443 time moves above the sentence.444- **Counting rules match the heatmap's:** every commit on the default445 branch counts, whoever authored it, because the anonymous API hides446 emails. Pushes are approximated by commits, since Gitea's activity feed447 isn't used: it would need a new endpoint and covers private repos.448- The repo-a fixture gains 25 dated commits across five months (on449 `docs/notes.md`, four of them on one day), repo `created_at` dates, and a450 merged pull (#5), so the goldens and `just demo` show a real shape.451452### Phase 5: more life on every page453454No JS was added for any of it.455456- **Freshness:** a still green dot marks a commit in the last 24 hours:457 on the "updated" pill in the repo header and on tree rows. A pulsing458 version was tried and dropped, since motion doesn't fit the static look.459 Repo cards with commits in the last 7 days show a plain "N commits this460 week" pill and an accent edge. An earlier "active"/"live" label said too461 little. Releases and commits under 7 days old get an accent "new" badge.462 The warm age colours stay, and they are mixes of `--syn-constant` and463 `--text-secondary`, both well over 4.5:1 on boxes and hovers.464- **Repo header:** stats are compact pills on every repo page: the latest465 release (an accent badge), commits, branches, tags, "updated … ago" in its466 freshness colour (or the live dot), and the CI result of HEAD linked to467 its checks. The code box no longer repeats branches, tags and commits.468 Its top bar keeps the branch chip and the clone menu. Website, licence469 and packages stay on the meta line, which is left out when empty.470- **Reuse key:** pages reused across builds (tree, blob, commit) show the471 header too, so the reuse key now includes the CI status and the newest472 commit's age bucket (days for the first week, then weeks, months,473 years). Those pages are rebuilt when the pill's text or the live dot474 would change. Within the first day the hours can lag on reused pages; the475 repo home and log are rebuilt every time.476- **Commit log:** commits are grouped by day (UTC) under sticky headers477 ("Today", "Yesterday", "Nov 14", with the year when it differs), one box478 per day. Each row has a coloured `+N −M` from one `git log --shortstat479 --diff-merges=first-parent` pass, matching the commit pages.480- **Hover and focus:** cards lift onto a lighter background with an accent481 edge, and asset rows highlight like other rows. Focus rings inside boxes482 sit inside the edge so they aren't clipped. The ring itself is the shared483 `--accent-bright` one from Phase 1.484- **Empty states** (no releases, pulls, packages or commits, an empty repo,485 no branches or tags) have a round icon, one line and a muted hint.486- **Motion:** hover transitions are 120–180 ms, and the clone menu chevron487 rotates. Saturn's reduced-motion rule turns all of it off.488- **404:** the pixel "404" in `--accent-bright`, links to the featured489 repos, and buttons back home and to all repositories.490- **Clone menu:** the code box no longer clips the menu (`overflow:491 visible`). Its first child and last file row take the rounded corners492 instead.493- The fixture's newest commit moves to the morning of the fixed build day,494 so the goldens and `just demo` show live dots, "Today" and "new".495496## Activity bar chart497498`render.ActivityBars` replaces the plain weekly bars above the heatmap. It499is one inline SVG (`class="bars"`, `role="img"`), with no JS and no inline500styles: every part has its own class and its colour comes from tokens.501502- **Shared x axis.** The chart uses the heatmap's grid from `heatmap.go`503 (`left`, `cell`, `gap`, 53 columns, `colX`, `monthCols`) and the same first504 week, `WeekStart(end, 52)`. Both viewBoxes are `left + n*(cell+gap)` wide505 and drawn at `width: 100%; height: auto`, so each bar sits over its week506 at any width and the text isn't stretched. The bars are bucketed with507 `Weeks(times, now, 53)`. "Active in N of the last 52 weeks" and the streak508 still use the last 52.509- **Y axis.** The step is the smallest of 1, 2, 5, 10, 20, 50 … that gives510 2–3 lines (0 included) with the top line at or above the busiest week,511 for example 0/5/10 for a max of 6 and 0/10/20 for 15. Bars are linear on512 that scale, at least 4 units tall. Empty weeks are a 2-unit stub. Colour513 uses the heatmap's `level()` steps.514- **Markers, kept few:** this week (an `--accent-bright` outline and "this515 week" under the right end of the baseline) and the streak (a bracket in516 `--syn-constant` under exactly the weeks `Streak` counts, so it ends last517 week while this week is still empty). Month rules sit in the gap before518 each heatmap month label. The streak has no label of its own, because the519 box head already says "6-week streak". A "busiest · Oct 18 · 15" dot and520 label were dropped after review for the same reason (busy). The busiest521 week stays in the aria-label.522- **Releases are not marked.** A first version drew a dashed line, a523 diamond and the tag for each release, with labels staggered over two524 rows. It was dropped after review: the tags were detail nobody needed,525 and the label placement cost code. With one label left under the526 baseline, the chart is 118 units high.527- **Hover** detail is SVG `<title>`s: a full-height hit rect per column528 holds "12 commits · week of Oct 18 – Oct 24", and the bar after it has529 `pointer-events: none`, so `.bars-hit:hover + .bars-bar` brightens it and530 the column gets a faint background. 120ms fill transitions, none under531 reduced motion.532- **Empty year:** grid, month rules and stubs only, with "No commits in the533 last year" in the middle and no markers.534- **Small screens: two renders, toggled by CSS.** Below 600px the profile535 shows a second chart and heatmap drawn for the last 26 weeks with the same536 column logic, and hides the full-year pair (`.heat-year` / `.heat-half`).537 The aria-labels keep the full-year summary. A sideways scroller that538 starts at the right (an `rtl` container) was the other option. It keeps539 one copy, but scrolls the y-axis labels and weekday labels out of view,540 which is the part that makes the chart readable. Each pair sits in one541 container with equal viewBox widths, so the chart and heatmap can't fall542 out of line. The cost is HTML: the profile went from 58.9 KB to 92.1 KB543 (7.1 KB to 10.1 KB gzipped), most of it the second heatmap.544545## Served at code.danieldaum.net546547The site moves from `daum.dev` to `code.danieldaum.net`. Everything548host-specific already came from `site_url` (clone URLs, `go get` paths, image549refs, the registry token realm) except the brand in the header, which now550shows the host of `site_url` too. Go module paths follow the host:551`go get code.danieldaum.net/<repo>`. The fixtures and tests use the new host.552The spec still says `daum.dev` throughout; read it as `site_url`.553554## Palettes shared with danieldaum.net, and a font review toggle555556- **Why a cookie:** danieldaum.net keeps the palette in `sessionStorage` and557 `localStorage` under `theme`. Those are per origin, so558 `code.danieldaum.net` can't read them. A cookie set for559 `Domain=danieldaum.net` is visible to both. `/static/theme.js` reads a560 `theme` cookie first, then this site's own `sessionStorage`, and otherwise561 moves to the next palette after the last visit, like saturn's562 `theme.js`. It writes all three whenever it picks one. The cookie is a563 session cookie with `SameSite=Lax`, and `Secure` on https. On an IP or564 `localhost` it's host-only. The server never reads it.565- **Saturn's side** needs the same cookie read and write (about 10 lines in566 its `theme.js`). Until that ships, each site rotates palettes on its own.567- **Footer:** a `theme` button cycles moss → ink → wine → plum → teal, as on568 danieldaum.net (flexoki stays out of the cycle there too). The buttons569 have `hidden` and `theme.js` reveals them, since `[data-theme]` is always570 set here from config. Saturn shows its button on that attribute instead.571- **No flash:** `theme.js` loads in `<head>` without `defer`, so the palette572 is set before the first paint. It's same-origin, so the CSP is unchanged573 (`script-src 'self'`, nothing inline). Without JS, the page keeps the574 palette from config. The cache-busting `?v=` hash now covers `style.css`,575 `theme.js` and `copy.js`.576- **Font: Geist Pixel for all text,** as on danieldaum.net, chosen after a577 short review with a footer toggle (since removed). Code and hashes stay578 Geist Mono, because pixel type is proportional and code columns would579 drift. Geist Pixel is declared for every weight, as in saturn, so bold580 text isn't faked and emphasis comes from colour. The Geist font is gone.581 This reverses "Text is Geist" from the polish pass.582- **Width:** repo pages (`page--code`) are up to 60rem wide, down from583 68rem, and every other page (profile, repos, 404) is up to 50rem. Saturn's584 78ch is gone here: `ch` follows the font, and with Geist Pixel it grew to585 about 73rem.586587## Gitea's icons again588589Phosphor read worse than the Material icons the site had before, so the590icons are Gitea's own again: material-icon-theme for files and folders,591Octicons for the UI.592593- **Files:** the same 153-icon subset of material-icon-theme as before594 Phase 3, plus `folder-open` for the current folder in breadcrumbs. It is595 npm `material-icon-theme@5.40.0`, which reproduces the old files and596 tables byte for byte. Lookup is the old one: the lowercased name, then597 extensions longest first (`a.test.ts` tries `test.ts`, then `ts`), and598 folders by name (`docs`, `cmd`, `.github` get their own folder icons).599 The icons keep their own colours, as on Gitea, so they don't follow600 `data-theme`. The `.r-*` colour roles are gone.601- **UI:** Octicons 16px from `@primer/octicons@19.15.0`, GitHub's set, which602 Gitea uses too. Templates keep their own names (`pull`, `fire`, `user`…),603 and `scripts/icons.py` maps them to Octicons (`git-pull-request`, `flame`,604 `person`…). Document tabs use GitHub's glyphs where it has one: Code of605 conduct `code-of-conduct`, Funding `heart`, Governance `organization`,606 Support `comment-discussion`, Citation `quote`. CI pending is `dot-fill`.607- **Still a per-page sprite**, not `<img>` as before Phase 3: icons are608 `<symbol>`s inlined into the pages that use them, so nothing is fetched609 and the CSP is unchanged. Material icons reuse ids (`a`, `folder`,610 `motive`) and refer to them (`url(#a)`, `xlink:href="#a"`). The loader611 prefixes every id inside an icon with its symbol id (`xf-kotlin-a`), so612 they can't clash on one page. A test checks there are no bare ids and no613 inline styles.614- **Root attributes:** six icons (document, readme, changelog, log,615 settings, just) set `fill="none"` on their `<svg>` to hide a 24×24616 background path, and editorconfig sets `clip-rule` there. The loader617 copies the root's presentation attributes onto the `<symbol>`. Without618 that, the background drew as a black square. The editorconfig logo619 itself is black, as on Gitea.620- `just icons <material-icon-theme dir> <octicons dir>` regenerates both621 sets from extracted npm packages. The repo home grew from 29.0 KB to 35.1 KB622 before compression, since Material paths are longer.623624## User name case and avatar caching625626- Gitea user names keep their case for display ("Daniel") but match in any627 case, in the API and in git URLs. Image refs must be lowercase, so628 `user` from config is lowercased when it loads. Clone paths, registry629 routes and `docker pull` refs use the lowercase name. The profile shows630 the login and full name as Gitea returns them.631- The avatar is downloaded on every build and saved as632 `/static/avatar-<hash>.<ext>`, a hash of its bytes. `/static/` is cached633 for a day, so a fixed name would keep showing the old avatar after a634 change.635636## Responsive pass after Geist Pixel637638Checked in headless Chromium at 1280px and 390px on the profile, repos,639repo home, file, log, commit, releases and packages pages. No page scrolls640sideways at either width.641642- **Repo cards:** the name keeps its width and the "N commits this week"643 pill and release badge wrap under it, instead of the name shrinking to644 "repo…". The pill doesn't wrap inside itself.645- **Tabs:** saturn's `nav { flex-wrap: wrap }` made the repo tabs wrap into646 ragged rows on phones. They now scroll sideways, like Gitea's and GitHub's647 on mobile. Below 600px the repo tabs and the README box's document tabs648 fade out at the right edge to show there's more, with room to scroll the649 last tab clear of the fade.650- **Clone menu:** stays anchored to the right of the Clone button at every651 width, so it opens leftward and fits. The old small-screen rule anchored652 it left and pushed it off screen.653- **Commit rows:** below 600px the `+N −M`, CI and hash move to a second654 line under the subject, so subjects aren't cut to a few letters.655- **Avatar:** 160px, a rounded square (`--radius`) as on Gitea instead of a656 circle. Small avatars stay round.657- `just demo` used to 404 on the newest commit page: the golden test moved658 that page to `commit-latest.html`. It copies it now.659660## The chrome is danieldaum.net's661662The site is served at code.danieldaum.net and will move to663danieldaum.net/projects, so it must read as part of that site. The header,664footer and favicon are now exactly saturn's, hard-coded in `base.html`:665666- **Header:** the name is "Daniel Daum", linking to danieldaum.net, and the667 nav is about, blog, projects, garden. The three main-site links are668 absolute (a relative `/about/` would 404 on code.danieldaum.net); the669 "projects" link points at `/` (this site's home) and carries670 `aria-current="page"`. When the site moves under danieldaum.net/projects,671 the absolute links stay right, but the internal ones need a base path.672- **Footer:** saturn's, verbatim: email, git (Tangled, new tab), PGP,673 changelog, privacy, feed, theme button. All absolute, since the pages live674 on danieldaum.net. The mobile hide-rules match the path675 (`a[href$="/pgp.asc"]`) because the urls aren't bare paths, as in saturn.676- **Profile page:** the profile card (avatar, name, bio) is gone. The home677 page opens with saturn's /projects page header (`/projects` and678 "Things I've built or projects in development"), the same meta description679 and the title "daniel daum - projects". The avatar is still downloaded: the680 activity feed uses it for own events.681- **Favicon:** saturn's favicon pngs and webmanifest (icon paths rewritten to682 `/static/favicon/`) live in `web/static/favicon/`. The server serves683 `.webmanifest` as `application/manifest`.684- **Config:** the `links` map is gone. The chrome is fixed, not configured.685 `site_url` still drives clone urls, `go get` paths and image refs.686- **Width and background:** `body` is saturn's again: `78ch` wide (about687 73rem in Geist Pixel at 16px), 16px, `--background-dark`. With the old688 50rem and 60rem widths the header nav and footer jumped sideways when689 coming from danieldaum.net, and the darker grey page background showed690 too. The code browser's own 15px type now starts at `main`. Every page is691 the same width, so `Page.Wide` and `page--code` are gone. This replaces692 the "Width" bullet under "Palettes shared with danieldaum.net".693- **Layers:** `--page` is `--background-dark`. The other layers mix it with694 white (box 2%, box head 5%, hover 8%, rule 14%, edge 20%, line 24%), close695 to the old Paint lightness steps above the page, keeping the palette's696 hue. The contrast test passes in every palette (lowest: secondary text on697 hover, 5.21:1).698- **Titles and head:** every title is `daniel daum - <page>`, as on saturn699 ("daniel daum - repo-a", "daniel daum - README.md · repo-a"). Every page700 links saturn's Atom feed, and pages with a description (the home page)701 carry saturn's Open Graph and Twitter card tags.702- **Breadcrumbs:** repo pages and `/repos/` open with saturn's breadcrumb703 (`projects -> repo-a`), like saturn's project and tracker pages. It keeps704 saturn's capitals. The repo title is just the name: the owner, avatar and705 slash are gone. `/repos/` uses saturn's page header (`/repositories`).706 The in-repo path crumbs stay as they were.707- **404:** saturn's wording, "this page doesn't exist", and its title.708- **Activity feed:** one rule only. The line through the avatars and the709 commit list's left rule drew two parallel lines. The commit rule stays,710 as on saturn's comment replies.711- **Palette:** saturn's `theme.js` still needs the cookie (see "Palettes712 shared with danieldaum.net"). Until then the two sites can show713 different palettes, which is the most visible seam left.714715## README HTML: an allowlist716717GitHub-style READMEs open with raw HTML (`<p align="center"><img …></p>`,718`<h1 align="center">`). With goldmark's raw HTML switched off, rhea's719screenshot, title and tagline were dropped. This bends spec rule 5: raw HTML720is still never passed through, but `internal/render/rawhtml.go` rebuilds an721allowlist of it.722723- **Tags:** p, div, h1–h6, img, a, br, hr, b, i, em, strong, code, kbd, sub,724 sup, s, del, pre, blockquote, ul, ol, li, details, summary. Others are725 dropped and their text kept, except script-like tags (script, style,726 iframe, svg, textarea …), whose contents go too. Comments are dropped.727- **Attributes:** `align` (left, center, right) on blocks and img; img728 `src`, `alt`, `title`, `width`, `height` (digits, optional `%`); a `href`,729 `title`; details `open`. Everything else goes, so no `style`, `class`,730 `id` or `on*`, and the CSP is unchanged.731- **URLs:** `src` and `href` go through the same resolver as Markdown732 images and links (relative paths to `raw/` and `blob/`, images relative733 or https only). An href must be relative, http(s) or mailto. An image734 without a usable src becomes its alt text, like a dropped Markdown image.735- **Text** is unescaped and re-escaped, so nothing in it can form a tag.736- **Balance:** open tags are tracked over the whole README, so a737 `<div align="center">` … `</div>` around Markdown works. A close tag that738 was never opened is ignored, so README HTML can't end the page's own739 elements, and whatever is still open is closed at the end.740- No new dependency: the tags are read with two regular expressions, which741 is enough because the output is built from scratch, never copied.742743## Release 0.1.0: name, deploy folder, base path744745- **Name:** the project is "showcase". The binary, `cmd/showcase`, the746 compose service and the image (`git.danieldaum.net/daniel/showcase`) use747 it. The Go module path stays `daum.dev/showcase`, since nothing imports748 it from outside.749- **Deploy folder:** `deploy/` holds the production `config.json` (no750 secrets: the builder is anonymous), `compose.yaml`, the saturn patch and751 the runbook. The root `config.json` stays gitignored, for `just run`.752- **Images:** `just release <version>` builds linux/amd64 and linux/arm64753 with buildx and pushes `<version>` and `latest`. It refuses a dirty tree754 or a HEAD not tagged `v<version>`. The Dockerfile's build stage runs on755 `$BUILDPLATFORM` and cross-compiles, so only the small runtime stage is756 emulated. Both base digests are multi-arch indexes.757- **Mirrors follow `gitea_url`:** `gitx.Mirror` resets `origin` to the758 configured URL before each fetch. Before, a mirror kept fetching the759 address it was cloned from, so moving Gitea to the tailnet would have760 broken every repo until the volume was wiped.761- **`base_path`** (`/projects`, or empty for the root) serves the pages under762 one path segment, for danieldaum.net/projects through saturn's Pages763 Function.764 - Links: templates and the builder still write root-relative links. One765 pass in `render.Write` prefixes every root-relative `href` and `src`766 (`/repo-a/` → `/projects/repo-a/`), README links included, so no link767 can be missed. html/template always quotes attributes with `"` and768 escapes quotes in text and values, so only real attributes match.769 `//host` links are left alone. `TestBasePathLinks` fails if any page770 links outside the base.771 - Server: paths under the base are served with it stripped. Anything772 else redirects into the base (`/repo-a/` → `/projects/repo-a/`), so773 old links keep working. Clone, `docker pull`, release downloads, `go get`774 (`?go-get=1`) and `/healthz` stay at the root: module paths and image775 refs can't move, and Pages Functions only forward GET and HEAD.776 - Release downloads link to `site_url` when a base is set, since777 danieldaum.net doesn't forward them.778 - The webmanifest's paths are relative, so they work under either.779 - Validation: one lowercase segment, not a reserved name or a repo name.780- **Saturn side** (`deploy/saturn/saturn.patch`): `theme.js` shares the781 palette through the `theme` cookie, `social/functions/projects/` redirects782 `/projects/*` to code.danieldaum.net (`MODE = "redirect"`) or proxies it783 (`"proxy"`), `_routes.json` adds `/projects`, and `isLikeable` drops784 `/projects/`. The proxy forwards GET and HEAD only, to a fixed origin,785 without cookies, and returns upstream redirects as they are. Showcase's786 security headers pass through; saturn's `_headers` don't apply to787 Function responses. Tested with Node in front of a `base_path` build:788 all 66 pages and their links work through it.789790## Language bar, tree rules and `.env` pages791792- **Language bar:** the bar shows Gitea's numbers as they are. Gitea reads793 linguist attributes, so wrong stats get fixed in the repo being shown,794 not in showcase. This repo's `.gitattributes` marks `gitea/` (copied795 Gitea themes) and `testdata/` (goldens) as vendored and `icons_gen.go`796 as generated. Before that, the themes made showcase read as mostly CSS.797 Gitea recounts on the next push.798- **File tree rules:** the commit message fade (`mask-image`) sits on the799 link inside `.f-msg`, not on the cell. A mask on the cell faded its800 top border too, so each row's rule broke off under the message column.801- **`.env` pages:** `/<repo>/blob/.env` renders and is served like any802 other file. In production, the reverse proxy in front of the container803 answers every path ending in `/.env` with an empty 403 (no showcase804 headers, missing files too), and browsers show that as a blank page. It805 looks like a WAF rule against `.env` leaks (for example CrowdSec's806 `vpatch-env-access`). Fix it there with an exception for this host,807 not by renaming routes in showcase.808809## Issues and comments810811The spec lists issues and comments as non-goals. Daniel asked for both, so812they're in, read-only like pulls.813814- **Issues tab** (`/<repo>/issues/`), between Releases and Pulls: the 50815 newest issues (`/issues?state=all&type=issues`; the issues API has no sort816 option). Gitea's issues API returns pulls too, so anything with817 `pull_request` set is dropped. The heading counts open and closed issues;818 labels are plain pills, since the CSP allows no inline colors.819- **Comments** on issues and pulls, oldest first, from820 `/issues/{n}/comments`, fetched only when the item's `comments` count is821 above zero. That endpoint only returns real comments, not timeline822 events. Bodies come from anyone, so they go through the same Markdown823 allowlist as READMEs; the fixture's comment carries a `<script>` and a824 `javascript:` link to prove it.825- **Public only:** the calls are anonymous, so only issues of public repos826 are seen. Gitea has no confidential issues within a public repo.827- **Read-only:** the page says issues can't be opened or answered here.828- **Activity:** opened issues join the profile feed.829- Icons: Octicons `issue-opened`, `issue-closed` and `comment` (19.15.0),830 added to `scripts/icons.py`.831832## A Gitea token, for the packages API only833834Security rule 1 says the generator uses no token. Gitea 28 wants one to835list packages, and non-container packages are coming, so there's now one836narrow exception. Nothing uses it until `gitea_token_file` is set.837838- **Config:** `gitea_token_file` names a file holding the token (a Docker839 secret or a read-only mount), so config.json stays free of secrets. The840 token can't be set in config.json itself, and it's never marshalled.841- **One endpoint:** `gitea.Client` sends the token only when a call asks for842 it (only `Packages` does) and the path is the user's package listing843 (`/api/v1/packages/<user>?…`). Any other path asking for it is refused844 before a request goes out. Repos, issues, pulls, comments, avatars,845 mirrors and the git and registry proxies stay anonymous: they never see846 the token. Add more endpoints to `tokenPath` one at a time.847- **No redirects:** the client already refuses them, so the token is never848 replayed elsewhere.849- **Filter:** with a token, the listing can include private packages. Only850 packages linked to a repo that loaded anonymously, and not private, are851 kept. The builder passes those repo names, not the config list, so a852 private repo in config never lets its packages through.853- **Not yet:** packages linked to no repo are still dropped, and downloads854 still need a route. Both come with the packages work.855- Tests: `internal/gitea` proves the header only reaches the package856 listing, never follows a redirect, and is absent without a token;857 `internal/config` covers the file handling.858859## Tab bars that fit860861With issues added, a repo using everything overflowed both tab rows on862desktop. The content column is 631px (78ch of Geist Pixel at 16px, less863padding). Measured from the font's glyph advances: the repo tabs needed864772px (808px with four-digit counts), the README box's tabs 716px for865repo-a's six documents and 1,202px for all eleven kinds.866867- **Commits tab, without its count.** The header's "N commits" pill868 already shows the number. Tabs are a little tighter (0.85rem, 0.45rem869 side padding, no gap, smaller count pills): 592px for repo-a, 610px with870 large counts (issues and pulls are capped at 50). Only the current tab871 is bold, which adds a few pixels at most.872- **Compact document tabs.** Up to four documents keep their labels (the873 four longest take 516px). From five on, only the open tab shows its874 label; the others are icons with a `title`, and the label stays in the875 page for screen readers. All eleven take 496px, so they never scroll on876 desktop. On hover a tab's icon lights up and a faint underline shows, so877 icon-only tabs read as clickable. Phones still scroll both rows with the878 edge fade.879880## Second security review881882Details in `docs/security.md`. The decisions: the proxy forwards an883allowlist of request headers instead of stripping a denylist; git proxying884is capped at 8 concurrent requests (503 beyond); registry blobs are always885downloads; issue, pull and comment bodies are cut at 32 KB and threads show886their newest 100 comments.887888## A quieter code bar889890On an iPhone the repo tabs overlapped: Safari shrank the scrolling tabs891below their content, so each icon sat on the previous word. Even where they892fit, six icons, six labels and four count pills under a wrapping language893legend made the top of the code box busy. This replaces "Tab bars that fit"894for the repo tabs; the README box's document tabs are unchanged.895896- **Plain words.** The repo tabs drop their icons and read like the site897 nav above them: secondary text, the open tab in `--accent-bright` with an898 underline as wide as the word, 1.5rem apart (1.25rem on phones). Counts899 are small secondary numerals, not pills. `flex: none` on each tab stops900 Safari's squeeze.901- **Only tabs with something in them.** Code and Commits always show.902 Releases, Issues, Pulls and Packages show when they have at least one903 item, or when they're the open page (an old link to an empty page still904 says where you are). The pages themselves still exist.905- **Three languages and "other".** `langBar` keeps the three largest906 languages instead of six; the rest join "other", in the legend and the907 strip. On phones the legend is 0.75rem with 0.75rem gaps.908- **Widths** (Geist Pixel advances, as before): all six tabs with counts909 take 448px of the 631px column. On a 390px phone (358px of content) the910 showcase repo's three tabs take 202px; all six take 428px and scroll with911 the edge fade. The legend for Go, CSS, HTML and other takes 335px on a912 phone, so it stays on one line down to 375px screens.913- Not checked in a real browser in this pass: the numbers come from the914 font's metrics, not a render.915916## Images built by Gitea Actions917918`.gitea/workflows/release.yml` builds and pushes the image when a tag919`v*.*.*` is pushed, then creates the Gitea release. Tagging and deploying920stay manual: the server runs the digest pinned in `deploy/compose.yaml`,921never `latest`, so nothing reaches it that Daniel didn't pin.922923- **amd64 only.** The server is amd64. The image used to be built for924 arm64 too, because `just release` ran on the Mac (Apple silicon). That925 needed QEMU: Go cross-compiles natively, but the runtime stage's926 `apk add` runs as the target arch. Nothing runs the arm64 image, so it927 and QEMU are gone, here and in `just release`. Locally there's928 `just image` and `just demo`.929- **Plain docker commands**, no actions beyond checkout (pinned to a930 commit). The newest Docker actions need Node 24, and the runner was only931 shown to run Node 20 (`actions/checkout@v4`). The digest comes from932 `docker push`'s output, which every image store prints, rather than933 `docker inspect`.934- **Tokens:** only `REGISTRY_TOKEN` is made by hand (a Gitea token with935 `write:package`), since Gitea's run token isn't known to push packages.936 The release is written with the run token, `GITEA_TOKEN`. Both reach937 the scripts as environment variables, and the tag name is read from938 `$GITHUB_REF_NAME`, so nothing is interpolated into a script.939- **Registry host:** Gitea moved to the tailnet940 (`code.aardvark-halibut.ts.net`), and `git.danieldaum.net/v2/` now941 answers 404. The workflow, the justfile, compose.yaml and the docs name942 the tailnet host. The pinned 0.1.0 digest is the same there (checked943 with crane).944 - Not `$GITHUB_SERVER_URL`: that's the runner's address for Gitea,945 `http://gitea:3000` (a Docker network name), which works inside the946 job container but not for the push. `docker push` is done by the947 Docker daemon on the runner's host, which resolves names like the948 host does. So that host must resolve and reach the tailnet name.949 The Gitea API call (the release) does run in the job container and950 keeps using `$GITHUB_SERVER_URL`.951- **Manual runs:** `workflow_dispatch` takes an existing tag. The952 workflow comes from the branch it runs on and checks out953 `refs/tags/<tag>`, so a fixed workflow can release a tag whose own run954 failed. The tag must look like `v1.2.3`; anything else stops the run.955- **Release notes:** the image with its digest (to pin in compose.yaml)956 and the commit subjects since the previous tag. A rerun rebuilds the957 image with a new digest, so an existing release is updated (PATCH)958 instead of created.959- **Not covered:** tests (`just test` runs before committing) and the960 tag's signature. A signature check was tried and dropped: the workflow961 comes from the tagged commit, so it only stops tags made in Gitea's UI,962 and the digest pin already guards the server.963964## Signed commits965966Signed commits get Gitea's lock badge: the short hash gets a green edge and967a segment with a lock and the signer's avatar when Gitea verified the968signature, or an open lock when it's signed but not verified. Unsigned969commits look as before.970971- **Gitea's verdict, not git's.** One more anonymous call per repo,972 `/commits?sha=<HEAD>&limit=50&stat=false&files=false&verification=true`,973 paged up to `max_commits`. Gitea checks the signature against the keys974 of the user whose verified email committed it, so the badge matches975 Gitea's own. Checking locally would need the keys in an allowed-signers976 file, `ssh-keygen` and `gpg` in the image, and Gitea's email matching977 rules again.978- **What's kept:** verified or not, the signer's Gitea name and the key979 (SSH fingerprint or GPG key ID, read from the `reason`, and only when it980 has that exact form). The signer's email, the signature and the payload981 are never decoded. The avatar shows only when the signer is the profile's982 user; other signers get the lock alone. The API has no trust status, so983 Gitea's yellow "untrusted" and red "warning" states aren't shown.984- **Where:** every short hash of a commit on the log page (log rows, the985 repo's latest commit bar, the commit page, branches and tags). The commit986 page adds Gitea's signature bar: "Verified · signed by daniel with SSH key987 `SHA256:…`", or "Signed · Gitea couldn't verify the signature". The988 activity feed shows a small lock after verified hashes. Parent hashes989 stay plain, as on Gitea. Branches and tags pointing at older commits show990 no badge, since only the log page's commits are looked up.991- **Colour:** `--add`, the CI pass green. `--sig` (12% of it over `--box`)992 is the badge segment and the bar; `--sig-edge` the border. The contrast993 test covers text on `--sig` (lowest: secondary text, 4.94:1).994- **Failure:** 404/401/403 means no badges. Any other error fails the995 build, like the CI status call. Empty repos skip the call (Gitea answers996 409).997- **Reuse key:** includes the verdicts, so commit pages are rebuilt when a998 key is added in Gitea and old commits turn verified.999- Icons: Octicons `lock` and `unlock` (19.15.0), added to `scripts/icons.py`.10001001## Copy a file10021003File pages get a copy button joined to Raw (`[Raw | ⧉]`), like GitHub's.10041005- **It copies the raw file.** `copy.js` fetches the Raw link's URL and puts1006 the bytes on the clipboard, so CRLF, mixed line endings and files too1007 big to show (over 512 KB) all copy exactly. That needs `connect-src1008 'self'` in the CSP: the third change to spec rule 6, after `script-src1009 'self'`. It only lets this site's own scripts (`theme.js`, `copy.js`)1010 request this origin. It adds no way out: an injected script could already1011 send data anywhere through `img-src https:`, and the site holds nothing1012 private. Under `base_path` the origin is danieldaum.net and the Raw link1013 is already rebased, so it works there too.1014- **Safari** only allows clipboard writes during the click, so the1015 download is handed to `ClipboardItem` as a promise. Browsers without1016 `ClipboardItem` get `writeText` after the download.1017- **Which files:** text with a raw copy, up to 5 MB (`maxCopy`). Images,1018 binary files and files over 5 MB keep Raw alone.1019- **Trailing blank lines:** chroma drops the empty line after a final1020 newline, so a file ending in blank lines showed one line too few.1021 `Highlight` adds it back, and `TestHighlightKeepsText` checks the lines1022 give back the source.1023- **Hidden without JS, for real now.** `.copy` and `.button` set `display`,1024 which beat the `hidden` attribute, so the clone box's copy button showed1025 without JS too, contrary to "Copy buttons need JS". `[hidden]` rules for1026 both fix it.10271028## This week on the bar chart, clearer10291030Production showed "1-week streak" with no bracket under the bars, and this1031week's bar looked like any other busy week. Both replace parts of1032"Markers, kept few" under "Activity bar chart".10331034- **The streak bracket is drawn from one week,** not two, so it always1035 matches the streak in the box head. A one-week bracket is a short1036 underline under that week's bar.1037- **This week's outline is `--text-headings`,** not `--accent-bright`. The1038 busiest weeks are filled with `--accent`, and `--accent-bright` (the1039 accent with 18% white) barely showed on them.10401041## Saturn's new footer and post headers10421043Saturn changed its footer and page headers, and showcase follows so1044danieldaum.net/projects stays seamless.10451046- **Footer:** saturn's new links: email, source, ID, changelog, privacy,1047 RSS, theme. "source" is `/saturn/`, showcase's own page for saturn, so it1048 becomes `/projects/saturn/` under `base_path` and opens in the same tab.1049 ID, changelog, privacy and RSS stay absolute `https://danieldaum.net/…`1050 links. The 600px hide rule now matches `a[href$="/id/"]` where it matched1051 `/pgp.asc`.1052- **Headers, one rule:** the big `/name` header is only for pages in the top1053 nav, so only the home page (`/projects`) keeps it. Every other page uses1054 saturn's post header, `.page-header--post`, with a kicker linking to its1055 parent, and that kicker replaces the `projects -> …` breadcrumb.1056 - `/repos/`: kicker `/projects`, h1 "Repositories", the count sentence1057 as `.meta`.1058 - Repo pages: kicker `/projects`, h1 the repo name (shown in capitals by1059 saturn's caps rule), the description as `.meta`, then topics, stats and1060 links as before. Every page in a repo (code, commits, a file, a commit,1061 releases …) keeps this same header, so the tabs under it don't move. The1062 tabs and the in-repo path crumbs show where you are inside the repo.1063 The repo name in the h1 is no longer a link: the Code tab goes there.1064- **CSS:** saturn's `.page-header-kicker` and `.page-header--post` rules are1065 copied into part 1 of `style.css`. `.repo-title` only lays out the1066 archived pill now. `.breadcrumb` stays in part 1 as saturn's copy, unused.