Skip to content

fix(cli): pre-render root index route in static renderer#1400

Merged
Huijiro merged 2 commits intomainfrom
fix/static-renderer-root-index
Apr 20, 2026
Merged

fix(cli): pre-render root index route in static renderer#1400
Huijiro merged 2 commits intomainfrom
fix/static-renderer-root-index

Conversation

@Huijiro
Copy link
Copy Markdown
Member

@Huijiro Huijiro commented Apr 20, 2026

extractRoutePaths walks the TanStack Router routeTree to decide which URLs the static renderer should pre-render. An index route directly under the pathless site root (createFileRoute('/')) hit a branch that appended nothing to the parent path and then skipped the emit guard because currentPath was still empty — so '/' was silently dropped from the pre-render set.

The effect in production: the docs landing page shipped with Vite's raw template, leaving unreplaced where the SSR'd React tree should be. Every nested route SSR'd correctly because their accumulated path was non-empty.

Fix treats segment === '/' as an explicit index-route signal: emit the parent path, defaulting to '/' when the parent itself is pathless. All other cases behave identically.

Export extractRoutePaths + RouteTreeNode so the walker can be unit tested; add coverage for the root index case, non-root index routes, trailing-slash normalization, parameterized route filtering, legacy options.path fallback, and an end-to-end docs-shaped tree.

Summary by CodeRabbit

  • New Features

    • Route discovery helpers are now publicly available.
  • Bug Fixes

    • Fixed index route handling in static pre-rendering to correctly emit parent and root paths and normalize trailing slashes.
  • Tests

    • Added comprehensive unit tests for route path extraction, covering index routes, trailing-slash dedupe, parameterized skips, sorting and real-app shapes.
  • Chores

    • Removed legacy public-asset-path warning plugin, its test suite, and the client config wrapper that injected it.

extractRoutePaths walks the TanStack Router routeTree to decide which
URLs the static renderer should pre-render. An index route directly
under the pathless site root (`createFileRoute('/')`) hit a branch
that appended nothing to the parent path and then skipped the emit
guard because currentPath was still empty — so '/' was silently dropped
from the pre-render set.

The effect in production: the docs landing page shipped with Vite's
raw template, leaving <!--app-html--> unreplaced where the SSR'd React
tree should be. Every nested route SSR'd correctly because their
accumulated path was non-empty.

Fix treats segment === '/' as an explicit index-route signal: emit the
parent path, defaulting to '/' when the parent itself is pathless.
All other cases behave identically.

Export extractRoutePaths + RouteTreeNode so the walker can be unit
tested; add coverage for the root index case, non-root index routes,
trailing-slash normalization, parameterized route filtering, legacy
options.path fallback, and an end-to-end docs-shaped tree.
@agentuity-agent
Copy link
Copy Markdown

agentuity-agent Bot commented Apr 20, 2026

The latest Agentuity deployment details.

Project Deployment Preview Updated (UTC)
docs 🟢 Ready (deploy_d6c4a6c6c13fde06323827686d2c8c77) - 2026-04-20T20:02:08Z

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cc797467-013e-43bc-89dd-1cee88a8e466

📥 Commits

Reviewing files that changed from the base of the PR and between 507f2c9 and 8f8a863.

📒 Files selected for processing (5)
  • packages/cli/src/cmd/build/vite/index.ts
  • packages/cli/src/cmd/build/vite/public-asset-path-plugin.ts
  • packages/cli/src/cmd/build/vite/vite-asset-server-config.ts
  • packages/cli/src/cmd/build/vite/vite-builder.ts
  • packages/cli/test/cmd/build/vite/public-asset-path-plugin.test.ts
💤 Files with no reviewable changes (4)
  • packages/cli/src/cmd/build/vite/vite-asset-server-config.ts
  • packages/cli/src/cmd/build/vite/index.ts
  • packages/cli/src/cmd/build/vite/public-asset-path-plugin.ts
  • packages/cli/test/cmd/build/vite/public-asset-path-plugin.test.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: Build
  • GitHub Check: Framework Integration Tests (TanStack & Next.js)
  • GitHub Check: Queue CLI Tests
  • GitHub Check: Sandbox CLI Tests
  • GitHub Check: SDK Integration Test Suite
  • GitHub Check: Playwright E2E Smoke Test
  • GitHub Check: Queue SDK Tests
  • GitHub Check: Storage CLI Tests
  • GitHub Check: Package Installation & Usage Test
  • GitHub Check: Postgres SSL Integration Test
  • GitHub Check: Cloud Deployment Tests
  • GitHub Check: Standalone Agent Test
  • GitHub Check: Template Integration Tests
  • GitHub Check: Pack & Upload
  • GitHub Check: Windows WSL CLI Smoke Test
  • GitHub Check: Agentuity Deployment
🧰 Additional context used
📓 Path-based instructions (3)
packages/cli/**/*.ts

📄 CodeRabbit inference engine (packages/cli/AGENTS.md)

Use Bun.file(f).exists() instead of existsSync(f) for file existence checks

Files:

  • packages/cli/src/cmd/build/vite/vite-builder.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Biome as code formatter with tabs (width 3), single quotes, semicolons, lineWidth 100, and trailingCommas es5

Files:

  • packages/cli/src/cmd/build/vite/vite-builder.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use TypeScript Strict mode with ESNext target and bundler moduleResolution
Use StructuredError from @agentuity/core for error handling

Files:

  • packages/cli/src/cmd/build/vite/vite-builder.ts
🧠 Learnings (2)
📚 Learning: 2025-12-21T00:31:41.858Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 274
File: packages/cli/src/cmd/build/vite/server-bundler.ts:12-41
Timestamp: 2025-12-21T00:31:41.858Z
Learning: In Bun runtime, BuildMessage and ResolveMessage are global types and are not exported from the bun module. Do not import { BuildMessage } from 'bun' or similar; these types are available globally and should be used without import. This applies to all TypeScript files that target the Bun runtime within the repository.

Applied to files:

  • packages/cli/src/cmd/build/vite/vite-builder.ts
📚 Learning: 2026-02-17T14:23:15.448Z
Learnt from: potofpie
Repo: agentuity/sdk PR: 974
File: packages/cli/src/cmd/git/account/list.ts:39-40
Timestamp: 2026-02-17T14:23:15.448Z
Learning: In the Agentuity CLI framework (packages/cli), when a subcommand declares requires: { auth: true }, the framework will automatically call requireAuth() before invoking the handler. Do not call requireAuth(ctx) manually inside command handlers. This applies to all TypeScript command files under packages/cli/src, including paths like packages/cli/src/cmd/git/account/list.ts.

Applied to files:

  • packages/cli/src/cmd/build/vite/vite-builder.ts
🔇 Additional comments (1)
packages/cli/src/cmd/build/vite/vite-builder.ts (1)

248-253: Good simplification of client build config flow.

Passing the project’s vite.config.ts directly (Line 260) removes wrapper indirection cleanly and keeps behavior explicit, while preserving useful warning-level logging.

Also applies to: 260-260, 265-266


📝 Walkthrough

Walkthrough

Exports and tests were added for route discovery helpers in the static renderer; legacy Vite asset-path linting plugin and its tests were removed, and build plumbing that auto-inserted that plugin (wrapper config and dynamic registration) was deleted or simplified.

Changes

Cohort / File(s) Summary
Static renderer exports & logic
packages/cli/src/cmd/build/vite/static-renderer.ts
Made RouteTreeNode and extractRoutePaths() exported. extractRoutePaths now explicitly detects index segments (segment === '/') and emits parent URLs (including resolving root /), continues to skip parameterized $ segments, and normalizes trailing slashes.
Static renderer tests
packages/cli/test/cmd/build/vite/static-renderer.test.ts
Added Bun test suite covering index emission, pathless layout handling, nested layout index emission, trailing-slash normalization/deduplication, parameterized-segment exclusion, sorted deduped output, and an end-to-end docs-app route-tree case.
Removed asset-path plugin & tests
packages/cli/src/cmd/build/vite/public-asset-path-plugin.ts, packages/cli/test/cmd/build/vite/public-asset-path-plugin.test.ts
Deleted the Vite publicAssetPathPlugin and its unit tests. The plugin previously scanned source files for legacy /public/ references and emitted warnings (no transforms).
Vite index exports
packages/cli/src/cmd/build/vite/index.ts
Stopped re-exporting publicAssetPathPlugin; only browserEnvPlugin remains exported.
Dev asset server config
packages/cli/src/cmd/build/vite/vite-asset-server-config.ts
Removed dynamic import/registration of publicAssetPathPlugin from generated asset-server Vite plugin list.
Vite client build flow
packages/cli/src/cmd/build/vite/vite-builder.ts
Removed wrapper config generation that injected publicAssetPathPlugin; now passes the original viteConfigPath directly to vite build --config. Deleted helper functions for wrapper creation and related comments adjusted.
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 20, 2026

📦 Canary Packages Published

version: 2.0.9-8f8a863

Packages
Package Version URL
@agentuity/cli 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-cli-2.0.9-8f8a863.tgz
@agentuity/sandbox 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-sandbox-2.0.9-8f8a863.tgz
@agentuity/react 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-react-2.0.9-8f8a863.tgz
@agentuity/schedule 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-schedule-2.0.9-8f8a863.tgz
@agentuity/opencode 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-opencode-2.0.9-8f8a863.tgz
@agentuity/coder-tui 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-coder-tui-2.0.9-8f8a863.tgz
@agentuity/drizzle 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-drizzle-2.0.9-8f8a863.tgz
@agentuity/auth 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-auth-2.0.9-8f8a863.tgz
@agentuity/claude-code 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-claude-code-2.0.9-8f8a863.tgz
@agentuity/workbench 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-workbench-2.0.9-8f8a863.tgz
@agentuity/db 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-db-2.0.9-8f8a863.tgz
@agentuity/frontend 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-frontend-2.0.9-8f8a863.tgz
@agentuity/coder 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-coder-2.0.9-8f8a863.tgz
@agentuity/vector 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-vector-2.0.9-8f8a863.tgz
@agentuity/postgres 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-postgres-2.0.9-8f8a863.tgz
@agentuity/schema 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-schema-2.0.9-8f8a863.tgz
@agentuity/core 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-core-2.0.9-8f8a863.tgz
@agentuity/evals 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-evals-2.0.9-8f8a863.tgz
@agentuity/keyvalue 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-keyvalue-2.0.9-8f8a863.tgz
@agentuity/server 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-server-2.0.9-8f8a863.tgz
@agentuity/migrate 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-migrate-2.0.9-8f8a863.tgz
@agentuity/email 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-email-2.0.9-8f8a863.tgz
@agentuity/queue 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-queue-2.0.9-8f8a863.tgz
@agentuity/task 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-task-2.0.9-8f8a863.tgz
@agentuity/runtime 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-runtime-2.0.9-8f8a863.tgz
@agentuity/webhook 2.0.9-8f8a863 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-webhook-2.0.9-8f8a863.tgz
Install

Add to your package.json:

{
  "dependencies": {
    "@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-cli-2.0.9-8f8a863.tgz",
    "@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-sandbox-2.0.9-8f8a863.tgz",
    "@agentuity/react": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-react-2.0.9-8f8a863.tgz",
    "@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-schedule-2.0.9-8f8a863.tgz",
    "@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-opencode-2.0.9-8f8a863.tgz",
    "@agentuity/coder-tui": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-coder-tui-2.0.9-8f8a863.tgz",
    "@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-drizzle-2.0.9-8f8a863.tgz",
    "@agentuity/auth": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-auth-2.0.9-8f8a863.tgz",
    "@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-claude-code-2.0.9-8f8a863.tgz",
    "@agentuity/workbench": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-workbench-2.0.9-8f8a863.tgz",
    "@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-db-2.0.9-8f8a863.tgz",
    "@agentuity/frontend": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-frontend-2.0.9-8f8a863.tgz",
    "@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-coder-2.0.9-8f8a863.tgz",
    "@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-vector-2.0.9-8f8a863.tgz",
    "@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-postgres-2.0.9-8f8a863.tgz",
    "@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-schema-2.0.9-8f8a863.tgz",
    "@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-core-2.0.9-8f8a863.tgz",
    "@agentuity/evals": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-evals-2.0.9-8f8a863.tgz",
    "@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-keyvalue-2.0.9-8f8a863.tgz",
    "@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-server-2.0.9-8f8a863.tgz",
    "@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-migrate-2.0.9-8f8a863.tgz",
    "@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-email-2.0.9-8f8a863.tgz",
    "@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-queue-2.0.9-8f8a863.tgz",
    "@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-task-2.0.9-8f8a863.tgz",
    "@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-runtime-2.0.9-8f8a863.tgz",
    "@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-webhook-2.0.9-8f8a863.tgz"
  }
}

Or install directly:

bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-cli-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-sandbox-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-react-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-schedule-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-opencode-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-coder-tui-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-drizzle-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-auth-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-claude-code-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-workbench-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-db-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-frontend-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-coder-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-vector-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-postgres-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-schema-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-core-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-evals-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-keyvalue-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-server-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-migrate-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-email-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-queue-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-task-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-runtime-2.0.9-8f8a863.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-8f8a863/agentuity-webhook-2.0.9-8f8a863.tgz

The publicAssetPathPlugin was a lint-only plugin that warned when users
referenced legacy Agentuity-v1 '/public/foo.svg' paths in their frontend
code. It never blocked a build, never transformed code, and was
redundant with the cloud-deployment integration test that already
catches unrewritten /public/ URLs end-to-end at deploy time.

To run it inside Vite's subprocess-isolated client build, the CLI
generated '.agentuity/vite.client.config.ts' on every build, re-exporting
the user's vite.config.ts and merging the plugin in. That wrapper
carried a few pieces of accidental complexity:

  - A multi-step plugin-path resolver (source tree, compiled dist,
    published package) with a fallback import string that didn't match
    the CLI's package.json exports.
  - An absolute-path import baked into a generated file that then
    shipped inside the deploy zip, since nothing in deploy.ts's filter
    excluded it.
  - Duplicate plugin wiring for dev (vite-asset-server-config) and
    prod (vite-builder wrapper).

All of that existed only so a warning-only linter could run. Dropping
the plugin removes ~490 lines, lets the client build consume the user's
vite.config.ts directly via --config, and stops writing a junk file
into every production bundle.

If we need CLI-provided Vite plugins again, export them from
@agentuity/cli/vite-plugin and have templates add them explicitly —
the plugin surface becomes discoverable instead of smuggled in.
@Huijiro Huijiro merged commit 53e947b into main Apr 20, 2026
17 of 19 checks passed
@Huijiro Huijiro deleted the fix/static-renderer-root-index branch April 20, 2026 20:07
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