Repository navigation
feat(core): one component set, five page templates and a gallery - #1338
Conversation
…nd the gallery is whole Sol's review of #1338: - A dialog's focus starts on its autofocus control, else its first field, never its Close link. - Reached by any link on this site, a dialog closes with history back to that page; only a dialog loaded another way closes to its own page. - Focus returns to the very link that opened it (by id, or its place among links to the same address), or to its menu's button. - A malformed fragment no longer stops the enhancer. - idFor is lossless: letters and digits stay, anything else is encoded, so different keys always make different ids. - Without script a dialog is the page: the inert page behind it and the scrim are left out (@media (scripting: none)), and it sits in the flow. - A locked flow section is a disabled fieldset, so its controls neither take focus nor submit. - The gallery adds the type and colour reference, tile options, the off switch, a deactivated person, a dialog only its actions close, Copy that works, and a state table for every component, checked by a test. - ui:report counts any raw button or field element and height values. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Sol review round 1 (GPT 6.1 Sol, xhigh): 4 Must fix, 6 Should fix; all fixed in 59a31dd.
|
…ogue is complete Sol's second review of #1338: - A dialog keeps its chain in history state: how many entries it has taken since a link on this site opened it, refused submissions included. Closing goes back past all of them to that page, so neither closing nor Back revisits a POST. dialog() takes a form, and the gallery's dialog posts and is always refused, so this is tried in the browser. - A refused choice group is marked invalid, and so is each choice drawn from the aria it hands out. - The gallery adds a refused choice group and state tables for the copy line, facts, page header, section and setting row; the inventory test covers them, and each gallery page has one h1. - ui:report flags any numeric weight or line height, named colours and a side's border colour. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Sol review round 2 (GPT 6.1 Sol, xhigh): round-1 findings 1, 3 and 5–9 confirmed fixed; one Must fix and four Should fix left, all addressed in 0134803.
No round 3: the brief allows one round after a Must fix. Every change is covered by a test. |
1ba862b to
d8cd509
Compare
67e5911 to
affc5cf
Compare
|
Acceptance fixes: browser Back from a refused dialog submission now closes the dialog to its opener, focus on its link, also when the back-forward cache restores the entry (browser test presses Back after one and two refusals), in c9d57a0. G1's dialog overflow fix (Close stays on screen at 390px with a long unbroken name) moved down into this PR, in 1aa89e5. |
Acceptance: PASS with notesChecked Round 2 scope: range-diff against round 1's FAIL on d8cd509 maps all five original commits unchanged and adds only the dialog overflow and refused-dialog Back fixes. I carry forward that verdict's unchanged production-gate, governance, served-wrapper and golden-journey evidence, and rechecked the changed behavior and page risks below. Done means
Golden journeys
Rollback answers: match the diff. No schema, persisted-data shape, API/CLI or infrastructure change. Transient history/session-storage state does not require the earlier release to understand it; no one-way label needed. Sanitized round 2 evidenceNot run
Notes
|
|
Ok this seems to be adding to the previous pr (1336). basedo n my agent these are the changes: Index: lists such as People or All patches. |
|
That's the right read. (Fermy, Allison's agent.) Teams should fit without a new template: a list of teams is an Index, one team is a Detail (members, patches it can open, as tabs), its settings and danger actions use the Settings template, and creating one or adding people is a Flow or a dialog. The gallery at |
affc5cf to
f4d28b3
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
c9d57a0 to
3839d4f
Compare
…s are tied (#1353) Stacked on #1351; part of #1315. Merge the stack together, not alone. ## What changed The page lanes left loose ends. This PR ties the ones listed for lane G1 of #1331. (Its first item, keeping a dialog's Close on screen on phones, moved down into #1338 after acceptance, so every PR above that one has it.) 1. **Dialogs on phones:** moved to #1338 (commit `1aa89e53`) after acceptance; nothing of it remains in this PR. 2. **Home's Reconnect row.** Needs attention now lists the viewer's own apps and computers whose access ended on its own in the last 30 days: "ChatGPT · Access ended 3 Nov 2026 · **Reconnect**". Reconnect goes to Connect an app with that app chosen, or to Add a computer. It uses P4's `AgentConnections.ended` and `MachineTokens.ended`, so it uses the same window and newest-of-a-name rule as Your agents. While a computer is listed there, Home leaves out "Connect your agent", which leads to the same steps. 3. **"No agent yet?"** One `getAnAgent` helper in auth holds the words and the links. Add a computer's Get an agent dialog uses it as its body, and the Final step opens it in place. Each link goes to its maker's own page, and I loaded each one in Chromium: `claude.com/product/claude-code` ("Claude Code by Anthropic"), `openai.com/codex/` ("Codex | AI Coding Partner from OpenAI"; curl gets a Cloudflare challenge, browsers don't) and `cursor.com`. 4. **Titles without " · Company" everywhere.** P3's `shownTitle` is now `patchTitle(patch, company)` in core. Every caller passes the patch's own company: the viewer's, or for a patch shared with a guest, the company that shared it. That covers Home, All patches, the switcher, Share, People's guests, the deactivation flow, the patch page and `<title>`. It matches the whole company name before the separator, so a company named "Harbor - Pine" still works. 5. **One failures cell.** Home's Yours and All patches share `failuresColumn`, `failuresCell` and `failedBadge`: "Failures (24 h)", with None, No calls yet, or "n failed" linked to the failed log. Before, Home's count was a badge without a link. 6. **People's See their patches** opens `/patches?owner=<user id>`, which lists that person's patches exactly, under an Owner chip that clears it. The filters and Share keep the parameter. An id that isn't a member of the company narrows nothing. Before, it searched by name, which also matched titles. 7. **`typedExactly` is now an option.** `input` and `prefixInput` take `exact: true`, and the company-address field on Join uses it. 8. **The `/~ui` gallery** now shows: door parts (`verificationCode`, `meet`, `answerPair`) with a Door state table, a Consent door page, the device door drawn from the real helpers, and P3's detail parts (`chipMenu` any and chosen, `groupedTable` closed, open and permalinked, `codeRow`, `person`, `settingsPanel`, `menuNewTab` and `menuRule` in a header menu, the quiet `copyButton`). It also adds P5's `checklist`. Each state that takes the focus or ends a door has its own page, so the system page's focus never jumps: `/~ui/refused` (a Detail page whose `refusalNotice` leads), `/~ui/checklist-refused` and `/~ui/checklist-none` (focus on the first box that can be chosen, or on the error), and `/~ui/door-refused`, `/~ui/door-field`, `/~ui/door-outcome` and `/~ui/door-unavailable`. Each has a state table, and tests pin the list and each page's focus target. 9. **Small fixes.** `pnpm ui:report` no longer counts `class="btn-group"` as a hand-drawn button. The `.refusal:focus` rule from P3 and P8 now lives once, in the notices chunk. `docs/product.md` names the aside "Your agent can, as you" and describes it as built. ## Look at **Home as Allison (dense):** the two Reconnect rows end Needs attention, Yours' "2 failed" links to the log, and the titles have no company suffix. Before and after, desktop and phone, are under **Before and after** at the end (`pnpm dev compare`). **The Final step's No agent yet?, open** (left), and the same words as Add a computer's Get an agent dialog (right): <img src="https://github.com/user-attachments/assets/cccc5293-e658-4b28-a07c-a2363789f874" alt="The Final step with No agent yet? open: the common agents, each with Get it" width="420"> <img src="https://github.com/user-attachments/assets/353344ae-f285-4d8b-90ef-ba4b37e9623b" alt="Add a computer's Get an agent dialog with the same words" width="420"> **The gallery's new parts** (`/~ui`, sample data):    **The dialog fix** now lives in #1338 with its test (`ui.spec.ts` › "on a phone, a dialog breaks a long unbroken name and keeps Close on screen"). ## How it was verified - `pnpm check`: format, lint, typecheck and synth pass. The offline run passed 302 of 307 files. The 14 failures are all in `packages/patchy` CLI stub tests, whose request logs catch the `GET /` probes T3 sends to local ports on this machine. This PR doesn't touch that package, and CI runs them clean. - New and changed tests: `patchTitle` in core (company suffix forms, another company's suffix kept, falling back to the name); Home's titles, published note and colleagues table, and All patches, without the suffix; the switcher's rows strip each patch's own company; Home's Yours count links to the failed log twice (its column and the phone line); Home's Reconnect rows for an ended app and computer, Connect your agent left out, and a colleague's Home without them; All patches `?owner=` (exact list, counts, a chip that clears, filters keep it, a stranger's id narrows nothing) and People's menu link; the Final step's disclosure and the Get an agent dialog holding the same `getAnAgent`, whose links are the three official pages; `exact` on Join's address; `ui:report` with a button group; the gallery's state tables, its door and refused pages, and `disclosure`. - Browser: `test/browser-tier1/ui.spec.ts` run on its own locally, all six tests passing (the 320px touch check covers the new gallery sections). CI runs the rest. - Looked at it on `pnpm dev up dense`: Allison's Home, Priya's Final step with the disclosure open, Add a computer's Get an agent, `/~ui`, `/~ui/door`, `/~ui/consent`, `/~ui/refused`. ### §10 states kept - **Home (11), Errors (10):** Needs attention still holds only problems, each with one fix. The Reconnect rows show only the viewer's own records. The Connect line stays in the empty company and no-results states, and is left out only while a computer of theirs is offering Reconnect. - **Who sees what (3):** All patches' owner filter only narrows what the viewer can already open. An id outside the company is ignored, so the page never reveals whether someone exists elsewhere. - **Status honesty (19):** Failures stay None / No calls yet / n failed, never "Healthy". - **URLs (2) and overlays (15):** the owner filter is a URL and its chip a link. The Final step's disclosure is ephemeral and works without script. Get an agent stays a dialog URL. ### Core additions - `disclosure(summary, body, { id, open })` in `ui/disclosure.ts`, with a `disclosures` chunk: the body's parts sit on one gap under the summary. The Final step uses it, and the gallery's Disclosures demo now draws from it. - `exact` on `InputOptions` (replaces `typedExactly`, whose one caller moved). - `patchTitle(patch, company)`: its second argument is now required, which is a change to an existing helper on purpose (decision in g-followups). Every caller is updated, and the type system catches any missed. - The `.refusal` focus rules moved into `notices`. (The dialog chunk's two rules moved to #1338.) ### Left for others - G2: legacy CSS deletion (the gallery no longer uses `.verification-code`), enforcement checks, finishing `ui-consistency` (this PR only adds `exact` and `disclosure` to it). - G2 adds `productMark`, `expandingTable` and `fieldRow` to the gallery. `productMark` and `canList` already live once in core after the integrations restack. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required Pages, core helpers and docs. Two read-only queries Home now calls already existed (P4's). No schema, wire, CLI or `--json` change. Old People links that searched `?q=<name>` still work as searches. - **What does a revert leave behind?** Nothing: no migration and no new rows. - **Does the release before it still work with that?** Yes. Built by Claude Opus 5.5 (xhigh) in Claude Code, orchestrated by Fermy. <!-- patchy-dev:compare:allison --> #### Before and after, as Allison Mahmood (admin) Before is `a3b8071` (where this branch left ui/p4-agents) and after is `87381fb` (ui/g1-loose-ends), both on the `dense` scenario, from `pnpm dev compare`. Every page answered 200 with no browser errors. ##### `/` **1280px, after**  <details><summary>1280px, before</summary>  </details> | Width | Before | After | | --- | --- | --- | | 390px |  |  | <!-- /patchy-dev:compare:allison --> Co-authored-by: Claude Opus 5.5 <[email protected]>
…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]>
#1227) ## What changed People had no way to tell Patchy what it lacks or got wrong without a terminal, and nowhere to see or take back what their agents sent. The only path was a `mailto:` on the integrations page. Now **Tell Patchy** sits in the sidebar's foot between What's new and the account, and opens a panel in What's new's frame: Request or Feedback, one field, Send. A request's receipt is followed by its similar requests, each with its status and public note, and **Same need** links one in a click. **What you sent** at `/feedback` lists everything the person and their agents sent, with Unlink and Withdraw… in each row's menu. Integrations' **Ask** and **Ask for an integration** open the same panel with Request picked. This is Direction A from the mocks (post.patchyhq.com/d/irl2myfbmdgk), ported onto the new component set. Part of #1210, closes #1215 **Ported onto the new component set.** While this waited, main replaced the first-party UI: the overhaul (#1332–#1354, #1371), the component set and five templates (#1338), the new sidebar (#1341), What's new's foot menu (#1350), and a check that fails a page that styles itself (#1354). The classes the first version used are gone. This version keeps the same concept, flows and behaviour, and draws everything from core's helpers with no page CSS. The look follows the system rather than the mock, and the departures it forces are listed under **Look at**. **How it works** - **The panel** lives in the shell (`packages/core/src/html.ts`), so every app page has it. It is a `menu app-foot-menu` popover, like What's new's, anchored to whichever button opened it. It sits outside the folding Menu, because a popover inside a hidden menu can't show, so any page's button with `popovertarget="tell-patchy"` opens it; its `data-kind` picks the kind. The form is `choiceGroup`, `field` and `textarea`, with no `maxlength`, plus a primary Send. Its styles are a few lines in core's `app-shell` chunk. - **Sending** goes through `/feedback/tell.js`. It posts the panel's forms with a `patchy-panel` header, and the server answers with markup drawn by helpers: - a sent request: a `receipt` naming its title, then `rows` of matches, each with a `badge`, its note, Same need and Unlink; - a refusal: the form drawn again with the field's `error`. The script only moves server-drawn markup and toggles `hidden`, so it draws no component. - **Without the script**, the composer has its own address, `/feedback/new?kind=request` (or `feedback`; anything else is a request), a `dialog` over What you sent with the panel's fields. A refused send from it draws it again with the field's error and an empty field. Integrations' Ask buttons are links to it: the panel's script opens the panel beside them instead, with the kind taken from the link. A sent request lands at its own address, `/feedback/<id>/sent`. It is a `dialog` over What you sent, drawn by the same renderer as the panel's answer, where Same need and Unlink post and come back to it. Done and Close go to What you sent. Only the request's sender sees it, and another person's id or a feedback id answers 404. Feedback lands on What you sent with a receipt, and a refusal on What you sent with a `refusal` above its table. - **Behaviour carried over unchanged:** - the routes and the `patchy-panel` contract; - the long-request split (`requestOf`: the first line, or the opening words cut with "…", becomes the title, and the whole text the why); - no automatic resend after an ambiguous failure; - one change in flight across the panel, with a counter that drops stale answers. Every close settles what was in flight: the panel opens again with the draft kept and the "couldn't confirm" note; - closing gives focus back to the button that opened it, or to Menu once that is folded away, after the switcher's chord and after a tap outside too; - `Feedback.get`, and surface `dashboard` with no agent. - **What you sent** is `indexPage` over the shared `table` (Sent, What, From, Status, a `menu` per row), paged by the store's cursor with Older. It lights no place. **Withdraw…** opens a `dialog` over it at `/feedback/:id/withdraw`, with Cancel first and focused and **Withdraw request** in `danger-solid`, as Your agents' Disconnect does. - **Small core additions:** - `button` takes `popovertarget` and `popovertargetaction`; - `field` takes `hideLabel` and `choiceGroup` takes `hideLegend`, keeping the mock's label-free composer while readers still get the names; - a speech-bubble `message` icon. Each comes with its gallery entry. Feedback joins the portal's services, and FeedbackPages is registered with the other portal surfaces. - **`dense`** now shows both: five general requests, one of each status and two with notes, plus Allison's own requests and feedback beside her agents' (Claude Code and Codex through the CLI, ChatGPT through Patchy MCP, and one unnamed agent), three of them linked. These are seeded through two new scenario fields, `generalRequests` and per-person `sent`. The ids are stable and in the store's shape, so a resumed `up` writes the same rows and the cursor pages them. - **Store changes**, each in its own commit with a test: - `Feedback.get({ person, id })`, which the withdraw dialog, the Unlink receipt and the sent address read; - `Feedback.similarTo({ person, id })`, which matches one of the person's own requests again with the query filing used, ranked now, for the sent address. ## Look at <!-- patchy-dev:film:tell-patchy --> #### Flow `tell-patchy`, as Allison Mahmood (admin) After is `857cc17` (feedback/portal), on the `dense` scenario, from `pnpm dev film`. - After: finished in 17.2s https://github.com/user-attachments/assets/9e6604b0-c0b1-4d1f-8c5e-c11fcb061fbe <!-- /patchy-dev:film:tell-patchy --> <!-- patchy-dev:compare:ada --> #### Before and after, as Allison Mahmood (admin) Before is `6a5a29c` (where this branch left main) and after is `857cc17` (feedback/portal), both on the `dense` scenario, from `pnpm dev compare`. ##### `/settings/integrations/connect` **1280px, after**  <details><summary>1280px, before</summary>  </details> | Width | Before | After | | --- | --- | --- | | 390px | No visible change |  | ##### `/feedback` **1280px, after**  <details><summary>1280px, before</summary>  </details> | Width | Before | After | | --- | --- | --- | | 390px |  |  | - Before at 1280px answered 404; 1 browser error(s): `Failed to load resource: the server responded with a status of 404 (Not Found)`. - Before at 390px answered 404; 1 browser error(s): `Failed to load resource: the server responded with a status of 404 (Not Found)`. <!-- /patchy-dev:compare:ada --> **With Patchy's general requests**, on a local `dense` instance as Allison. Fresh evidence instances run the same scenario. **1. Send a request from the foot, see similar requests, link one and unlink it**   <details><summary>Composing, and after Unlink</summary>   </details> **2. A key is refused on the field, and Ask for an integration opens the panel with Request picked**   **3. What you sent, a row's menu, Withdraw**     **4. When a send's answer is lost** (the server stored it and the browser never heard back): nothing is sent again, the draft stays, and the note points to What you sent.  **5. Without script: the sent request's own address, then linked from it**    <details><summary>Phone, without script</summary>   </details> **6. Phones: the panel opens above the foot inside Menu, the table scrolls sideways, Withdraw is a bottom sheet**  <details><summary>Phone: from Integrations, What you sent, a row's menu, Withdraw</summary>  </details> **Departures from Direction A that the new system forces** - **Receipts, not green boxes.** Success is quiet, so a sent request leaves a `receipt`, "Request sent: <title>", and a link leaves "Linked to <match>". The mock showed a bordered "Request sent" note. - **Statuses are `badge`s** with the mapping main's overhaul gave the old pills: Shipped green, Planned blue, Declined red, Open plain. - **A match stacks** its title, note, then badge and Same need, as a `row` in a 360px panel does. The mock put the badge beside the title. - **A refusal is the field's error**, one red sentence under the field that the field is marked against ("Your request has a Google API key in it. Nothing was saved. Take it out, or write <token> where it was, and send again."), rather than the mock's callout box. - **No bottom sheet on a phone.** Foot menus open above their button now, so Tell Patchy does too, as What's new does. Withdraw's dialog is the system's bottom sheet on a phone. - **Withdraw is a dialog over What you sent**, as confirmations on list pages are now, rather than a page of its own. Its URL is unchanged. - **Main's copy on Integrations.** The page now says **Ask** in the catalogue's "Something else" row and **Ask for an integration** in a member's header. Both open the panel; I kept those words rather than "Request an integration". - **An icon in the foot.** Every foot place wears one now, so Tell Patchy has a speech bubble. Its panel heading is the menu's head, as What's new's is. - **One notice a page.** The note for a send it can't confirm waits inert in a `<template>`, so no page carries a hidden second notice. The card's one-notice test now counts the page's own notices, inside `<main>`. - **The From column** is drawn the way All patches' Owner column is, a mark then the name over its surface. A grid cell there let the table squeeze it to nothing. Still standing from the first version: - Sent reads "just now" or "2 days ago", because the server doesn't know the reader's time zone. - The panel opens beside whichever button opened it. - Feedback's receipt doesn't repeat the note. - Done also closes the Menu it was opened from. - A long request is split into a title and its whole text as the why, never refused. ## How it was verified - **Tests.** `packages/portal/src/FeedbackPages.test.ts` is ported to the new markup without dropping what it asserts: - a send from the panel is stored as `dashboard` with no agent. The answer is a receipt, the shipped general request with its badge and note, and Done; - link, then unlink from the row menu without the script; - a pasted paragraph is filed as a title and a why. Exactly 4,000 characters ending in an emoji is accepted as a request and as feedback, and 4,001 is refused, as is too-short text; - a Google key is refused with 422 and nothing stored, and never echoed. In the panel, the answer is the form with the field's error and an empty field. Without the script, it is What you sent with a danger notice; - the list shows the person's own entries beside Claude Code · CLI, ChatGPT · Patchy MCP and Unknown agent · CLI, without notes; - another person's GET and POST withdraw, link and unlink all answer 404 on a live submission. The owner then withdraws it through the dialog, and the withdrawn id answers 404; - `requestOf`'s edges; - the composer at `/feedback/new`: Request picked for `?kind=request`, a bogus kind or none, and Feedback for `?kind=feedback`, under its own ids beside the panel's form. A request sent from it lands at its own address. A refused send from it is drawn again with the field's error, the kind as sent and an empty field, and never echoes the key; - without script, a send redirects to `/feedback/<id>/sent`. The dialog there shows the receipt, the shipped match and Same need, over the table. Same need and Unlink (with `from=sent`) each post and come back to it, linked and then unlinked. Another person, and a feedback id, get 404. `Feedback.test.ts` covers `similarTo`: three matches ranked now, never itself or another company's, and missing for another person, for feedback and for an unstorable id. `test/browser-tier1/tell-patchy.spec.ts`, in the browser suite, runs the panel's script: - a send held until the panel closed and opened again leaves the new draft alone, with the note; - Escape gives focus back to Tell Patchy, and so do the switcher's chord and Escape; - on a phone, a tap above the panel gives focus back to Tell Patchy, and Done closes Menu and gives focus to it; - after Feedback was picked, Ask for an integration opens the panel in place with Request picked and the field focused. Without script, it opens `/feedback/new?kind=request` with Request picked. The shell's tests (`html.test.ts`) cover the foot order, the panel outside the menu, the label-free field without `maxlength`, the inert note, the script on every app page and What you sent lighting no place. `ConnectionsView.test.ts` covers both Ask buttons. Dense's history test covers the seeded submissions, their id shape, and that a resumed `up` writes the same rows. - **`pnpm check`** at this tree: - format, lint (including `patchy/no-page-styles` and `patchy/no-hand-drawn-components`), typecheck and synth pass; - tests: 3,475 of 3,476. The one failure was a 5-second timeout in `PgliteCompanyDatabases.test.ts`, which this change doesn't touch; it passes run alone. - Focused suites pass: portal, core (including the stylesheet rules and the gallery inventory), feedback and the integrations view, 552 tests, plus the dev history and scenario tests, 12. - **In a browser.** Playwright Chromium drove the walkthrough on a local `dense` instance at 1280 and 390 wide: - focus starts in the field, and moves to Unlink after Same need; - the panel reopens fresh after Done, the draft and the invalid mark survive a refusal, and Ask picks Request; - Withdraw's Cancel takes focus; - the only console error was the expected 422 from the refused key. The review's three cases still hold on the ported markup. A send whose answer was cut after the server stored it is stored once and keeps its draft. A second Same need pressed while the first is held for 1.5 s sends nothing, and the panel's "Linked to" matches the database. Closing the panel during a held Unlink and reopening it shows a fresh form. - **Not checked.** - Firefox and Safari. Anchoring relies on the browser's implicit popover anchor, as the row menus' does. - Clerk sign-in mode. - A real Patchy MCP client: the MCP row is covered by a test, and `tell_patchy` is #1214. - `pnpm verify`'s browser and packed suites weren't re-run for this port. ## Review GPT 6.1 Sol reviewed the first version. Its findings were fixed then, and each fix is carried through the port with its test: 1. **P2: an automatic retry duplicated a submission.** The script never resends on its own; it keeps the draft and shows the note that links What you sent. 2. **P2: overlapping links could show the wrong saved state.** One flag covers the whole panel, and a counter drops answers for a panel reset since they were sent. There is no committed test for the ordering, since the script is a string served to the browser and the repo has no DOM test library. It was checked in Chromium, as above. 3. **P3: the ownership test checked an already-deleted id.** Another person tries a live submission first, and the deleted id is checked separately. 4. **P2: the textarea silently cut valid input.** There is still no `maxlength`; the server's 4,000-character refusal is the one bound. Sol reviewed the port at 857cc17. The four findings above still held, and it raised three more, fixed in ea0eb68 with the store method in c33ceb1: 5. **P2: a late Send reply could discard a new draft.** A close while composing didn't bump the counter, so a held reply landed after a new draft: its receipt covered the draft, and Done cleared it. Now every close settles what was in flight. If a send was on its way, the panel opens again with the draft kept and the note pointing to What you sent. 6. **P2: Same need was gone without script.** A send without script now redirects to the request's own address, `/feedback/<id>/sent`: a dialog over What you sent with the receipt, the matches and native Same need and Unlink forms. Both post and come back to it, so it reads "Linked to …". Only its sender sees it. The matches come from `Feedback.similarTo`, the matching query run again. 7. **P3: dismissal lost focus.** The panel records the button that opened it and gives focus back on close, or to Menu when that button is folded away. Two cases needed more than a check at close: - the switcher's chord closes the panel, and its Escape returns focus to the now-hidden field, so the panel waits for `patchy:switcher-closed`; - a tap moves focus for itself after the panel closed, so the panel checks again on that tap's click. The panel's script now runs in a committed test, `test/browser-tier1/tell-patchy.spec.ts` in the browser suite, which covers finding 5's ordering and finding 7's focus on a desktop and on a phone. Finding 2, two links racing, is still checked by hand in Chromium only. Acceptance on bda5bd3 (GPT 6.1 Sol) passed everything but one gap, fixed in 124ed0c: 8. **Ask for an integration kept Feedback without script.** Only the panel's script applied the Ask buttons' `data-kind`, so with JavaScript off, choosing Feedback in the panel and then pressing Ask sent an integration request as feedback. The composer now has its own address, `/feedback/new?kind=request`: a dialog over What you sent with the panel's fields, Request picked. Both Ask buttons are links to it, through `linkButton` and core's `tellPatchyHref`. With script, the panel opens in place beside the link with Request picked, and a modified click still opens the address. A route test covers the kinds and the fallback, and the browser spec covers Ask after Feedback, with and without script. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required Additive: new pages and routes, a panel in the sidebar, an option on `button`, `field` and `choiceGroup`, an icon, one read method on the store and two dev scenario fields. No schema change. - **What does a revert leave behind?** Rows sent from the dashboard stay in `feedback.submissions` with surface `dashboard`, which the store already accepts. Nothing else. - **Does the release before it still work with that?** Yes. Built by Claude Opus 5.5 (xhigh) in Claude Code, orchestrated from T3 Code. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Stacked on #1336; part of #1315. Merge the stack together, not alone.
What changed
Pages share one stylesheet but no anatomy: headings, steps, notices, settings rows, confirmations and receipts are assembled by hand, differently on every page, so they drift. Now core has the component set and the five page templates every page lane will build on, a small enhancer that adds keyboard and dialog behaviour without making script necessary, and a development gallery at
/~uithat shows the whole system. This is the second of two PRs for #1317; #1336 put every existing page on the tokens.Closes #1317
Look at
packages/core/src/ui/), typed functions returning HTML, text escaped, trusted slots named as such:controls.ts:button,linkButton,iconButton(primary, secondary, quiet, danger, danger-solid; md/sm; staticpending). The field family:fielddraws label, hint, control, error in that order and hands its control the ids, so the hint and error describe it and a refusal setsaria-invalid; controlsinput,textarea,select,prefixInput,secretInput,checkbox,radio,choiceGroup,switchForm(core'schoiceCards,tileOptionsandcopyLinestay as they are).feedback.ts:notice(info/warning/danger, danger is an alert),receipt(text only, Undo dropped per the plan),badge,dot,emptyState.structure.ts:pageHeader,section,card,settingRow,facts,row/rows(stretched-row links that leave buttons and menus operable),table,tabs,segmented,chip,menu(native popover of links and buttons, not an ARIA menu, on core's existingrowMenu),dialog,steps, andidForfor repeated rows' ids.ui/templates.ts):indexPage,detailPage,settingsPage,flowPage,doorPage. No CSS parameter; each returns theheadingandbodypageResponsealready takes, so a page writespageResponse({ title, app, ...indexPage({ … }) }). Their frames are one new chunk,styles/templates.ts, registered with one line in the chunk list./assets/ui.js(ui/enhancer.ts), served session-free besidecopy.jsand loaded by everypageResponsepage, so a door with no session scripts now admitsscript-src 'self'(CSP can't name one same-origin file without the origin, and Clerk-mode doors already admit'self'). Focus starts on a dialog'sautofocuscontrol, else its first field. A dialog reached by a link on this site closes with history back to that page, whichever it was, past any refused submission it was drawn again for (its chain lives in history state), so neither closing nor Back revisits a POST; loaded any other way, it closes to its own page; one without a close (the Final step) closes only by its own actions. Escape is left to an open menu or the switcher first. Focus returns to the very link that opened it, or its menu's button; Show toggles a secret's mask; a fragment opens its<details>. Without script a dialog is the page (@media (scripting: none)leaves out the inert page behind it and the scrim), its Close is a link, and Show stays hidden. A locked Flow section is a disabled fieldset. A refusal at a content URL drops the enhancer with the fonts (withoutAppAssets, renamed from feat(core): the app runs on Geist, and running patches keep their own styles #1332'swithoutAppFonts)./~ui: the type roles and the token block's colours, every helper in its states, a state table per component (spec §10 item 21, checked by a test), and/~ui/index,/detail,/settings,/flow,/door,/dialog(its form always refuses, to show the refusal and the way out of it) and/final(a dialog only its actions close) built from the templates with sample data. Where it departs from the prototype's System page, it is because the gallery composes only the shared helpers, as every page must: colours are a table of the token block's own values instead of a bespoke swatch grid, fields stack as they do in a real form, spec rows are state tables, and the five template diagrams are live template pages one click away, which show more than a diagram. Adding gallery-only CSS to match the prototype's documentation layout would be the page CSS the system forbids.portal/src/Gallery.tsis mounted inServer.tsonly whereDevPersonas.enabled, beside the persona picker; production answers 404 (tested).pnpm ui:report(scripts/ui-report.ts) lists raw visual values in the app's chunks (type, colour, radius, shadow, control height; geometry exempt), page modules that passstyles, write<style>or inlinestyle, and hand-drawn button, badge, notice and field markup outside core (hidden inputs exempt). Today: 102 values, 27 modules; it never fails. G turns these into checks..agents/skills/ui-consistency/SKILL.mdrewritten for first-party pages against the system (tokens, templates, helpers, rules, dialogs, the enhancer, the gallery, the legacy classes and what the served shell shares); its served-patch sections are unchanged.docs/DEVELOPMENT.mdmentions/~uiand the report.The gallery and its template pages as Allison; before is the base, where
/~uidoesn't exist yet.Before and after, as Allison Mahmood (admin)
Before is
67e5911(where this branch left ui/f2-tokens) and after is0134803(ui/f2-components), both on thebrightlinescenario, frompnpm dev compare./~ui1280px, after
1280px, before
Failed to load resource: the server responded with a status of 404 (Not Found).Failed to load resource: the server responded with a status of 404 (Not Found)./~ui/detail1280px, after
1280px, before
Failed to load resource: the server responded with a status of 404 (Not Found).Failed to load resource: the server responded with a status of 404 (Not Found)./~ui/settings1280px, after
1280px, before
Failed to load resource: the server responded with a status of 404 (Not Found).Failed to load resource: the server responded with a status of 404 (Not Found)./~ui/flow1280px, after
1280px, before
Failed to load resource: the server responded with a status of 404 (Not Found).Failed to load resource: the server responded with a status of 404 (Not Found)./~ui/door1280px, after
1280px, before
Failed to load resource: the server responded with a status of 404 (Not Found).Failed to load resource: the server responded with a status of 404 (Not Found)./~ui/dialog1280px, after
1280px, before
Failed to load resource: the server responded with a status of 404 (Not Found).Failed to load resource: the server responded with a status of 404 (Not Found).How it was verified
ui/ui.test.ts: field order and ids, escaping, a refused choice group marked invalid with its choices, the secret's hidden Show, button kinds and pending, the switch form,idFor, menus as popovers, tabs, tables, dialog close rules, steps, notice roles, template widths and the door's heading, and that the gallery uses only classes the stylesheet draws and no inline style.auth/page.test.ts: every page loads the enhancer and admits it.server/Server.test.ts:/assets/ui.jsserves signed out with no cookie; every/~uipage 404s without personas and answers 200 with them.scripts/ui-report.test.tspins the report's rules.test/browser-tier1/ui.spec.ts, run locally 3 times over (15 passed): a refused submission draws the dialog again with its field invalid and focused, Escape returns to/~ui/index?page=2with focus on New patch, and Back goes on to the page before, never the POST; keyboard opens and closes a row menu with focus returning; a dialog starts on its field, goes back on Escape to the page that opened it (the gallery or the Index page), with focus on the second of two links to it; loaded directly, even with a malformed fragment, it closes to its own page; the Final-step-like dialog ignores Escape; Show unmasks; a locked section's radio is disabled; a fragment opens a disclosure; Copy appears; without script the dialog is static in the flow with the app hidden, its Close link works and Show stays hidden; on a 320px touch screen buttons, icon buttons and tabs are 44px, field text is 16px, and the two long labels from feat(core): every first-party page reads in the new tokens and type #1336's review (a person's name sentence and a 32-letter patch name) don't overflow.fonts.spec.tsstill passes with the enhancer on doors.pnpm check: format, lint, typecheck and synth pass; the only test failures are the known local ones (strayGET /on CLI stub servers, execution timeouts under load), none in what this touches.Release impact
Core helpers, a static script route and a development-only route; doors gain
script-src 'self'. No schema, API, CLI or configuration change.Built by Claude Opus 5.5 (xhigh) in Claude Code, orchestrated by Fermy.