feat: Export Data UI (browser download) + UI static MIME fix#180
Merged
Conversation
The SPA catch-all served index.html (text/html) for any unmatched /ui/* path, including missing hashed assets after a rebuild. Browsers then rejected the HTML as a JS module (MIME error) and rendered a blank page. - SPA fallback now falls through to 404 for paths with a file extension - index.html served with Cache-Control: no-cache so new asset hashes are always picked up Adds regression tests covering both behaviors.
…ype explicitly; add limit test
…ds return rows In the MCP/VSCode direct-connection path, the container/default schema was not propagated, so CURRENT_SCHEMA stayed the empty HDI runtime user schema and schema-filtered commands (tables, views, ...) returned no rows. - utils/connections.js: set hana.schema from HANA_CLI_SCHEMA when present - vscode-extension lifecycle: set HANA_CLI_SCHEMA from the connection, and clear any stale value when the new connection has no schema - add regression tests covering set/unset/propagate cases
… sap-hdb-promisfied to 2.202607.1
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
Adds an Export Data UI to the hana-cli web app (
hana-cli ui), mirroring the existinghana-cli exportCLI command and delivering the result as a browser download. Also fixes a blank-page/MIME bug in the UI static route, and folds in two pre-existing local changes (a schema-propagation fix and VSCode extension packaging).Export UI (main feature)
Exportview in the sidebar — the "Import / Convert" group is relabeled "Import / Export / Convert" and gains an Export entry beside Import and Mass Convert.GET /hana/exportroute streams the query result back as a file attachment (CSV / Excel / JSON), following the existing/excelroute pattern.bin/export.jsare refactored into pure buffer-returning functions used by both the CLI and the new route (one source of truth).hana-cli exportUIlauncher — opens the browser directly on the Export screen (mirrorsimportUI).Security
whereandorderbywere intentionally not implemented (an automated security review flagged raw SQL fragments; they were removed rather than hardened). Identifier inputs (schema,table, eachcolumnsentry) are validated with the project'ssqlInjection.isAcceptableParameter()guard before any DB connection, andlimitis integer-validated (rejects< 1). A final whole-branch review fuzzed the guard (~25 payloads) and found no residual injection surface.Also included
fix(ui): blank page / MIME error — the SPA catch-all servedindex.html(astext/html) for missing/ui/*assets after a rebuild, so browsers rejected the HTML as a JS module. The fallback now 404s for paths with a file extension, andindex.htmlis servedno-cacheso new asset hashes are always picked up. Regression tests added.fix(connections): propagateHANA_CLI_SCHEMA— in the MCP/VSCode direct-connection path the container schema wasn't propagated, leavingCURRENT_SCHEMAempty so schema-filtered commands (tables, views, …) returned no rows. Now set on connect (and cleared on connection switch). Regression tests added.chore(vscode): packaging — adds apackage:vscodenpm script, bumps the extension to 0.1.1 andsap-hdb-promisfiedto 2.202607.1.Testing
vue-tsc) and builds cleanly.npm testrun shows 25 pre-existing failures in environmental E2E/UI tests (server-launch-with-browser, wdiobrowserglobal, live-DBsystemInfoassertions). This branch modifies none of those test files; they fail independently of these changes.Design & plan docs
docs/superpowers/specs/2026-07-13-export-ui-design.mddocs/superpowers/plans/2026-07-13-export-ui.md