chore: switch ui to pnpm (#1645)

* chore: require pnpm for ui agent work

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>

* chore: switch ui to pnpm

Replace Bun and Yarn lockfiles with pnpm lockfile and update UI/Vercel commands to use pnpm.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>

* ci: use corepack for ui pnpm e2e build

Run pnpm through Corepack in the E2E global setup so CI can use the pinned package manager without a separate pnpm install step.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
This commit is contained in:
Johannes du Plessis 2026-06-30 11:29:16 -07:00 • committed by GitHub
parent 20f63e8cab
commit e1d85526b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 11967 additions and 11934 deletions

View file

@ -16,7 +16,7 @@ Open SWE has two runnable pieces:
- [uv](https://docs.astral.sh/uv/) package manager
- [LangGraph CLI](https://docs.langchain.com/langsmith/cli)
- [ngrok](https://ngrok.com/) (for local development — exposes webhook endpoints to the internet)
- [Bun](https://bun.sh/) (only if you want to run the dashboard UI locally — see step 8). Node 20+ also works, but `ui/bun.lock` is the canonical lockfile.
- [pnpm](https://pnpm.io/) (only if you want to run the dashboard UI locally — see step 8). Node 20+ also works, but `ui/pnpm-lock.yaml` is the canonical lockfile.
## 1. Clone and install
@ -582,11 +582,11 @@ The dashboard is the web app in `ui/`. It's a static TanStack Start client that
```bash
cd ui
bun install
pnpm install
cat > .env <<'EOF'
VITE_DASHBOARD_API_BASE_URL="http://localhost:2024"
EOF
bun run dev # vite dev --port 3000 -> http://localhost:3000
pnpm run dev # vite dev --port 3000 -> http://localhost:3000
```
The dashboard needs `VITE_DASHBOARD_API_BASE_URL` in `ui/.env` pointing at the backend for local dev. The file is intentionally untracked because `.env*` files are gitignored.
@ -595,7 +595,7 @@ The client calls `${VITE_DASHBOARD_API_BASE_URL}/dashboard/api/*` with `credenti
For the dashboard login to succeed, you need (from steps 3c / 6): `GITHUB_APP_CLIENT_ID`, `GITHUB_APP_CLIENT_SECRET`, `DASHBOARD_JWT_SECRET`, `DASHBOARD_API_BASE_URL`, `DASHBOARD_BASE_URL`, and `DASHBOARD_ALLOWED_ORIGINS`. To reach the admin pages (user mappings, etc.), add your GitHub login or email to `CONFIGURED_ADMINS`.
Other UI scripts: `bun run build`, `bun run typecheck`, `bun run lint`, `bun run test`.
Other UI scripts: `pnpm run build`, `pnpm run typecheck`, `pnpm run lint`, `pnpm run test`.
## 9. Verify it works

View file

@ -54,7 +54,7 @@ extra fake is the OAuth-token store (an external credential).
The UI is built by `global-setup.ts` with `VITE_DASHBOARD_API_BASE_URL` pointed at
the harness. It builds once; set `E2E_FORCE_UI_BUILD=1` to rebuild (e.g. after a
UI change or port change). Requires `bun`.
UI change or port change). Requires Corepack with `pnpm` enabled.
## Run

View file

@ -14,9 +14,9 @@ export default function globalSetup() {
if (existsSync(shell) && !process.env.E2E_FORCE_UI_BUILD) return;
if (!existsSync(resolve(ui, "node_modules"))) {
execSync("bun install", { cwd: ui, stdio: "inherit" });
execSync("corepack pnpm install --frozen-lockfile", { cwd: ui, stdio: "inherit" });
}
execSync("bun run build", {
execSync("corepack pnpm run build", {
cwd: ui,
stdio: "inherit",
env: { ...process.env, VITE_DASHBOARD_API_BASE_URL: `http://127.0.0.1:${port}` },

View file

@ -4,9 +4,9 @@ This file applies to all work under `ui/`.
## Package manager
- Use **Bun** for dashboard dependency management and script execution.
- `bun.lock` is the canonical lockfile for this directory.
- Run UI scripts with `bun run <script>` (for example, `bun run typecheck`, `bun run lint`, `bun run test`, `bun run build`).
- Install or update UI dependencies with `bun install` / `bun add` only.
- Use **pnpm** for dashboard dependency management and script execution.
- Run UI scripts with `pnpm run <script>` (for example, `pnpm run typecheck`, `pnpm run lint`, `pnpm run test`, `pnpm run build`).
- Install or update UI dependencies with `pnpm install` / `pnpm add` only.
- Do **not** use npm in this directory: no `npm install`, `npm ci`, `npm run`, `npx`, or npm lockfile changes.
- If a command must use npm, it belongs outside `ui/` in a subtree that explicitly owns npm configuration and lockfiles.
- Do **not** use Bun in this directory: no `bun install`, `bun add`, `bun run`, `bunx`, or Bun lockfile changes.
- If a command must use npm or Bun, it belongs outside `ui/` in a subtree that explicitly owns that package-manager configuration and lockfiles.

View file

@ -7,7 +7,7 @@ This is a template for a new TanStack Start project with React, TypeScript, and
To add components to your app, run the following command:
```bash
npx shadcn@latest add button
pnpm dlx shadcn@latest add button
```
This will place the ui components in the `components` directory.

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,11 @@
{
"name": "open-swe-dashboard",
"private": true,
"packageManager": "pnpm@11.9.0",
"type": "module",
"scripts": {
"dev": "vite dev --port 3000",
"build": "vite build",
"build": "node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build",
"preview": "vite preview",
"test": "vitest run",
"lint": "eslint",
@ -55,6 +56,7 @@
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.2.0",
"httpxy": "0.5.3",
"jsdom": "^27.4.0",
"prettier": "^3.8.1",
"prettier-plugin-tailwindcss": "^0.7.2",

11946
ui/pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load diff

3
ui/pnpm-workspace.yaml Normal file
View file

@ -0,0 +1,3 @@
allowBuilds:
esbuild: true
unrs-resolver: true

View file

@ -1,6 +1,7 @@
{
"framework": null,
"buildCommand": "bun run build",
"buildCommand": "pnpm run build",
"installCommand": "pnpm install --frozen-lockfile",
"outputDirectory": ".output/public",
"rewrites": [
{

File diff suppressed because it is too large Load diff