Repository navigation
feat(react-draggable): add exact Octane binding - #556
jonkwheeler wants to merge 68 commits into
Conversation
Define the pinned consumer contract, framework adaptations, executable parity lanes, and draft-only review lifecycle before implementation.
Vendor the exact npm and tag evidence, retain the MIT notice, and add fail-closed source, export, test, fixture, and type inventories.
Force-track the ignored build directory so the vendored npm artifact remains complete and its runtime and declaration bytes can be audited.
Characterize React 19 nodeRef timing and cleanup behavior, then prove Octane cloning, native listeners, SSR, and hydration can represent those observable contracts.
- run Three launch normalization in ordinary CI shards
Babysit run report (pipeline)Status: blocked-needs-human — not posting Applied this round
Residual (open)
Draft left unchanged. No merge. |
Port each upstream browser.test.js case with an exact adaptedCase identity, stop scenario-lumping in the inventory, and keep the heavy browser lane able to run behavior-root by installing WebKit and skipping that suite on Firefox. Co-authored-by: Cursor <[email protected]>
… case Match upstream's default enableUserSelectHack so the adapted identity still exercises scheduleRemoveUserSelectStyles on unmount. Co-authored-by: Cursor <[email protected]>
|
Addressed leonidaz public-root and browser-parity feedback with one-for-one upstream browser identities, merged origin/main earlier, and cleared Bugbot findings on the current head. READY FOR REVIEW |
leonidaz
left a comment
There was a problem hiding this comment.
React parity audit review only; no tests were run.
Inventory adapted case assertions/scenario steps, type assertion groups, exhaustive authored-test classifications, and immutable React oracle pins so title-only or wholesale type mappings can no longer pass the audit. Co-authored-by: Cursor <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit 3cc2919. Configure here.
Inventory prop-object probes in typings.consumer.ts, record upstream JSX probes as upstream-only, and mutation-test clearing the adapted consumer file. Co-authored-by: Cursor <[email protected]>
|
Parity audit feedback addressed on the current head: adapted case structure inventories + negative controls, type assertion-group inventories with upstream-only React probes, exhaustive authored-test classifications, immutable React oracle pins, and UPSTREAM.md aligned with the allowedTransforms ledger. Bugbot is clean on this head; merge state is CLEAN. READY FOR REVIEW |
|
REVIEW WITHDRAWN |
Keep descriptor-children binding path; take Fragment-ref isFragmentLongForm(node, ctx). Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
|
READY FOR REVIEW |
| return { | ||
| upstream: value.id, | ||
| kind: 'unit-case', | ||
| disposition: 'upstream-internal-implementation', |
There was a problem hiding this comment.
This still waives 141 upstream utility cases wholesale as upstream-internal-implementation solely because their helpers are unexported. These are framework-neutral tests for the mirrored src/utils implementation, including bounds, scale, touch, focus, nonce, event-listener, grid, and data calculations. The port workflow requires framework-neutral upstream suites to run against the reused or ported core; source paths and a generic claim of public coverage are not executable counterparts, and unexported alone is not a not-applicable reason. Run these suites against the Octane utility implementation or give case-specific reasons for any genuinely inapplicable seam.
| path: relativePath, | ||
| assertionGroups: groups, | ||
| assertionGroupCount: groups.length, | ||
| sha256: sha256(JSON.stringify(groups)), |
There was a problem hiding this comment.
The type audit still does not enforce the recorded transformations structurally. This sha256 covers only the recognized assertion-group array, not the full file, and verifyReactDraggableTypes later checks only that each permittedTransformation has a kind and rule. There is no normalized upstream-to-adapted comparison; for typeCompat, required adapted groups even default to the current adapted inventory itself. Deleting or changing an unrecognized statement and regenerating inventories is therefore accepted. Hash the full files, map upstream groups to adapted groups under executable transformations, and reject every unrecorded structural change.
| const resolvedConfig = config ?? readTypeParityConfig(packageRoot, { packageRoot }); | ||
| const upstream = []; | ||
| const adapted = []; | ||
| for (const entry of resolvedConfig.fileDispositions) { |
There was a problem hiding this comment.
Neither compiler project is parsed here, so the required type lanes still lack compiler-program membership verification. The mapped files can remain on disk and in these inventories while a narrowed include in tsconfig.pristine.json or tsconfig.adapted.json causes the corresponding compiler to check no mapped probe. Require every mapped upstream and adapted fixture to belong to its recorded parsed program and add a negative control that excludes an existing file through tsconfig.
| const packageRoot = options.packageRoot | ||
| ? resolve(options.packageRoot) | ||
| : resolve(rootOrPackage, 'packages/react-draggable'); | ||
| const discovered = discoverPackageTests(packageRoot); |
There was a problem hiding this comment.
The exactly-once ledger is not exhaustive for authored type tests. Discovery scans only packages/react-draggable/tests, so the two required port-authored fixtures under typetests/adapted are absent from test-classifications.json and cannot receive an adapted-type disposition. Extend discovery and the ledger to cover both runtime and type-test roots; vendored pristine type programs can retain their upstream disposition separately.
| ] | ||
| } | ||
| ], | ||
| "divergences": [] |
There was a problem hiding this comment.
The structured divergence ledger cannot be empty. status.json and type-parity.json already document consumer-visible differences for React synthetic events versus native mouse/touch events, React class/component and instance-ref surfaces versus function components and nodeRef, and ReactNode children. Record these as manifest divergences with the relevant runtime or type case IDs, rationale, impact, and migration guidance so the parity evidence and published status agree.
|
Thank you for your contribution! This pull request was incorporated into |

Summary
[email protected]without giving up the rootDraggableAPI,DraggableCore, controlled and uncontrolled movement, bounds, grid snapping, SVG transforms, mouse/touch behavior, SSR, or hydration.Why
nodeRef, matching the upstream modern API boundary.Changes
@octanejs/react-draggablepackage, provenance lock, migration docs, release metadata, generated catalogs, playground example, and package-condition support.Related: #548, #550, #555
Session-settled decisions carried from planning: one binding per isolated draft PR (user-directed, over multi-binding batches); exact React public-contract parity (user-approved, over similar-but-different APIs); agent-authored PRs remain draft for maintainer promotion (user-directed, over agent readiness promotion).
Validation
pnpm format:check(targeted changed-file formatting passed; repo-wide formatting was not rerun)pnpm typecheck(pristinetscand adaptedtsrx-tscprojects passed; repo-wide typecheck was not rerun)pnpm test(targeted projects and workflow tests passed; repo-wide test was not rerun)Risk / follow-ups
Provenance
agent-authored)Note
Medium Risk
Large new public drag API with native input, SSR/hydration, and cross-browser behavior, plus export-map changes for core UI packages; mitigated by extensive parity/audit lanes but still stacked on prerequisite PRs per the description.
Overview
Introduces
@octanejs/react-draggableas a port of[email protected](Draggable,DraggableCore, bounds/grid/axis, mouse/touch, SSR/hydration) with React differential, browser, audit, CLI/MCP migration (react-draggable→@octanejs/react-draggable), playground demo, and generated binding/package docs.Packaging and compiler: Publishes executable CommonJS
requireconditions (withbuild:cjs/prepack) foroctane,@octanejs/floating-ui,@octanejs/base-ui, and@octanejs/radixwhile keeping ESM/source-first exports; the new binding uses callable-default CJS. A separateoctanepatch adds compiler-visible descriptor children for bindings that clone/inspect TSЯX children.CI and browsers: Heavy integration browser work splits into Chromium and Firefox matrix jobs, discovers specs via
scripts/discover-heavy-browser-specs.mjs, setsPLAYWRIGHT_BROWSER, and installs WebKit alongside the matrix engine. Dexie’s browser suite switches to sharedlaunchBrowser; root adds a playwright dev dependency.Reviewed by Cursor Bugbot for commit 278a700. Bugbot is set up for automated code reviews on this repo. Configure here.