Skip to content

chore: update Vite, Tailwind, and build tooling - #29345

Merged
OrcaWin merged 4 commits into
mainfrom
OrcaWin/build-toolchain-update
Oct 16, 2026
Merged

OrcaWin merged 4 commits into
mainfrom
OrcaWin/build-toolchain-update

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Update the tools that build and test Orca together, replacing the Rolldown preview with stable Vite 8. This also removes unnecessary Babel work from the React and Electron build path.

What Changed

  • Upgrade Vite to 8.3.4, React plugin to 6.1.2, Electron Vite to 6.0.0, Tailwind and its Vite plugin to 4.3.3, Vitest to 5.0.5, and Electron rebuild to 4.2.1. Keep the process-host test package on the same Vitest patch and update mobile's Vite to 8.3.4.
  • Use Electron Vite's existing dependency handling instead of the duplicate external predicate, which version 6 merges into an invalid array. The output-contract test now checks the fully resolved configuration, including native packages, subpaths, Electron, and dependencies that must stay bundled.
  • Preserve exact main entry exports. A CLI build can replace these entry files after the desktop build; Vite 8's default puts private shared exports in those files, crashing Electron at startup. Protecting the signatures of entries with public exports keeps their shared implementation code in separate chunks, while keeping the main startup code beside its renderer and preload paths. A build regression test reproduces the overwrite, and the build rejects moving startup code into a subfolder.
  • Fix the existing root max-lines blocker by moving the Git base-branch compatibility case into its own registered case file, following the suite's existing pattern. Main resolved the mobile max-lines blocker in test(mobile): split MobileNativeChatView.test.ts under the max-lines limit #29368 and the extracted harness mock exemption in ci: unblock static analysis after the MobileNativeChatView test split #29378; this branch preserves both fixes.
  • Update the credential-runtime fixture to override resolved rolldownOptions; Vite 8 otherwise ignores its old input override and builds the full app in the temporary directory before its dependencies are staged. The Node and Electron runtime checks both pass.
  • Update the sequencer test's cache mock for Vitest's current API. Keep release-delay exceptions limited to exact new package versions and preserve unrelated mobile dependency resolutions.

Why

These versions are intended to work together. Upgrading just the React plugin would leave an unsupported Vite peer, while keeping the preview alias would miss the stable toolchain. Reusing Electron Vite's existing dependency handling avoids maintaining a second implementation.

Bun 1.4.3 is already pinned and used for unit tests, CI typechecking, and measured CI checks. Both typecheck paths and the test runner were verified with these upgrades. An additional bundler comparison measured Node at 7.307/7.110 seconds and Bun at 6.875/6.949 seconds on this Linux host. Builds continue using Node: running the bundler on Bun also runs its plain-Node compatibility smoke check on Bun, invalidating that check for a small saving.

The generated renderer CSS was 1,303,980 bytes versus 1,436,581 before (about 9% smaller), with every previously emitted CSS class retained. Renderer boot-graph output fell from 5,030.0 KB to 4,929.1 KB. These are local output measurements, not a cross-platform build-time claim.

Linked Issue

Maintainer-requested tooling maintenance; no existing issue.

Visual Proof

N/A — build and test tooling changes; no intended UI or interaction change. Generated CSS class coverage was compared before and after.

Testing

Tested on Linux with Node 24.22.0, pnpm 12.8.1, and Bun 1.4.3, with ORCA_BACKGROUND_LAUNCH=1:

  • Root and mobile frozen installs pass under the normal release-delay policy.

  • Native TypeScript and Bun CI typechecks pass.

  • Desktop, standalone web, and packaged mobile-web bundle builds pass, including output verification.

  • 160 root regression tests pass under both Node and Bun, including build output, launch wrappers, plugin behavior, and the custom Node worker pool; two existing platform-specific skips.

  • 130 process-host tests and 18 mobile tests pass.

  • Changed-code quality, focused lint, changed-file formatting, dead-class checks, and precommit hooks pass.

  • The startup regression test fails without protecting exported entry signatures and passes with them. The rebuilt desktop no longer imports the CLI entry that TypeScript replaces. Desktop-then-CLI compilation succeeds.

  • The 45 focused build and real-Git compatibility tests and 56 mobile chat tests pass after rebasing the CI fixes. The new bundling regression also passes under Node 24. Root native and Bun CI typechecking, mobile lint, and mobile test-typecheck ratcheting pass.

  • After the latest Electron-config rebase, 51 focused build and packaging tests, the full desktop build, and the Node typecheck pass; one existing platform-specific test is skipped. Main's layout-build packaging safeguards are preserved.

  • On commit de61f20, all 53 CI checks pass (11 conditional skips), including the full .github/workflows/pr.yml run 38850527447 and its PR checks passed aggregate. All five unit-test shards, Linux/Windows packaging, mobile checks, all Windows SSH variants, cross-version wire and Git compatibility, layout E2E checks, and the platform persistence/glibc/musl matrix pass.

  • Both max-lines errors are fixed without disabling or raising limits. Full local lint reaches existing mobile import cycles when mobile dependencies are installed; CI runs that check before installing mobile dependencies. CI remains the merge gate for all platforms.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

No application runtime or wire protocol changes. Native dependency externalization, SSH/plain-Node entries, sandboxed preload dependencies, and mobile's separate install are covered by existing contracts. Linux, macOS, Windows x64/ARM, SSH, mobile web, and older Linux runtime compatibility are validated by CI.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c72a0083-3291-4bb9-b323-0a4982b455e8
📥 Commits

Reviewing files that changed from the base of the PR and between c5740aa and de61f20.

📒 Files selected for processing: 1
  • config/scripts/managed-data-account-runtime.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

📝 Walkthrough

The Electron main build no longer derives external dependencies from package.json. It sets entry signatures to exports-only, and its bootstrap plugin checks that index.js contains the main entry point. Tests inspect resolved external patterns and run a built main entry with a replaced controls entry. The changes also update development dependency ranges, adjust test configuration for Rolldown, and add a registered Git compatibility test for local-base-branch fast-forward behavior.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to de61f

The new facade test can pass even if the replacement controls entry is ignored, leaving a narrow regression-coverage gap. No present runtime failure is established, so the remaining merge risk is low.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description covers the required sections, explains the tooling changes and rationale, documents testing and platform coverage, and marks visual proof as not applicable. The maintainer-specific lin…
Title check Passed The title clearly and concisely identifies the primary change: updating Vite, Tailwind, and related build tooling.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

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

@OrcaWin
OrcaWin force-pushed the OrcaWin/build-toolchain-update branch from 16f7b50 to a32f353 Compare October 16, 2026 02:31

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a436742a-186a-4ba7-87aa-4fd261a8f6d4
📥 Commits

Reviewing files that changed from the base of the PR and between 16f7b50 and a32f353f60669fb5bd49402a35ecc20c5b90ba3d.

⛔ Files ignored due to path filters: 2
  • mobile/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing: 5
  • config/scripts/main-entry-facade.test.ts
  • electron.vite.config.ts
  • mobile/src/session/MobileNativeChatView.test.ts
  • src/shared/git-binary-compatibility.test.ts
  • src/shared/git-local-base-branch-binary-compatibility.test-cases.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

}
})
// tsc emits public names only, replacing the bundler's entry at this same path.
await writeFile(join(root, 'dist', 'controls.js'), 'exports.getStatus = () => 0')

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the replacement controls entry distinguishable.

If the built main entry still uses the bundled getStatus(), this test passes: both the original function and the replacement return 0. Make the replacement return a different value, then assert that value in state.status. This will test whether replacing controls.js changes the main entry’s behavior.

Proposed change
--- "a/config/scripts/main-entry-facade.test.ts"
+++ "b/config/scripts/main-entry-facade.test.ts"
@@ -35,7 +35,7 @@
       }
     })
     // tsc emits public names only, replacing the bundler's entry at this same path.
-    await writeFile(join(root, 'dist', 'controls.js'), 'exports.getStatus = () => 0')
+    await writeFile(join(root, 'dist', 'controls.js'), 'exports.getStatus = () => 1')
     const require = createRequire(import.meta.url)
     expect(require(join(root, 'dist', 'index.js')).state).toEqual({
       status: 0,

Update the expected status to 1 as well.

@OrcaWin
OrcaWin force-pushed the OrcaWin/build-toolchain-update branch 2 times, most recently from 3300f83 to fa2ab69 Compare October 16, 2026 03:15
@OrcaWin
OrcaWin force-pushed the OrcaWin/build-toolchain-update branch from fa2ab69 to c5740aa Compare October 16, 2026 03:19
@OrcaWin
OrcaWin merged commit 144aac0 into main Oct 16, 2026
64 checks passed
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