Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cta.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"mode": "file-router",
"typescript": true,
"tailwind": false,
"packageManager": "npm",
"packageManager": "bun",
"git": true,
"install": true,
"addOnOptions": {},
Expand Down
31 changes: 10 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,41 +29,30 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Clean node_modules and npm cache (Windows)
- name: Clean node_modules (Windows)
if: runner.os == 'Windows'
run: |
if (Test-Path node_modules) { Remove-Item -Recurse -Force node_modules }
npm cache clean --force
shell: pwsh

- name: Clean node_modules and npm cache (macOS/Linux)
- name: Clean node_modules (macOS/Linux)
if: runner.os != 'Windows'
run: |
rm -rf node_modules package-lock.json || true
npm cache clean --force
run: rm -rf node_modules || true

- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: npm ci --include=optional

- name: Install dependencies (macOS/Linux)
if: runner.os != 'Windows'
run: npm install --include=optional --force
- name: Install dependencies
run: bun install

- name: Rebuild native dependencies
run: npx electron-builder install-app-deps
run: bunx electron-builder install-app-deps

- name: Build frontend
run: npm run build
run: bun run build

- name: Package Electron app
run: npm run dist -- --publish=never
run: bun run dist -- --publish=never

- name: Upload Electron Artifacts
uses: actions/upload-artifact@v4
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: npm install
run: bun install
Comment on lines +15 to +19
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.

🧹 Nitpick | 🔵 Trivial

🧩 Analysis chain

🌐 Web query:

oven-sh/setup-bun action default version and bun install --frozen-lockfile flag

💡 Result:

The oven-sh/setup-bun GitHub Action's default version is v2 (latest release v2.2.0 as of March 2026). When no bun-version is specified in the workflow, it checks package.json for "packageManager" (e.g., "[email protected]") or "engines.bun", falling back to the latest Bun version if neither is found or package.json is absent. The bun install --frozen-lockfile flag ensures reproducible installs by using exact versions from bun.lockb or bun.lock. It fails if package.json disagrees with the lockfile and does not update the lockfile. This is recommended for CI and equivalent to bun ci. It is not enabled by default; bun install normally updates the lockfile. There is an open proposal for a flag to disable frozen-lockfile behavior (e.g., --no-frozen-lockfile), but none exists currently.

Citations:


Pin the Bun version and use --frozen-lockfile for reproducible CI.

Two reproducibility issues with the current setup:

  1. oven-sh/setup-bun@v2 will default to the latest Bun release if your package.json doesn't specify a version via the packageManager field or engines.bun. This means a future Bun release can silently break CI without any code change in this repo.

  2. bun install will update bun.lockb if it drifts from package.json. In CI, you want a strict, lockfile-faithful install that fails on drift rather than silently mutating dependencies.

♻️ Suggested change
       - name: Setup Bun
         uses: oven-sh/setup-bun@v2
+        with:
+          bun-version: 1.2.x

       - name: Install dependencies
-        run: bun install
+        run: bun install --frozen-lockfile

Alternatively, add "packageManager": "[email protected]" to package.json to let the action detect the version automatically.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 15 - 19, Pin the Bun setup action and
make installs reproducible: change the GitHub action step using
oven-sh/setup-bun@v2 to pin a specific Bun release (e.g., set the action's input
like bun-version or switch to oven-sh/setup-bun@v2 with a fixed version tag) or
add "packageManager": "bun@<major>.<minor>.x" to package.json so the action
detects the version, and modify the Install dependencies step to run bun install
--frozen-lockfile instead of bun install to fail on lockfile drift.


- name: Run Biome Check
run: npx @biomejs/biome ci .
run: bunx @biomejs/biome ci .

- name: Run Build
run: npm run build
run: bun run build
19 changes: 9 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ What we expect:

### Prerequisites

- [Node.js](https://nodejs.org/) (v18 or higher recommended)
- npm (comes with Node.js)
- [Bun](https://bun.sh/) (v1.0 or higher recommended)
- Access to Windows, Linux Wayland, and macOS (either on bare metal or via VM) is mandatory to fully test the app's cross-platform functionality.

### Setup
Expand All @@ -98,12 +97,12 @@ What we expect:

5. **Install Dependencies**
```bash
npm install
bun install
```

6. **Run the Project**
```bash
npm run dev
bun run dev
```

## 🔄 Development Workflow
Expand Down Expand Up @@ -131,13 +130,13 @@ We use Vitest for testing and Biome for formatting/linting:

```bash
# Run tests
npm run test
bun run test

# Format & Lint code
npm run check
bun run check

# Auto-fix formatting & linting issues
npm run check:fix
bun run check:fix
```

### 4. Commit Your Changes
Expand Down Expand Up @@ -177,8 +176,8 @@ git push origin feature/your-feature-name

### Before Submitting

- [ ] Your code follows the project's style guidelines (`npm run check`)
- [ ] You've tested your changes thoroughly (`npm run test`)
- [ ] Your code follows the project's style guidelines (`bun run check`)
- [ ] You've tested your changes thoroughly (`bun run test`)
- [ ] You've updated relevant documentation
- [ ] Your commits are clean and well-organized
- [ ] You've rebased with the latest upstream changes
Expand Down Expand Up @@ -238,7 +237,7 @@ The project uses [Biome](https://biomejs.dev/) for formatting and linting.

### General Guidelines

- Run `npm run check` (or `npm run check:fix` to auto-fix) before committing your code.
- Run `bun run check` (or `bun run check:fix` to auto-fix) before committing your code.
- Use meaningful variable and function names.
- Keep functions small and focused.
- Add comments for complex logic.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ Quality couch keyboards are not so accessible, STT on Linux isn’t in a good st

1. Install dependencies:
```bash
npm install
bun install
```
2. Start the development server:
```bash
npm run dev
bun run dev
```
3. Open the local app: `http://localhost:3000`

Expand Down
2 changes: 1 addition & 1 deletion electron/main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function startServer() {

console.log("Starting server from:", serverPath);

serverProcess = spawn('node', [serverPath], {
serverProcess = spawn('bun', [serverPath], {
stdio: 'ignore', // no terminal
windowsHide: true, // hide CMD
env: {
Expand Down
Loading
Loading