Repository navigation
feat(patchy): see a look on the specimen before publishing it - #578
Conversation
|
Review round 1 (stack orchestration for #547): one Claude Opus 5.5 reviewer and three GPT-6.1 Sol reviewers (page correctness, YAGNI + spec + CLI, and a rendered-page pass in Chromium at 1280 and 375px), read-only against Agreed sound: all three acceptance criteria; the command logic for every Sent to the builder:
Posted by Claude Fable 5.1 (orchestrator) in Claude Code, running in T3 Code. |
|
Review round 2: a GPT-6.1 Sol verifier re-checked all eight fixes at Verdict from the orchestrator: ready to merge after #577. Posted by Claude Fable 5.1 (orchestrator) in Claude Code, running in T3 Code. |
04a396b to
bdbe5c2
Compare
The specimen is one fixed page that ships in the CLI, styled only by a look. look preview writes it as a self-contained file in the state dir, for a candidate folder, the company's look, or both with --compare, and lists every failure look publish would report without refusing to render. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The state dir is created 0700 and the page goes through a sibling temp file and a rename, as State's other files do, so a link at look-preview.html is replaced instead of truncating its target. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… has them - hover and focus stand-ins replace each pseudo-class in place with :is(), inside :not() and :is() too, so negations and :focus:not(:focus-visible) behave as the real state would - the specimen's own CSS follows the look unlayered, so its amount column and error spacing aren't overridden by the look's element styles - badges keep text on the verified ground and carry status in the border - no <form>, so the single-look page publishes as a tier 0 page - compare frames are border-box, ending a 1px overflow; a browser test renders a compare page Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… as a page Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
57eb7ca to
7149e8e
Compare
Release 8 of What's new, written for the deploy of the company look stack (#547, first build). It covers everything merged after release 7's `through`. - **New: Your tools can look like your company** — #577, #579 - **New: Preview a look before you publish it** — #578 - **New: Setting up Patchy sets up your look** — #598 (the rebased replacement for #582) - **Improved: Patches hear when the look changes** — #581 - **Improved: Static pages can use embedded fonts** — #576 - Behind the scenes: the personal style file retires (#598) Written by Claude Fable 5.1 in Claude Code, running in T3 Code. Co-authored-by: Claude Fable 5.1 <[email protected]>
People judge a look from a picture, not from CSS, and an agent needs to know what
look publishwould refuse before it shows a look to anyone. Until now a look couldn't be seen before it was published.patchy look preview [<dir>] [--compare]writes the specimen as one HTML file and prints its path. Under--jsonit returns{ ok, path, failures, warnings? }.packages/patchy/src/lookPreview.ts), so every release renders the same one. It has companies: a company look, so new patches look like their company by default #547's contents plus a badge per status, and hover, focus, invalid, disabled and busy states. Its own CSS comes after the look's, unlayered, and styles only its own classes, so every plain element shows the look. It puts text only on bg or surface, where the checks verify every text colour; badges keep the status-colour text on that ground and carry the status in their border (neutral uses muted). The page says that it checkslook.css, not the brief's recipes, and that it can't show how a look collides with a patch's own components. The single-look page passespatchy validate, so a member's agent can publish it to show an admin.:hover,:focusand:focus-visibleinlook.css, wherever it sits (inside:not()and:is()too), is replaced in place by:is()of itself and a stand-in class. Specificity is unchanged, and:focus:not(:focus-visible)can't match the keyboard-focus stand-in. A screenshot therefore shows those states as the look has them.data:fonts and images, so the page never makes a request. A candidate with a remote@importrenders the way a patch would, without the fetch.--compareputs each look in its own labelled<iframe srcdoc>, so one look's element styles can't reach the other. With no current look it renders the candidate alone and says the company has no look yet.failuresischeckLook's output, line for line whatlook publishprints. Preview always renders.look-preview.htmlin the state dir (PATCHY_STATE_DIR, default~/.patchy). That directory is writable wherever the CLI works, it avoids a fixed filename in a shared/tmp, and reloading the tab shows the latest preview. State writes it like its other files: an owner-only directory, then a sibling temp file and a rename, so a link at that path is replaced rather than followed. A folder alone needs no login and sends nothing; only the company's look is read withgetLook().The Patchy fixture, which becomes Patchy's default look in #567, also gets a visible disabled field: muted text in a dashed frame.
Tests: the CLI contract in
cliLook.test.ts(including that the single-look page validates), the state stand-ins inlookPreview.test.ts, the link-safe write inState.test.ts, and a Chromium spec. The spec runs the four fixture looks through the bundled CLI, covering forced states, real keyboard focus, a 375px viewport with long labels and non-Latin names, no requests, and an embedded font with remote URLs refused (it fails without the CSP). It also renders a compare page, checking each frame keeps its own look, the frames make no requests and nothing overflows.Closes #566
Built by Claude Opus 5.5 in Claude Code, running in T3 Code.