Repository navigation
test(deps): pin the vaul patch and fail on any unpinned patch - #443
Merged
Merged
Conversation
[email protected] was the one patched package with no pin in src/lib/shadow-patches.test.ts. Upstream is unmaintained (its README says so, and 1.1.2 from 2024-12-14 is still the newest release), so the patch is staying, and now it is pinned like the other three: - the CSS hunk (#91): a fresh evaluation of the build this lane resolves adds no vaul stylesheet to the document; - the modal hunk (#30): through our Drawer atom, its only caller, a non-modal drawer leaves the page behind it neither aria-hidden nor focus-trapped, with a modal control showing jsdom sees both effects; - a drift pin on both built files. Each spec was run against pristine vaul 1.1.2 from the registry tarball and against each hunk reverted alone, and fails on its own hunk. The modal hunk exists only in dist/index.mjs. Measured with a marker build: the Vite bundle, the dev server's pre-bundle, Ladle, and this lane in node and jsdom all load index.mjs, and nothing loads index.js, the `require` build. The pin records that limit as a shortcut rather than widening the patch. A register check now fails if pnpm.patchedDependencies applies a patch that PATCHES does not pin. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVeNzer8ue5c7JRsZk
The per-edit hook only acted on src/ and scripts/ sources, so an edit to patches/*.patch selected nothing. A dependency patch is now a lane source, reached the way brand.test.ts reaches its copy files: by the quoted repo-relative path src/lib/shadow-patches.test.ts names it by in PATCHES. Editing any of the four patches now runs that spec. Drawer.tsx reaches the vaul pin through the existing reference index, since the pin renders the Drawer atom. That selection measured ~3.1s here (from ~1.5s), well inside the 12s budget, and the widest selection is unchanged at 22. The pins read the INSTALLED package, which a patch edit reaches only at the next pnpm install. The selector and docs/testing.md say so. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVeNzer8ue5c7JRsZk
expectPatched reads only the files a patch lists, so an onlyIn key naming any other file (a typo, or a renamed build file) left its hunks unchecked and the drift pin green. With the vaul key mistyped and the modal hunk absent, 'keeps every hunk in our own pinned copy' passed; it now fails on the unlisted key. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVeNzer8ue5c7JRsZk
The vaul pin's comment said every drawer in the app is non-modal, but DrawerStack's filter overlay passes `modal`. The defect #30 describes is the page behind a non-modal drawer, so the comment now says that. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVeNzer8ue5c7JRsZk
Ardnived
approved these changes
Nov 19, 2026
Contributor
Author
|
🤖 no session running Written by the sydevs dispatcher. Sessions never edit this comment. |
This was referenced Nov 19, 2026
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.
Summary
patches/[email protected]was the only dependency patch with no pin insrc/lib/shadow-patches.test.ts. Upstream vaul is unmaintained: its README says so, and 1.1.2 (2024-12-14) is still the newest release as of 2026-11-19 (re-checked that day withnpm view vaul version time.modified). So the patch stays, and this PR pins it the same way as the other three. Pins now fail the unit lane if either hunk stops having its effect. They also fail ifpnpm.patchedDependenciesever gains a patch that nothing pins. Editing a patch file, or the Drawer atom, now runs the pins per edit.The branch is rebased onto
mainata1ce36b6(#436), so it already sits on top of #434, #436, #437 and #438.mainhas since gained #439 (payload types only), which this branch does not touch.What changed and why it matters
The vaul patch has three hunks:
dist/index.jsanddist/index.mjs: disables__insertCSS. Upstream appends an unscoped<style>to the host's<head>at module scope. Its bare@keyframes fadeIn/fadeOut/slideFrom*are document-global and overrode the host page's own animations.src/styles/vaul.cssalready vendors that CSS through the scoping pass.dist/index.mjsonly: forwardsmodalto RadixDialog.Root. Without it Radix defaults to modal, so evenmodal={false}aria-hid the page behind the drawer and trapped focus. Upstreammainstill does not forward it.Which build each consumer loads. vaul's exports map sends
importtodist/index.mjsandrequiretodist/index.js. A marker build showed that onlyindex.mjsloads, in every consumer: the Vite bundle, the dev-server pre-bundle, Ladle, and the unit lane in node and jsdom. Nothingrequires vaul (pnpm why vaulshows only our direct dependency, andDrawer.tsxis still the only file insrc/that imports it). So the CJS build's missing modal hunk is a latent limit, not a live bug. It is recorded as ashortcut:in the spec and a ⚠ in the register. The patch itself is unchanged.src/lib/shadow-patches.test.ts:[VAUL]entry inPATCHES. The drift pin checks thathead.appendChild(style)is gone from both builds and thatmodal: modal,is present inindex.mjs. The latter uses a new optionalonlyInfield for a hunk that lives in one file only.expectPatchedalso fails if anonlyInkey names a file not listed infiles. Without that check, a mistyped key passed without being checked.Draweratom, vaul's only caller, and checks both noaria-hiddenand no focus trap.pnpm.patchedDependenciesapplies a patch thatPATCHESdoes not pin. Every entry gained apatchpath field for this check.react/no-children-propdisable. A.tsspec has no JSX, and the atom's types requirechildrenas a prop.scripts/select-unit-specs.mjstreatspatches/*.patchas a lane source. The spec that names a patch by its quoted repo-relative path selects it, which is the same formbrand.test.tsalready uses.Drawer.tsxreaches the pin through the existing reference index. Fixture and real-repo assertions inscripts/select-unit-specs.test.tscover both.src/components/AGENTS.md(patch register): every row is now pinned. vaul is marked unmaintained, with the date and how to re-check (npm view vaul version time.modified, plus the note at the top of the upstream README). The ESM-only modal hunk is flagged.docs/testing.md: one sentence on how a patch file is selected. It carries a ⚠: the pins read the INSTALLED package, which a patch edit reaches only at the nextpnpm install.No CHANGELOG or
docs/embedding.mdentry: a host cannot observe any of this.Verification
Run on the rebased head unless a line says otherwise.
git rebase origin/mainapplied all four commits with no conflicts.git range-diffshows each commit's diff unchanged.package.json,pnpm-lock.yamlandpatches/are byte-identical tomain, andpnpm install --frozen-lockfilepasses.dist.integrity) swapped in for the installed copy: 3 failed, 12 passed. The failures were the stylesheet spec (2 vaul<style>elements found), the non-modal spec (aria-hiddenwas'true'), and the drift pin. The modal control passed, as intended. After restoring the patched install: 15/15.Drawer.tsxtomodal: falsefails the control spec. An extrapatchedDependenciesentry fails the register spec.onlyInguard: with the vaul key mistyped and the hunk absent, the drift pin passed before the guard and fails after it.scripts/select-unit-specs.mjsreverted tomain.Drawer.tsxselects 5 specs including it (3 onmain). The widest selection is still 22 (src/test-support/repo-source.ts). The per-edit hook, timed end to end, medians of three on 4 cores: 2.2s forDrawer.tsx, 1.7s forpatches/[email protected], 1.7s forpatches/[email protected], and 4.2s for the widest, all against the 12s budget..claude/skills/pr-prep/check.sh --full: exit 0.src/lib/shadow-patches.test.tsalone: 15/15.pnpm size,main(a1ce36b6) → this branch, measured / shipped: standalone 333.5 / 334.7 → 333.5 / 334.7 KiB, embed 334.6 / 335.8 → 334.6 / 335.8 KiB, loader 2.8 / 3.3 → 2.8 / 3.3 KiB (budgets 336 / 336 / 3.6). The twodist/trees are byte-identical, since the branch adds no runtime code.pnpm ladle:build: exit 0 (no source maps across 168 files).pnpm check:wrangler: exit 0, both configs.Not done / not verified
dist/index.jsstill lacks the modal hunk, and no behaviour spec runs against that build because nothing loads it. Only the drift pin checks its CSS hunk.mainchanged isDrawer.tsx, whosetvimport moved to@/styles/tvin chore(deps): tailwind-variants 4.0.2 on its lite runtime #438. Itsmodalpass-through is untouched, and the modal control spec still passes on the rebased head, so the non-modal spec is still not vacuous.docs/testing.mdwere not refreshed. Its '7 of 420 lane sources' and '116 of those 420 select nothing' were already stale onmain, which measures 467 lane sources with 104 selecting nothing. This branch adds the four patch files, so 471 with 104 selecting nothing, andtranslations.test.tsis still selected for 7.import.meta.resolve('vaul'). That works because Vitest loads vaul through Node's own import today. If vaul is ever bundled into the test run, the spec needs re-checking.Follow-ups for the maintainer
.claude/edit (wording only, not made here): the comment near line 30 of.claude/hooks/unit-test.mjs('Empty for a Ladle story, a path outside src/, or a tree with no specs in it') could mention thatpatches/*.patchis now covered. The hook's code needs no change.require()s vaul: add the same one-linemodal: modal,hunk todist/index.jsin the patch and update the lockfile. The spec'sshortcut:line says so.pnpm.patchedDependenciesout ofpackage.jsonintopnpm-workspace.yaml, and the new register spec reads it frompackage.json. Whichever of the two lands second must point that spec atpnpm-workspace.yaml. The toolchain PR is meant to land last, so in practice it carries the change.Drawer.tsxnow runs 5 specs instead of 3.Generated by Claude Code