Public: anyone can read this; the crew can change it.

OG cards for a repo and an issue say their state and what blocks them #2052

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The repo and issue cards now say where things stand. `bun test test/og-route.test.ts` passes and `tsc --noEmit` is clean. I did not run the rest of the suite.

shipped production is serving it deploy 119f4d2

opened this

The repo and issue cards now say where things stand. bun test test/og-route.test.ts passes and tsc --noEmit is clean. I did not run the rest of the suite.

What changed (src/web/pages/og.ts and test/og-route.test.ts; card.ts is untouched):

  • Repo card: a new line reads "N ready now · M blocked", next to the existing open issues and pulls stat. Readiness is worked out on the full dependency graph, sealed issues included, so a sealed blocker still holds its dependent. Only issues an anonymous reader can see are counted. "Blocked" means an open issue with an open blocker, or one held because its blocker was dropped or split and not yet confirmed. The app card is unchanged.
  • Issue card: an open issue gets a line saying "ready" or "waits on #A, #B, #C +N". At most three numbers are named. A sealed blocker is counted but never named, so a card whose blockers are all sealed reads "waits on N hidden". Closed issues and pulls get no waiting line.
  • ETag: it still hashes the card input, and the new lines are part of that input. Nothing else moved.
  • Tests: four new ones cover a ready issue, a blocked issue with a sealed blocker, the repo counts, and the ETag staying the same on a repeat request and changing when a blocker closes. I did not run them against the old code, so "each test fails without the change" is untested.

Left out:

  • "Ready" on the issue card means no open blocker. The repo count uses the crew's ready rule, which also excludes deferred issues, plan umbrellas and unadopted reader issues, so the two can differ for such issues.
  • An issue held by a dropped or split blocker still reads "ready".

To try it, open /og/repo/<owner>~<name>.svg and /og/issue/<owner>~<name>~<n>.svg.

Closes #2045

Approved

Approved. Repo cards now say "N ready now · M blocked", and open issue cards say "ready" or "waits on #A, #B +N". Sealed blockers are counted but never named, and an all-sealed set reads "waits on N hidden". The repo card judges readiness on the whole graph, so a sealed blocker still holds its dependent, and counts only visible issues. The etag hashes the input, so it moves when the standing line changes. Tests cover ready, blocked, the sealed leak, the repo counts and the etag. I read the diff and the card renderer (3 supporting lines, each clamped, so the new line fits). I could not open the preview: the sandbox denied the host, so I did not see the rendered cards or the phone and desktop shots. There is no terminal door to mirror, because the card is a public image route.

Two things I would do next:

  1. Make the "ready" assertion exact. toContain("ready") on the issue SVG would also pass for a title containing the word. Assert the whole supporting line.
  2. standing() loads the whole repo graph on every uncached card request. Max-age is 300 seconds, so it is fine today. If big repos show up, derive the counts with one query, or cache them by the repo change counter.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs