Repository navigation
Skip eager number updates that cause field rewrites - #3373
Merged
Merged
Conversation
When we resolved the number field committing in #3282 to not be so lazy, it became not lazy enough! In particular, min and max values would be applied while a user was still typing, which was far too intrusive. The solution is to check if react-aria would cause any changes to the input value on commit, and only force a commit when it's a true no-op on the input string. Resolves #3372
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Chromium runs seem a little flaky here, I imagine this is race conditions between re-renderings and keystrokes.
These never fail in this way locally so I'm just dancing with CI at this point.
fakemonster
commented
Sep 8, 2026
|
|
||
| await input.click() | ||
| await userEvent.type(input, '20') | ||
| await expect.element(input).toHaveValue('20') |
Contributor
Author
There was a problem hiding this comment.
pausing here to check that this is 20 is really just to avoid race conditions. locally, this would fail on chromium if i did userEvent.type(input, '20.1'). the end result would be "201". completely unreproducible irl
david-crespo
approved these changes
Sep 8, 2026
david-crespo
added a commit
to oxidecomputer/omicron
that referenced
this pull request
Sep 12, 2026
oxidecomputer/console@700ff8b...96092fc * [96092fcc](oxidecomputer/console@96092fcc) oxidecomputer/console#3383 * [fc3d969e](oxidecomputer/console@fc3d969e) oxidecomputer/console#3380 * [cc7ab241](oxidecomputer/console@cc7ab241) oxidecomputer/console#3377 * [c187b75c](oxidecomputer/console@c187b75c) oxidecomputer/console#3376 * [add81de6](oxidecomputer/console@add81de6) oxidecomputer/console#3382 * [3a4ae2a6](oxidecomputer/console@3a4ae2a6) oxidecomputer/console#3320 * [4d1215e2](oxidecomputer/console@4d1215e2) oxidecomputer/console#3371 * [7b434ba9](oxidecomputer/console@7b434ba9) oxidecomputer/console#3374 * [915d68a0](oxidecomputer/console@915d68a0) oxidecomputer/console#3373 * [fb929929](oxidecomputer/console@fb929929) oxidecomputer/console#3369 * [e7ee1bbe](oxidecomputer/console@e7ee1bbe) oxidecomputer/console#3368 * [0a4aca0b](oxidecomputer/console@0a4aca0b) oxidecomputer/console#3367
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When we resolved the number field committing in #3282 to not be so lazy, it became not lazy enough! In particular, min and max values would be applied while a user was still typing, which was far too intrusive. The solution is to check if react-aria would cause any changes to the input value on commit, and only force a commit when it's a true no-op on the input string.
Resolves #3372