Skip to content

Fix validate missing selected storage profile.#132

Open
chenkins wants to merge 2 commits intofeature/cipherduck-uvffrom
feature/123-fix-no-storage-profiles
Open

Fix validate missing selected storage profile.#132
chenkins wants to merge 2 commits intofeature/cipherduck-uvffrom
feature/123-fix-no-storage-profiles

Conversation

@chenkins
Copy link
Copy Markdown
Collaborator

@chenkins chenkins commented Apr 3, 2026

Closes #123
Fixes condition in #125 .

@chenkins chenkins requested a review from tobihagemann April 3, 2026 08:50
@chenkins chenkins changed the title Fix condition. Fix validate missing selected storage profile. Apr 3, 2026
@chenkins chenkins enabled auto-merge (squash) April 3, 2026 08:51
@chenkins chenkins added this to the 1.0.0 milestone Apr 3, 2026
@chenkins chenkins added the bug Something isn't working label Apr 3, 2026
@dkocher dkocher requested a review from Copilot April 3, 2026 09:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the Create Vault wizard’s “EnterVaultDetails” rendering logic so the UI correctly reacts to the presence/absence of available storage profiles (and regions), addressing the missing validation flow described in issue #123 / PR #125.

Changes:

  • Replace incorrect backends?.values?.length / regions?.values?.length checks with array length checks in the template.
  • Initialize backends and regions refs as empty arrays instead of null/undefined.
  • Update the “no storage profile available” branch condition to use the new array-based checks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

</div>
<!-- // / start katta modification -->
<div v-else-if="state == State.EnterVaultDetails && ((backends?.values?.length ?? 0) == 0 || (regions?.values?.length ?? 0) == 0)">
<div v-else-if="state == State.EnterVaultDetails && (backends.length == 0 || regions.length == 0)">
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backends/regions now default to empty arrays, but state transitions to EnterVaultDetails before the async storage-profile fetch finishes. That makes this branch render the “no storage profile available” error during normal loading (and also if the fetch fails). Consider keeping the UI in a loading state until storage profiles/regions are loaded (e.g., a storageProfilesLoaded/storageProfilesError flag, or delaying state = EnterVaultDetails until after backend.storageprofiles.get(false) completes), and only show this error when loading finished and the resulting list is actually empty.

Copilot uses AI. Check for mistakes.
Comment thread frontend/src/components/CreateVault.vue
Comment thread frontend/src/components/CreateVault.vue Outdated
@chenkins chenkins disabled auto-merge April 3, 2026 10:17
@chenkins chenkins enabled auto-merge (squash) April 3, 2026 10:17
chenkins and others added 2 commits April 8, 2026 16:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@chenkins chenkins force-pushed the feature/123-fix-no-storage-profiles branch from ae45e69 to e672b9e Compare April 8, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wizard to create new vault allows to continue with no storage profile available

2 participants