Repository navigation
Pin FoldKit 0.156.0 and migrate the two changed APIs - #3
Merged
Merged
Conversation
These three files were already failing `vp check` on main; the formatter bails before lint and type check, so the gate was red before any dependency change. Fixing them in their own commit keeps the FoldKit bump that follows a pure version-number diff. Claude-Session: https://claude.ai/code/session_01BF1v1wNNipspj3CZuBS2ae
…dency
foldkit and its override move together so tsc keeps seeing one HtmlBuilder,
@foldkit/vite-plugin goes to 0.20.0, and @foldkit/oxlint-plugin to 0.11.0.
storybook-renderer-foldkit retargets to a1624e35, the tip of that repo's own
chore/foldkit-0.156.0 branch. Left at the old SHA the git dependency drags
foldkit 0.152.0 back into the tree; the lockfile now resolves a single
foldkit@0.156.0.
Two FoldKit APIs changed under this bump. h.OnClickFocus(selector, message) is
gone, and the focus behaviour now rides on h.OnClick's optional ClickOptions as
{ focusSelector }. Mount.define and Mount.defineStream no longer curry a
name-and-schemas call over an execute function; each takes one config object of
{ args?, messages, execute }, and execute receives the live element as a named
field. Five call sites and two mount definitions across six files are the whole
affected surface.
The README's tooling pins now read foldkit 0.156, and its install line names bun
instead of pnpm. Commit 9b0beeb dropped the pnpm lockfile and workspace file
that line still pointed at.
Claude-Session: https://claude.ai/code/session_01BF1v1wNNipspj3CZuBS2ae
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.
Why
FoldKit 0.156.0 is the current release. This library,
storybook-renderer-foldkit, andastro-renderer-foldkitneed to sit on one runtime version, because FoldKit's render frame is module-local and a view built by a second instance of the library renders nothing. That is the same reasonoverrides.foldkitexists here, so the override and the dependency move together.Two APIs this library uses changed in the release, so the bump is not only version numbers. Both changes are mechanical and confined to six files.
Scope
package.jsonmovesdependencies.foldkitandoverrides.foldkitfrom0.153.0to0.156.0,devDependencies.@foldkit/vite-pluginfrom0.19.0to0.20.0, anddevDependencies.@foldkit/oxlint-pluginfrom0.8.0to0.11.0. It also retargets thestorybook-renderer-foldkitgit dependency from8aa6d28toa1624e3, the head of that repository's own FoldKit 0.156.0 branch. That retarget is load-bearing rather than tidiness. Left at the old commit the git dependency pulls its ownfoldkit@0.152.0into the tree, andfoldkit@0.156.0is now the only foldkit version inbun.lock.h.OnClickFocuswas removed fromfoldkit/html. Its behavior moved ontoOnClick's new optional second parameter,ClickOptions, which carriesfocusSelector. Five call sites move fromh.OnClickFocus(selector, message)toh.OnClick(message, { focusSelector: selector }), with the argument order flipping. They are insrc/application/filters-advanced-menu.ts,src/application/share-project-menu.ts,src/base/dropdown.ts, andsrc/internal/context-menu-primitives.ts.Mount.defineandMount.defineStreamstopped currying. Each now takes one config object,define(name, { messages, execute }), andexecutereceives the live element as a named field rather than a positional parameter. Two definitions move,ScrollCalendarToFirstEventinsrc/internal/calendar-runtime.tsandObserveTextEditorinsrc/internal/text-editor-runtime.ts. The text editor diff is large only because the body re-indents. Its listeners,acquireReleasepairing, and cleanup are unchanged.README.mdmoves the tooling pin line fromfoldkit 0.153tofoldkit 0.156. The same line claimed pnpm workspaces and apnpm-workspace.yaml, which no longer exist in this repository, so it now names bun workspaces and the commands CI actually runs.The first commit is a separate, revertable slice.
vp checkwas already red on the base commit over three oxfmt nits, and one of them wanted theoverridesblock moved belowpeerDependenciesin the very file this bump edits.vp check --fixresolves them, and keeping it out of the bump commit leaves the bump a pure version-and-API diff.Tradeoffs
The base is
base/main-local, notmain. Localmainis twelve commits ahead oforigin/mainand unpushed, and those twelve commits are wherefoldkit@0.153.0,@foldkit/vite-plugin,@foldkit/oxlint-plugin, and the bun migration were introduced.base/main-localis that exact localmaintip,03806ed, pushed under a name that is not the default branch. Targetingmainwould have made this a fourteen-commit pull request carrying twelve commits of unrelated component and packaging work under a dependency-bump title. Push localmainand retarget this withgh pr edit --base mainwhen you are ready, then deletebase/main-local.Unlike its two sibling repositories, this one has no single compatibility-boundary file, so the bump could not be confined to one module by design. 620 files under
src/import FoldKit, 618 of them fromfoldkit/html. That is the risk this change ran into and got lucky on. Only six files touch the two APIs that moved. A release that changesHtmlBuilderitself would land on every component port at once, and it would be worth introducing a boundary before that happens.Blast Radius
Consumers install this library by commit, so nothing moves until a consumer retargets its SHA. Within the library, the five
OnClickFocussites are menu and dropdown items whose click both dispatches a message and returns focus to the trigger, so the affected surface is dropdown, context menu, share-project menu, and the advanced filters menu. The two Mount definitions drive calendar initial scroll and the rich text editor's input and selection observation.One risk this gate does not cover. The type checker proves the new call shapes are correct and every test still passes, but
focusSelectortiming and mount lifecycle are DOM-level behaviors that this package's suite does not drive. If 0.156.0 changed when focus is applied relative to dispatch, that would not surface here.Verification
Ran
bun install,vp check, andvp test, first at the base commit and then after the bump, so a bump-caused failure was distinguishable from a pre-existing one. The final gate was then re-run independently against the pushed commit.Baseline at
03806ed:vp testexit 0 with 531 test files and 611 tests passing, andvp checkexit 1. That failure was pre-existing and cosmetic. Oxfmt flaggedREADME.md,package.json, andtests/catalog.test.ts, and becausevp checkstops at the format stage, lint and typecheck never ran.vp check --no-fmtrecovered the real baseline and passed clean over 1890 files, which is what makes the post-bump errors attributable to the bump.After the bump and before any fix,
vp checkexit 1 with 57 errors. They reduced to the two API changes above, not 57 separate problems. EveryTS18046in the text editor was cascade from the brokendefineStreamshape and cleared once the definition was right.Final state on this branch:
bun installexit 0,vp checkexit 0 over 1904 formatted and 1890 linted and typechecked files,vp testexit 0 with 531 test files and 611 tests passing. The test counts match the baseline exactly, so nothing was skipped, deleted, or suppressed to reach green. Noasoranycast and no lint-rule relaxation was used.https://claude.ai/code/session_01BF1v1wNNipspj3CZuBS2ae