Repository navigation
fix(ds): two leftovers from the button/input axis renames (TASK-22817) - #3317
Conversation
The BaseInput doc page still seeded its playground with `variant: 'md'`. The prop became `size` in 7b7b955, but `Playground.defaults` is typed `Record<string, any>`, so the typecheck could not see it. The playground therefore opened with no size at all and its select started empty. CopyField still hand-wrote `'4' | '6' | '8'` for the shadow size it forwards to Button. 8c786c9 exported `ShadowSize` for exactly this, so the field now names the same union the prop it feeds is typed with. The set widens by '3', which Button already accepts. No call site changes.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: peanutprotocol/peanut-ui/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Why the
|
Code-analysis diffPainscore total: 8705.18 → 8705.18 (0) 🆕 New findings (1)
✅ Resolved (2)
|
There was a problem hiding this comment.
Chip review — no blocking findings — this is not an approval
Two type-level leftovers from the axis renames, exactly as described: the base-input playground now seeds the real size prop, and CopyField names Button's exported ShadowSize union instead of hand-writing a subset. Verified Button accepts ShadowSize ('3' | '4' | '6' | '8') and CopyField forwards shadowSize to it unchanged, so the widened union adds only a value Button already renders; no call site passes '3'. No runtime behavior changes, no money/auth surface.
Checked clean
- Worktree HEAD matches the supplied head SHA 09fc8d6
- base-input doc page: Playground.defaults now seeds size:'md', matching BaseInputProps.size ('sm'|'md') and the page's select options
- CopyField: shadowSize forwarded verbatim to Button, which accepts ShadowSize; the union widens by '3' only, which Button's buttonShadows map already covers
- No call site passes shadowSize='3' to CopyField, so nothing renders differently
- PR scope: 2 files, 3 insertions, 3 deletions — no runtime, dependency, analytics, or security surface
- CI at this head: no failing checks caused by the PR (typecheck, eslint, format, ds-lint, human-authors, bot-approval green; several jobs still running)
Security review: did not run — this change has no security, privacy or money surface, so it was not asked. This review is one reviewer short.
Third opinion by claude-opus: 0 finding(s), marked with the model name. It answers only product truth, missing tests and the cross-repo contract, so treat its findings as advice.
The usual first reviewer was out of plan, so this review was done by openrouter/z-ai/glm-5.3.
Exact head: 09fc8d6be58d · Context: repo · Took 1m
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
🖼 Visual diff — 4 screens moved7 of 146 shots changed · 139 identical · baseline
job summary · before/after/diff images — artifact Fixture screenshots, no backend. Advisory — this check never blocks a merge. Posted from the default branch by ds-shots-comment.yml; the report it renders is untrusted data. |
|
English · Español · Español (Argentina) · Português (Brasil) After merge: 6f687a0 → 788c488. Capture complete in all locales. |
Follow-up to #3302, which merged before its review fixes were applied. Two leftovers the axis renames left behind.
BaseInput doc page seeded the wrong prop
/dev/ds/primitives/base-inputstill setdefaults={{ variant: 'md' }}. The height axis becamesizein 7b7b955, butPlayground.defaultsis typedRecord<string, any>, so the typecheck never saw the stale name. The playground opened with no size and an empty select. One word.CopyField names the exported union
CopyFieldProps.shadowSizehand-wrote'4' | '6' | '8'for a value it forwards straight toButton. 8c786c9 exportedShadowSizefor exactly this; the field now names it. The set widens by'3', whichButtonalready accepts, so no call site changes and nothing renders differently.Scope
A doc-page default and a type alias. No runtime behaviour, no new dependency, no analytics.
Checks
pnpm prettier --check,npm run typecheckandTZ=UTC npm test(719 suites, 9163 tests) are green locally.A third review item — a restore-only Next build cache on the
press-contractjob — is not in this PR on purpose. The reason is in the first comment below.