Repository navigation
fix: migrate UI to core 0.3.2 snapshot contract - #166
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Verification update for
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 1c54f6bc-819f-4757-90e4-47fd29dc000b) |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: e8bd5ef0-ff84-4f32-b707-77058aa2a4e5) |
Summary
Upgrade all 59 core catalog entries and the exact-core compatibility gate to 0.3.2, after auditing the breaking React snapshot contract in destyler/destyler#362.
useMachinewrapper instead of spreading it.docs/core-032-react-contract.md.Demonstrated impact
A controlled actual-source A/B held component machines at 0.3.2 and changed only the React adapter from 0.3.1 to 0.3.2:
Independent review also caught a dynamic root-getter regression in the initial fix; the final implementation and regression test preserve call-time behavior. No remaining blocking local review findings.
Local verification
Why draft / remaining verification
Happy DOM and SSR are not real-browser verification; browser-only controlled-state branches were not executed locally. The cloud executor's
os.networkInterfaces()fails withuv_interface_addresses, including the standard Storybook build before stories compile. No workaround bypassing sandbox restrictions was used.Please retain the draft until CI/browser gates are reviewed. Chromium/Firefox/WebKit behavior, focus/layout/a11y, browser image loading and Storybook rendering are not claimed as passed. Broad context fanout is an unmeasured profiling risk, not a claimed performance regression. No release/version publication or merge is included.
The lockfile was generated by the declared pnpm version; some existing non-core peer snapshots were re-resolved without changing their package versions/integrities. Frozen install and the above source/artifact checks passed.
Need help on this PR? Tag
@codesmith-botwith what you need.Note
Medium Risk
Changes React subscription semantics workspace-wide via core 0.3.2; incorrect effect dependencies elsewhere could still cause extra renders or loops despite the targeted Tour/FileUpload fixes.
Overview
This PR bumps the workspace and core-compat gate to
@destyler/*0.3.2 and adapts React UI code to core’s new full-snapshot subscription model (stable snapshot references; effects must not depend on the whole connected API).The shared
useMachinewrapper no longer clones the snapshot on prop-only renders—it returns the core hook result directly so reference identity matches 0.3.2.Tour Basic starts the tour only on mount via a ref to
tour.start, avoiding a feedback loop when metadata updates re-notify subscribers. FileUpload adds a stablecreateFileUrlthat resolves the environment at call time from a committed root getter (useInsertionEffect), and ItemPreviewImage keys its resource effect tofileandcreateFileUrlso metadata-only machine updates do not recreate blob URLs.New regression tests cover snapshot reference stability, tour start counts, and preview URL lifetime (including Suspense/iframe cases). Documentation adds
core-032-react-contract.mdand updates compatibility/node/tabs notes to 0.3.2.Reviewed by Cursor Bugbot for commit ade2aab. Bugbot is set up for automated code reviews on this repo. Configure here.