Skip to content

feat(flow-client): switch the live client bootstrap from GWT to TypeScript - #24953

Open
totally-not-ai[bot] wants to merge 6 commits into
flow-client-ts-enginefrom
flow-client-ts-cutover
Open

feat(flow-client): switch the live client bootstrap from GWT to TypeScript#24953
totally-not-ai[bot] wants to merge 6 commits into
flow-client-ts-enginefrom
flow-client-ts-cutover

Conversation

@totally-not-ai

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

Copy link
Copy Markdown
Contributor

Summary

Flips the client over to TypeScript. FlowClient.init() (imported and called by Flow.ts) is generated by scripts/client.js; this changes the generator to emit the TypeScript bootstrap (onModuleLoad from Bootstrapper) instead of wrapping the compiled GWT engine blob. The TypeScript engine is now the live client.

The full mocha suite (87 files, 497 tests) — including FlowTests, which exercises the bootstrap — passes against the TypeScript client. The GWT sources and build wiring are removed in the next PR.

⚠️ This is the pivotal PR of the series; its real end-to-end validation is the IT suite (client router, embedding, resync, push). Rollback = revert this one commit.

Stacked on #24952 (base flow-client-ts-engine) — 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 — GWT→TS bootstrap cutover

The client.js build script no longer reads the compiled GWT client-*.cache.js bundle and wraps it; it now generates a small FlowClient.js that imports and calls the TypeScript bootstrap. Verified the full wiring:

  • onModuleLoad is exported from src/main/frontend/internal/Bootstrapper.ts (line 231), so the generated import { onModuleLoad } from './internal/Bootstrapper' resolves — the relative path is correct (FlowClient.js is written to src/main/frontend/, Bootstrapper.ts is under internal/).
  • Flow.ts dynamically imports ./FlowClient (line 351) and calls clientMod.init() (line 409) behind the isFlowClientLoaded() guard — the same entry point the old GWT bundle exposed.
  • The generated init() runs onModuleLoad(), which registers the widgetset start callback so the server bootstrap can start the application and assemble the TS engine (ApplicationConnection) — behaviorally equivalent to the former GWT onModuleLoad.

Clean, minimal, and correct. LGTM. The new comment accurately documents the entry-point flow.

…cript

FlowClient.init() -- imported and called by Flow.ts -- is generated by
scripts/client.js. Change the generator to emit the TypeScript bootstrap
(onModuleLoad from Bootstrapper) instead of wrapping the compiled GWT engine blob,
making the TypeScript engine the live client. The GWT compile output is no longer
read.

The full mocha suite, including FlowTests (which exercises the bootstrap), passes
against the TypeScript client. The GWT sources and build wiring are removed in the
follow-up PR.
@totally-not-ai
totally-not-ai Bot force-pushed the flow-client-ts-cutover branch from 950e2a9 to fc90354 Compare July 8, 2026 17:01
@totally-not-ai
totally-not-ai Bot force-pushed the flow-client-ts-engine branch from fbfbe84 to 760dd0a Compare July 8, 2026 17:01
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