Skip to content

ESD-1623: Delete the CLI's frontend-integration reference implementation#514

Open
Phil-Browne wants to merge 13 commits into
mainfrom
esd-1623-delete-frontend-integration
Open

ESD-1623: Delete the CLI's frontend-integration reference implementation#514
Phil-Browne wants to merge 13 commits into
mainfrom
esd-1623-delete-frontend-integration

Conversation

@Phil-Browne

@Phil-Browne Phil-Browne commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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.

  • Deleted frontend-integration/ entirely.
  • Turned out it was also being built and published to S3 as a Vue demo site by the WASM publish workflow, which the Portal never loads (it only fetches megaport.wasm/wasm_exec.js by URL). Dropped the npm/Vue build step from the publish pipeline entirely and renamed the output dir web/vue-demo/ to web/dist/ (wasm + wasm_exec.js only).
  • Updated WASM_README.md, web/README.md, .gitignore, and .dockerignore to match.
  • Folded in the ESD-1584 interactive-mode host-contract docs. ESD-1584-docs(wasm): document interactive-mode host contract #486 only touched frontend-integration/ and WASM_README.md; its frontend-integration edits die with the directory, so its surviving WASM_README.md content (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

  • go build ./... && go test ./...
  • GOOS=js GOARCH=wasm go build -tags js,wasm ./...
  • golangci-lint run
  • Ran scripts/build-web.sh locally, confirmed web/dist/megaport.wasm + wasm_exec.js are produced

…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.
Copilot AI review requested due to automatic review settings July 10, 2026 00:26
@Phil-Browne Phil-Browne requested review from a team and penzeliz-megaport as code owners July 10, 2026 00:26
@Phil-Browne Phil-Browne requested a review from megasergeyd July 10, 2026 00:26
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.89%. Comparing base (69ab3e4) to head (641c7a9).

Additional details and impacted files

Impacted file tree graph

@@            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     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread scripts/lib/web-assets.sh
Comment thread Makefile Outdated
Comment thread web/README.md
Comment thread .dockerignore

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 48 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • frontend-integration/package-lock.json: Generated file

Comment thread Makefile Outdated
Comment thread .dockerignore
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).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 48 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • frontend-integration/package-lock.json: Generated file

Comment thread web/README.md Outdated
…end-integration

# Conflicts:
#	frontend-integration/__tests__/MegaportTerminal.test.ts
#	frontend-integration/components/MegaportTerminal.vue
#	frontend-integration/types/megaport-wasm.d.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 48 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • frontend-integration/package-lock.json: Generated file

Comment thread web/README.md
…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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --delete won’t remove megaport.wasm.br / megaport.wasm.gz objects 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 only megaport.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"

@penzeliz-megaport

penzeliz-megaport commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

#486 adds docs and a test inside frontend-integration/ (INTEGRATION_GUIDE.md, __tests__/interactive.test.ts, types/megaport-wasm.d.ts), all of which this PR deletes. If this deletion is the direction, those edits in #486 are discarded; its WASM_README.md host-contract docs are unaffected. Worth aligning the two before either lands.

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
@Phil-Browne

Copy link
Copy Markdown
Contributor Author

Decided: this deletion is the direction. #486's frontend-integration/ edits (INTEGRATION_GUIDE.md, interactive.test.ts, types/megaport-wasm.d.ts) go away with the directory, and its surviving WASM_README.md host-contract docs are now folded into this PR (0b6d200). #486 is closed. ESD-1584 rides along here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 44 out of 49 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • frontend-integration/package-lock.json: Generated file

Comment thread WASM_README.md Outdated
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 44 out of 49 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • frontend-integration/package-lock.json: Generated file

Comment thread Makefile
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 44 out of 49 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • frontend-integration/package-lock.json: Generated file

Comment thread scripts/build-web.sh Outdated
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 44 out of 49 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • frontend-integration/package-lock.json: Generated file

Comment thread scripts/build-web.sh Outdated
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 44 out of 49 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • frontend-integration/package-lock.json: Generated file

Comment thread WASM_README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 44 out of 49 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • frontend-integration/package-lock.json: Generated file

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 44 out of 49 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • frontend-integration/package-lock.json: Generated file

@Phil-Browne

Copy link
Copy Markdown
Contributor Author

Closed #486 in favor of this PR.

#486 (ESD-1584) documented the WASM interactive-mode host contract, but three of its edits lived inside frontend-integration/, which this PR deletes. Rather than land two conflicting PRs, the surviving docs are folded here: the interactive-mode contract now lives in WASM_README.md (host prompt handlers, prompt request shape, secret masking, lifecycle, the 10-minute timeout, and live output streaming), documenting the raw window contract directly instead of frontend-integration/'s composable wrapper. Nothing unique from #486 is lost. This PR now covers both ESD-1623 and ESD-1584.

…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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 44 out of 49 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • frontend-integration/package-lock.json: Generated file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants