Don't reset submit button loading state right before nav - #3345
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
david-crespo
commented
Aug 21, 2026
| onDismiss={() => { | ||
| setCreateModalOpen(false) | ||
| createNic.reset() // clear stale error state | ||
| }} |
Collaborator
Author
There was a problem hiding this comment.
Lack of reset() here was a bug, uncaught in a previous PR where I tried to fix these missing resets.
david-crespo
force-pushed
the
form-loading-success
branch
from
August 28, 2026 20:51
7371d71 to
87d6ad0
Compare
david-crespo
force-pushed
the
form-loading-success
branch
from
August 28, 2026 21:27
87d6ad0 to
e36e8da
Compare
david-crespo
added a commit
that referenced
this pull request
Aug 28, 2026
Fixes two bugs found while doing #3345: 1. **Silent attach failure in the create-then-attach flow.** In the unlikely event you create a disk from the storage tab and the subsequent attach call fails (e.g., the instance started in the meantime), there was no visible error: the error only rendered inside the attach modal, which isn't open anymore. You'd get the "Disk created" toast but the disk just wouldn't be attached. Now it shows an error toast. 2. **Stale error leaking between modal uses.** In that failure scenario, the error stuck to the shared mutation, so the *next* time you opened the "Attach existing disk" modal, it displayed the old error from the create flow before you'd done anything. Now the attach modal's mutation is its own, created fresh on each open. Moving the mutation inside its own component means we don't have to do `reset()`s to avoid holding onto state across different openings of the attach modal.
david-crespo
added a commit
to oxidecomputer/omicron
that referenced
this pull request
Aug 29, 2026
oxidecomputer/console@ab7faf6...46f3fd8 * [46f3fd84](oxidecomputer/console@46f3fd84) oxidecomputer/console#3352 * [a6b03812](oxidecomputer/console@a6b03812) oxidecomputer/console#3357 * [b402ebbd](oxidecomputer/console@b402ebbd) oxidecomputer/console#3319 * [b9cea7ea](oxidecomputer/console@b9cea7ea) oxidecomputer/console#3346 * [44646771](oxidecomputer/console@44646771) oxidecomputer/console#3345 * [9e4d3206](oxidecomputer/console@9e4d3206) oxidecomputer/console#3356 * [12edea0f](oxidecomputer/console@12edea0f) oxidecomputer/console#3355 * [21d7c52d](oxidecomputer/console@21d7c52d) oxidecomputer/console#3330 * [dd44146d](oxidecomputer/console@dd44146d) oxidecomputer/console#3353 * [d44615bc](oxidecomputer/console@d44615bc) oxidecomputer/console#3350 * [4f92755b](oxidecomputer/console@4f92755b) oxidecomputer/console#3337 * [b2c28c7d](oxidecomputer/console@b2c28c7d) oxidecomputer/console#3344 * [950767c0](oxidecomputer/console@950767c0) oxidecomputer/console#3343 * [7cd18ad2](oxidecomputer/console@7cd18ad2) oxidecomputer/console#3342 * [5e1f7673](oxidecomputer/console@5e1f7673) oxidecomputer/console#3336 * [37d98e31](oxidecomputer/console@37d98e31) oxidecomputer/console#3332 * [a842fbe7](oxidecomputer/console@a842fbe7) oxidecomputer/console#3335 * [218f3c0f](oxidecomputer/console@218f3c0f) oxidecomputer/console#3334 * [ff240db0](oxidecomputer/console@ff240db0) oxidecomputer/console#3333 * [dfa45c53](oxidecomputer/console@dfa45c53) oxidecomputer/console#3331
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.
Noticed while doing #3344. Form submit button loading state is true only when the mutation
isPending. But there's a brief moment after the mutation completes but before the success nav happens where that's false and the button is on screen. What that looks like is the button flipping back to clickable right before the nav. That's stupid, so I gave every button where it makes senseloading={isPending || isSuccess}. There's some risk we could have a form where that is not appropriate (and there are a couple already — seecreateNicon the instance networking tab) but it's very easy for agents to get it right. I added a note to AGENTS.md about it.Before
2026-08-21-project-submit-loading.mp4
After
2026-08-21-project-submit-loading-fixed.mp4