You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(components): preserve exponent values in the row editor - #2956
The Explorer number input accepts scientific notation, but entering 1e6 currently changes it to 16 before Save builds the transaction. The shared number parser removes the exponent marker as though it were formatting.
Parse complete finite numbers before the existing formatted-number fallback. This also preserves values that JavaScript serializes with an exponent. Empty/null handling and conversions such as $1,234.50 stay intact.
Adds 15 parser tests and connects them to test:ci through the existing Vitest dependency. No new dependency or public barrel export.
Validation:
Native behavior/build run: 8 new regressions fail on the old parser; all26 existing/new component tests pass after the fix. Component types/build, six unchanged browser cases and seven Add/Edit/type-conversion/null/required checks pass. Browser tests exercise actual UI and SDK transaction construction, with the write boundary captured; no stored database write was made.
Clean source formatting comparison: changed files and all tracked component files pass. The official whole-client check-format exits1 on the same17 sandbox files in both original and candidate. Its full output is identical after normalizing checkout paths; those existing warnings are not fixed here. Neither workflow is claimed entirely green.
Codex generated the implementation, tests and this description; a separate Sol-high pass reviewed the patch and the native results were checked before submission.
No actionable comments were generated in the recent review.
Walkthrough
The change exports parseFieldValue and adds an initial finite-number conversion for number fields. Tests cover numeric inputs, currency-formatted strings, empty strings, and null. The components package adds a test:ci script that runs Vitest.
Changes: Number field parsing
Layer / File(s)
Summary
Number field parsing and validation client/packages/components/src/components/explorer/edit-row-dialog.tsx, client/packages/components/src/components/explorer/__tests__/edit-row-dialog.test.ts, client/packages/components/package.json
parseFieldValue now returns finite numeric conversions for nonempty number-field inputs before using its existing fallback. Tests cover numeric inputs, currency-formatted strings, empty strings, and null. The package adds a test:ci script that runs Vitest.
Exponent values such as 1e6 are now preserved when editing number fields, and formatted values still parse. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the row editor's number parsing now keeps exponent values such as 1e6 instead of altering them. It uses the fix() conventional-commit prefix and a specific scope. It m…
Description check
The description states the bug: entering 1e6 in the Explorer number input becomes 16 because the shared number parser strips the exponent marker. It explains the fix, which parses complete finite numb…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: the row editor's number parsing now keeps exponent values such as 1e6 instead of altering them. It uses the fix() conventional-commit prefix and a specific scope. It matches the parseFieldValue change and the parser tests in the changeset, and it matches the PR objectives.
Full details: Description check
Explanation
The description states the bug: entering 1e6 in the Explorer number input becomes 16 because the shared number parser strips the exponent marker. It explains the fix, which parses complete finite numbers before the formatted-number fallback. It also lists the 15 added parser tests, the test:ci wiring, and the validation runs. This matches the edit-row-dialog.tsx and test file changes in the raw summary.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Explorer number input accepts scientific notation, but entering
1e6currently changes it to16before Save builds the transaction. The shared number parser removes the exponent marker as though it were formatting.Parse complete finite numbers before the existing formatted-number fallback. This also preserves values that JavaScript serializes with an exponent. Empty/null handling and conversions such as
$1,234.50stay intact.Adds 15 parser tests and connects them to
test:cithrough the existing Vitest dependency. No new dependency or public barrel export.Validation:
check-formatexits1 on the same17 sandbox files in both original and candidate. Its full output is identical after normalizing checkout paths; those existing warnings are not fixed here. Neither workflow is claimed entirely green.Codex generated the implementation, tests and this description; a separate Sol-high pass reviewed the patch and the native results were checked before submission.