Document the site-holds-many-tickets model, and correct the guide pages that predate it - #245
Merged
Merged
Conversation
…redate it The guide describes a site as one working tree and one implicit patch. The ticket-branches stack makes a ticket a branch on the site, so several of these pages are now wrong rather than merely incomplete: what a patch contains, what Unlink costs, what a trunk update does to work in progress. Adds guide/ticket-branches.md for the model itself — starting a second ticket, the tickets card in both its states, what a switch says while it runs, deleting one ticket's work, and the question asked about edits made before a ticket was picked. Corrects trac-tickets, submitting-changes, trunk-updates, applying-patches, creating-a-site and managing-sites where they describe the old model, and renames the "Submit changes" button everywhere it is quoted. Screenshots: six new ones for the panels the stack adds, plus a re-shot site-view.png whose button label was already stale on trunk. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…pp does Five accuracy findings, all verified against the stack tip before fixing. The worst was the new page's central how-to: it said to type a second ticket number into the Trac ticket panel, which holds no field while a ticket is linked — Unlink first is the real route. The mid-switch advice named a recovery the app does not offer (the marker is only written when a live checkout throws, and the refusal covers the retry as well, so Unlink is the way out). The unsubmitted-changes note was said to always match the patch file-for-file, when it counts binaries the diff can only name. The by-hand replay recipe skipped the update that gives it a newer base, and offered a delete the card does not show for the ticket you are on. And a switch does not rebuild, so a running dev server keeps serving the previous ticket's assets until npm run build. Also: applying-patches' "reset with Update to latest trunk" escape hatch does not apply on a ticket branch; managing-sites and trunk-updates described the same dirty-tree dialog differently; and troubleshooting gained the refused-switch message, which is what someone will search for when it happens. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
Do not merge this before the ticket-branches stack (#168 #185 #198 #205 #218 #238 #241 #242 #243). It documents features that are not on trunk yet. Merged first, the published guide describes an app nobody can download.
Why
The user guide describes a site as one working tree and one implicit patch, because that is what the app was when the guide was written. The ticket-branches stack makes a ticket a branch on the site, which leaves several pages not merely incomplete but wrong: what a patch contains, what Unlink costs you, what a trunk update does to work in progress, whether the applied-patch banner describes the ticket you are looking at.
The stack also adds surface nothing documents at all — the tickets card, the question asked about edits made before a ticket was picked, the note about unsubmitted work, the switch progress line, coloured pull request states.
What changes
Docs only. The diff is
docs/— guide pages,docs/.vitepress/config.mjsfor the sidebar, and screenshots. Nosrc/, noscripts/.New page:
guide/ticket-branches.md, "Working on several tickets". The model (a site is the expensive substrate, a ticket is a cheap branch), starting a second ticket, the tickets card in both its states, what a switch says while it runs and what to do when one fails part-way, deleting one ticket's work, the four-choice question about loose trunk edits, the unsubmitted-work note, and what a ticket's patch does and does not contain. Added to the sidebar under "Contributing changes", after "Working on a Trac ticket".Corrections to pages that describe the old model:
trac-tickets.mdsubmitting-changes.mdtrunk-updates.mdapplying-patches.mdcreating-a-site.mdmanaging-sites.mdtroubleshooting.mdgetting-started.md,setup-wizard.md,submit-*.md,running-the-site.mdDeliberately not in this PR: new entries in
scripts/screenshots/shots.cjsfor the panels the stack adds. A shot definition belongs with the code that draws the panel, and one added here would fail on trunk where the panel does not exist — see Risks.How to test this
Platforms: any. This is a static site; nothing here touches the app.
Starting state: this branch checked out.
npm run docs:build→ completes. This is the real check:ignoreDeadLinks: false, so a broken link or a missing image fails it.npm run docs:devand open/guide/ticket-branches→ the page renders, the six screenshots load, and "Working on several tickets" is in the sidebar under Contributing changes, between "Working on a Trac ticket" and "Applying patches and PRs".#what-a-patch-contains,#edits-you-made-before-picking-a-ticket,#deleting-a-ticket-s-work,trunk-updates#updating-while-you-are-on-a-ticket,submitting-changes#what-a-patch-can-and-cannot-carry→ each lands on the heading it names, not at the top of the page.npm run lint→ clean.And the part a build cannot check — drive the stack (the Buildkite artifact for
juanmaguitar/pr-state-coloursexercises all nine PRs) with the new page open, and check the prose against the app:What must not have happened:
src/orscripts/file in the diff.git diff --stat origin/trunk...HEADmust list onlydocs/. If a screenshot-harness change slipped in, it will fail on trunk.Risks and limitations
This PR must merge after the stack. It is the only real risk here and it is not defended by anything automated: nothing in CI knows the difference. The Pages deploy runs on trunk, so merging early publishes it immediately.
scripts/screenshots/shots.cjshas no entries for the new panels, so the six new images are not reproducible withnpm run shotsas things stand. They were taken by driving the stack through the same Playwright harness in a throwaway worktree, with fixture and shot definitions that were not committed anywhere. Follow-up, and it belongs on a branch that has the panels: the fixtures need real repositories with ticket branches, where the current ones are empty directories. Follow-up issue not yet filed — happy to file it.site-view.pngis re-shot and is the only existing image replaced. Its button still read Submit changes, which was already stale on trunk after Say on the card when there are unsubmitted changes, and give them a way out #235 renamed it — so that image and the text corrections around it are true of trunk today, stack or no stack.MERGEDpill is documented but not screenshotted. A repository-wide search returns no merged pull requests onwordpress-develop; the state is real in the API and unit-tested, and Colour a linked pull request by its state, in GitHub's own colours #243 says the same.Related
Documents #168, #185, #198, #205, #218, #238, #241, #242, #243 — the ticket-branches stack, tip branch
juanmaguitar/pr-state-colours. Part of the contribution-flow tracker #110. Follows the docs site (#230), its screenshot harness (#231) and the guide itself (#232).Design decisions and alternatives considered
A new page rather than growing
trac-tickets.md. That page is about one ticket: linking it, and reading the work that already exists on it. Several tickets is a different subject with its own vocabulary — parking, switching, deleting a branch — and folding it in would have doubled the length of a page a first-time contributor reads on their first ticket, to describe something they do not do yet.trac-tickets.mdgains pointers instead.Corrections before additions. A page that is wrong costs more than a page that is missing: someone acts on it. So the pass over the existing guide came first, and the new page was written to fill what was left.
Screenshots taken by hand rather than by adding shot definitions. The harness lives on trunk and the panels live on the stack, so a shot definition committed here would fail every
npm run shotson trunk until the stack lands. The images were taken by assembling the two in a scratch worktree — stack tip, plus trunk'sscripts/screenshots/and theTOOLKIT_USER_DATA_DIRhook, plus fixtures that build real repositories with ticket branches — and only the resulting PNGs were copied here. That worktree is gone; nothing of it is in this diff.Quoting the app rather than paraphrasing it. Where a sentence in the app is the thing being explained — the question about loose edits, the switch stages, the confirm before a delete — the page quotes it verbatim, so someone reading with the app open can match what they see. Every quote was read out of the stack's source.
Review outcome (5 [fix here] · 1 [follow-up] — all addressed)
Run per
.github/instructions/code-review.instructions.md. Deterministic layer inline and clean —npm run lintclean,npm test638/638,npm run docs:buildclean. The judgement pass went to a subagent with the diff, the instructions file and the stack's source, and nothing from the session that wrote the pages; it was asked to check every quoted string and every behavioural claim against the code rather than to read the prose.Every finding was an accuracy finding — the guide asserting something the app does not do. All five were verified against the source before being fixed.
midSwitchBlockrefuses the retry along with everything else. The one action it allows is Unlink, which is now what the page andtroubleshooting.mdsay.applying-patches.md's "use Update to latest trunk to reset the checkout" escape hatch. On a ticket the update parks, resets trunk and checks the branch back out — applied patch included — so it leaves you where you started.npm run buildafter a switch, which is what the site view itself says.submitting-changes.md.[follow-up], both taken here rather than deferred because they were two sentences each:managing-sites.mdandtrunk-updates.mddescribed the same dirty-tree dialog differently, andtroubleshooting.mdhad no entry for the refused-switch message.Style notes, also applied: the tickets card is additionally gated on the setup checklist being finished or skipped, and the loose-edits question can be raised from the Attach to Trac card's link field too.
The pass also confirmed what was most likely to be wrong and was not: every other quoted label and message is verbatim, all six screenshots match their alt text,
#deleting-a-ticket-s-workresolves under VitePress's slugifier, and the new page is in the sidebar.Implementation notes
How the screenshots were taken.
git worktree addfrom the stack tip, thengit checkout <trunk> -- scripts/screenshots docs/…,playwright-coreinstalled, and theTOOLKIT_USER_DATA_DIRhook fromsrc/main.jsre-applied — the stack predates all of it, sonpm run shotsdoes not exist on that branch. Two throwaway fixture variants were added, both building real repositories through the app's ownsrc/ticket-branches.js(startTicketBranch,parkCurrentWork,switchToBranch) so the state is the state the app makes: one site onticket/29798with parked work and a second branch, one parked back on trunk with a loose edit. Same 1200×800 window and--force-device-scale-factor=1ascapture.cjs, so the new images sit beside the existing ones without a size jump. The worktree has been removed.The new slugs, none of which
shots.cjsknows about:ticket-list-card,ticket-list-unlinked,trunk-work-question,carried-work-notice,linked-pull-requests,site-with-tickets.linked-pull-requests.pngis one image doing three jobs — the coloured state pills (#243), the unsubmitted-changes note (#241), and the reorganised ticket card with the tickets list no longer inside it (#242).docs/is its own npm package, sonpm run docs:buildneedsnpm --prefix docs cifirst on a fresh checkout.Screenshots or recording
Six new images, and one replaced.
The tickets card, linked —
ticket-list-card.png:The tickets card, unlinked —
ticket-list-unlinked.png:The question about loose trunk edits —
trunk-work-question.png:After choosing to carry them —
carried-work-notice.png:The ticket card with coloured pull request states and the unsubmitted-work note —
linked-pull-requests.png:The three cards in their new order —
site-with-tickets.png:Replaced:
site-view.png, whose action bar read Submit changes. No stack behaviour is visible in it — it is a straight re-take of a stale image.