Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

[Alcova] Implementation plan: renderBuiltUrl-aware asset URLs - #1

Closed
MarcPorciuncula wants to merge 1 commit into
mainfrom
alcova/plan
Closed

[Alcova] Implementation plan: renderBuiltUrl-aware asset URLs#1
MarcPorciuncula wants to merge 1 commit into
mainfrom
alcova/plan

Conversation

@MarcPorciuncula

Copy link
Copy Markdown
Collaborator

Tracking PR for the Alcova implementation plan in `ALCOVA-PLAN.md`.

Do not merge. This PR exists to host review / discussion of the plan on the `alcova/plan` branch without landing the file on `main`. Keeping `main` free of Alcova-specific content is what makes future upstream PRs (from `alcova/render-built-url`) diff cleanly against `TanStack/router:main`.

What the plan covers

  • Diagnosis: why the current operator-ui deploy breaks when Vite's `base` is set to a CDN URL, and why that's a `base` misuse but also an exposed gap in TanStack Start's interaction with `experimental.renderBuiltUrl`.
  • Design: route manifest-builder asset URL emission through an injected `resolveBuiltUrl(fileName)` that consults `config.experimental.renderBuiltUrl` before falling back to `joinURL(basePath, fileName)`.
  • Implementation scope: three files touched —
    • `packages/start-plugin-core/src/start-manifest-plugin/manifestBuilder.ts`
    • `packages/start-plugin-core/src/vite/start-manifest-plugin/plugin.ts`
    • `packages/start-plugin-core/src/vite/prerender.ts`
  • Tests: unit tests on `createManifestAssetResolvers` for the new resolver and its fallbacks; prerender integration coverage for absolute-`base` preview servers.
  • Local verification: step-by-step `pnpm link` into `operator-ui`, drop the existing `pnpm` patch, flip `vite.config.ts` to `base: "/"` + `renderBuiltUrl`, run the dual-origin smoke test (HTML on :3000, CDN on :3001, real backend on :8080).
  • Upstream workflow: open the upstream PR from `Alcova-AI:alcova/render-built-url` → `TanStack/router:main`. Implementation branch stays Alcova-free; plan stays on `alcova/plan`.

The next agent's entry point is `ALCOVA-PLAN.md` in this diff.

…kflow

Internal planning doc. Lives on alcova/plan branch only — never
cherry-picked onto main or the public upstream PR branch.
@MarcPorciuncula

Copy link
Copy Markdown
Collaborator Author

Closing — solved upstream.

transformAssets (merged in TanStack/router#7009, available in @tanstack/react-start@1.167.4+) is the canonical solution for splitting HTML and assets across origins. Alcova-side migration: Alcova-AI/operator-ui#417. Closing companion PR #2 too; archiving the fork.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant