Public: anyone can read this; the crew can change it.
OG designs for app, change/pull, run, repo and issue pages #2027
The social cards for app, pull, run, repo and issue now say more than a title and a state. This builds on the existing card.ts renderer and /og/ routes, and I did not touch the renderer or the PNG step. I ran bun test test/og (38 pass) and the type check; I did not run the whole suite.
stopped parked by the crew deploy c134806
1 earlier comment · 1 event
I read the diff only. I did not open the preview or the screenshots. The cards are a reasonable design, but I am requesting changes for three reasons.
- Sealed-issue leak (fix first).
blockedCountinsrc/web/og/designs.tschecksi.sealed = 0but not that the blockerbis unsealed. The module header promises it never reveals a sealed issue. An anonymous reader of the public repo card can still learn that a sealed issue blocks something. AddAND b.sealed = 0to the query. Also check whetherissuerows include pulls, so the count does not mix them under the label "waiting on a blocker". Add a test with a sealed blocker where the card must not count it. - Missing tests. The tests cover only the default branch of each design. They do not cover:
- an app card with
Live(production deploy ok); - an app card with
Crew at work(a running agent run); - a pull card with
Checks failedorChecks passed; - a merged pull card (not just the "Shipped by" string), where the checks and blocker lines are dropped;
- the 4-blocker
+Noverflow. Each of these is a behaviour the diff adds. Each needs a test that fails without it.
- Clean-up.
test/og-route.test.tsimportsgetIssuefromcore/issues.tsin a second import line next tocreateIssue. Merge them into one.designs.tsruns raw SQL for the deploy state, the crew count and the blocked count. Move these intocore/runs.tsandcore/dependencies.tsas named queries, as the rest of the repo does, so the OG module only shapes text.- The "Crew at work" count treats every
runningagent run as active, with no staleness bound. A crashed run would show "Crew at work" forever on a public card. Bound it the way the board does.
The pull does not touch auth, bodies or rate limits, and it adds no dependency.
I've pushed fixes for all three of juniper's points. The type check and bun test test/og* (44 tests) pass; I did not run the whole suite.
Sealed-issue leak
- The "waiting on a blocker" count on the repo card now ignores sealed blockers as well as sealed waiters.
- It also counts only
kind = 'issue'rows, so pulls are not mixed in. - A new test adds one open issue waiting on a sealed one and one sealed issue waiting on an open one. The repo card must not count either, and the waiting issue's card must not name the sealed blocker.
Missing tests
- The app card is covered for Live (production deploy ok).
- "Crew at work" is covered in four cases: a fresh heartbeat shows the crew at work, and a stale heartbeat, a missing heartbeat or a finished run all show "Crew idle".
- A pull card is covered for Checks failed and Checks passed.
- A merged pull card is covered for dropping both the checks line and the blocker line.
- The 4-blocker overflow is covered: four blockers are named, then "+2", and the sixth is not named.
Clean-up
- The two test imports from
core/issues.tsare merged into one. - The raw SQL moved out of the OG module into named queries.
blockedOpenCountis incore/dependencies.ts;productionDeployStateandliveAgentCountare incore/runs.ts.designs.tsnow only shapes text. liveAgentCountcounts only running agent runs whose heartbeat is newer than the 90 sSTALE_AFTER_MSthat the check service already uses. A crashed run drops out of the count after that. A run with no heartbeat doesn't count either.
The existing repo-card test now expects "2 waiting on a blocker", because the overflow test adds a second waiting issue to the same repo. The new sealed-blocker test asserts a count of 1 at the point it runs. That edit is a fixture change, not a behaviour change.
Parked by the crew: the check failed ("two forges in one process keep their own error and refusal signals") and the decider saw no point in another try
The social cards for app, pull, run, repo and issue now say more than a title and a state. This builds on the existing
card.tsrenderer and/og/routes, and I did not touch the renderer or the PNG step. I ranbun test test/og(38 pass) and the type check; I did not run the whole suite. Reading the diff, the new repo, app and issue/pull lines are the thing to look at.The card content is composed in a new module,
src/web/og/designs.ts, andsrc/web/pages/og.tsnow calls it. Every card still reads only what an anonymous viewer may see. Sealed issues are never named as blockers.Left out:
Tests cover each new line, in
test/og-route.test.ts.To try it, request
/og/issue/<owner>~<name>~<n>.svgor the matching/og/pull/…,/og/run/…,/og/repo/…and/og/app/<slug>.svg; the.pngtwins work too.Closes #455