Skip to content

Migrate build and test pipeline to vite-plus#1616

Draft
juliusmarminge wants to merge 7 commits intomainfrom
t3code/viteplus-migrate
Draft

Migrate build and test pipeline to vite-plus#1616
juliusmarminge wants to merge 7 commits intomainfrom
t3code/viteplus-migrate

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented Mar 31, 2026

Summary

  • Replace the legacy tsdown/vitest workflow with vite-plus across desktop, server, web, and shared packages.
  • Consolidate build and test configs around root-level Vite-based task runners, including new vite.config.ts files and removed Turbo/tsdown config.
  • Update the server CLI and CI cache setup to match the new workspace build flow and dependency catalog handling.
  • Refresh several type signatures and runtime checks that surfaced during the migration.

Testing

  • Install vite-plus: https://viteplus.dev/guide/#install-vp
  • Not run locally.
  • Expected to pass: bun fmt
  • Expected to pass: bun lint
  • Expected to pass: bun typecheck
  • Expected to pass: bun run test

Note

Medium Risk
Build/test infrastructure is replaced across desktop/server/web, so failures may surface in CI or local workflows despite mostly mechanical changes. Runtime logic changes are minor, but the new bundling/aliasing config affects how packages resolve and ship.

Overview
Switches the workspace build + test toolchain to vite-plus. Desktop/server bundling moves from tsdown to vp pack with new vite.config.ts files, Turbo app configs are removed, and package scripts are updated to use vp for build/dev/test.

Adjusts repo plumbing to match the new flow. CI caching drops .turbo and only caches Bun, docs update the meaning of bun run build, and TypeScript configs now include source-package paths (and exclude their tests) to support the new bundling/TS resolution.

Includes small correctness/type cleanups uncovered by the migration. Many Effect.Effect<..., never>/fiber signatures are loosened, workspace scanning ignores .vite instead of .turbo, and a few UI/test assertions and casts are simplified for stricter typing and more reliable browser tests.

Written by Cursor Bugbot for commit 881c649. This will update automatically on new commits. Configure here.

Note

Migrate build, test, and dev pipeline from vitest/turbo/tsdown to vite-plus

  • Replaces vitest imports with vite-plus/test across all test files in apps/, packages/, and scripts/.
  • Replaces turbo with vp (vite-plus CLI) for monorepo task orchestration in root and per-package package.json scripts (dev, build, test, lint, fmt).
  • Replaces tsdown with vp pack for bundling desktop and shared packages; adds vite.config.ts files for apps/desktop, apps/server, apps/web, packages/shared, and packages/contracts.
  • Adds path alias resolution for @t3tools/* workspace packages to source files across all vite configs and tsconfig.base.json, removing the need for pre-built outputs during development.
  • Workspace directory scanning in WorkspaceEntries.ts now ignores .vite instead of .turbo.
  • Removes turbo cache from CI; simplifies cache key to bun.lock only.
  • Behavioral Change: Effect.Effect and related types drop explicit never error/environment type parameters throughout the codebase, aligning with updated Effect library conventions.

Macroscope summarized 881c649. (Automatic summaries will resume when PR exits draft mode or review begins).

- Replace tsdown and Turbo build wiring with vite-plus tasks
- Switch server, desktop, and web tests to vite-plus test imports
- Tighten related Effect types and update CI/docs for the new workflow
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e4d3d144-bd31-4f9e-bee1-752c489f4ed5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/viteplus-migrate

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

@juliusmarminge juliusmarminge marked this pull request as draft March 31, 2026 20:50
@github-actions github-actions bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Mar 31, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Workspace scan no longer ignores Turbo cache
    • Restored .turbo to IGNORED_DIRECTORY_NAMES alongside the newly added .vite, since the migration accidentally replaced it instead of adding .vite as an additional entry.

Create PR

Or push these changes by commenting:

@cursor push 2d90d516bd
Preview (2d90d516bd)
diff --git a/apps/server/src/workspace/Layers/WorkspaceEntries.ts b/apps/server/src/workspace/Layers/WorkspaceEntries.ts
--- a/apps/server/src/workspace/Layers/WorkspaceEntries.ts
+++ b/apps/server/src/workspace/Layers/WorkspaceEntries.ts
@@ -21,6 +21,7 @@
   ".convex",
   "node_modules",
   ".next",
+  ".turbo",
   ".vite",
   "dist",
   "build",

You can send follow-ups to this agent here.

"node_modules",
".next",
".turbo",
".vite",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workspace scan no longer ignores Turbo cache

Medium Severity

Replacing ".turbo" with ".vite" in IGNORED_DIRECTORY_NAMES makes WorkspaceEntries recurse into old Turbo caches. When Git filtering is unavailable or the folder is outside a Git worktree, .turbo contents can flood indexing, hit WORKSPACE_INDEX_MAX_ENTRIES, and hide real project files from search results.

Additional Locations (1)
Fix in Cursor Fix in Web

juliusmarminge and others added 6 commits March 31, 2026 14:57
- Remove tsconfig path aliases and Vite aliases
- Point contracts/shared packages at source entrypoints
- Update dev runner imports to use package specifiers
- switch workspace checks and tests to `vp`
- fold Vitest browser config into `vite.config.ts`
- add `electron-builder` for desktop packaging
Co-authored-by: codex <codex@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant