Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions apps/console/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
* HonoServerPlugin auto-discovers this plugin via `type: 'ui-plugin'`
* and mounts it at `/<slug>` (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 '/'.
*
Comment on lines 5 to 9
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JSDoc still states HonoServerPlugin mounts this UI at /<slug> (i.e. /console), but the comment now says the SPA is built with base path '/'. If the plugin is actually served under /console, a '/' base will generate root-absolute asset URLs (e.g. /assets/...) that won’t resolve under /console. Please update the JSDoc to accurately describe the serving path (or document how default=true affects mounting), so the base path and mount path stay consistent.

Copilot uses AI. Check for mistakes.
* Usage in any ObjectStack application:
*
Expand Down
2 changes: 1 addition & 1 deletion apps/console/vercel.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
4 changes: 1 addition & 3 deletions apps/console/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
4 changes: 2 additions & 2 deletions e2e/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Comment on lines 4 to +7
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says this matches Vite base (always '/'), but CONSOLE_BASE is set to an empty string. If the intent is “root-relative” URLs, consider updating the comment to clarify why this is '' (or set it to '/' and ensure call sites don’t produce double slashes).

Copilot uses AI. Check for mistakes.

/** Wait for React to mount (at least one child inside #root). */
export async function waitForReactMount(page: Page) {
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down