Fix docs CDN asset routing for TanStack Start#1600
Merged
Conversation
- Wire docs SSR assets through TanStack `transformAssets` - Use side-effect CSS so Start owns stylesheet links - Set Vite `base: ''` for CDN-relative chunks - Keep generated API and nav docs from the build
|
The latest Agentuity deployment details.
View deployment logs with the Agentuity CLI: |
Contributor
📝 WalkthroughWalkthroughAdds CDN asset handling and server routing for the docs app, changes the root stylesheet import, and updates several docs navigation and API reference entries. ChangesDocs web delivery
Reference docs updates
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 Canary Packages Publishedversion: PackagesInstallAdd to your {
"dependencies": {
"@agentuity/api": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-api-3.1.4-7e13f0a.tgz",
"@agentuity/config": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-config-3.1.4-7e13f0a.tgz",
"@agentuity/vite": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-vite-3.1.4-7e13f0a.tgz",
"@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-keyvalue-3.1.4-7e13f0a.tgz",
"@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-migrate-3.1.4-7e13f0a.tgz",
"@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-core-3.1.4-7e13f0a.tgz",
"@agentuity/analytics": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-analytics-3.1.4-7e13f0a.tgz",
"@agentuity/hono": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-hono-3.1.4-7e13f0a.tgz",
"@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-drizzle-3.1.4-7e13f0a.tgz",
"@agentuity/genesis": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-genesis-3.1.4-7e13f0a.tgz",
"@agentuity/pi": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-pi-3.1.4-7e13f0a.tgz",
"@agentuity/storage": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-storage-3.1.4-7e13f0a.tgz",
"@agentuity/coder-tui": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-coder-tui-3.1.4-7e13f0a.tgz",
"@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-postgres-3.1.4-7e13f0a.tgz",
"@agentuity/telemetry": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-telemetry-3.1.4-7e13f0a.tgz",
"@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-runtime-3.1.4-7e13f0a.tgz",
"@agentuity/adapter": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-adapter-3.1.4-7e13f0a.tgz",
"@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-schema-3.1.4-7e13f0a.tgz",
"create-agentuity": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/create-agentuity-3.1.4-7e13f0a.tgz",
"@agentuity/client": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-client-3.1.4-7e13f0a.tgz",
"@agentuity/stream": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-stream-3.1.4-7e13f0a.tgz",
"@agentuity/aigateway": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-aigateway-3.1.4-7e13f0a.tgz",
"@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-schedule-3.1.4-7e13f0a.tgz",
"@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-sandbox-3.1.4-7e13f0a.tgz",
"@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-cli-3.1.4-7e13f0a.tgz",
"@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-db-3.1.4-7e13f0a.tgz",
"@agentuity/skills": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-skills-3.1.4-7e13f0a.tgz",
"@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-server-3.1.4-7e13f0a.tgz",
"@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-email-3.1.4-7e13f0a.tgz",
"@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-opencode-3.1.4-7e13f0a.tgz",
"@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-coder-3.1.4-7e13f0a.tgz",
"@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-claude-code-3.1.4-7e13f0a.tgz",
"@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-task-3.1.4-7e13f0a.tgz",
"@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-webhook-3.1.4-7e13f0a.tgz",
"@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-queue-3.1.4-7e13f0a.tgz",
"@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-vector-3.1.4-7e13f0a.tgz"
}
}Or install directly: bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-api-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-config-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-vite-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-keyvalue-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-migrate-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-core-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-analytics-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-hono-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-drizzle-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-genesis-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-pi-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-storage-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-coder-tui-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-postgres-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-telemetry-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-runtime-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-adapter-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-schema-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/create-agentuity-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-client-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-stream-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-aigateway-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-schedule-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-sandbox-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-cli-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-db-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-skills-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-server-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-email-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-opencode-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-coder-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-claude-code-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-task-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-webhook-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-queue-3.1.4-7e13f0a.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.4-7e13f0a/agentuity-vector-3.1.4-7e13f0a.tgz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AGENTUITY_CDN_ORIGINandAGENTUITY_CLOUD_DEPLOYMENT_ID.base: ''so client-side lazy chunks resolve relative to the CDN-hosted entry script.Related: #1570
Follow-up to: #1571 and #1546
Why
The docs app has its own TanStack Start server entry at
src/web/server.ts. That entry needs the same CDN asset transform added for TanStack Start apps in #1571.TanStack only rewrites manifest-managed assets through
transformAssets. A stylesheet imported with?urland returned fromhead().linksstays outside that rewrite path, so the root stylesheet has to be a side-effect CSS import.Implementation
The docs server now passes a CDN transform into
createStartHandler:The helper prefers the platform-injected CDN origin and falls back to the deployment CDN path:
The root route now lets TanStack own the stylesheet link:
Vite emits relative build URLs so lazy chunks resolve from the CDN entry script:
Verification
cd docs && bun testcd docs && bun run typecheckbunx biome lint docs/src/web/cdn-assets.ts docs/src/web/cdn-assets.test.ts docs/src/web/routes/__root.tsx docs/src/web/server.ts docs/vite.config.tsbunx biome check docs/src/web/cdn-assets.ts docs/src/web/cdn-assets.test.ts docs/src/web/routes/__root.tsx docs/src/web/server.ts docs/vite.config.tscd docs && bun run buildAGENTUITY_CDN_ORIGIN=https://cdn.example.test: same-originhref/srcasset refs dropped from13to0; CDNhref/srcasset refs became12.References/Sources