diff --git a/.github/workflows/admin.yml b/.github/workflows/admin.yml index 812b58bd1..4564e6f1d 100644 --- a/.github/workflows/admin.yml +++ b/.github/workflows/admin.yml @@ -25,10 +25,11 @@ jobs: with: version: 9.12.3 - - name: Install dependencies + - name: Install and Build run: | cd ui/admin pnpm install + pnpm run build - name: Run linter run: make lint-admin diff --git a/tools/dev.sh b/tools/dev.sh index 412913881..fbce32009 100755 --- a/tools/dev.sh +++ b/tools/dev.sh @@ -82,7 +82,7 @@ server_ready_pid=$! print_with_color 153 "[admin-ui](install)" " $line" done - VITE_API_IN_BROWSER=true npm run dev 2>&1 | while IFS= read -r line; do + VITE_API_IN_BROWSER=true pnpm run dev 2>&1 | while IFS= read -r line; do print_with_color 153 "[admin-ui]" " $line" done ) & diff --git a/ui/admin/app/lib/service/routeService.ts b/ui/admin/app/lib/service/routeService.ts index c484f7b9e..307e646ce 100644 --- a/ui/admin/app/lib/service/routeService.ts +++ b/ui/admin/app/lib/service/routeService.ts @@ -2,6 +2,11 @@ import queryString from "query-string"; import { $params, $path, Routes, RoutesWithParams } from "remix-routes"; import { ZodNull, ZodSchema, ZodType, z } from "zod"; +// note: If you see a linter error related to `Routes`, or `RoutesWithParams`, +// it's probably because you need to run `pnpm run dev` or `pnpm run build` +// these types are generated by remix-routes, and are used to provide type +// safety when navigating through the app + const QuerySchemas = { agentSchema: z.object({ threadId: z.string().nullish(), diff --git a/ui/admin/package.json b/ui/admin/package.json index 5ad3c1bf2..a585b108c 100644 --- a/ui/admin/package.json +++ b/ui/admin/package.json @@ -8,8 +8,7 @@ "dev": "remix vite:dev", "lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint . && tsc --noEmit", "preview": "vite preview", - "format": "prettier --write .", - "postinstall": "npm run build" + "format": "prettier --write ." }, "dependencies": { "@gptscript-ai/gptscript": "^0.9.5-rc5",