fix(vscode): pre-fill artifact name and enable type-ahead in webview#183
Merged
jung-thomas merged 1 commit intoJul 14, 2026
Conversation
Two related artifact-inspector bugs in the VS Code extension: 1. Clicking an .hdbtable/.hdbview/etc. opened the inspector but left the object-name input empty. The extension posted an `openArtifact` message that no Vue component consumed. Fix: pass the name as a route query param the views already read (e.g. /inspect-table?table=NAME), matching how the browser UI navigates. Covers all artifact kinds. 2. Type-ahead suggestions never appeared in webview inputs. useSuggestions fetched with relative URLs, which resolve against the vscode-webview:// origin instead of the http://localhost:<port> server. Fix: prefix fetches with getAdapter().getApiBaseUrl(), matching useHanaApi. Also cut release 4.202607.1 (via scripts/prepare-release.js) documenting these fixes plus the unreleased subfolder connection-resolution work and `vscode status` update-check from PR #182. Tests: new useSuggestions vitest (TDD red->green); full vue suite 51/51.
ff59004
into
fix/vscode-subfolder-connection-resolution
8 checks passed
jung-thomas
added a commit
that referenced
this pull request
Jul 14, 2026
…02607.1 (#184) Re-lands PR #183 onto main. #183 was merged into its stacked base branch (fix/vscode-subfolder-connection-resolution) rather than main, so these changes never reached main. - artifactInspector.ts: pass artifact name as a route query param the Vue views already read (/inspect-table?table=NAME), fixing the empty input - useSuggestions.ts: prefix fetches with getAdapter().getApiBaseUrl() so type-ahead works in the vscode-webview:// origin - release 4.202607.1 (version bumps + CHANGELOG) via prepare-release.js Co-authored-by: Thomas Jung <12159356+jung-thomas@users.noreply.github.com>
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.
Problems
Two related bugs in the VS Code extension's artifact inspectors (reported after testing #182):
Object name not passed to the input. Clicking an
.hdbtable/.hdbmigrationtable(and other artifact files) opened the inspector but left the name input empty. The extension posted anopenArtifactmessage that no Vue component consumed, and opened the view with no query params.No type-ahead completion. Typing in the webview inputs (schema/table/…) surfaced no suggestions.
useSuggestionsfetched with relative URLs, which in the webview resolve against thevscode-webview://origin instead of thehttp://localhost:<port>server, so the requests never reached it.Both are extension↔webview integration mismatches with the browser assumptions.
Fixes
artifactInspector.ts— pass the artifact name as a route query param the target view already reads (e.g./inspect-table?table=NAME), matching how the browser UI navigates (Functions.vue→query: { function, schema }). Added a per-kindqueryKeymapping; covers table/view/function/procedure/synonym/role/sequence. Removed the deadopenArtifactpost.useSuggestions.ts— prefix both fetches withgetAdapter().getApiBaseUrl()(same pattern asuseHanaApi). Safe in the browser too, where it returnswindow.location.origin.Testing
app/vue/src/composables/__tests__/useSuggestions.test.ts— 2 tests (TDD red→green): asserts requests are prefixed with the adapter base URL and name-field mapping works.changeLogtest green..hdbtablepre-fills the name and auto-loads; type-ahead works in the inputs. Confirmed by the reporter.Release
Cut 4.202607.1 via
scripts/prepare-release.js(the sanctioned release path — bumps root + mcp-server + server.json, prependsCHANGELOG.json, regeneratesCHANGELOG.md). The entry documents these two fixes plus the unreleased #182 work (subfolder connection resolution,hana-cli.projectPath,vscode statusupdate-check).