feat(onboarding): attach-your-own-vault in the wizard finale - #35
Merged
Conversation
2 tasks
Add POST /amicode/vaults (clone a repo / symlink a local vault dir into the vaults root) and a quiet finale affordance in the onboarding wizard to attach an existing vault. Repo refs (owner/repo, git URL, bare name → harmoniqs/) are primary; local paths with an .amico-vault.toml marker are secondary. Attach success is independent of the amico-vault CLI.
When amico-vault isn't resolvable (a fresh / marketplace user without the amico-ops install), GET /amicode/vaults lists mounts straight off ~/.amico/vaults markers instead of returning cli_not_found — so the tab reflects the personal vault + anything attached. The CLI stays the preferred path (richer git sync info) when present.
jack-champagne
force-pushed
the
local/amicode
branch
from
July 20, 2026 12:59
c05d2e3 to
e9b6951
Compare
jack-champagne
force-pushed
the
feat/onboarding-vault-attach
branch
from
July 20, 2026 13:05
f234cc4 to
c3fd73a
Compare
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.
What
Folds an attach-your-own-vault affordance into the onboarding wizard finale, and adds the write endpoint behind it.
POST /amicode/vaults(server/amicode/vaults.ts+ route inhttpapi/server.ts): clones a repo or symlinks a local vault dir into~/.amico/vaults, soresolveMountStackdiscovers it like any other mount. Refs resolve as:owner/repo/ git URL / bare-name (→harmoniqs/<name>) → clone (primary); an absolute/~/.path with an.amico-vault.tomlmarker → symlink (secondary). Success is independent of theamico-vaultCLI and returns its own{ok,name,kind,path}shape (distinct fromstatus()'s mounts shape).ui/src/amicode/onboarding-wizard.tsx): a quiet, collapsible "Already have a vault? Attach it →" that expands to a ref input + Attach, a ✓-list of attached mounts, and inline errors. Gated behind a new optionalonAttachVaultprop so the component degrades gracefully when unwired.app/src/pages/home.tsx):attachVaulthandler →POST /amicode/vaults, mapping server error codes to human-readable messages; passesonAttachVaultto the wizard.The personal vault itself is created by default on the extension side (amicode sister PR) — this PR is the "bring your own / additional vaults" half.
Test
packages/opencode:bun test test/server/amicode-vaults.test.ts→ 15 pass (new:normalizeRef,sanitizeVaultName,attachVaultincl. local-path symlink,not_a_vault,exists, bad-body).ui/app/opencodetypecheck clean;onboarding-wizard.test.tspasses.$HOME(no.amico) off a local build of this branch:POST /amicode/vaultssymlinks a marker dir into the fresh vaults root (ok:true);not_a_vault/bad_request/existserrors correct; unauthenticated → 401. Built app asset carries the finale affordance.🤖 Generated with Claude Code