Skip to content

feat(core): page titles in Cabinet Grotesk, the font kept out of the repo - #1372

Merged
allisonmahmood merged 1 commit into
mainfrom
ui/cabinet-titles
Nov 10, 2026
Merged

allisonmahmood merged 1 commit into
mainfrom
ui/cabinet-titles

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #1371; part of #1315. Merge the stack together, not alone.

What changed

Patchy's own page, dialog and door titles are set in Cabinet Grotesk Extrabold, falling back to Geist, as the overhaul's type spec has them. The font file isn't in this repository: a private bucket in our AWS account holds it, a production deploy copies it into the release image, and cloud.patchyhq.com serves it from its own origin at a digest URL, as it serves Geist. Anywhere the file isn't, CI, PR images and local checkouts, titles stay Geist and pages declare no face for it, so nothing is fetched and nothing 404s.

  • The pin. packages/core/fonts/display-font.json names the file and its SHA-256. The server, the image build and the deploy all read it. The file goes beside it in packages/core/fonts/, which .gitignore keeps out of commits.
  • Pages. fonts.ts checks once, on load, whether the file is there. With it, the fonts chunk adds a Cabinet Grotesk face (weight 800, font-display: swap) and a metric-matched Cabinet Grotesk Fallback, and --font-display becomes "Cabinet Grotesk", "Cabinet Grotesk Fallback", var(--font-ui). Without it, the app's stylesheet is byte for byte what it was (same SHA-256 at base and head). A running patch's shell, its policy and the company look are untouched; the shell styles' pin test still passes.
  • The fallback. Cabinet Grotesk Extrabold is about 11% narrower than Geist 800, so a title would shrink when the face arrives. The fallback is local Arial Bold (or Liberation Sans Bold) at Cabinet's width and line metrics, measured in Chromium against the official file: the 14 real titles' combined width within 0.1%, same line box. A single title can still change width by up to about 14px when the face arrives (acceptance measured 0–14px), but none moved or gained a line. The prototype used Arial Regular with synthetic bold; this measures against the real cut. Where neither is installed, the stack goes on to Geist. The face isn't preloaded: a page without a title would log an unused-preload warning, and the fallback makes the late swap still.
  • Serving. The portal's font routes serve what the release carries and hash each file on the way up. A file whose bytes aren't the ones its URL names stops the server from starting (FontMismatch), since a browser would keep the wrong bytes for a year.
  • Deploy. A new step 3 fetches <sha256>/<file> from patchy-fonts-<account id> and checks it with sha256sum before the run records or deploys anything. The image build checks the bytes again, and that they reached the staged runtime. The deploy job drops its pnpm cache (a cache saved from main can be restored by any pull request's workflow; I checked pnpm's store doesn't take the file today, so this is insurance). server-image.yml never fetches the font and says why above its artifact upload. A commit from before this one pins no font, so a rollback to it builds exactly as before.

Why the bucket isn't in CDK. The image is built before the base stack deploys, and the base stack deploys from each release's own commit. A stack-made bucket wouldn't exist, let alone hold the file, for the first release that needs it, and a rollback past this change would take it out of the stack (retained, but orphaned, and the next deploy would fail to create it again). So the bucket is made once by hand, like the host secret's value. It can be set up before this merges, and no stack update or deletion can touch it. The explicit choice: once a commit pins the font, every production deploy requires it and stops before recording anything when it's missing, unreadable or different. No release quietly ships Geist titles, and every rebuild of a commit gets the same bytes, so its image digest matches ECR's. docs/OPERATIONS.md › The display font records all of this.

Core additions: displayFont, hasDisplayFont, servedFonts and fontStyles(withDisplay) in fonts.ts; Fonts.serve(files) and FontMismatch in the portal. fontFaces, fontUrl, fontFile and fontPreload behave as before. The /~ui gallery's title rows name the face in use.

For Allison

One-time, before the first deploy that includes this PR. It can run now. Use administrator credentials; nothing here touches the running service.

digest=de0d7ba5c28ab4a863b7c32293fb115de54157eeb868bd567207ceb33e14a578
account=$(aws sts get-caller-identity --query Account --output text)
bucket=patchy-fonts-$account
aws s3api create-bucket --bucket "$bucket" --region us-east-1
aws s3api put-public-access-block --bucket "$bucket" --public-access-block-configuration \
  BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
aws s3api put-bucket-versioning --bucket "$bucket" --versioning-configuration Status=Enabled
aws s3api put-bucket-policy --bucket "$bucket" --policy "$(jq -n --arg bucket "$bucket" \
  --arg role "arn:aws:iam::$account:role/patchy-production-deploy" '{
    Version: "2012-10-17",
    Statement: [
      {Sid: "DeployReads", Effect: "Allow", Principal: {AWS: $role},
       Action: "s3:GetObject", Resource: "arn:aws:s3:::\($bucket)/*"},
      {Sid: "TlsOnly", Effect: "Deny", Principal: "*", Action: "s3:*",
       Resource: ["arn:aws:s3:::\($bucket)", "arn:aws:s3:::\($bucket)/*"],
       Condition: {Bool: {"aws:SecureTransport": "false"}}}
    ]}')"
cd "$(mktemp -d)"
curl -fsSL -o cabinet-grotesk.zip https://api.fontshare.com/v2/fonts/download/cabinet-grotesk
unzip -jq cabinet-grotesk.zip '*/Fonts/WEB/fonts/CabinetGrotesk-Extrabold.woff2'
echo "$digest  CabinetGrotesk-Extrabold.woff2" | sha256sum --check &&
  aws s3 cp CabinetGrotesk-Extrabold.woff2 "s3://$bucket/$digest/CabinetGrotesk-Extrabold.woff2"
aws s3api head-object --bucket "$bucket" --key "$digest/CabinetGrotesk-Extrabold.woff2" --query ContentLength   # 20960

If a deploy runs first, it stops at "Fetch the display font" before recording or deploying anything; run the above, then start a new run.

Look at

With the font in place, as Allison Mahmood (admin)

Before is 3466836 (--base origin/ui/product-logos) and after is 9a5d8b7 (ui/cabinet-titles), both on the dense scenario, from pnpm dev compare, with the official file dropped into the after side's checkout (and removed afterwards).

Every page answered 200 with no browser errors.

/

1280px, after

After: / at 1280px

1280px, before

Before: / at 1280px

Width Before After
390px Before: / at 390px After: / at 390px
/patches/new-business

1280px, after

After: /patches/new-business at 1280px

1280px, before

Before: /patches/new-business at 1280px

Width Before After
390px Before: /patches/new-business at 390px After: /patches/new-business at 390px
/patches/new-business/delete

1280px, after

After: /patches/new-business/delete at 1280px

1280px, before

Before: /patches/new-business/delete at 1280px

Width Before After
390px Before: /patches/new-business/delete at 390px After: /patches/new-business/delete at 390px
/brightline/holiday-rota

1280px, after

After: /brightline/holiday-rota at 1280px

1280px, before

Before: /brightline/holiday-rota at 1280px

Width Before After
390px Before: /brightline/holiday-rota at 390px After: /brightline/holiday-rota at 390px

The gallery's type specimen names the face it draws titles in:

Before After
Before: the /~ui type specimen After: the /~ui type specimen

Without the file (the same compare on head as CI and everyone else builds it): Home and the door showed no visible change at either width. The patch page and the dialog differed only in the instance's host name and two call durations; every title stayed Geist. Every page answered 200 with no browser errors.

How it was verified

  • Network, both ways, on this worktree's instance as a signed-in person, with Playwright:
    • With the file: 200 /assets/fonts/Geist-Variable-3626eba547294501.woff2, 200 /assets/fonts/CabinetGrotesk-Extrabold-de0d7ba5c28ab4a8.woff2; the title computes to "Cabinet Grotesk", "Cabinet Grotesk Fallback", Geist, …; no console errors or warnings.
    • Without it: only Geist's request; the title computes to Geist, "Geist Fallback", …; no console errors or warnings.
  • A wrong file is refused. Other bytes at the font's path stop pnpm dev with FontMismatch: …CabinetGrotesk-Extrabold.woff2 has SHA-256 d039…, not the pinned de0d…; put the official file there, or remove it.
  • Reproducible with the font. scripts/build-server-image.mjs run twice with the file in place gave the same tarball and digest, sha256:838dc8c2e148…, and the image's @patchy/core/fonts/CabinetGrotesk-Extrabold.woff2 hashes to the pinned digest. The tarballs were deleted afterwards.
  • Tests. fonts.test.ts: with the file, the face at its URL, weight 800 and swap, a fallback that asks for nothing, and the title stack; without it, no face and var(--font-ui); a copy of fonts.ts laid out as a release, with and without the file beside it, decides as the server will (hardcoding the check fails it); the release's stylesheet follows the file. Fonts.test.ts (portal): a font beside the committed ones is served at its digest URL with year-long caching; without the file its URL answers 404; a mismatched file fails startup with FontMismatch. The shell styles' pin test is unchanged and now also refuses Cabinet.
  • pnpm check: format, lint, typecheck and synth pass. The offline tests' failures locally were only packages/patchy CLI and packages/execution stub tests receiving a stray GET /, this machine's port probe, which CI doesn't have. The core and portal suites pass.
  • Not checked: the deploy step itself, which needs the bucket. Its jq/sha256sum logic is the same check run locally above, and the bucket policy JSON was rendered offline.

Hit every surface. Applied: served pages (the ui-consistency type notes and the /~ui gallery name the face; the patch shell and the HTML checks are untouched), the dev loop's docs (docs/DEVELOPMENT.md › Titles' typeface: an administrator puts the file in place; everyone else sees Geist; no runner change), operations (docs/OPERATIONS.md: the bucket, the one-time setup, the deploy step, the setup record), reverse states (removing the file returns titles to Geist; rollbacks across this change are covered above). Not applicable: the wire contract, the CLI, migrations, company resources, vocabulary (GLOSSARY-MAP.md's "the app's fonts" still covers it) and the repo layout.

Release impact

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

Only for the production deploy: from this commit on, a deploy stops before recording anything until the bucket holds the file (For Allison, above). Nothing changes for people using Patchy beyond the titles' face, or for anyone running the server by hand.

  • What does a revert leave behind? The bucket and its file, which nothing reads any more. No schema, rows or stack changes.
  • Does the release before it still work with that? Yes. It draws titles in Geist and never looks for the file.

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

@github-actions github-actions Bot added 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:m 100-500 changed lines size:l 501-1,000 changed lines and removed size:m 100-500 changed lines labels Nov 9, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review round 1 (GPT 6.1 Sol, xhigh): no must-fix findings. What I did with each, as of 33ced58:

  1. The file check runs as fonts.ts loads, and the tests didn't exercise it.
    • Fixed, the test gap. A new case loads a copy of fonts.ts laid out as a release lays out core, src beside fonts, with and without the file. It checks the decision, the served fonts, the faces and the title stack. Hardcoding the check to false fails it.
    • Kept, the check on load. Every first-party page inlines one stylesheet through the pure htmlPage, which pageResponse and renderNoticePage call from many handlers. Passing a runtime choice through them is a broad refactor for a fact that holds for the life of the process: whether the release's own files include this one. It sits beside fontFile, which already addresses those files relative to the module. The spec's rule against hidden module-global dependencies is about services and layers. fonts.ts is neither, and the one service that reads the file, the portal's font routes, takes FileSystem, Path and Cryptography from the environment and checks the bytes at startup. No browser bundle imports it (the review confirmed this). In the CLI's bundle it costs one stat of a path that never exists.
  2. Add the font to CLAUDE.md's "Hit every surface". Dismissed. The brief asked for that list to be walked in the PR, which the body does. Its entries are for surfaces that mirror each other and drift. Here the pin is one file, packages/core/fonts/display-font.json, which the server, the image build and the deploy all read, so there is no second copy to miss. The runbook is docs/OPERATIONS.md › The display font, linked from the deploy step, the build script and fonts.ts.
  3. catchTag in the font route test. Fixed: catchTags.
  4. "Byte for byte" was false because of a CSS comment in the tokens. Fixed by moving the note out of the emitted CSS into the tokens' doc comment. Without the file, appStyles now hashes the same at base and head (9634b496…, 68,274 bytes).

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

Checked 33ced58a941ccb596242315369d04ff616537b2e (base 3466836a5397a5e3c203780fe2ffa57ae828a82f, ui/product-logos) on fresh dense data, by GPT-6.1 Sol (xhigh) in Codex / T3 Code. I did not write this PR.

Done means

  • Absent file: passed. The stylesheet served on Home, the patch detail, Delete dialog and retired-patch door equals the base stylesheet byte for byte, including its surrounding markup whitespace. The stylesheet's SHA-256 is 9634b4966e3d8e4b8db624a847368b06631f554aaeb5af9420bd9cf3cd5446f2. At 1280 and 390, Chromium's platform-font report identifies Geist on the titles. Only Geist/Geist Mono requests; no failed requests, 404s, console errors or horizontal overflow.
  • Official file: passed. Independently downloaded Fontshare's package and extracted its official ExtraBold WOFF2: 20,960 bytes, SHA-256 de0d7ba5c28ab4a863b7c32293fb115de54157eeb868bd567207ceb33e14a578. At both widths, the same four page types render their titles in Cabinet Grotesk Extrabold, confirmed by Chromium's platform-font report rather than just the computed stack. Every page answers 200 without browser errors.
  • Serving: passed. /assets/fonts/CabinetGrotesk-Extrabold-de0d7ba5c28ab4a8.woff2 returns the pinned bytes, Content-Type: font/woff2, Cache-Control: public, max-age=31536000, immutable, and no cookie.
  • Fallback: passed, with the qualification below. Holding back the font request kept title positions, line counts and block heights stable on the four page types at both widths.
  • Patch and look isolation: passed. A running tier 1 page and tier 2 New Business tool fetch no app fonts. Neither wrapper nor content declares or points to the display font file; frame CSP remains font-src blob: data:. The look validator rejects both relative and absolute URLs to this font. The tier 1 fixture already names Cabinet in its own system-font stack on the base; that produces no request or access to this release's font.
  • Wrong bytes: passed. A real dev-server start refuses the altered file with FontMismatch and the expected/found digests. The server log reports found SHA-256 60845565235d747f372e07c8c17437252746484d3e74b12c1b3685a9a601195e, rejects it against the pin, and exits 1.
  • Images: passed. Two exact-head builds using scripts/build-server-image.mjs, pinned Node/pnpm/crane and the official file produce byte-identical tarballs and metadata, with image digest sha256:42711a69588ace185c59d8630dd411bdd1fcaee7e3b14bb37916013bca18b003. The image's font hashes to the pin. Separately downloaded and inspected every layer of the successful server-image artifact: no Cabinet font is included.
  • Deploy and setup: passed by inspection and offline execution. Fetch precedes the pending-release record, image build and stack changes. Executing the exact step with a local AWS substitute gives: no pin → success without a fetch; unreadable/missing object → actionable error and exit 1; wrong digest → error and exit 1; pinned bytes → success. The documented policy renders with deploy-role s3:GetObject, an all-principal non-TLS deny, public-access blocking and versioning. A checkout before the pin uses the old image builder. No workflow uploads the font; the only fetching job saves neither an artifact nor a dependency cache that a PR could restore.
  • Public-repo hygiene: passed. git ls-tree at the head and both added commits contains no Cabinet font file. Reviewed source, documentation, commit messages and PR body meet the requested source-only wording restriction.
  • Checks: passed. All checks on the requested head completed successfully; Attio/IMAP live checks were skipped as expected. CI includes 147 passing browser cases, Node 22/24/26 and Bun suites, live Clerk, CLI/install and tier 2 smoke checks. Independently ran the font, portal-font, served-style and company-look tests: 4 files, 53 tests passed.

Golden journeys

  • Publish/open, find/open, share/unshare, retire/restore: passed locally with the font. A member finds a newly CLI-published page on Home and in search and opens its frame. Signed-out access changes 401 → public 200 → 401. Retire shows the notice; Restore opens the same address again.
  • Sign in and machine login: passed. Local signed-out company access keeps its 401, private, no-store door; CI's live Clerk and CLI journeys pass.
  • Use a tool live / tier 2 rules: passed. New Business opens locally with its scenario data; CI's two-viewer subscriptions and packed tier 2 journey pass.
  • Invite/join and reverse states: passed in CI. Live Clerk and the browser People/dialog tests pass, including deactivation/reactivation. Shared UI tests also cover no-script dialogs and touch layouts.

Rollback answers: match the diff. Breaking accurately describes the one-time production-deploy setup. Reverting leaves an unused private bucket/object; the prior release neither reads it nor needs schema, data or stack changes. No one-way label is needed.

Not run

  • Real AWS setup, access and production deploy, as requested. The actual bucket/object and permissions still need the administrator's one-time setup; the checks above used offline substitutes only.

Notes

  • The fallback preserves layout in the tested matrix, but it is not an exact width match for each title: the delayed swap changed individual text widths by 0–14 px (for example, the phone retired title grew by 14 px and the Delete title shrank by 11 px). No tested title moved or gained a line. The PR's aggregate metric claim should not be read as a per-title pixel match.
  • The dev instance is down. Deleted the source download, extracted files, local font, offline-step copies and image tarballs. Verified the review checkout and packed package archives retain no font copy.
Page captures from the acceptance instance

Desktop Home, with the file:

Desktop Home with Cabinet

Phone Home, without and with the file:

Without With
Phone Home without the file Phone Home with the file

Desktop patch detail:

Patch detail with Cabinet

Desktop dialog:

Desktop dialog with Cabinet

Phone dialog and retired-patch door:

Dialog Door
Phone dialog with Cabinet Phone door with Cabinet

Only scenario data is shown; instance-address text is concealed.

Base automatically changed from ui/product-logos to main November 10, 2026 20:45
@allisonmahmood
allisonmahmood merged commit e8851ea into main Nov 10, 2026
26 checks passed
@allisonmahmood
allisonmahmood deleted the ui/cabinet-titles branch November 10, 2026 20:58
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]>
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:ui Portal and first-party browser pages, shared rendering and styles size:l 501-1,000 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant