Repository navigation
fix(cli): pages built with Tailwind v4 publish - #1191
Merged
Merged
Conversation
Owner
Author
|
Review (GPT 6.1 Sol, xhigh) on 0fb800a: PASS with notes.
|
Owner
Author
Acceptance: PASS with notesChecked Done means
Golden journeys
Rollback answers: they now match the diff. The Not run
Notes
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
allisonmahmood
force-pushed
the
fix/tailwind-v4-publish
branch
from
November 4, 2026 01:42
be4e604 to
63447c2
Compare
1 of 2 tasks
allisonmahmood
added a commit
that referenced
this pull request
Nov 4, 2026
…ges publish (#1241) ## What changed This adds release 36's What's new entry, written from `1acc968`. It covers everything merged since release 35's `through` (`dd0e2ec`), and sets the `patchy` release to `0.36.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. | Change | PRs | | --- | --- | | Improved: shortcuts work where you use them (keys for one part of a patch, the closest wins, text boxes keep their typing keys) | #1231 | | Improved: the shortcuts sheet shows what works where you are (Ctrl+/ and ⌘/ open it, its commands run, it opens from a patch's menu and in view on a narrow screen, keeps the look, spells keys out away from a Mac) | #1231, #1181, #1178, #1180, #1177 | | Fixed: keys pressed while a patch opens reach it | #1183 | | Fixed: pages styled with Tailwind 4 publish, and a look with the same rule saves | #1191 | | Fixed: an old copy of a patch no longer replaces newer work (**Breaking** for such a copy: it needs `patchy pull` or one `--allow-behind` publish) | #1179 | | Improved: your agent can check a publish before sending it | #1188 | | Improved: your agent hears what changed when it updates a patch | #1186, #1185 | | Fixed: your agent stops chasing false alarms (`pnpm install` exit codes, `manifest.json` bytes, the description notice, a copied dev record) | #1176, #1174, #1175 | | Behind the scenes: fuller hotkeys instructions for agents; fewer redraw costs for patches with many shortcuts | #1182, #1187 | `patchChanges` has three sentences for the agent refreshing a patch across this release: - #1231's, from its PR: text fields keep their keys, `preventDefault()`, and the sheet's Mod+/ and `.hotkey-row` buttons. - The sheet's dialog renders in `document.body`, and element-only page rules don't reach it (#1178, #1180). Its own row lists last (#1181). The hotkey label helpers take only valid literals (#1177). - Publish's `unknown_base_version` (#1179). It also rewords release 33's "Press ? to see every shortcut a patch has". That was true only for a patch that mounts the shortcuts sheet, so it now says a patch *can* list its shortcuts. The rest get no line: - #1206, #1207, #1209 and #1220 are `pnpm dev eval` tooling. - #1222 is release 35's own entry. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`, and release 33's reworded line. - **Rollback safety, from the live commit `d28fdd0` (release 35) to `1acc968`:** - #1191 is labelled `one-way`. Its Release impact: a company look published after this release with a nested `@supports` condition stays stored after a revert. Release 35 refuses any bundle carrying it, so repo publishes in that company would fail until an admin runs `patchy look restore` to an earlier revision. Pages and Tailwind 4 repos already published stay published. - #1183 is the only change to what the server serves browsers: the shell's script, under a digest-named URL. Its revert leaves nothing behind. - The hotkeys PRs change `patchy/hotkeys`, which patches bundle when they are built. Published patches keep their copy. - The CLI PRs change what a CLI writes and refuses. Release 35 reads everything they leave behind: #1176's `allowBuilds` entry, #1174's indented `manifest.json`, and the `version` recorded by an `--allow-behind` publish. **Rollback line:** If this release misbehaves, roll back to `d28fdd0` (release 35). First check that no company's look has a nested `@supports` condition, and `patchy look restore` an earlier revision where one does (#1191). ## How it was verified - **Tests.** `whatsNew.test.ts`, `WhatsNewPages.test.ts` and `schemas.test.ts` pass (22 tests), and `bun fmt` passes on the changed files. - **Facts.** The sheet's new `document.body` home and its element-rule reset were checked against `hotkeys.ts` and `hotkeySheet.ts` on main. - **Deploy state.** I pinned the live commit from `/healthz/deep`: `d28fdd0` (release 35). The Deploy run updated last succeeded, and none is unfinished. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required Text and version numbers only. Like every release, the `0.36.0` bump tells CLIs and patch repos installed before this deploy to upgrade. - **What does a revert leave behind?** Nothing. - **Does the release before it still work with that?** Yes. Built by Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, through T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
patchy publishrefused every page built with Tailwind CSS v4: "Could not inspect the HTML bundle." Tailwind's preflight has nested@supportsconditions, and css-tree reports a parse error each time it tries one grammar on a condition and moves on to the next. The bundle check threw on every report. Now it throws only when css-tree couldn't read something, so Tailwind v4 pages publish, from a repo or as a single HTML file. Aurl()inside an@supportsblock is still found and refused.The look check had the same bug: a look with a nested condition, such as
@layer look { @supports ((display:grid)) { … } }, was refused with "could not be parsed: Identifier is expected". It now follows the same rule.Closes #1190
Look at
The
onParseErrorrule inpackages/patchy/src/bundleCheck.ts. css-tree's condition parser backtracks withparseWithFallback(…, () => null). It tries a supports declaration, reports the miss with anullfallback, rewinds, and rereads the same tokens as a nested condition. If that fails too, it reports again with a real fallback node (general-enclosed, orRawfor unreadable text), and the check still throws. On Tailwind 4.3.3's real output, every error css-tree reports has anullfallback, and the tree has noRawnodes.@supports ((-webkit-hyphens:none) and …) { body { background-image: url("https://…") } }external CSS url()@supports (((( {…},@supports ((x) and (y) {…}color: red; broken; …(the existing test)Other options I ruled out:
@supportspreludes. That needs offsets mapped back to at-rules, and it would also accept conditions css-tree truly can't read.The same rule in
packages/core/src/look.ts. The look check records an error for every report css-tree makes, so a valid nested@supportsinside@layer lookwas refused. It now records only reports with a non-null fallback. Every other check it makes on the parsed CSS is unchanged: tokens only in:root, references,!importantand escapes. The server's look API andpatchy lookboth use this function.pageImports.tsneeds no change. It parses with css-tree's defaultonParseError, which recovers instead of throwing, and the repo publish below runs it over Tailwind's CSS.The tests, red then green. Here are the new tests running against
main'sbundleCheck.ts:On the branch:
Tests 8 passed (8).The new look test, against
main'slook.ts:On the branch:
Tests 39 passed (39). The same test also checks that an externalurl()inside the condition is still refused.How it was verified
I built a page with Tailwind v4 (4.3.3, its own CLI) in a scratch project and ran it against a local instance (
pnpm dev). Each publish ran first withmain'sbundleCheck.tsrestored, then with the branch's. Output is trimmed to the point.Single file. The Tailwind CSS is inlined in one HTML file, built both with and without
--minify.Repo. I ran
patchy init, kept Tailwind's compiled CSS in the repo assrc/tailwind.css, and imported it fromsrc/main.tsx.An external
url()hidden in a Tailwind page's@supportsblock, on the branch:Checks. After the look fix, I ran
pnpm lintandpnpm typecheck(both pass), plus the focused suiteslook.test.ts,LookApi.test.ts,cliLook.test.tsandrepoBuild.test.ts(all pass). Before it, I ranpnpm checklocally:GET /on CLI and execution stub servers. That's a local port probe on this machine, and the failing set changed between runs.repoBuild.test.tsandPatchesApi.test.tspass on their own.pnpm verifylocally, because the machine is shared. CI judges.Release impact
Tick exactly one.
Breaking — requires action from anyone already running this
Not breaking — no action required. The CLI and the look check now accept CSS they used to refuse, and still refuse everything they refused before except css-tree's own backtracking reports.
What does a revert leave behind? A company look published in the meantime with a nested
@supportscondition, such as@supports ((display:grid)) and (not (margin-trim:inline)). Nothing re-checks a stored look, so it stays the company's look after a revert. Pages and Tailwind v4 repos published in the meantime stay published.Does the release before it still work with that? Not fully. It serves the stored look as is. But every repo that imports the company's
look.css(the starter'ssrc/main.tsxdoes) gets that CSS in its bundle, and the release before refuses the bundle with "Could not inspect the HTML bundle". Repo publishes in that company then fail until an admin runspatchy look restoreto a revision without the nested condition. Before rolling back past this PR, checkpatchy lookfor a nested@supportsand restore an earlier revision first if there is one. A repo refreshed while the nested look was current keeps it inpatchy/_generated/look.cssuntil it runspatchy refreshagain, and a single-file page that copied the look's CSS needs that CSS replaced.Built by Claude Opus 5.5 (
claude-opus-5-5) in Claude Code, through T3 Code.