Repository navigation
Show core/server/webui versions in the standalone browser shell - #44
Merged
Merged
Conversation
README's own "Versioning" section already called for this: package versions, especially core, should be shown separately when the UI displays build information. Adds a token-gated GET /api/versions endpoint (core+server, read from each package's own package.json) and bakes webui's own version into the browser bundle at build time (esbuild define, since the browser can't read package.json at runtime). Standalone-only: withheld under the VS Code local-server embed signal, since that host already shows its extension version via VS Code's own Extensions view. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…on-display # Conflicts: # README.md
CI's "Extension integration and package" job failed: extension activation threw a TypeError from createRequire(import.meta.url) inside core/src/version-info.ts. Root cause: both core and server are bundled transitively into the VS Code extension's CJS dist/extension.js (core via its wildcard index export, server for the optional local-server mode) — import.meta.url resolves to undefined in that bundle, and the eager top-level const evaluated the broken call at import time regardless of whether the extension used it (it never does). Same defect existed in server.ts's SERVER_VERSION, initially masked because the first crash aborted the integration suite before that test ran. Fixed by making both getCoreVersion() and getServerVersion() lazy, cached functions instead of top-level constants — the extension pulls both modules in but calls neither, so the broken path never executes there. Re-ran the real Extension Host suite locally: 6/6 passing, including the previously-hidden second failure. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…on-display # Conflicts: # README.md
…on-display # Conflicts: # README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
README.md's own "Versioning" section already called for this: package versions, especiallycore, should be shown separately when the UI displays build information. Nothing did until now.GET /api/versionson the server, returningcore+serverversions read from each package's ownpackage.json(createRequire, not hardcoded).webui's own version is baked into the browser bundle at build time via an esbuilddefine(__OPENSPEC_UI_WEBUI_VERSION__) — the browser has no filesystem access to read its ownpackage.jsonat runtime.host-embed.tssignal) — that host already shows its own extension version via VS Code's Extensions view.Test plan
npm run verify(typecheck/lint/english-policy/test) passes repo-wideCORE_VERSIONmatches its ownpackage.json;GET /api/versionsreturns real core+server versionstsx packages/server/src/cli.ts) against a temp workspace + real authenticatedcurlof/api/versions— returned{"core":"0.18.1","server":"1.7.1"}, matching the bumped versions exactlyesbuildclient build — confirmed1.8.1andopenspec-shell-version-footerboth present in the builtdist/app.jsopenspec change validate --strict standalone-version-displaypasses🤖 Generated with Claude Code