Skip to content

feat(core): one component set, five page templates and a gallery - #1338

Merged
allisonmahmood merged 1 commit into
mainfrom
ui/f2-components
Nov 10, 2026
Merged

allisonmahmood merged 1 commit into
mainfrom
ui/f2-components

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

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 /~ui that 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

  • Helpers (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; static pending). The field family: field draws label, hint, control, error in that order and hands its control the ids, so the hint and error describe it and a refusal sets aria-invalid; controls input, textarea, select, prefixInput, secretInput, checkbox, radio, choiceGroup, switchForm (core's choiceCards, tileOptions and copyLine stay 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 existing rowMenu), dialog, steps, and idFor for repeated rows' ids.
  • Templates (ui/templates.ts): indexPage, detailPage, settingsPage, flowPage, doorPage. No CSS parameter; each returns the heading and body pageResponse already takes, so a page writes pageResponse({ title, app, ...indexPage({ … }) }). Their frames are one new chunk, styles/templates.ts, registered with one line in the chunk list.
  • Enhancer /assets/ui.js (ui/enhancer.ts), served session-free beside copy.js and loaded by every pageResponse page, so a door with no session scripts now admits script-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's autofocus control, 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's withoutAppFonts).
  • Gallery /~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.ts is mounted in Server.ts only where DevPersonas.enabled, beside the persona picker; production answers 404 (tested).
  • Governance, report only: 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 pass styles, write <style> or inline style, 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.
  • Standards: .agents/skills/ui-consistency/SKILL.md rewritten 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.md mentions /~ui and the report.
  • One look change: the copy line's Copy button is secondary and compact, as spec principle 4 and the prototype draw it.

The gallery and its template pages as Allison; before is the base, where /~ui doesn't exist yet.

Before and after, as Allison Mahmood (admin)

Before is 67e5911 (where this branch left ui/f2-tokens) and after is 0134803 (ui/f2-components), both on the brightline scenario, from pnpm dev compare.

/~ui

1280px, after

After: /~ui at 1280px

1280px, before

Before: /~ui at 1280px

Width Before After
390px Before: /~ui at 390px After: /~ui at 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).
/~ui/detail

1280px, after

After: /~ui/detail at 1280px

1280px, before

Before: /~ui/detail at 1280px

Width Before After
390px Before: /~ui/detail at 390px After: /~ui/detail at 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).
/~ui/settings

1280px, after

After: /~ui/settings at 1280px

1280px, before

Before: /~ui/settings at 1280px

Width Before After
390px Before: /~ui/settings at 390px After: /~ui/settings at 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).
/~ui/flow

1280px, after

After: /~ui/flow at 1280px

1280px, before

Before: /~ui/flow at 1280px

Width Before After
390px Before: /~ui/flow at 390px After: /~ui/flow at 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).
/~ui/door

1280px, after

After: /~ui/door at 1280px

1280px, before

Before: /~ui/door at 1280px

Width Before After
390px Before: /~ui/door at 390px After: /~ui/door at 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).
/~ui/dialog

1280px, after

After: /~ui/dialog at 1280px

1280px, before

Before: /~ui/dialog at 1280px

Width Before After
390px Before: /~ui/dialog at 390px After: /~ui/dialog at 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).

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.js serves signed out with no cookie; every /~ui page 404s without personas and answers 200 with them. scripts/ui-report.test.ts pins 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=2 with 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.ts still passes with the enhancer on doors.
  • pnpm check: format, lint, typecheck and synth pass; the only test failures are the known local ones (stray GET / on CLI stub servers, execution timeouts under load), none in what this touches.

Release impact

  • Breaking — requires action from anyone already running this
  • Not breaking — no action required

Core helpers, a static script route and a development-only route; doors gain script-src 'self'. No schema, API, CLI or configuration change.

  • What does a revert leave behind? Nothing.
  • Does the release before it still work with that? Yes.

Built by Claude Opus 5.5 (xhigh) in Claude Code, orchestrated by Fermy.

@github-actions github-actions Bot added area:server Touches the server area area:ci CI, shared testing infrastructure, development scripts and tooling area:core Touches the core area area:docs Touches the docs area area:ui Portal and first-party browser pages, shared rendering and styles size:xl Over 1,000 changed lines; review in multiple passes labels Nov 8, 2026
allisonmahmood added a commit that referenced this pull request Nov 8, 2026
…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]>
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Sol review round 1 (GPT 6.1 Sol, xhigh): 4 Must fix, 6 Should fix; all fixed in 59a31dd.

  1. Initial focus (Must). The enhancer focuses [autofocus] first, then the first control in the dialog body, then anything; Close never wins. This was CI's browser failure; the keyboard test now passes 4 runs out of 4 locally.
  2. In-app Back from any page (Must). The enhancer records the link a click followed; a dialog reached by a link on this site (referrer and recorded link agree) closes with history back to that page, whichever it was. Tested from /~ui/index's New patch.
  3. idFor collisions (Must). Lossless now: letters and digits stay, anything else is _<hex>_, empty is ~, parts join with -. The test checks every collision you listed.
  4. Gallery completeness (Must). Added the Type roles and the Colour reference (read from the token block itself), tile options, the off and read-only switch, a deactivated person, /~ui/final (a dialog only its actions close), and state tables for Choice, Switch, Status, Receipt, Empty state, Table, Menu, Card, Dialog, Marks and Steps beside the existing ones; a test checks the inventory.
  5. Focus return to the trigger. Stored by id, else by its place among links to the same address; a link inside a closed menu returns focus to the menu's button. Tested with the second of two links to the same dialog.
  6. No-script dialogs as pages. @media (scripting: none) leaves out the inert page and the scrim and puts the dialog in the flow, with no flash when script runs. Tested: position: static, .app hidden. aria-modal stays in the markup; with nothing else rendered it changes nothing.
  7. Copy in the gallery. The gallery loads the existing copy.js; the browser test sees Copy appear.
  8. Locked flow sections. A disabled fieldset with the title as its legend; tested that its radio is disabled.
  9. Malformed fragment. Decoding failure is ignored; tested with #%.
  10. Report misses. Any <button> or non-hidden <input>, <textarea>, <select> counts, and height is a sized property; your counterexamples are in ui-report.test.ts.

allisonmahmood added a commit that referenced this pull request Nov 8, 2026
…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]>
@allisonmahmood

Copy link
Copy Markdown
Owner Author

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.

  1. Refused POST lost the opener (Must). The dialog's chain now lives in history state: how many entries it has taken since a link on this site opened it, each refused submission it is drawn again for adding one, carried across loads in session storage keyed by the last dialog URL. Closing calls history.go(-depth) to the opener, so neither Close nor Back revisits the POST. dialog() takes a form; the gallery's dialog posts and is always refused (422). Browser test: /~ui/index?page=2 → New patch → Send invites (refused, field invalid and focused) → Escape lands on /~ui/index?page=2 with focus on New patch, and Back goes to the page before, not the POST. 3 runs out of 3.
  2. Catalogue gaps. State tables added for Copy line (no script, ready, copied, refused by the browser), Facts, Page header, Section and Setting row; the inventory test lists every component a page composes. Each gallery page also has exactly one h1 (tested); the page header's live example is the Detail template page, so the system page doesn't carry a second h1.
  3. Departures from the System page. Explained in the body: the gallery composes only shared helpers, so colours are a table of the token block's own values, fields stack, spec rows are state tables, and the five template diagrams are live template pages. Matching the prototype's documentation layout would need gallery-only CSS, which is the page CSS the system forbids. Evidence refreshed at this head.
  4. Choice-group refusal. A refused choiceGroup sets aria-invalid on its fieldset and hands { describedBy, invalid } to its choices; radio/checkbox take it. The gallery shows a refused group; a markup test checks both.
  5. Report misses. Any number in font-weight or line-height, a named colour as a colour property's value, and border-top-color and friends now count; your counterexamples are in ui-report.test.ts.

No round 3: the brief allows one round after a Must fix. Every change is covered by a test.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

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.

@allisonmahmood

allisonmahmood commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

Checked c9d57a0bbfcf8e3f738acd66ab1e92933d5e278e (base affc5cfca7754c47569a76a17253ec844553eaeb) on fresh brightline data and isolated browser/test fixtures, by GPT-6.1 Sol (xhigh) in the Codex harness through T3 Code.

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

  • The gallery shows the whole system: passed. All eight gallery pages at 1280px/390px with script enabled/disabled passed 32 fresh navigations. Inspected gallery/template and long-name captures: no page overflow or browser errors, and Close remains visible.
  • Existing pages still work at desktop and phone width: passed. Forty fresh navigations as Allison (admin) and Jordan (member) covered Home, All patches, guide, Your agents, People, Integrations, Agent access, What's new and the New Business card. No page overflow or browser errors. The unchanged wider page coverage is carried from round 1.
  • Keyboard, no-script and coarse-pointer behavior: passed. All 10 UI/font Chromium tests pass, including both new regression tests, Escape/Close, exact-link focus, native menus, script-disabled dialog pages, secrets, disclosure, Copy, locked fields, 44px targets and 16px fields.
  • Original failure, /~ui/index?page=2 → New patch → Send invites empty (422) → browser Back: passed at 1280px and 390px, after one and two refusals. One Back reaches the opener, focuses New patch, removes the dialog and clears the inert page state; another Back reaches the preceding gallery page. The new test asserts this same refusal/Back path.
  • Shared dialog overflow: passed. With a 64-character unbroken name in the dialog heading and body at 390px, Close ends at x=368; dialog scroll/client widths both 386 and document width 390. The added browser test covers the same long-name case.

Golden journeys

  • Sign in, machine login/logout, publish/retire/restore/delete, share/unshare, find/open, live kudos, New Business move/back, Spend self-approval refusal, and invite/join/revoke/deactivate/reactivate: passed in round 1, carried forward for the unchanged implementations shown by range-diff. Fresh round 2 page/navigation checks and the enhancer browser cases above found no regression.
  • The unchanged production dev-gate, session-free enhancer and report-only governance results are also carried from round 1. Font/CSP and sandbox-refusal checks were rerun and passed.

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 evidence
Focused vitest: 7 files / 97 tests passed
Chromium ui.spec.ts + fonts.spec.ts: 10 passed
Gallery: 32 desktop/phone, script on/off navigations
Existing pages: 40 admin/member desktop/phone navigations
Browser errors / document overflow: 0 / 0

Refusals | Width | Back destination       | Dialogs | Inert | Focus
1        | 1280  | /~ui/index?page=2      | 0       | 0     | New patch
2        | 1280  | /~ui/index?page=2      | 0       | 0     | New patch
1        | 390   | /~ui/index?page=2      | 0       | 0     | New patch
2        | 390   | /~ui/index?page=2      | 0       | 0     | New patch

64-character dialog title/body, 390px:
document width 390; dialog scroll/client 386/386; Close right edge 368

Not run

  • dense: unavailable at this foundation head; fresh brightline plus isolated fixtures used.
  • Full local verify, fresh live Clerk sign-in and all golden journeys end to end: carried forward where unchanged; focused suites and pages were rerun as listed.

Notes

  • CI is incomplete at posting. Lint, Bun tests, live Clerk, CLI/tier-2 smoke, concurrency, release tarball, rollback rehearsal and macOS install passed; browser, Node suites and other installs were still running/queued. Pidgeon remained pending.
  • Server image failed before image construction: the crane download returned HTTP 504 (curl exit 22), confirmed in its log. Infrastructure failure; needs a successful run before merge.
  • This review posts text evidence only. All disposable instances from this PR check are down. No PR code, branch, body or labels changed.

@vsrikar08

Copy link
Copy Markdown
Collaborator

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.
Detail: one patch or connection.
Settings: editable settings and danger actions.
Flow: a task such as connecting an integration.
Door: signing in, joining or giving consent.
Again really the only thing is we will have to make way for teams for something like this but it shouldn't be too much of an issue.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

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 /~ui in dev shows each template's slots, which is a quick way to sketch the teams pages before building them.

Base automatically changed from ui/f2-tokens to main November 10, 2026 16:40
@allisonmahmood
allisonmahmood merged commit 79e1f69 into main Nov 10, 2026
25 checks passed
@allisonmahmood
allisonmahmood deleted the ui/f2-components branch November 10, 2026 16:52
allisonmahmood added a commit that referenced this pull request Nov 10, 2026
…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 gallery's Detail parts: chip menus, a grouped log table, code
rows, a settings
panel](https://github.com/user-attachments/assets/86f5855e-8f3f-4733-b0e2-5174370c7bb2)

![The gallery's Door parts: a verification code, who meets whom, an
answer
pair](https://github.com/user-attachments/assets/3c900f9f-eef7-4530-8663-1b2a30a6d6b8)

![The gallery's Consent
door](https://github.com/user-attachments/assets/a4cfeddc-c250-4a58-aabf-55ee4c74a9b0)

**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**

![After: / at
1280px](https://github.com/user-attachments/assets/8d2787f2-e85a-40bb-8725-91f96a2bc368)

<details><summary>1280px, before</summary>

![Before: / at
1280px](https://github.com/user-attachments/assets/d0a10268-b3fa-4cbb-a4c8-793f247b0cad)

</details>

| Width | Before | After |
| --- | --- | --- |
| 390px | ![Before: / at
390px](https://github.com/user-attachments/assets/59f5a150-0cbc-4dab-a2a8-d36796b92e22)
| ![After: / at
390px](https://github.com/user-attachments/assets/296d1a20-12f9-4203-a798-28ec0273ab2d)
|

<!-- /patchy-dev:compare:allison -->

Co-authored-by: Claude Opus 5.5 <[email protected]>
allisonmahmood added a commit that referenced this pull request Nov 10, 2026
…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]>
allisonmahmood added a commit that referenced this pull request Nov 11, 2026
#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**

![After: /settings/integrations/connect at
1280px](https://github.com/user-attachments/assets/7649c0fe-1613-4004-b5ab-019d9672b998)

<details><summary>1280px, before</summary>

![Before: /settings/integrations/connect at
1280px](https://github.com/user-attachments/assets/b6a2b566-2b24-4fc7-aed9-ad0081fc2386)

</details>

| Width | Before | After |
| --- | --- | --- |
| 390px | No visible change | ![After: /settings/integrations/connect at
390px](https://github.com/user-attachments/assets/2721d7a4-e97e-4f9c-9b7b-196eb0f6688a)
|

##### `/feedback`

**1280px, after**

![After: /feedback at
1280px](https://github.com/user-attachments/assets/b1c04bed-71e8-4504-a15e-87cdfcb0ceb6)

<details><summary>1280px, before</summary>

![Before: /feedback at
1280px](https://github.com/user-attachments/assets/abd96088-c664-4a60-b4e2-5e8419d166a3)

</details>

| Width | Before | After |
| --- | --- | --- |
| 390px | ![Before: /feedback at
390px](https://github.com/user-attachments/assets/707aad5c-b21f-4323-80b7-479e90bb8122)
| ![After: /feedback at
390px](https://github.com/user-attachments/assets/79b1290d-5075-42b3-9fc0-4731d9d6b617)
|

- 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**

![Request sent: a receipt naming the title, then three similar requests:
her own earlier one, Shipped; Postgres encryption options, Shipped, with
its note; Bring your own encryption keys,
Planned](https://github.com/user-attachments/assets/9cac7e41-2022-4973-b9b1-520a09c2d13f)

![After Same need: Unlink on that match, and a receipt reading Linked to
Postgres encryption
options](https://github.com/user-attachments/assets/954c51e1-cb1d-41bf-becd-374888f50b7f)

<details><summary>Composing, and after Unlink</summary>

![Tell Patchy open above its foot button, Request
picked](https://github.com/user-attachments/assets/f996b754-7744-4a90-957a-3fada2523c30)

![After Unlink: Same need back on every
match](https://github.com/user-attachments/assets/7e3d1326-8777-403c-88a8-28aef66207b4)

</details>

**2. A key is refused on the field, and Ask for an integration opens the
panel with Request picked**

![Your request has a Google API key in it. Nothing was saved. The text
stays in the field, marked
invalid.](https://github.com/user-attachments/assets/9cf2f2c3-25cf-4fe8-855a-1dc9d0de35ef)

![Opened from the catalogue's Ask, beside it, with Request picked
although Feedback was last
chosen](https://github.com/user-attachments/assets/f7593446-2a2a-4c1c-b077-3e1d2d2d5368)

**3. What you sent, a row's menu, Withdraw**

![What you sent: Allison's own requests and feedback beside Claude Code,
Codex and ChatGPT's, one Unknown agent, statuses Shipped, Planned, Open
and
Declined](https://github.com/user-attachments/assets/2059264e-f933-4b44-91a4-e14356c088c8)

![The row menu: Unlink from Gmail integration, then
Withdraw…](https://github.com/user-attachments/assets/669c6fbc-8e5d-4c7b-a382-15d63c9d9ecb)

![Withdraw “Gmail integration for the sales inbox”? Patchy deletes it
and everything Claude Code sent with it. Cancel focused, Withdraw
request.](https://github.com/user-attachments/assets/e2be9292-5a47-4ea6-8428-9a5b3460fda6)

![Back on What you sent with the receipt Withdrew your
request](https://github.com/user-attachments/assets/acec3d36-e1e0-47b1-960d-64009d0a8d6d)

**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.

![Patchy couldn't confirm that. It may have gone through. Check What you
sent before you try
again.](https://github.com/user-attachments/assets/ae6a23e9-e042-446b-9018-7329e318647a)

**5. Without script: the sent request's own address, then linked from
it**

![Without script: the send lands on a Tell Patchy dialog with the
receipt and three similar requests, each with Same
need](https://github.com/user-attachments/assets/0db7102d-40f3-4955-a9af-c8854ac194fc)

![After Same need without script: back at the same address, Unlink on
the linked match and a Linked to
receipt](https://github.com/user-attachments/assets/46104ef6-815a-4a61-be9b-2a1885e98eb2)

![Without script, after picking Feedback in the panel: Ask for an
integration opens the composer at its own address with Request
picked](https://github.com/user-attachments/assets/c0d82250-e3a2-44ba-baec-2d7558c71653)

<details><summary>Phone, without script</summary>

![Phone without script: Ask opens the composer with Request
picked](https://github.com/user-attachments/assets/2f37dfee-4d6b-4900-89e5-7ae8790aa4c6)

![Phone without script: the sent dialog, then
linked](https://github.com/user-attachments/assets/a3fcf2c2-b9a2-45b6-9d15-987ae6f051dc)

</details>

**6. Phones: the panel opens above the foot inside Menu, the table
scrolls sideways, Withdraw is a bottom sheet**

![Phone: composing, sent with matches, linked,
refused](https://github.com/user-attachments/assets/e296ff5d-8773-4bf3-9a74-906a5e72e700)

<details><summary>Phone: from Integrations, What you sent, a row's menu,
Withdraw</summary>

![Phone: opened from Ask, What you sent, the row menu, the Withdraw
sheet](https://github.com/user-attachments/assets/1f17cfbc-d6e9-44c8-b0b8-b1faa09e0692)

</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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling area:core Touches the core area area:docs Touches the docs area area:server Touches the server area area:ui Portal and first-party browser pages, shared rendering and styles size:xl Over 1,000 changed lines; review in multiple passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI overhaul F2: one component set, five page templates and a gallery

2 participants