Skip to content

fix(init): hide opencode user-scope path from init output#249

Merged
rhuanbarreto merged 2 commits into
mainfrom
claude/dazzling-tharp-a5432e
Apr 29, 2026
Merged

fix(init): hide opencode user-scope path from init output#249
rhuanbarreto merged 2 commits into
mainfrom
claude/dazzling-tharp-a5432e

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Stop printing the absolute opencode agents directory path during archgate init when the plugin is auto-installed
  • The (user-scope) placeholder in the init summary already communicates that the install target is outside the project tree — the full resolved path (e.g. C:\Users\<user>\.config\opencode\agents) was unnecessary noise and leaked the user's home directory into stdout

What changed

src/helpers/init-project.ts — the opencode branch in tryInstallPlugin() no longer sets detail: opencodeAgentsDir() on the success return. The PluginResult is returned with only installed: true and autoInstalled: true, so the init command prints the confirmation message without the path.

Error/fallback paths (cli-not-found, install failure) are unchanged — they still carry the relevant detail for printManualInstructions().

Test plan

  • Run archgate init --editor opencode --install-plugin with opencode on PATH and verify the output shows "Archgate plugin installed for opencode." without an absolute path below it
  • Run archgate init --editor opencode --install-plugin without opencode on PATH and verify the manual-install fallback still prints correctly
  • Existing unit tests pass (bun test tests/helpers/init-project.test.ts tests/commands/init.test.ts)

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 29, 2026

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: bc560f7
Status: ✅  Deploy successful!
Preview URL: https://4762a453.archgate-cli.pages.dev
Branch Preview URL: https://claude-dazzling-tharp-a5432e.archgate-cli.pages.dev

View logs

The opencode auto-install success path was returning the resolved
absolute agents directory as `PluginResult.detail`, which the init
summary then printed to stdout. This leaked the user's home directory
path unnecessarily — the "(user-scope)" placeholder already conveys
that the install target is outside the project tree.

Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
@rhuanbarreto rhuanbarreto force-pushed the claude/dazzling-tharp-a5432e branch from acb6b8f to cf131e9 Compare April 29, 2026 10:06
Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
@rhuanbarreto rhuanbarreto merged commit 7b04f04 into main Apr 29, 2026
10 checks passed
@rhuanbarreto rhuanbarreto deleted the claude/dazzling-tharp-a5432e branch April 29, 2026 10:14
@github-actions github-actions Bot mentioned this pull request Apr 29, 2026
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