Skip to content

Commit d471d0f

Browse files
authored
Merge pull request #978 from objectstack-ai/copilot/update-console-app-base-path
2 parents 50d9584 + d65bbcd commit d471d0f

6 files changed

Lines changed: 16 additions & 9 deletions

File tree

ROADMAP.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,16 @@ ObjectUI is a universal Server-Driven UI (SDUI) engine built on React + Tailwind
860860
- [x] 10 unit tests for `useObjectLabel` hook
861861
- [x] Zero changes to object metadata files or translation files
862862

863+
### P1.16 Console Base Path Unification ✅
864+
865+
> **Status:** Complete — Console app base path unified to `/` across all environments.
866+
867+
- [x] `apps/console/vite.config.ts`: base path changed from `/console/` to `/`
868+
- [x] `e2e/helpers/index.ts`: `CONSOLE_BASE` changed from `/console` to `''`
869+
- [x] `apps/console/vercel.json`: removed `VITE_BASE_PATH=/` override (now redundant)
870+
- [x] `playwright.config.ts`: webServer url updated from `/console/` to `/`
871+
- [x] `apps/console/plugin.ts`: updated JSDoc to reflect new base path
872+
863873
---
864874

865875
## 🧩 P2 — Polish & Advanced Features

apps/console/plugin.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
* HonoServerPlugin auto-discovers this plugin via `type: 'ui-plugin'`
66
* and mounts it at `/<slug>` (i.e. `/console`).
77
*
8-
* The SPA must be built with the matching base path:
9-
* VITE_BASE_PATH=/console/ pnpm build
8+
* The SPA is built with base path '/'.
109
*
1110
* Usage in any ObjectStack application:
1211
*

apps/console/vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
33
"installCommand": "cd ../.. && pnpm install --frozen-lockfile",
4-
"buildCommand": "cd ../.. && pnpm turbo run build --filter=@object-ui/console^... && cd apps/console && VITE_BASE_PATH=/ pnpm build:vercel",
4+
"buildCommand": "cd ../.. && pnpm turbo run build --filter=@object-ui/console^... && cd apps/console && pnpm build:vercel",
55
"outputDirectory": "dist",
66
"framework": "vite",
77
"rewrites": [

apps/console/vite.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ function preloadCriticalChunks(): Plugin {
3636
};
3737
}
3838

39-
// Base path for SPA deployment. Always '/console/' to match the HonoServerPlugin
40-
// auto-mount slug. Override with VITE_BASE_PATH only if deploying standalone.
41-
const basePath = process.env.VITE_BASE_PATH || '/console/';
39+
const basePath = '/';
4240

4341
// https://vitejs.dev/config/
4442
export default defineConfig({

e2e/helpers/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import type { Page } from '@playwright/test';
22

33
/**
44
* Base path for the console app.
5-
* Matches `base` in `apps/console/vite.config.ts` (defaults to '/console/').
5+
* Matches `base` in `apps/console/vite.config.ts` (always '/').
66
*/
7-
export const CONSOLE_BASE = '/console';
7+
export const CONSOLE_BASE = '';
88

99
/** Wait for React to mount (at least one child inside #root). */
1010
export async function waitForReactMount(page: Page) {

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default defineConfig({
6868
command: process.env.CI
6969
? 'pnpm --filter @object-ui/console preview --port 4173'
7070
: 'pnpm turbo run build --filter=@object-ui/console && pnpm --filter @object-ui/console preview --port 4173',
71-
url: 'http://localhost:4173/console/',
71+
url: 'http://localhost:4173/',
7272
reuseExistingServer: !process.env.CI,
7373
timeout: 180 * 1000,
7474
},

0 commit comments

Comments
 (0)