Public: anyone can read this; the crew can change it.
A preview's toolbar page says what its pull changed and whether its check is green, each link a 44 px tap on touch screens #4214
A preview's toolbar page now shows what its pull changed (diff totals) and whether its check is green. The pull failed because it didn't merge into main. I've merged main into the branch and pushed, so it should merge cleanly now.
stopped parked by the crew deploy f89896c
2 earlier comments
A preview's toolbar page (env=pull-N) now shows a change line under the head line. The line has the pull's diff totals ("N files, +A −R") linking to its Files page, and the latest check's badge linking to that run's log. With no check it shows a plain "No check" badge with no link. tsc --noEmit, test/design-lint.test.ts and the toolbar tests pass. I ran only those, not the whole check.
- Missing branch: the earlier branch
scout/4088-…was not on the forge, so I built this fresh.diffTotals(),runStateBadge,.change-lineand the stat cached by head oid exist here as I wrote them, not as the reviewers accepted them. - Stat cache: the stat is cached in memory per pull and head oid, capped at 500 entries, and a failed read is not cached. The test's repeat request on the same head answers in under 50 ms.
- Link size: the links are at least 36 px tall, and 44 px under
@media (pointer: coarse)..change-lineis registered in docs/DESIGN.md §5d with that note. - Production: production's page is unchanged, and a pull the viewer may not see still returns 404.
- Tests:
test/toolbar-change-line.test.tscovers a green check, a red check, no check, the second-request speed, production and a missing pull. - Signed-out viewers: they also see the change line on a preview. I chose that because a pull they may view already shows them its files and checks.
- Cache key: the cache is keyed on head oid only, as the issue asked. If the base branch moves while the head stays put, the cached totals can lag.
- Left out: I did not add a test for a sealed pull. The 404 comes from the existing
mayViewcheck, and the new test only covers a pull number that doesn't exist.
To try it, open /<owner>/<app>/toolbar?env=pull-N on a preview.
A preview's toolbar page now shows what its pull changed (diff totals) and whether its check is green. The pull failed because it didn't merge into main. I've merged main into the branch and pushed, so it should merge cleanly now.
The conflicts were in src/web/studio/toolbar.ts and docs/DESIGN.md:
toolbar.ts: I kept the imports from both sides. A preview shows the change line, and production keeps main's live line. The unauthenticated and signed-in views render both.DESIGN.md: I took main's class lists and added.change-lineback to the apps/runs entry.
I ran tsc --noEmit and the toolbar and design test files (99 tests), and all passed. I did not run the full bun test suite here. The forge's check will run it on this push.
Parked by the crew: the check failed in the place it ran, not in the change, and failed the same way when it was run again
A preview's toolbar page now shows what its pull changed (diff totals) and whether its check is green. The pull failed because it didn't merge into main. I've merged main into the branch and pushed, so it should merge cleanly now.
The conflicts were in
src/web/studio/toolbar.tsanddocs/DESIGN.md:toolbar.ts: I kept the imports from both sides. A preview shows the change line, and production keeps main's live line. The unauthenticated and signed-in views render both.DESIGN.md: I took main's class lists and added.change-lineback to the apps/runs entry.I ran
tsc --noEmitand the toolbar and design test files (99 tests), and all passed. I did not run the fullbun testsuite here. The forge's check will run it on this push.Continues #4214