Skip to content

Fix macOS extension discovery, sim warning and vdev footer; document Codex (v1.30.1) - #10

Merged
asbis merged 1 commit into
masterfrom
claude/project-analysis-distribution-a3b8e0
Oct 13, 2026
Merged

asbis merged 1 commit into
masterfrom
claude/project-analysis-distribution-a3b8e0

Conversation

@asbis

@asbis asbis commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Summary

Three bugs found while testing the published @shapeitup/[email protected] from an empty npm cache, plus Codex setup docs.

Fixes

  • macOS: the MCP server and the VS Code extension never found each other. The server hardcoded ~/.config/Code/User/globalStorage/... on every non-Windows OS. VS Code on macOS uses ~/Library/Application Support/Code/..., so the extension never saw the server's heartbeat. Live viewer sync, set_render_mode, toggle_dimensions and workspace-root detection silently did nothing on Mac. On the maintainer's machine there were 114 orphaned mcp-server-heartbeat-*.json files in ~/.config, and the extension's heartbeat lived only under ~/Library.
    • resolveGlobalStorageDir() in subscriber-bus.ts follows VS Code's rules per OS (~/Library/Application Support, APPDATA, XDG_CONFIG_HOME).
    • It checks Code, Cursor, Code - Insiders, VSCodium and Windsurf, and picks the editor whose extension heartbeat is newest. Directory existence alone proves nothing, because the server creates the directory itself.
    • tools.ts reuses the result instead of its own copy of the path.
    • Limitation: with the extension running in two editors at once, only the more recently active one sees the server.
  • Every render warned Import "sim" will always be undefined (including the README's own example). The warning filters in engine.ts and viewer-provider.ts predated sim. Both now call isOptionalReexportWarning() from @shapeitup/shared, and bundle-spec.test.ts fails if the wrapper gains an export the filter doesn't cover.
  • Published builds signed tool results [shapeitup mcp vdev …]. The version probe used __dirname, which doesn't exist in the ESM bundle. It now uses process.env.SHAPEITUP_MCP_VERSION, which esbuild bakes in, as serverInfo already did.

Docs

  • Codex setup in README.md, packages/mcp-server/README.md, INSTALL.md and shapeitup.dev: codex mcp add, then startup_timeout_sec = 60 and tool_timeout_sec = 180.
    • Codex defaults are 10 s to start and 60 s per tool (learn.chatgpt.com/docs/extend/mcp).
    • A cold npx start measured 34 s, and render_preview itself allows up to 60 s.
    • The skill goes in ~/.agents/skills/shapeitup/, Codex's user-level skills directory.

Other

  • CI now runs the @shapeitup/shared tests (163 tests, including the new one). They passed locally but never ran in CI.
  • Version 1.30.1 for the extension, mcp-server and the plugin entry, with a CHANGELOG entry.

Follow-up, not in this PR

engine.ts and viewer-provider.ts still inline their own copies of the synthetic wrapper instead of calling buildSyntheticShapeEntry().

Test plan

  • pnpm lint
  • pnpm build
  • pnpm test: 65 files, 1231 tests pass
  • New tests: resolveGlobalStorageDir (macOS / Windows / Linux + XDG paths, picks the editor by heartbeat) and isOptionalReexportWarning
  • Ran the built dist/index.js on macOS with a client that discovers the server the way extension.ts does, by reading mcp-server-heartbeat-<pid>.json from ~/Library/Application Support/Code/...:
    • the heartbeat landed there and not in ~/.config
    • set_render_mode was delivered to the subscriber
    • create_shape rendered with no sim warning
    • the footer read v1.30.1
    • the heartbeat was removed on exit
  • Not done: a live check with a real VS Code window running the extension

🤖 Generated with Claude Code

- On macOS the MCP server and the VS Code extension never found each
  other: the server hardcoded ~/.config/Code/... while VS Code keeps
  globalStorage under ~/Library/Application Support/Code/.... The path
  now follows VS Code's rules per OS (APPDATA, XDG_CONFIG_HOME) and picks
  Cursor / Insiders / VSCodium / Windsurf when the extension ran there.
- Every render warned `Import "sim" will always be undefined`: both
  bundlers' filters predated `sim`. They now share one list in
  @shapeitup/shared, with a test against the wrapper.
- Published builds signed tool results `vdev`: the version probe used
  __dirname, which the ESM bundle doesn't have. Use the baked-in version.
- Codex setup in README, the npm README, INSTALL.md and the website,
  with startup_timeout_sec = 60 and tool_timeout_sec = 180 (Codex
  defaults: 10 s / 60 s; a cold npx start took 34 s).
- CI runs the @shapeitup/shared tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shapeitup-landing Ready Ready Preview Oct 12, 2026 8:57pm UTC

@asbis
asbis merged commit 49fac88 into master Oct 13, 2026
4 checks passed
@asbis
asbis deleted the claude/project-analysis-distribution-a3b8e0 branch October 13, 2026 21:24

This branch was successfully deployed

1 active deployment
Preview — adbf9958 Deployed Oct 12, 2026 by vercel[bot]
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