fix(plugin): restart a server left on a retired plugin root
A plugin update applied mid-session (/plugin followed by /reload-plugins) fires no SessionStart, so the bootstrap's version handover never runs and the dashboard server keeps executing a cache directory Claude Code has already discarded. /ccam-open then rebuilt the bundle from the new root against that old server, and the new bundle called routes the old server never had: /api/lanes/pipeline-stats fell through to /:id and rendered "lane not found", /api/workflows/skill-usage fell through to the SPA catch-all and broke JSON.parse on the returned HTML. Both Workflows panels showed an error while the code they needed was sitting on disk. plugin-open now re-runs bootstrap when the live server's recorded pluginRoot differs from the current one, or when no server is live at all. Bootstrap already owns the stop/start and the dependency install the new root may need, so this only restores the trigger that a mid-session update skips.
This commit is contained in:
@@ -12,8 +12,12 @@ node "${CLAUDE_PLUGIN_ROOT}/scripts/plugin-open.js" --force
|
||||
```
|
||||
|
||||
Install + build takes a few minutes if the client toolchain isn't already
|
||||
installed; otherwise the rebuild itself takes ~10-15s. No server restart is
|
||||
needed — the server already serves from that directory.
|
||||
installed; otherwise the rebuild itself takes ~10-15s. The server serves from
|
||||
that directory, so it usually needs no restart — but if it is down, or still
|
||||
running from a plugin root a mid-session `/plugin` update retired, the command
|
||||
re-runs bootstrap first and prints `Server restarted on the current plugin
|
||||
version.` (without it, the fresh bundle would call routes that old server
|
||||
never had).
|
||||
|
||||
Then help the user open it:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user