Skip to content

Conversation

@ItzNotABug
Copy link
Member

@ItzNotABug ItzNotABug commented Nov 23, 2025

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Summary by CodeRabbit

  • Chores

    • Migrated project tooling from pnpm/Node to Bun across CI, Docker, Gitpod, and local scripts; updated package scripts and removed Node engine requirement.
  • Tests

    • CI, unit and E2E workflows now run with Bun; test and Playwright commands updated.
  • Documentation

    • Contributing and setup docs revised to Bun-based commands.
  • Style

    • Formatter ignore updated to include Bun lockfile; Svelte lint rules now emit warnings.
  • UI / Themes

    • Code rendering switched to a new component and expanded syntax-highlight theme tokens.
  • Bug Fixes

    • Fixed binary handling to ensure correct blob construction.

@ItzNotABug ItzNotABug self-assigned this Nov 23, 2025
@appwrite
Copy link

appwrite bot commented Nov 23, 2025

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Failed Failed View Logs Preview URL QR Code

Tip

Preview deployments create instant URLs for every branch and commit

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 23, 2025

Walkthrough

The PR migrates project tooling from Node.js/npm/pnpm to Bun across CI workflows (.github/workflows), Gitpod, Dockerfile, and documentation (CONTRIBUTING.md, AGENTS.md). Package manager commands and lockfile references changed to Bun equivalents (bun install, bun run, bun test, bunx playwright install, bun.lock). package.json removed pnpm/packageManager/engines fields, updated scripts, added an overrides block, bumped a dependency, and removed prismjs. ESLint rules were adjusted. build.js removed a duplicate import. src/lib/helpers/files.ts changes Blob creation. src/lib/components/code.svelte replaced Prism usage with a Code component and changed the language prop type. Several theme JSON files were extended with Shiki tokens. vite.config.ts removed prismjs from dep lists.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Bun' is extremely vague and does not clearly summarize the main changes in the pull request. Provide a more descriptive title that clearly summarizes the main change, such as 'Migrate from pnpm to Bun package manager' or 'Replace npm/pnpm tooling with Bun throughout project'.
✅ 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.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bun

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 and usage tips.

@ItzNotABug ItzNotABug changed the base branch from improve-perf-size to main December 31, 2025 13:14
@ItzNotABug ItzNotABug marked this pull request as ready for review December 31, 2025 13:15
@ItzNotABug ItzNotABug changed the title Bun 🚧 Bun Dec 31, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/e2e.yml (1)

28-28: Update cache key to reference Bun lockfile.

The cache key still references pnpm-lock.yaml, but the project has migrated to Bun. This should reference Bun's lockfile instead.

🔎 Proposed fix
-                  key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }}
+                  key: ${{ runner.os }}-playwright-${{ hashFiles('**/bun.lockb') }}
🧹 Nitpick comments (4)
eslint.config.js (1)

37-39: Consider addressing these Svelte reactivity rules in a future refactor.

Two additional Svelte-specific rules have been disabled:

  • svelte/prefer-svelte-reactivity: Recommends using Svelte's reactivity features
  • svelte/prefer-writable-derived: Suggests using writable derived stores

While disabling these rules is acceptable for now, consider adding them to the technical debt backlog for future improvement as they promote better Svelte patterns and maintainability.

.github/workflows/copilot-setup-steps.yml (1)

21-27: Consider pinning the Bun version for CI stability.

The workflow correctly migrates to Bun setup, but using bun-version: latest may introduce non-deterministic behavior in CI if Bun releases breaking changes.

🔎 Suggested fix to pin Bun version
 - name: Setup Bun
   uses: oven-sh/setup-bun@v2
   with:
-      bun-version: latest
+      bun-version: 1.1.42

Replace 1.1.42 with the specific Bun version you've tested with. Check your package.json packageManager field or local Bun version for the appropriate value.

Dockerfile (2)

5-6: Use COPY instead of ADD for local files.

The Hadolint static analysis correctly identifies that COPY should be used instead of ADD for local files and folders. ADD has additional features (tar extraction, URL fetching) that aren't needed here, making COPY more explicit and safer.

🔎 Proposed fix
-ADD ./package.json /app/package.json
-ADD ./bun.lock /app/bun.lock
+COPY ./package.json /app/package.json
+COPY ./bun.lock /app/bun.lock

Consider updating other ADD commands (lines 10-15) to COPY as well for consistency, unless tar extraction is specifically needed.


1-1: Consider pinning the Bun Alpine image version.

Using oven/bun:alpine without a specific version tag may lead to non-deterministic builds if the image is updated with breaking changes.

🔎 Suggested fix to pin image version
-FROM --platform=$BUILDPLATFORM oven/bun:alpine AS build
+FROM --platform=$BUILDPLATFORM oven/bun:1.1.42-alpine AS build

Replace 1.1.42 with the specific Bun version you've tested with. Check your local Bun version or package.json packageManager field for the appropriate value.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between caa4d79 and 0a4ca86.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • .github/workflows/copilot-setup-steps.yml
  • .github/workflows/e2e.yml
  • .github/workflows/tests.yml
  • .gitpod.yml
  • .prettierignore
  • CONTRIBUTING.md
  • Dockerfile
  • build.js
  • eslint.config.js
  • package.json
  • playwright.config.ts
  • src/lib/helpers/files.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx,svelte}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx,svelte}: Import reusable modules from the src/lib directory using the $lib alias
Use minimal comments in code; reserve comments for TODOs or complex logic explanations
Use $lib, $routes, and $themes aliases instead of relative paths for module imports

Files:

  • src/lib/helpers/files.ts
  • build.js
  • eslint.config.js
  • playwright.config.ts
src/lib/helpers/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Implement pure functions in src/lib/helpers/ directory and use camelCase for helper function names

Files:

  • src/lib/helpers/files.ts
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.ts: Define types inline or in .d.ts files, avoid creating separate .types.ts files
Use TypeScript in non-strict mode; any type is tolerated in this project

Files:

  • src/lib/helpers/files.ts
  • playwright.config.ts
**/*.{ts,tsx,js,jsx,svelte,json}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation, single quotes, 100 character line width, and no trailing commas per Prettier configuration

Files:

  • src/lib/helpers/files.ts
  • build.js
  • package.json
  • eslint.config.js
  • playwright.config.ts
🧠 Learnings (9)
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to src/lib/helpers/**/*.ts : Implement pure functions in src/lib/helpers/ directory and use camelCase for helper function names

Applied to files:

  • src/lib/helpers/files.ts
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Run the mandatory pre-completion checklist before finishing work: pnpm run format → pnpm run check → pnpm run lint → pnpm run test → pnpm run build, ensuring all commands pass with zero errors

Applied to files:

  • .github/workflows/copilot-setup-steps.yml
  • CONTRIBUTING.md
  • .github/workflows/tests.yml
  • .gitpod.yml
  • .github/workflows/e2e.yml
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Configure environment variables by copying .env.example to .env and setting PUBLIC_APPWRITE_ENDPOINT and PUBLIC_CONSOLE_MODE

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Run pnpm run format before pnpm run lint to auto-fix formatting conflicts

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Run pnpm commands with --frozen-lockfile flag to ensure consistent dependencies

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to **/*.svelte : Use Svelte 5 + SvelteKit 2 syntax with TypeScript for component development

Applied to files:

  • eslint.config.js
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx,svelte,json} : Use 4 spaces for indentation, single quotes, 100 character line width, and no trailing commas per Prettier configuration

Applied to files:

  • eslint.config.js
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Ensure Playwright tests have access to preview server on port 4173; wait 120s for startup before running E2E tests

Applied to files:

  • playwright.config.ts
  • .github/workflows/e2e.yml
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to e2e/journeys/*.spec.ts : Write Playwright E2E tests in e2e/journeys/*.spec.ts files with 120s timeout and 3x retry configuration

Applied to files:

  • .github/workflows/e2e.yml
🪛 Hadolint (2.14.0)
Dockerfile

[error] 5-5: Use COPY instead of ADD for files and folders

(DL3020)


[error] 6-6: Use COPY instead of ADD for files and folders

(DL3020)

🪛 markdownlint-cli2 (0.18.1)
CONTRIBUTING.md

179-179: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


181-181: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


183-183: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

⏰ 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). (1)
  • GitHub Check: e2e
🔇 Additional comments (5)
build.js (1)

1-1: LGTM! Import consolidation improves code organization.

Moving the kleur import to the top and removing the duplicate import later in the file follows best practices for module organization.

.prettierignore (1)

1-5: LGTM! Properly excludes Bun lock file from formatting.

The addition of bun.lock to the ignore list is consistent with the existing treatment of other package manager lock files.

playwright.config.ts (1)

22-22: LGTM! Playwright webServer command updated for Bun.

The command has been correctly updated to use Bun equivalents while preserving the existing timeout and port configuration that ensures E2E tests have adequate startup time.

.gitpod.yml (1)

8-9: LGTM! Gitpod configuration updated for Bun.

The init and command steps have been correctly updated to use Bun for dependency installation, building, and running the development server.

src/lib/helpers/files.ts (1)

68-71: The Uint8Array wrapping is unnecessary; nanotar v0.1.1 is fully compatible with Bun.

nanotar v0.1.1 explicitly advertises support for "any JavaScript runtime (Node.js, Bun, Deno, Browsers, Edge Workers)" and works without modification. Both Bun and Node.js handle Uint8Array and Blob identically—wrapping the tar buffer in new Uint8Array(tar) is redundant since Blob accepts Buffer or Uint8Array directly with zero-copy or negligible overhead. The code works as-is, but you can simplify lines 68-70 to const blob = new Blob([tar], { type: 'application/gzip' }) if tar is already a Uint8Array or Buffer.

Copy link
Contributor

@TorstenDittmann TorstenDittmann left a comment

Choose a reason for hiding this comment

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

the pnpm lock file is still left I think

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@package.json`:
- Around line 6-10: The "clean" npm script (and any other scripts in
package.json that reference .svelte_kit) is deleting the wrong SvelteKit
directory name; change references of ".svelte_kit" to ".svelte-kit" so the
cache/build dir is correctly removed. Locate the "clean" script (and other
scripts that run rm -rf .svelte_kit) in package.json and replace ".svelte_kit"
with ".svelte-kit" to ensure the SvelteKit cache directory is properly cleaned.
- Line 35: The dependency bump to ai v6 may break runtime because several APIs
changed; run the official codemod (npx `@ai-sdk/codemod` v6) and update code
references: make convertToCoreMessages calls async, replace
generateObject/streamObject usages with their v6 alternatives, rename
textEmbeddingModel to embeddingModel, refactor any Experimental_Agent usage to
ToolLoopAgent, and audit OpenAI client instantiations for strictJsonSchema=true
defaults; ensure tests pass and update any callsites/signatures that relied on
the old CoreMessage shapes.

@abnegate abnegate merged commit c19cad5 into main Feb 2, 2026
4 of 5 checks passed
@abnegate abnegate deleted the bun branch February 2, 2026 09:26
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.

4 participants