Skip to content

Fix Unity plugin icons in released extension#300

Merged
joesobo merged 2 commits into
mainfrom
codex/fix-unity-release-icons
Jul 1, 2026
Merged

Fix Unity plugin icons in released extension#300
joesobo merged 2 commits into
mainfrom
codex/fix-unity-release-icons

Conversation

@joesobo

@joesobo joesobo commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • add generic support for bundled workspace plugin package roots, with packaged VSIX and local monorepo dev-host layouts discovered by manifest instead of plugin name
  • prefer bundled package records over stale installed/global package cache records for the same package or plugin id
  • stage and build bundled plugin manifests/runtimes/assets in the VSIX so released builds can load Unity package behavior without extension-specific Unity imports
  • split changesets across core, extension, and plugin-unity

Root cause

The released VSIX staged Unity assets but the runtime still resolved workspace plugin packages through the user plugin cache. If that cache pointed at an older linked/global Unity package, the released extension could keep loading stale Unity defaults, which explains no icon change and .asset staying square.

A second CI issue came from package:vsix trying to copy packages/plugin-unity/dist before the VSIX job had built that package. Release preparation now derives bundled plugin build filters from release-staged packages/*/dist entries.

The corrected fix keeps plugin identity out of packages/extension runtime code: extension passes generic bundled package roots, core reads CodeGraphy plugin manifests, and the package runtime prefers bundled records over stale installed records.

Validation intent

This validates the product flow as: core is extended through the plugin-api by the Unity plugin package; Unity contributes fileColors/imagePath icon metadata; extension theme/legend/graph resolves plugin icon assets from the plugin package root.

Verification

  • corepack pnpm --filter @codegraphy-dev/core exec vitest run --config vitest.config.ts tests/plugins/packageRuntime.test.ts
  • corepack pnpm --filter @codegraphy-dev/plugin-unity test
  • corepack pnpm --filter @codegraphy-dev/extension exec vitest run --config vitest.config.ts tests/extension/pipeline/plugins/bootstrap.test.ts tests/extension/graphView/groups/defaults/plugin.test.ts tests/extension/graphView/provider/plugin/resources.test.ts
  • cd packages/extension && CODEGRAPHY_VSCODE_PLAYWRIGHT_GREP="Unity plugin icons" corepack pnpm exec playwright test --config playwright.vscode.config.ts
  • corepack pnpm --filter @codegraphy-dev/extension run typecheck
  • corepack pnpm --filter @codegraphy-dev/extension run build:vscode
  • corepack pnpm run test:release
  • /usr/bin/trash packages/plugin-unity/dist && CODEGRAPHY_VSIX_TARGETS=darwin-arm64 corepack pnpm run package:vsix
  • unzip -l artifacts/vsix/codegraphy.codegraphy-5.12.2-darwin-arm64.vsix | rg 'extension/packages/plugin-unity/(codegraphy.json|dist/plugin.js|assets/(unity|icon).svg|package.json)'
  • corepack pnpm run lint
  • corepack pnpm exec tsx scripts/mutation/runSeedJob.ts --package "plugin-unity" --shard "plugin-unity"

Mac Mini visual screenshot validation is running in the existing Unity-icons remote thread.

@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cbfb8ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@codegraphy-dev/core Patch
@codegraphy-dev/extension Patch
@codegraphy-dev/plugin-unity Patch
@codegraphy-dev/mcp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@joesobo joesobo force-pushed the codex/fix-unity-release-icons branch 2 times, most recently from 4b14c30 to cb425b7 Compare July 1, 2026 18:16
@joesobo joesobo force-pushed the codex/fix-unity-release-icons branch from cb425b7 to cbeb8ae Compare July 1, 2026 18:20
@joesobo

joesobo commented Jul 1, 2026

Copy link
Copy Markdown
Owner Author

Follow-up validation/update after cbfb8ba67:

  • Split changesets remain separated across core, extension, and plugin-unity.
  • Added a generic CODEGRAPHY_BUNDLED_PLUGIN_PACKAGE_ROOTS override so acceptance EDH runs can constrain bundled plugin roots per example while packaged/devhost extension builds still discover bundled plugin packages generically.
  • Local checks passed after the CI repair:
    • pnpm --filter @codegraphy-dev/extension exec vitest run --config vitest.config.ts tests/extension/pipeline/plugins/bundledPackages.test.ts tests/extension/pipeline/service/pluginFacade.test.ts tests/extension/pipeline/service/pluginState.test.ts tests/extension/pipeline/service/discoveryFacade.test.ts
    • pnpm --filter @codegraphy-dev/extension run build:vscode
    • CODEGRAPHY_VSCODE_PLAYWRIGHT_GREP="Vue Example" pnpm exec playwright test --config playwright.vscode.config.ts
    • CODEGRAPHY_VSCODE_PLAYWRIGHT_GREP="Unity plugin icons" pnpm exec playwright test --config playwright.vscode.config.ts
    • pnpm --filter @codegraphy-dev/extension run typecheck
    • pnpm --filter @codegraphy-dev/extension run lint
    • pnpm --filter @codegraphy-dev/extension run test:node
  • Mac Mini visual validation passed at cbeb8ae53; screenshot proof was saved locally on the MacBook at /Users/poleski/Desktop/codegraphy-pr300-unity-icons-proof.png.

Mac Mini visual findings: Unity icon images loaded for *.unity, *.prefab, *.asset, *.mat, *.asmdef, and *.inputactions; *.asset is triangle; Unity file graph nodes show Unity icon imagery resolved from packages/plugin-unity/assets/unity.svg.

@joesobo joesobo marked this pull request as ready for review July 1, 2026 18:43
@joesobo joesobo merged commit e3e7e61 into main Jul 1, 2026
35 checks passed
@joesobo joesobo deleted the codex/fix-unity-release-icons branch July 1, 2026 18:44
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