Repository navigation
refactor(portal): each portal surface gets its own routes module - #1340
Conversation
5538065 to
0170b4d
Compare
cac16c5 to
d8f9cf1
Compare
8a40067 to
f509ba7
Compare
Acceptance: PASS with notesChecked Round 2 scope: Done means
Golden journeys
Rollback answers: match the diff. No DDL, row-shape or public-contract change; the migration-source diff changes only a comment. Round 1's rollback check passed; the new head's check was queued at the CI snapshot. Not run
Notes
All instances from this check are down. Text evidence only; no PR code, branch, body or labels changed. |
|
So from what i understand its basically in preparation for the ui ovehall and condenses everything into a much smaller registry . It looks good to me |
1f9f234 to
ae7cd47
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
f509ba7 to
9910304
Compare
…d once (#1376) ## What changed This adds release 41's What's new entry, written from `a25a9c5`. It covers everything merged since release 40's `through` (`08e1fd9`), and sets the `patchy` release to `0.41.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. It ships the UI overhaul together with #1204, the terms prompt, as one release, at Allison's word. | Change | PRs | | --- | --- | | Improved: Patchy has a new look | #1332, #1336, #1338, #1343, #1353, #1354, #1369, #1372 | | New: Accept updated terms once | #1204 | | Improved: Settings holds People, Integrations and Agent access | #1334, #1341 | | Improved: Home starts with what needs you | #1344, #1353 | | New: A blue dot marks patches you haven't opened | #1370 | | Improved: A patch's page has one header and tabs | #1345 | | Improved: Search lands on All patches | #1346, #1353 | | Improved: Inviting and deactivating people is clearer | #1349 | | Improved: Your agents shows what's connected | #1352 | | Improved: Integrations use plain words | #1347, #1351 | | Improved: Agents and integrations show their own logos | #1371 | | Improved: What's new goes by month | #1350 | | Fixed: ⌘⇧K works on your company's public patches | #1339 | | Fixed: Saving works after a patch stops being public | #1339, #1375 | | Behind the scenes: every page built from one set of parts, with a check | #1338, #1354 | | Behind the scenes: agents know a once-public page's refusals mean reload, and retries wait and stop | #1374 | | Patch changes: a kept public page reloads into the company page; check retries wait and stop | #1375, #1374 | #1337 is release 40's own entry. #1340 (routes split, plus the call summary Home and All patches show) and #1342 (the `dense` dev scenario) need no line of their own: the call summary is part of the Home and All patches changes, and the scenario is tooling. The overhaul makes no patch changes. Running patches keep their own styles, which #1332 pins, and the only SDK change is the wording of two error messages' admin addresses. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. - **Rollback safety, from the live commit `d3d32da` (release 40) to this PR's merge:** - **#1334 is `one-way`.** Your agents and Settings moved to `/agents` and `/settings/…`. Old addresses redirect forward, but release 40 serves none of the new ones. This release's CLI hints, the `patchy` skill on `main`, and the API, MCP and publish hints all name the new addresses, so on release 40 they'd answer 404. - **#1372 needs the private font bucket**, and that's done. Its deploy step fetches the pinned Cabinet Grotesk file and checks it before recording anything. The bucket was created on 2026-11-10 and holds the pinned bytes. A rollback to a commit from before #1372 pins no font and builds as before. - **#1204** adds migration `0036_terms_acceptances`, an additive table that release 40 never reads. Release 40 doesn't prompt, and coming forward again asks only people who hadn't accepted. Not `one-way`. - **#1375** changes only the public shell's script, and #1374 is skill text. Release 40 renders its own shell and serves its own skills. - **#1370 and #1339** add rows to the existing `patch_opens` table (a guest's opens, and members' opens of public patches). Release 40 reads them like any other open. - **Everything else** is pages, styles, copy and docs: no migrations, and no API, `--json` or configuration changes. - **patchy-web #53**, the website line #1371's logos needed, is merged (771e6d9). **Rollback line:** Rolling back past #1334 would break every `/agents` and `/settings/…` link that this release's CLI, skill and hints hand out, because release 40 answers them with 404. Fix forward instead. ## How it was verified - **Tests:** the `packages/core` What's new test passes (5), the `packages/api` suites pass (64), and the three files are formatted. - **The range.** Each of the 22 overhaul PRs was: - reviewed by GPT 6.1 Sol at xhigh, with every finding fixed or declined in writing on the PR; - accepted on its final head by an agent that didn't write it; - merged green, by a merge train that rebuilt each PR's accepted tree on main's tip and checked that main's tree matched it after every merge. - **#1339, #1375, #1374 and #1204** were each Sol-reviewed and accepted, and merged on their own: #1339 before the train, the other three after it. #1204's acceptance was rerun on the new sign-in pages. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required The changelog entry and the release version only. - **What does a revert leave behind?** Nothing. CLIs installed from this release report `0.41.0` and are told to match the server, as at every release. - **Does the release before it still work with that?** Yes. Changes made by Claude Opus 5.5 in Claude Code, running in T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
Stacked on #1334; part of #1315. Merge the stack together, not alone.
What changed
PortalPages.tsheld every portal route and handler, so the five page rebuilds that come next would all have edited one file. Each portal surface now has its own routes module, registered from one list. The portal also gets a call summary: calls and failed calls per patch over the last 24 hours. Before this, a patch nobody called looked the same as one called all day without a failure. People see no change.Closes #1319
Look at
One module per surface, registered from one list.
PortalPages.tsis now only that list:HomePages.tshome.ts,guide.tsHomePages.test.tsAllPatchesPages.tsallPatches.tsAllPatchesPages.test.tsPatchPages.tsrender.ts,log.tsPatchPages.test.tsSharePages.tsshare.tsSharePages.test.tsUserLifecyclePage.ts(gains itslayer)UserLifecyclePage.test.tsWhatsNewPages.ts(now in the list)WhatsNewPages.test.ts/assets/Assets.tsAssets.test.tsSwitcherList.ts(now in the list)SwitcherList.test.tsEach module starts with a two-line comment saying what it owns. Modules share code only through
shared/:shared/presentation.tsholds pure helpers: patch paths, menus, search,isNew, confirmation parts (hidden,refusal, the acknowledgement) and the old page layout CSS every portal page still carries. It moved byte for byte fromrender.tsandallPatches.ts.shared/handlers.tsholds the request context, error wiring (errors,pageErrors,errorPage), patch-name guards,staleNotice, the Share dialog over a page and its way back (Sharing,asked,behind,pagePath,shareOverlay), and reads that several pages make (callSummary,turnedAway,prewarm). It also defines the shared types:PortalServices(the requirement listPortalPages.layerspelled out before),Routes(the layer type each surface declares, so an unhandled failure or an unprovided service is a type error in that module), andPage.share.ts: the overlay needs that renderer, and the renderer needs the pure helpers.SharePagesgets those pages as aPagesBehindargument from the list instead of importing three other surfaces.The call summary (second commit).
InvocationLog.callsreplacesInvocationLog.failures. For each patch it returns the top-level calls since a time and how many of them failed (as the log's Failed filter counts them). It is one query over the sameruntime_invocations_top_level_recentindex. Inshared/handlers.ts,callSummarygives each live tier 2 patch the viewer manages{ calls, failures }for the last 24 hours,{ 0, 0 }when nobody called it, and nothing for a member who manages none. Home and All patches read their failure counts from it, so their output is unchanged. The new glossary entry is inpackages/portal/GLOSSARY.md.Reviewing the move:
git show --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change 8b795204. Almost everything shows as moved. The changes are in imports, span names,SharePagestakingpages, and theRoutes/Pageannotations.How it was verified
No screenshots: no page changes, and the response comparison below is stricter than a picture.
Locationand body). Three tests asserted on several surfaces. Each is now split so its assertions sit with their surface, and every response in the new tests appears in the original test's.pnpm --filter @patchy/portal test: 11 files, 121 tests (the 99 portal tests, plus four from the splits, the call summary test, What's new and the renderer tests).packages/runtime/src/InvocationLog.test.tscoverscalls: pending and overdue calls count as calls but not failures; nested calls and calls older than the window are left out; a patch whose only calls are old is absent.pnpm check: format, lint, typecheck and synth pass for this change. Format fails onpackages/core/src/html.test.ts, which this PR doesn't touch: it is already unformatted on the base, so CI'slintjob fails here exactly as it does on feat(portal): Your agents and Settings get their own addresses #1334. The fix belongs on feat(portal): Your agents and Settings get their own addresses #1334, the branch that introduced it. The offline tests had 52 failures across 23 files: CLI tests that see a strayGET /on this machine's local ports, and timeouts under shared-machine load. The non-CLI failures (InvocationLocal,PatchesApi,SdkApi,DevReads) pass when run alone. CI runs the full suite.pnpm verifyand the browser suites. CI runs them.Release impact
Breaking — requires action from anyone already running this
Not breaking — internal refactor. The one service method renamed (
InvocationLog.failures→calls) is read only by the portal; the CLI'spatchy devstub, which answers it with nothing, followsWhat does a revert leave behind? Nothing: no schema, data or contract change. One comment in a migration's source changed, not its DDL.
Does the release before it still work with that? Yes.
Built by Claude Opus 5.5 (xhigh) in Claude Code, orchestrated by Fermy.