Skip to content

fix(vault): open pre-v0.4.0 external vaults - #420

Merged
jahvon merged 1 commit into
mainfrom
fix/vault-list-resilience
Jul 27, 2026
Merged

fix(vault): open pre-v0.4.0 external vaults#420
jahvon merged 1 commit into
mainfrom
fix/vault-list-resilience

Conversation

@jahvon

@jahvon jahvon commented Jul 27, 2026

Copy link
Copy Markdown
Member

Follow-up to #419. Two bugs that together made the desktop's vault dropdown come up empty and disabled.

An external vault created before v0.4.0 cannot be opened

Those configs have no storage_path, and NewExternalVaultProvider now requires one. The default was applied when creating a vault but not when opening one, so every pre-existing external vault broke on upgrade:

$ flow vault list --output json
ERR Vault error Klipster - invalid configuration: external vault "Klipster" needs a storage path for its link registry
(no output, non-zero exit)

applyExternalDefaults now runs on both paths.

One unopenable vault hid every other one

PrintVaultList called Fatalf on the first vault it could not open, so a single bad vault produced no output at all rather than one bad row. The TUI list view did the same via NewErrorView.

A vault that will not open is now listed with an error field, and the rest still load. This matters beyond the bug above — a missing key env var or a revoked age identity would have blanked the whole list the same way.

Verified

Against a real config carrying a pre-v0.4.0 external vault: it opens cleanly once the default applies, and all four vaults list.

Against an isolated config with a vault broken in a way defaults cannot repair: it shows as type=unknown with its error while the healthy vault still lists.

broken     type=unknown      error=invalid configuration: a get command template is required...
healthy    type=unencrypted  error=

0 issues from golangci-lint v2.5.0; tests pass.

🤖 Generated with Claude Code

…l not

An external vault created before the link registry existed has no
storage_path in its saved config, and NewExternalVaultProvider now
requires one. The default was only applied when creating a vault, not
when opening one, so every such vault failed to open after upgrading.

Worse, `vault list` called Fatalf on the first vault it could not open,
so a single bad vault produced no output at all. In the desktop that
surfaced as an empty, disabled vault dropdown with no indication why.

A vault that cannot be opened is now listed with an `error` field and the
rest still load. Verified against a real config carrying an old external
vault, and against a vault broken in a way defaults cannot repair.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/vault/vault.go 40.00% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@jahvon jahvon changed the title fix(vault): open pre-v0.4.0 external vaults, and survive one that will not fix(vault): open pre-v0.4.0 external vaults Jul 27, 2026
@jahvon
jahvon merged commit d7cdb38 into main Jul 27, 2026
15 checks passed
@jahvon
jahvon deleted the fix/vault-list-resilience branch July 27, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant