Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #43241 +/- ##
=======================================
Coverage 88.52% 88.52%
=======================================
Files 5184 5184
Lines 326028 326028
Branches 65435 65435
=======================================
Hits 288621 288621
Misses 32115 32115
Partials 5292 5292
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@iamjoel, could you take a look when you have time? At The verification already recorded in the description includes the zero case failing before the fix, all 16 focused tests passing afterward, and a real workflow run returning |
|
@iamjoel @zxhlyh Following up on this small required-Number validation fix at unchanged head 6580158. Current-head Main CI Pipeline remains green, including the Web tests, browser checks, builds and E2E. The zero/empty-input regression evidence is documented in the description. Could you review when convenient? No unresolved inline feedback is pending. |
Summary
Fixes #43240.
Workflow Test Run rejects
0for a required Number input with a required-field error. The NumberField migration in #42405 emits numeric values; the shared validator's truthiness check accepted the previous string"0"but rejects numeric0.Allow numeric zero through the required-input check. Add regression coverage using the real validation hook for zero, positive/negative numbers, string
"0", empty values, and an unchecked required checkbox. Existing text and file-upload checks remain covered.Validation
Verified on current main
a4f949f173718974b0379dd0db8cf4401efaf8f8plus this change:vp run -w check: passed (0 errors; 1,580 existing warnings across the repository).vp staged: passed.nand no default now runs withn = 0, reports success, and returns{"result": 0}. Clearing the field still shows the required-field error. The issue includes the importable DSL and the original reproduction (0rejected,1succeeds).Focused test command, from
web/:vp test run --project unit app/components/base/chat/chat/__tests__/check-input-forms-hooks.spec.tsxScreenshots
No layout changes. Browser-verified behavior:
0showsn必填("n is required") and blocks the run.n: 0and outputresult: 0.Checklist
vp stagedand the completevp run -w checkpassed.make lint && make type-check: not run; no backend code changed.From Codex