Don't ask for a Trac ticket while creating a site - #165
Merged
juanmaguitar merged 1 commit intoAug 7, 2026
Merged
Conversation
The create-site modal asked for a ticket alongside name and location. That is the moment someone is least likely to have one — they may be creating the site precisely so they can go find a ticket to work on — and the site row already offers linking, changing and unlinking at any point afterwards. Removes the field, its state and its creation-time validation, and with the renderer no longer passing one, the now-dead `tracTicket` branch of the `wordpress:setup` handler. The post-creation path (`sites:set-ticket`, the ticket panel, `trac-ticket.cjs`) is untouched. Fixes #164 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.
Fixes #164. Stacked on #142 — review the two-file diff, not the base.
What and why
The Create WordPress Core site modal asked for a Trac ticket alongside the site name and location. That is the moment someone is least likely to have an answer — they may be creating the site precisely so they can go find something to work on — and the field made the modal look longer and more demanding than it is.
It was also a second entry point for an association the site row already handles, better: link, change and unlink, at any point in the site's life. This removes the creation-time shortcut and leaves that panel as the only way in.
Changes
src/renderer/index.jsx— the field, its state, its resets and its creation-time validation are gone;parseTicketRefis no longer needed in the renderer (the panel validates in the main process), so the import narrows toticketUrl.src/main.js— with the renderer no longer passing one, theoptions.tracTicketbranch of thewordpress:setuphandler had no caller left. Removed rather than kept as dead code.parseTicketRefstays imported:sites:set-ticketstill uses it.The post-creation path —
sites:set-ticket,trac-ticket.cjs, the ticket panel inSiteRow— is byte-identical.Review
Ran the pass in
.github/instructions/code-review.instructions.md, judgement dimensions dispatched to a fresh context per/self-review.npm run lint— clean.npm test— 337/337.Three things the review verified rather than assumed, since they were the plausible failure modes:
src/,test/or the docs expects a ticket at creation time — no test exercisedwordpress:setupwithoptions.tracTicket, so the deletion orphans no assertion.tracTicket: nullfrom the optimisticsetSiteMetapatch cannot resurrect a stale ticket when a site is re-created at the same path:sites:forgetandsites:deleteboth delete the meta entry, and the renderer refreshes wholesale from the store before a re-create can spread it.sites:set-tickettests andtest/trac-ticket.test.cjs.Testing
Open Create WordPress Core site: only Site name and Site location. Create a site, then link a ticket from its row and confirm it saves, opens in Trac and unlinks.
🤖 Generated with Claude Code