mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-07 16:19:09 +00:00
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:
parent
20f63e8cab
commit
e1d85526b6
11 changed files with 11967 additions and 11934 deletions
|
|
@ -16,7 +16,7 @@ Open SWE has two runnable pieces:
|
||||||
- [uv](https://docs.astral.sh/uv/) package manager
|
- [uv](https://docs.astral.sh/uv/) package manager
|
||||||
- [LangGraph CLI](https://docs.langchain.com/langsmith/cli)
|
- [LangGraph CLI](https://docs.langchain.com/langsmith/cli)
|
||||||
- [ngrok](https://ngrok.com/) (for local development — exposes webhook endpoints to the internet)
|
- [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
|
## 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
|
```bash
|
||||||
cd ui
|
cd ui
|
||||||
bun install
|
pnpm install
|
||||||
cat > .env <<'EOF'
|
cat > .env <<'EOF'
|
||||||
VITE_DASHBOARD_API_BASE_URL="http://localhost:2024"
|
VITE_DASHBOARD_API_BASE_URL="http://localhost:2024"
|
||||||
EOF
|
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.
|
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`.
|
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
|
## 9. Verify it works
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 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
|
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
|
## Run
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ export default function globalSetup() {
|
||||||
if (existsSync(shell) && !process.env.E2E_FORCE_UI_BUILD) return;
|
if (existsSync(shell) && !process.env.E2E_FORCE_UI_BUILD) return;
|
||||||
|
|
||||||
if (!existsSync(resolve(ui, "node_modules"))) {
|
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,
|
cwd: ui,
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
env: { ...process.env, VITE_DASHBOARD_API_BASE_URL: `http://127.0.0.1:${port}` },
|
env: { ...process.env, VITE_DASHBOARD_API_BASE_URL: `http://127.0.0.1:${port}` },
|
||||||
|
|
|
||||||
10
ui/AGENTS.md
10
ui/AGENTS.md
|
|
@ -4,9 +4,9 @@ This file applies to all work under `ui/`.
|
||||||
|
|
||||||
## Package manager
|
## Package manager
|
||||||
|
|
||||||
- Use **Bun** for dashboard dependency management and script execution.
|
- Use **pnpm** for dashboard dependency management and script execution.
|
||||||
- `bun.lock` is the canonical lockfile for this directory.
|
- Run UI scripts with `pnpm run <script>` (for example, `pnpm run typecheck`, `pnpm run lint`, `pnpm run test`, `pnpm run build`).
|
||||||
- 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 `pnpm install` / `pnpm add` only.
|
||||||
- Install or update UI dependencies with `bun install` / `bun add` only.
|
|
||||||
- Do **not** use npm in this directory: no `npm install`, `npm ci`, `npm run`, `npx`, or npm lockfile changes.
|
- 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.
|
||||||
|
|
|
||||||
|
|
@ -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:
|
To add components to your app, run the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx shadcn@latest add button
|
pnpm dlx shadcn@latest add button
|
||||||
```
|
```
|
||||||
|
|
||||||
This will place the ui components in the `components` directory.
|
This will place the ui components in the `components` directory.
|
||||||
|
|
|
||||||
2533
ui/bun.lock
2533
ui/bun.lock
File diff suppressed because it is too large
Load diff
|
|
@ -1,10 +1,11 @@
|
||||||
{
|
{
|
||||||
"name": "open-swe-dashboard",
|
"name": "open-swe-dashboard",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"packageManager": "pnpm@11.9.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev --port 3000",
|
"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",
|
"preview": "vite preview",
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"lint": "eslint",
|
"lint": "eslint",
|
||||||
|
|
@ -55,6 +56,7 @@
|
||||||
"@types/react": "^19.2.14",
|
"@types/react": "^19.2.14",
|
||||||
"@types/react-dom": "^19.2.3",
|
"@types/react-dom": "^19.2.3",
|
||||||
"@vitejs/plugin-react": "^5.2.0",
|
"@vitejs/plugin-react": "^5.2.0",
|
||||||
|
"httpxy": "0.5.3",
|
||||||
"jsdom": "^27.4.0",
|
"jsdom": "^27.4.0",
|
||||||
"prettier": "^3.8.1",
|
"prettier": "^3.8.1",
|
||||||
"prettier-plugin-tailwindcss": "^0.7.2",
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
||||||
|
|
|
||||||
11946
ui/pnpm-lock.yaml
generated
Normal file
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
3
ui/pnpm-workspace.yaml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
allowBuilds:
|
||||||
|
esbuild: true
|
||||||
|
unrs-resolver: true
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"framework": null,
|
"framework": null,
|
||||||
"buildCommand": "bun run build",
|
"buildCommand": "pnpm run build",
|
||||||
|
"installCommand": "pnpm install --frozen-lockfile",
|
||||||
"outputDirectory": ".output/public",
|
"outputDirectory": ".output/public",
|
||||||
"rewrites": [
|
"rewrites": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
9386
ui/yarn.lock
9386
ui/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue