Skip to content

fix: resolve startup toast version detection for local and cached installs#3317

Open
idoall wants to merge 1 commit intocode-yeongyu:devfrom
idoall:codex/fix-startup-toast-version-detection
Open

fix: resolve startup toast version detection for local and cached installs#3317
idoall wants to merge 1 commit intocode-yeongyu:devfrom
idoall:codex/fix-startup-toast-version-detection

Conversation

@idoall
Copy link
Copy Markdown

@idoall idoall commented Apr 10, 2026

Summary

  • resolve startup toast version detection when OpenCode stores plugin metadata under versioned cache directories
  • fall back to config-dir node_modules installs when cache metadata is not present in the legacy location
  • recognize project-root opencode.json during auto-update checker config discovery so local file:// plugin installs are detected correctly

Testing

  • bun test src/hooks/auto-update-checker/checker/cached-version.test.ts src/hooks/auto-update-checker/checker/plugin-entry.test.ts src/hooks/auto-update-checker/constants.test.ts

Summary by cubic

Fixes startup toast version detection so the correct plugin version is shown for local installs, versioned caches, and user-config installs.

  • Bug Fixes
    • Enumerates CACHE_DIR for versioned cache dirs (e.g., oh-my-openagent@latest) and reads package.json from node_modules or the package root.
    • Falls back to user config node_modules when cache entries are missing.
    • Prefers project-root opencode.json/opencode.jsonc over .opencode/opencode.json to detect local file:// plugins.
    • Supports both oh-my-opencode and oh-my-openagent during version resolution.

Written for commit da0a006. Summary will update on new commits.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

@idoall
Copy link
Copy Markdown
Author

idoall commented Apr 10, 2026

I have read the CLA Document and I hereby sign the CLA

@idoall idoall force-pushed the codex/fix-startup-toast-version-detection branch from 2dfb4e3 to da0a006 Compare April 10, 2026 14:12
github-actions bot added a commit that referenced this pull request Apr 10, 2026
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: The PR expands version detection to support versioned cache directories and project-root configs with robust error handling and tests, posing no regression risk.

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