Skip to content

Commit e563ed6

Browse files
hotlongCopilot
andcommitted
refactor: rename apps/dashboard → apps/console
The runtime console SPA was previously called 'dashboard', which clashed with the spec-level UI.Dashboard metadata type (a first-class view kind). The Console *renders* dashboards; it is not itself a dashboard. - apps/dashboard → apps/console (`@objectstack/dashboard` → `@objectstack/console`) - vite base `/_dashboard/` → `/_console/` - packages/cli/src/utils/dashboard.ts → console.ts (DASHBOARD_PATH → CONSOLE_PATH, resolveDashboardPath → resolveConsolePath, hasDashboardDist → hasConsoleDist, createDashboardStaticPlugin → createConsoleStaticPlugin) - serve.ts / format.ts: dashboardPath → consolePath, 'Dashboard:' label → 'Console:' - root package.json: dev:dashboard / build:dashboard → dev:console / build:console - apps/objectos/scripts/build-vercel.sh: turbo filter + copy paths - apps/objectos/vercel.json: `/_console/*` headers/redirects/rewrites, with `/_dashboard/*` kept as a back-compat redirect → `/_console/*` - index.html title "ObjectStack Dashboard" → "ObjectStack Console" - in-source comments (auth-redirect, AccountLoginRedirect, App.tsx) CLI tests (99/99) and console build pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 46bc5c5 commit e563ed6

23 files changed

Lines changed: 104 additions & 92 deletions
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# @objectstack/dashboard
1+
# @objectstack/console
22

3-
Opinionated, fork-ready ObjectStack console template built on
3+
Opinionated, fork-ready ObjectStack runtime console built on
44
[`@object-ui/app-shell`](https://www.objectui.org/docs/layout/app-shell) with the
55
full ObjectUI plugin set wired up (grid, kanban, calendar, charts, list, detail,
66
view, form, dashboard, report, chatbot).
@@ -10,12 +10,16 @@ This app mirrors the upstream
1010
template, repackaged as a first-party app inside the framework monorepo so it
1111
can be served alongside `apps/objectos` / `apps/cloud`.
1212

13+
> Renamed from `apps/dashboard` to avoid confusion with the spec-level
14+
> `Dashboard` metadata type. The Console is the runtime UI shell that *renders*
15+
> dashboards (and views/pages/reports), it is not itself a dashboard.
16+
1317
## Develop
1418

1519
```bash
1620
# from the repo root
1721
pnpm install
18-
pnpm dev:dashboard # runs on http://localhost:5175/_dashboard/
22+
pnpm dev:console # runs on http://localhost:5175/_console/
1923
```
2024

2125
By default the dev server proxies `/api` and `/.well-known` to
@@ -24,7 +28,7 @@ listens. Override the upstream server with `VITE_SERVER_URL` in
2428
`.env.development` if you point the console at a remote ObjectStack instance.
2529

2630
> Pair it with the CRM example server: `pnpm dev:crm` (port 3001) and launch
27-
> with `VITE_SERVER_URL=http://localhost:3001 VITE_PROXY_TARGET=http://localhost:3001 pnpm dev:dashboard`.
31+
> with `VITE_SERVER_URL=http://localhost:3001 VITE_PROXY_TARGET=http://localhost:3001 pnpm dev:console`.
2832
2933
### Workspace alias requirement
3034

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>ObjectStack Dashboard</title>
6+
<title>ObjectStack Console</title>
77
</head>
88
<body>
99
<div id="root"></div>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "@objectstack/dashboard",
2+
"name": "@objectstack/console",
33
"version": "0.1.0",
44
"private": true,
55
"type": "module",
6-
"description": "ObjectStack Dashboard - opinionated, fork-ready console built on @object-ui/app-shell with the full plugin set wired up.",
6+
"description": "ObjectStack Console - opinionated, fork-ready runtime console built on @object-ui/app-shell with the full plugin set wired up.",
77
"license": "Apache-2.0",
88
"scripts": {
99
"dev": "vite",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* ObjectStack Dashboard — fork-ready console template.
2+
* ObjectStack Console — fork-ready runtime console template.
33
*
44
* Auth UI lives in the Account SPA at `/_account/*`. This file owns the
55
* console routing tree only — sign-in / sign-up / forgot-password URLs are

apps/dashboard/src/components/AccountLoginRedirect.tsx renamed to apps/console/src/components/AccountLoginRedirect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* AccountLoginRedirect — element used as `AuthGuard`'s fallback. On mount
55
* it hard-navigates the browser to `/_account/login?redirect=<current>` so
6-
* the user lands back on the original Dashboard URL after signing in.
6+
* the user lands back on the original Console URL after signing in.
77
*/
88

99
import { useEffect } from 'react';
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,33 @@
33
/**
44
* Cross-SPA auth redirect helpers.
55
*
6-
* Dashboard defers all sign-in / sign-up UI to the Account SPA mounted at
7-
* `/_account/`. These helpers build absolute URLs preserving the original
8-
* Dashboard location so the user lands back where they started after auth.
6+
* The Console defers all sign-in / sign-up UI to the Account SPA mounted
7+
* at `/_account/`. These helpers build absolute URLs preserving the
8+
* original Console location so the user lands back where they started
9+
* after auth.
910
*/
1011

1112
const ACCOUNT_BASE = '/_account';
1213

13-
/** Compose a Dashboard absolute path from `pathname + search`. */
14-
function currentDashboardHref(): string {
14+
/** Compose a Console absolute path from `pathname + search`. */
15+
function currentConsoleHref(): string {
1516
if (typeof window === 'undefined') return '/';
1617
return window.location.pathname + window.location.search;
1718
}
1819

1920
/**
2021
* Hard-navigate the browser to the Account login page, preserving the
21-
* current Dashboard path as `?redirect=...`.
22+
* current Console path as `?redirect=...`.
2223
*/
2324
export function gotoAccountLogin(redirect?: string): void {
24-
const target = redirect ?? currentDashboardHref();
25+
const target = redirect ?? currentConsoleHref();
2526
const url = `${ACCOUNT_BASE}/login?redirect=${encodeURIComponent(target)}`;
2627
window.location.assign(url);
2728
}
2829

2930
/** Hard-navigate to the Account registration page. */
3031
export function gotoAccountRegister(redirect?: string): void {
31-
const target = redirect ?? currentDashboardHref();
32+
const target = redirect ?? currentConsoleHref();
3233
const url = `${ACCOUNT_BASE}/register?redirect=${encodeURIComponent(target)}`;
3334
window.location.assign(url);
3435
}

0 commit comments

Comments
 (0)