Skip to content

chore(flow-server): remove the dead GWT client-engine bootstrap emission - #24955

Open
totally-not-ai[bot] wants to merge 8 commits into
flow-client-ts-remove-gwtfrom
flow-server-remove-client-engine
Open

chore(flow-server): remove the dead GWT client-engine bootstrap emission#24955
totally-not-ai[bot] wants to merge 8 commits into
flow-client-ts-remove-gwtfrom
flow-server-remove-client-engine

Conversation

@totally-not-ai

@totally-not-ai totally-not-ai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

BootstrapHandler emitted a client.nocache.js <script> and computed the GWT client-engine URL, but the live client loads via Flow.ts -> FlowClient, so this path is dead once GWT is gone. Removes getClientEngineUrl/getClientEngine, the CLIENT_ENGINE_NOCACHE_FILE constant and its emission, and the matching mock in MockServletServiceSessionSetup.

Verified: no callers of the removed API anywhere in the repo. Placed after the GWT removal so the emission is unambiguously dead.

Stacked on #24954 (base flow-client-ts-remove-gwt) — merge after it. Non-draft; please review before merging.

@totally-not-ai

totally-not-ai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Review — remove dead GWT client-engine bootstrap emission

Correct and clean. BootstrapHandler no longer emits the <script src=".../client.nocache.js"> element (head.appendChild(createJavaScriptElement(getClientEngineUrl(context)))), and the now-unreachable helpers getClientEngineUrl, getResourceProvider, getClientEngine, plus the CLIENT_ENGINE_NOCACHE_FILE constant are removed. After the TS cutover the client loads via the frontend FlowClient module, so this GWT loader script would 404 — removing it is the right move.

Verified no fallout in BootstrapHandler.java:

  • The dropped imports Properties, Lookup, ResourceProvider have 0 remaining uses (no dangling/unused imports → checkstyle-clean).
  • InputStream and IOException are correctly retained — still used elsewhere in the class (e.g. readResource, the request handlers).

The paired MockServletServiceSessionSetup change removes the matching compile.properties mock stub, and its ByteArrayInputStream/StandardCharsets/IOException imports are still used by other stubs, so nothing is left dangling.

Minor (optional, for consistency)

An identical now-dead getClientResourceAsStream(".../compile.properties") mock stub still exists in flow-server/src/test/.../WebComponentBootstrapHandlerViteTest.java (initLookup). WebComponentBootstrapHandler (main) doesn't read the client engine, so that stub is unused — consider removing it alongside the MockServletServiceSessionSetup one (and note that CLIENT_ENGINE_PATH becomes referenced only by that dead stub afterwards). Not blocking.

LGTM.

@totally-not-ai
totally-not-ai Bot force-pushed the flow-server-remove-client-engine branch from 189f26e to eaf9955 Compare July 8, 2026 17:01
Artur- added 2 commits July 8, 2026 20:23
BootstrapHandler emitted a client.nocache.js <script> and computed the GWT client
engine URL, but the live client loads via Flow.ts -> FlowClient, so this path is
dead once the GWT engine is gone. Remove getClientEngineUrl/getClientEngine, the
CLIENT_ENGINE_NOCACHE_FILE constant and its emission in setupFrameworkLibraries,
and the matching compile.properties mock in MockServletServiceSessionSetup.

Nothing referenced the removed API.
@totally-not-ai
totally-not-ai Bot force-pushed the flow-server-remove-client-engine branch from eaf9955 to 057c9fb Compare July 8, 2026 18:51
totally-not-ai Bot and others added 4 commits July 20, 2026 13:42
…v-mode banner (#24979)

Small polish:
- Rename `eslint.config.js` → `eslint.config.mjs` so Node treats the ESM
config as a module (drops the `MODULE_TYPELESS_PACKAGE_JSON` warning)
without adding `"type": "module"` (`scripts/client.js` stays CommonJS).
- web-test-runner: pre-mark Lit's `dev-mode` warning as issued before
any module loads, keeping the banner out of test output; scope discovery
to `*Tests.ts`.

**Stacked on #24955** (base `flow-server-remove-client-engine`) — merge
after it. Non-draft; please review before merging.


---
_Re-created from #24956 after renaming the head branch
`flow-client-ts-polish` → `feature/client-ts` (the canonical branch for
the full client TS migration). GitHub orphaned the original PR on
rename._

Co-authored-by: Artur Signell <artur@vaadin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants