feat(vscode): add VSCode extension with embedded server and webview UI#143
Merged
Conversation
Design for integrating hana-cli into VSCode as a native extension with embedded Express server, custom editors for HANA artifacts, and the full Vue UI surfaced as webview panels.
15-task implementation plan covering extension scaffold, server lifecycle, webview integration, custom editors, connection management, CLI installer, build pipeline, and CI/CD.
…hutdown Implements the embedded Express server that powers data operations for Vue webviews. Routes are statically imported via a barrel file so esbuild can bundle them into the extension — no dynamic filesystem discovery needed in the packaged .vsix.
…all/status Adds a new CLI command to manage the hana-cli VSCode extension directly from the terminal. Supports install (from local .vsix or marketplace), uninstall, and status checking. Detects code/codium/code-insiders CLI with cross-platform Windows .cmd wrapper support via cmd.exe invocation.
Two-stage build: TypeScript compiles to out/, then esbuild bundles into a single dist/extension.js for the .vsix package. Includes a resolve plugin to map parent-project route imports and externals for optional dependencies not needed in the extension runtime.
… tests Add @vscode/test-electron test runner, Mocha-based suite discoverer, and initial activation tests that verify the extension is present and all commands are registered. Uses a separate tsconfig.test.json to compile test files without affecting the main build output structure.
- Switch all editors to ensureServer-first pattern (eliminates port=0 race condition) - Fix route paths to kebab-case matching Vue router (inspect-table, calc-view-editor, etc.) - Add chromeless flag to custom editors (hides shell/nav in artifact inspectors and calc view) - Add CORS middleware for webview-to-localhost fetch requests - Use HANA_CLI_* env vars for connection injection (avoids VCAP_SERVICES deletion) - Add base layout CSS (height:100%, flex column) matching Vue app's index.html - Enhance esbuild config with route bundling plugins for VSCode-specific build - Improve connection resolver with CAP binding support and status bar feedback - Remove stale app/vue/dist hashed assets (replaced by new Vite build output)
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
dist-vscode/bundle with stable chunk names for webview consumptionhana-cli vscode install/uninstall/statusfor managing the extensionKey Design Decisions
vscode-resourceorigin; server allows*for local-only trafficdist/extension.jswith custom plugins for route resolutionTest plan
npm run test:integration)npm run test:e2e)