Repository navigation
feat(input-otp): add exact binding - #510
jonkwheeler wants to merge 30 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Pin the pristine React oracle and require adapted DOM, SSR, Chromium, differential, and type lanes through the repository parity harness. Exercise the complete upstream browser identity set and keep shared manifest integrity evidence current.
Document and catalog the package, add a controlled numeric playground example and patch changeset, and cover the packed source consumer without React. Refresh generated package, status, parity-gap, CLI, eval, and shared integrity artifacts.
Preserve native input callbacks and selection side effects across accepted, rejected, and deletion edits. Make the adapted upstream oracle fail closed with a stable per-case behavior ledger, physical-mutation negative control, and retry-boundary cleanup coverage.
Apply the repository Prettier configuration and keep multiline type-error assertions attached to their invalid properties.
bc25d5f to
590ad6c
Compare
Keep marker enforcement on executable repository tests while allowing byte-verified vendored fixtures to preserve upstream source exactly.
Forward object, callback, and nested array refs through Octane's native host ref composition.
Integrate upstream main eval corpus and hook-form parity baseline while keeping the input-otp binding work; refresh generated inventories. Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
Regenerate parity lockfile hashes, bindings status, and package inventory. Co-authored-by: Cursor <[email protected]>
Resolve inventory and root scripts while keeping input-otp coverage.
Regenerate lockfile hashes and Vitest evidence for input-otp.
Resolve inventory and root scripts while keeping input-otp coverage.
Regenerate lockfile hashes and Vitest evidence for input-otp.
|
@leonidaz Ready for the |
|
READY FOR REVIEW |
|
REVIEW WITHDRAWN Merging origin/main to clear conflicts before re-requesting review. |
Co-authored-by: Cursor <[email protected]>
|
READY FOR REVIEW |
| "lanes": [ | ||
| { | ||
| "id": "input-otp-pristine-browser", | ||
| "type": "pristine-upstream", |
There was a problem hiding this comment.
Not pristine execution: This lane labels a rewritten Vitest file as pristine-upstream, and its own note/ledger permits Playwright→Vitest, module-consolidation, and platform-expression transformations. The repository contract requires pristine evidence to run the vendored upstream suite unchanged with its original runner; this translated file belongs in the adapted lane. Add a real pristine Playwright execution of the vendored specs, then keep the translated Octane specs as the one-for-one adaptation.
There was a problem hiding this comment.
Not pristine execution: Add a real pristine Playwright execution of the vendored specs, then keep the translated Octane specs as the one-for-one adaptation.
Needs a human call before I keep hacking this in the babysit loop.
What I verified:
- The current
input-otp-pristine-browserVitest file is an adapted React rewrite (Playwright→Vitest, consolidated module, changed interactions such as max-length overwrite). It should not stay typed aspristine-upstream. - Running the byte-exact vendored
@playwright/testspecs against a Vite React harness gets most cases green, butpressSequentially('1234567')does not exercise upstream overwrite the way discretekeyboard.pressdoes (selection ends[6,6]/ value stays123456). The Vitest rewrite already changed that case to wait for[5,6]thenpress('7'), which is exactly the non-pristine adaptation the review calls out. - A faithful pristine lane likely needs the vendored Next.js
apps/testhost (or another host proven to match upstream CI), not only a Vite stand-in.
Options:
- Next.js pristine host — temp install of vendored
apps/test+upstream/npm, run upstream Playwright config/chromium, inventory passes (incl. CI-skipped selections as skipped). Lean: this matches “original runner + unchanged suite.” - Accept Vite pristine host + document the one interaction gap — only if maintainers agree a Vite host is still “pristine” when one upstream interaction needs a known Playwright
pressSequentiallylimitation workaround (I do not lean this; it fights the contract). - Downgrade/reclassify the Vitest React rewrite as adapted/browser evidence now, and land the Next.js pristine lane in a fast follow so this PR is not blocked on the heavier host bring-up.
Lean: (1), or (3) then (1) immediately after if you want the ownership/CI fixes landed first without waiting on Next install in this pass.
Leaving this thread open until you pick.
Co-authored-by: Cursor <[email protected]>
Add testExecution react-parity ownership for the input-otp Vitest projects and remove package-specific exclusions/matrix paths from ci.yml so manifest discovery drives execution. Refresh lockfile integrity hashes after the main merge. Co-authored-by: Cursor <[email protected]>
|
Thank you for your contribution! This pull request was incorporated into |
Summary
[email protected]as@octanejs/input-otpwith the exact public runtime and React-free type surfaceUpstream
[email protected]81ccdb48c010d800b24942aa231909f0c971b1caVerification
main; post-rebase parity generation/check/negative controls passedProvenance
agent-authored)Note
Medium Risk
New user-input component with non-trivial selection, paste, and password-manager geometry behavior, but risk is mitigated by extensive Chromium, differential, and provenance gates rather than changes to core auth or data paths.
Overview
Introduces
@octanejs/input-otp, a source-compatible Octane port of[email protected]so apps can swap the dependency/import without changing the public API (OTPInput, context, regexp helpers, and types).The implementation keeps upstream’s single native input model: projected slots via render prop or
OTPInputContext, pattern/maxLengthfiltering, selection and keyboard editing, paste/pasteTransformer,onComplete, password-manager badge displacement, injected autofill CSS, and SSR-safe markup. Octane-specific seams are limited to nativeonInputinternally (publiconChange(newValue)unchanged) and ref-as-prop instead offorwardRef.Evidence and integration: byte-pinned
upstream/source and npm artifacts (prettier-ignored),audit/inventories andverify-provenance.mjs, andreact-parity.jsonlanes for pristine React Chromium (15 cases, including selection cases upstream skips in CI), adapted DOM/hydration/SSR, real Chromium (18), differential vs React, and type probes. Docs/catalog (bindings-status,packages.md, CLI data),status.json, README, implementation plan, and a patch changeset are included; Vitest projects wire the new test suites into the global parity harness.Reviewed by Cursor Bugbot for commit 2b1b518. Bugbot is set up for automated code reviews on this repo. Configure here.