From 2893f8e787ab096b4b7073ad9736c3b6b4d908a6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 01:45:10 +0000 Subject: [PATCH 1/3] Initial plan From 7b8dc3190799075b8ddd474b45a23988612601b6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 01:47:44 +0000 Subject: [PATCH 2/3] chore: unify console app base path to / across all environments - vite.config.ts: base path changed from /console/ to / - e2e/helpers: CONSOLE_BASE changed from /console to empty string - vercel.json: removed redundant VITE_BASE_PATH=/ override - playwright.config.ts: webServer url updated to / - plugin.ts: updated JSDoc comments - ROADMAP.md: added P1.16 entry Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com> --- ROADMAP.md | 10 ++++++++++ apps/console/plugin.ts | 3 +-- apps/console/vercel.json | 2 +- apps/console/vite.config.ts | 4 +--- e2e/helpers/index.ts | 4 ++-- playwright.config.ts | 2 +- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 9edac7958..f1f90433c 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -860,6 +860,16 @@ ObjectUI is a universal Server-Driven UI (SDUI) engine built on React + Tailwind - [x] 10 unit tests for `useObjectLabel` hook - [x] Zero changes to object metadata files or translation files +### P1.16 Console Base Path Unification ✅ + +> **Status:** Complete — Console app base path unified to `/` across all environments. + +- [x] `apps/console/vite.config.ts`: base path changed from `/console/` to `/` +- [x] `e2e/helpers/index.ts`: `CONSOLE_BASE` changed from `/console` to `''` +- [x] `apps/console/vercel.json`: removed `VITE_BASE_PATH=/` override (now redundant) +- [x] `playwright.config.ts`: webServer url updated from `/console/` to `/` +- [x] `apps/console/plugin.ts`: updated JSDoc to reflect new base path + --- ## 🧩 P2 — Polish & Advanced Features diff --git a/apps/console/plugin.ts b/apps/console/plugin.ts index bc29c9f52..1471ac9ca 100644 --- a/apps/console/plugin.ts +++ b/apps/console/plugin.ts @@ -5,8 +5,7 @@ * HonoServerPlugin auto-discovers this plugin via `type: 'ui-plugin'` * and mounts it at `/` (i.e. `/console`). * - * The SPA must be built with the matching base path: - * VITE_BASE_PATH=/console/ pnpm build + * The SPA is built with base path '/' by default. * * Usage in any ObjectStack application: * diff --git a/apps/console/vercel.json b/apps/console/vercel.json index 0cc3ddb22..1633771af 100644 --- a/apps/console/vercel.json +++ b/apps/console/vercel.json @@ -1,7 +1,7 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", "installCommand": "cd ../.. && pnpm install --frozen-lockfile", - "buildCommand": "cd ../.. && pnpm turbo run build --filter=@object-ui/console^... && cd apps/console && VITE_BASE_PATH=/ pnpm build:vercel", + "buildCommand": "cd ../.. && pnpm turbo run build --filter=@object-ui/console^... && cd apps/console && pnpm build:vercel", "outputDirectory": "dist", "framework": "vite", "rewrites": [ diff --git a/apps/console/vite.config.ts b/apps/console/vite.config.ts index 94596292f..97bfe0a2c 100644 --- a/apps/console/vite.config.ts +++ b/apps/console/vite.config.ts @@ -36,9 +36,7 @@ function preloadCriticalChunks(): Plugin { }; } -// Base path for SPA deployment. Always '/console/' to match the HonoServerPlugin -// auto-mount slug. Override with VITE_BASE_PATH only if deploying standalone. -const basePath = process.env.VITE_BASE_PATH || '/console/'; +const basePath = '/'; // https://vitejs.dev/config/ export default defineConfig({ diff --git a/e2e/helpers/index.ts b/e2e/helpers/index.ts index deae975c7..e7f474388 100644 --- a/e2e/helpers/index.ts +++ b/e2e/helpers/index.ts @@ -2,9 +2,9 @@ import type { Page } from '@playwright/test'; /** * Base path for the console app. - * Matches `base` in `apps/console/vite.config.ts` (defaults to '/console/'). + * Matches `base` in `apps/console/vite.config.ts` (always '/'). */ -export const CONSOLE_BASE = '/console'; +export const CONSOLE_BASE = ''; /** Wait for React to mount (at least one child inside #root). */ export async function waitForReactMount(page: Page) { diff --git a/playwright.config.ts b/playwright.config.ts index 105bafdbe..6470e7b96 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -68,7 +68,7 @@ export default defineConfig({ command: process.env.CI ? 'pnpm --filter @object-ui/console preview --port 4173' : 'pnpm turbo run build --filter=@object-ui/console && pnpm --filter @object-ui/console preview --port 4173', - url: 'http://localhost:4173/console/', + url: 'http://localhost:4173/', reuseExistingServer: !process.env.CI, timeout: 180 * 1000, }, From d65bbcd716c516aba2093d57bc58f70f82141212 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 01:48:10 +0000 Subject: [PATCH 3/3] fix: remove 'by default' from plugin.ts JSDoc per review feedback Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com> --- apps/console/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/console/plugin.ts b/apps/console/plugin.ts index 1471ac9ca..9b36191f5 100644 --- a/apps/console/plugin.ts +++ b/apps/console/plugin.ts @@ -5,7 +5,7 @@ * HonoServerPlugin auto-discovers this plugin via `type: 'ui-plugin'` * and mounts it at `/` (i.e. `/console`). * - * The SPA is built with base path '/' by default. + * The SPA is built with base path '/'. * * Usage in any ObjectStack application: *