Skip to content

refactor: generate cold-start routes at build time for v6.5.0 (OK-57861)#12542

Open
huhuanming wants to merge 16 commits into
release/v6.5.0from
codex/port-pr-12496-v650
Open

refactor: generate cold-start routes at build time for v6.5.0 (OK-57861)#12542
huhuanming wants to merge 16 commits into
release/v6.5.0from
codex/port-pr-12496-v650

Conversation

@huhuanming

@huhuanming huhuanming commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

OK-57861


Summary

Backports the complete fix from #12496 to release/v6.5.0.

  • compile the cold-start route graph at build time for Web, web-embed, Extension, Desktop, iOS, Android, and generic Native targets
  • keep production and development route assets isolated
  • preserve v6.4 displayed deep-link behavior and shared cross-platform route coverage
  • validate sensitive onboarding and firmware-update route parameters
  • retain the existing v6.5.0 Web DApp URL fallback while adopting the new resolveScreens implementation

Why

Runtime route discovery kept route modules in the cold-start dependency graph and made generated route coverage harder to audit. Some strongly typed onboarding routes could also mount with missing or malformed URL parameters.

This backport makes the route topology deterministic at build time, reduces production cold-start exposure, and fails closed for sensitive route inputs without changing established displayed URLs.

Impact

  • production bundles load only the production cold-start graph
  • deep-link behavior remains compatible with v6.4.0
  • malformed sensitive onboarding links no longer reach page implementations
  • generated artifacts are produced before builds instead of being committed

Port notes

The 16 commits from #12496 were replayed in order onto the latest release/v6.5.0. The only conflict was in packages/kit/src/routes/config/index.ts; the resolution preserves the release branch's Web DApp fallback and adds the backported resolveScreens import.

Validation

  • yarn install --immutable --inline-builds
  • yarn routes:generate
  • yarn routes:check
  • focused Jest: 9 suites, 119 tests passed
  • type-aware oxlint on 50 changed JS/TS files: 0 warnings, 0 errors
  • full TypeScript check with tsgo --noEmit
  • git diff --check

yarn agent:check --profile commit still hits the Windows child-process spawn issue documented in #12496; its underlying route generation, lint, tests, and TypeScript checks were run directly and passed.

@huhuanming
huhuanming marked this pull request as ready for review July 17, 2026 10:50
@huhuanming
huhuanming enabled auto-merge (squash) July 17, 2026 10:50
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.

1 participant