Instance create: fix for disk size updating on image tab switch - #3394
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
david-crespo
commented
Sep 30, 2026
|
|
||
| // back on the project tab, image-3 is still selected and 2 GiB is too small | ||
| await page.getByRole('tab', { name: 'Project images' }).click() | ||
| await expect(diskSizeInput).toHaveValue('10') |
Collaborator
Author
There was a problem hiding this comment.
Without the fix, this fails because the disk size stays on 2.
david-crespo
added a commit
that referenced
this pull request
Oct 1, 2026
Like #3394, pulled out of my work on #3391. Without this, if you submit the disk create form with a size too small for the selected source, and then switch to a smaller source that fits, the "Must be as large as selected…" error stays up until you edit the size again. Adding `deps="size"` to both source pickers revalidates the size whenever the source changes. `deps` is confusingly named because it makes it sounds like source depends on size, but the [docs](https://react-hook-form.com/docs/useform/register) for deps say: > When this field's own validation runs (e.g. via its registered onChange/onBlur), the fields listed in deps will also be re-validated.
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.
Noticed while working on #3391. When you switch from project images to silo images (or vice versa), the disk size value is now updated to fit the disk from the tab you're landing on. Before it was checked against the image from the previous tab.