ESD-1623: Delete the CLI's frontend-integration reference implementation#514
ESD-1623: Delete the CLI's frontend-integration reference implementation#514Phil-Browne wants to merge 13 commits into
Conversation
…tation frontend-integration/ was a standalone Vue/TS wrapper around the WASM build, but the Portal has its own independent terminal and never referenced it. It also still carried the credential-logging defects from ESD-1587's sibling ticket, which this deletion makes moot. Removing it also meant the WASM publish pipeline could no longer build a Vue demo site via npm. Simplified scripts/lib/web-assets.sh and wasm-publish.yaml to just cross-compile megaport.wasm and copy wasm_exec.js into web/dist/ (renamed from web/vue-demo/), matching what the Portal actually consumes, and dropped the now-unused npm/Node setup and ignore rules.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #514 +/- ##
==========================================
+ Coverage 78.87% 78.89% +0.01%
==========================================
Files 193 193
Lines 18574 18574
==========================================
+ Hits 14651 14654 +3
+ Misses 2857 2855 -2
+ Partials 1066 1065 -1 🚀 New features to boost your workflow:
|
These were checked-in Vue demo build artifacts from before the publish pipeline stopped building a Vue front end. Nothing produces or references them anymore. Also trims web/.gitignore's now-dead npm entries.
There was a problem hiding this comment.
Pull request overview
Removes the previously bundled Vue/TypeScript “frontend integration” reference implementation for the WASM build and simplifies the WASM publishing flow to ship only the required browser artifacts (megaport.wasm + wasm_exec.js).
Changes:
- Deleted
frontend-integration/(Vue demo site, wrapper code, and tests). - Switched web build output to
web/dist/and updated build scripts/Makefile targets accordingly. - Simplified the WASM publish workflow to stop building/publishing the Vue demo, and updated documentation to match.
Reviewed changes
Copilot reviewed 43 out of 48 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| web/README.md | Updates web artifact docs to describe web/dist/ output and S3 publishing. |
| wasm.sh | Removes the local preview hint that pointed at frontend-integration/. |
| WASM_README.md | Removes frontend integration references and updates build/publish instructions for web/dist/. |
| scripts/lib/web-assets.sh | Updates static asset build to emit web/dist and drop npm/Vue steps. |
| scripts/build-web.sh | Updates wrapper script messaging/paths to web/dist. |
| Makefile | Updates web-static description and clean paths to web/dist. |
| frontend-integration/vitest.config.ts | Deleted (removes Vitest config for the Vue integration). |
| frontend-integration/vite.demo.config.ts | Deleted (removes Vite demo build config). |
| frontend-integration/vite.config.ts | Deleted (removes Vite library build config). |
| frontend-integration/vite-env.d.ts | Deleted (removes Vue/Vite type env declarations). |
| frontend-integration/utils/wasmUrl.ts | Deleted (removes wasm URL resolution helper). |
| frontend-integration/utils/type-guards.ts | Deleted (removes runtime type guards and helpers). |
| frontend-integration/types/megaport-wasm.d.ts | Deleted (removes TS type surface definitions). |
| frontend-integration/tsconfig.node.json | Deleted (removes TS node config). |
| frontend-integration/tsconfig.json | Deleted (removes TS config). |
| frontend-integration/README.md | Deleted (removes Vue integration guide). |
| frontend-integration/package.json | Deleted (removes Node/Vue package definition). |
| frontend-integration/INTEGRATION_GUIDE.md | Deleted (removes portal integration guide). |
| frontend-integration/index.ts | Deleted (removes package entrypoint). |
| frontend-integration/index.html | Deleted (removes demo HTML entry). |
| frontend-integration/demo/main.ts | Deleted (removes demo bootstrap). |
| frontend-integration/demo/App.vue | Deleted (removes demo app). |
| frontend-integration/constants/megaportWASM.ts | Deleted (removes frontend constants). |
| frontend-integration/composables/useMegaportWASM.ts | Deleted (removes Vue composable wrapper). |
| frontend-integration/components/MegaportTerminal.vue | Deleted (removes Vue terminal component). |
| frontend-integration/.gitignore | Deleted (removes per-project ignore file). |
| frontend-integration/tests/wasmUrl.test.ts | Deleted (removes wasm URL tests). |
| frontend-integration/tests/useMegaportWASM.test.ts | Deleted (removes composable tests). |
| frontend-integration/tests/terminal-clear.test.ts | Deleted (removes terminal clear tests). |
| frontend-integration/tests/spinner.test.ts | Deleted (removes spinner tests). |
| frontend-integration/tests/smoke.test.ts | Deleted (removes smoke tests). |
| frontend-integration/tests/setup.ts | Deleted (removes test setup). |
| frontend-integration/tests/MegaportTerminal.test.ts | Deleted (removes terminal component tests). |
| frontend-integration/tests/interactive.test.ts | Deleted (removes interactive mode tests). |
| frontend-integration/tests/integration.test.ts | Deleted (removes integration tests). |
| frontend-integration/tests/improvements.test.ts | Deleted (removes “improvements” test suite). |
| frontend-integration/tests/auth.test.ts | Deleted (removes auth tests). |
| frontend-integration/tests/App.test.ts | Deleted (removes demo App tests). |
| cmd/wasmhash/main_test.go | Updates wasmhash test paths from web/vue-demo to web/dist. |
| .gitignore | Removes Node-specific ignores no longer needed after deleting the frontend. |
| .github/workflows/wasm-publish.yaml | Removes Node/Vue build steps; publishes only web/dist wasm + loader. |
| .dockerignore | Removes Node/frontend exclusions; docker context rules updated in this PR. |
Files not reviewed (1)
- frontend-integration/package-lock.json: Generated file
Addresses Copilot review feedback: build_static_assets now removes the publish dir before recreating it so stale .br/.gz artifacts from a prior run can't linger, and make clean removes web/dist wholesale instead of listing individual filenames (which missed wasm_exec.js).
…end-integration # Conflicts: # frontend-integration/__tests__/MegaportTerminal.test.ts # frontend-integration/components/MegaportTerminal.vue # frontend-integration/types/megaport-wasm.d.ts
…tive publish flow Copilot review feedback: the Caching section read as if the S3 publish workflow content-hashes the wasm via cmd/wasmhash and serves it through an index.html, but that tool isn't wired into any script or CI job. Reword the intro so it's clear this describes an unused helper, not the current publish path.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 43 out of 48 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- frontend-integration/package-lock.json: Generated file
Comments suppressed due to low confidence (1)
.github/workflows/wasm-publish.yaml:168
aws s3 sync --deletewon’t removemegaport.wasm.br/megaport.wasm.gzobjects from the destination because they’re excluded from the sync set. If those keys exist from an older publish flow, they’ll linger even though this workflow now publishes onlymegaport.wasm(Content-Encoding: br) +wasm_exec.js, which can cause confusion and unnecessary storage.
aws s3 sync "$src/" "$dest/" --delete \
--exclude 'megaport.wasm' \
--exclude 'megaport.wasm.br' \
--exclude 'megaport.wasm.gz' \
--exclude 'wasm_exec.js' \
--cache-control "$cache"
|
#486 adds docs and a test inside |
Fold in the ESD-1584 host-contract docs: the browser prompt callback contract (registerPromptHandler / submitPromptResponse / cancelPrompt), the prompt-request shape, and password-masking guidance in WASM_README.md. Also list the "password" prompt type in the PromptRequest comment. ESD-1584
|
Decided: this deletion is the direction. #486's |
The interactive-mode section said streaming was not yet available, but registerOutputHandler and its completion contract already ship in internal/wasm/output_handler.go. Replace the deferred-docs note with the actual contract.
wasm.sh and the manual publish steps copy the loader to web/wasm_exec.js, which is untracked and not gitignored, so make clean left it behind and dirtied the tree. Add it to the clean target.
The script produces only the uncompressed web/dist/, but the publish workflow brotli-compresses the wasm and pins Content-Type/Content-Encoding on upload. The old "aws s3 sync" hint would publish a large uncompressed wasm without the right headers. Point at the workflow / WASM_README steps.
The header still described the output as ready to aws s3 sync, which contradicted the corrected publish hint below it. Reword to point at the wasm-publish workflow.
|
Closed #486 in favor of this PR. #486 (ESD-1584) documented the WASM interactive-mode host contract, but three of its edits lived inside |
…end-integration # Conflicts: # frontend-integration/__tests__/auth.test.ts # frontend-integration/__tests__/improvements.test.ts # frontend-integration/composables/useMegaportWASM.ts # frontend-integration/types/megaport-wasm.d.ts # frontend-integration/utils/type-guards.ts
frontend-integration/ was a standalone Vue/TS reference wrapper around the WASM build, documented as built for the Portal. The Portal has its own independent terminal implementation and never imports or references it, so it's dead code that also carried the credential-logging defects from a related ticket.
frontend-integration/andWASM_README.md; its frontend-integration edits die with the directory, so its survivingWASM_README.mdcontent (the async prompt callback contract:registerPromptHandler/submitPromptResponse/cancelPrompt, the prompt-request shape, and password masking) lands here instead. ESD-1584-docs(wasm): document interactive-mode host contract #486 is closed in favor of this PR.Tickets: ESD-1623 (deletion + publish cleanup), ESD-1584 (interactive-mode docs).
Test plan