Skip to content

feat(patchy): look preview shows the Patchy look when the company has none - #697

Merged
allisonmahmood merged 1 commit into
mainfrom
fix/593-look-preview
Oct 15, 2026
Merged

allisonmahmood merged 1 commit into
mainfrom
fix/593-look-preview

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

Stacked on #696

With no company look, patchy look preview (no folder) refused with exit 1, and --compare showed the candidate alone. Yet GET /api/look already returns patchyLook, the look the company's tools actually render while it has none. So an admin couldn't compare a first look against what people see today, and the skill's advice to preview the company's look failed in a company without one.

Preview now reads patchyLook when current is null:

  • With a company look, nothing changes: the pane is "Revision N, the company's look".
  • With none, the company-side pane is the Patchy look's files, labelled "The Patchy look" with the note "The company has no look yet. New tools start from this one." It gets no logo, as patchyLook carries none, so the masthead falls back to the brief's heading as a wordmark.
  • patchy look preview with no folder renders that single pane, exit 0, and the file passes patchy validate. --compare frames the candidate beside it, and the candidate pane no longer carries a "no look yet" note.
  • Unchanged: the --json shape { ok, path, failures, warnings? }, failures listing only the candidate's publish failures, a candidate alone previewing offline with no request, and --compare without a folder failing locally before any request. A response with neither current nor patchyLook, which the server never sends, still gets the local refusal.

No API, server, generation or renderer change. Pane and previewPage are reused as they are.

It works

Run by hand against a pnpm dev up team environment (Acme Co, no company look), through its CLI, with each file opened offline in Playwright at 1280×720:

  • patchy look preview --json exited 0 with {"ok":true,…,"failures":[]}. The page is labelled "The Patchy look" with the note, its wordmark is "Patchy's look", it has no logo <img>, and its full-page screenshot is 1280×2961. patchy validate on it returned {"ok":true,"warnings":[]}.
  • patchy look preview linear --compare --json exited 0 with failures: [], and wrote two frames titled "Candidate" and "The Patchy look", the second with the note. The full-page screenshot is 1280×3611 with both whole looks (frames 2651px and 3611px). No requests.
  • After patchy look publish duolingo, the same --compare shows "Candidate" beside "Revision 1, the company's look", as before.

Tests, in packages/patchy/src/cliLook.test.ts:

  • With no company look, look preview --json exits 0 with { ok: true, failures: [] }. The file shows "The Patchy look" and the note, has no data:image/svg+xml, and passes validateHtml.
  • With no company look, look preview <dir> --compare writes frames "Candidate" and "The Patchy look".
  • A response with neither look still exits 1, and --compare without a folder still exits 1 with no request. The existing company-look and offline-candidate cases are unchanged.
  • Both new cases fail against the old commands.ts. cliLook, lookPreview and skillLock vitest pass 13/13, look-preview.spec.ts passes 6/6 after a fresh build, and lint, prettier and the typechecks are clean. pnpm verify is queued behind the machine's shared lock; CI is the gate.
  • GPT 6.1 Sol review at xhigh found nothing at any level.

Surfaces

  • The command's help strings: the dir argument, --compare and the command description name the Patchy-look fallback. These are the only commands.ts edits, all inside look preview.
  • CLI README's look section: the command table row, the --compare paragraph (the Patchy look stands in, labelled, no logo), the failures sentence, the exit-1 paragraph (only --compare without a folder), and the --compare flag line.
  • ADR-0004's look preview contract: the table row and paragraph. The --json shape and exit codes are unchanged; only the no-look behaviour moved.
  • docs/product.md's specimen paragraph, and the comment on the browser-tier compare spec (comparing needs an instance, not "a current look").
  • Global patchy skill, "Changing the look": --compare shows the candidate beside the company's look, or the Patchy look when there is none. skills-lock.json hash refreshed.

Closes #593

Made by Claude Opus 5.5 in Claude Code, running in T3 Code.

@github-actions github-actions Bot added area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:docs Touches the docs area size:m 100-500 changed lines labels Oct 15, 2026
Base automatically changed from fix/595-compare-frames to main October 15, 2026 21:04
… none

With no company look, `patchy look preview` refused and `--compare`
showed the candidate alone, though GET /api/look already carries the
Patchy look that stands in. Preview now shows that look, labelled as
such, in both cases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood
allisonmahmood merged commit a22f85a into main Oct 15, 2026
13 checks passed
@allisonmahmood
allisonmahmood deleted the fix/593-look-preview branch October 15, 2026 21:14
allisonmahmood added a commit that referenced this pull request Oct 16, 2026
…u when they fail (#720)

Release 13's What's new entry, written from `c9b8fc4`, ahead of
deploying it. `patchy` and `CURRENT_RELEASE` move to `0.13.0`, so CLIs
and patch repos installed before this deploy are told to upgrade.

| Change | PRs |
| --- | --- |
| New: Home puts the patches you use first | #713, #716, #719 |
| New: Every patch in one list | #715 |
| Improved: Each patch's page leads with Open | #717 |
| New: See when your tools are failing | #718 |
| Fixed: Everyone has a name | #687 |
| Improved: Your company's look is easier to get right | #697, #696,
#703, #688 |
| Improved: Forms follow your look's error states | #691, #692 |
| Improved: Clearer answers when a publish goes wrong | #686, #685, #689
|
| Fixed: Your agent's Patchy commands are steadier | #695, #704, #680,
#681 |
| Behind the scenes: stricter checks on static pages and tools' database
requests; malformed requests are logged | #682, #693, #683 |
| Behind the scenes: usage numbers count every publish, sharing change
and restore | #698, #699, #700, #690 |
| Test and tooling only, no line | #705, #702, #701, #694, #684, #607 |

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:cli Touches the cli area area:docs Touches the docs area size:m 100-500 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(patchy): look preview shows the Patchy look when the company has none

1 participant