diff --git a/dashboards/tracker-web/docs/roadmaps/UX_INTEGRATION_BYTELYST.md b/dashboards/tracker-web/docs/roadmaps/UX_INTEGRATION_BYTELYST.md index fc447597..4d45784d 100644 --- a/dashboards/tracker-web/docs/roadmaps/UX_INTEGRATION_BYTELYST.md +++ b/dashboards/tracker-web/docs/roadmaps/UX_INTEGRATION_BYTELYST.md @@ -186,14 +186,14 @@ pnpm build # final gate ## UX-10 — Page chrome via `@bytelyst/dashboard-components` -- [ ] **10.1** `src/app/error.tsx`: render `ErrorPage` from `@bytelyst/dashboard-components` +- [x] **10.1** `src/app/error.tsx`: render `ErrorPage` from `@bytelyst/dashboard-components` (keep the existing `trackEvent` telemetry side-effect + `reset` wiring). `not-found.tsx` already uses `NotFoundPage` — leave it. -- [ ] **10.2** Add `PageHeader` (title + breadcrumbs) to the top of `/dashboard`, `/dashboard/items`, +- [x] **10.2** Add `PageHeader` (title + breadcrumbs) to the top of `/dashboard`, `/dashboard/items`, `/dashboard/board`, and the item detail page for a consistent header band. -- [ ] **10.3** Replace ad-hoc loading text with `LoadingSpinner`/`LoadingSkeleton` where a full +- [x] **10.3** Replace ad-hoc loading text with `LoadingSpinner`/`LoadingSkeleton` where a full `SkeletonGroup` (UX-2) is overkill. - **Verify:** `pnpm typecheck && pnpm lint && pnpm build`. + **Verify:** `pnpm typecheck && pnpm lint && pnpm build`. (UX-10 verified: tc/lint/test 159 ✓/build/e2e 18 ✓; no new color literals) ## UX-11 — Adopt `@bytelyst/auth-ui` on the login surface @@ -253,7 +253,7 @@ pnpm build # final gate ``` Core : UX-1 ✅ UX-2 ⬜ UX-3 ⬜ UX-4 ⬜ UX-5 ⬜ UX-6 ⬜ UX-7 ⬜ UX-8 ⬜ -Expand : UX-9 ✅ UX-10 ⬜ UX-11 ⬜ UX-12 ⬜ UX-13 ⬜ (stretch: 12.3, 13.*) +Expand : UX-9 ✅ UX-10 ✅ UX-11 ⬜ UX-12 ⬜ UX-13 ⬜ (stretch: 12.3, 13.*) ``` **UX-1 is done** (token bridge + Primitives adapter, commit `dc01dd02`) — the `--bl-*` bridge is diff --git a/dashboards/tracker-web/src/app/dashboard/board/page.tsx b/dashboards/tracker-web/src/app/dashboard/board/page.tsx index f7e64e99..b7ea9be9 100644 --- a/dashboards/tracker-web/src/app/dashboard/board/page.tsx +++ b/dashboards/tracker-web/src/app/dashboard/board/page.tsx @@ -2,6 +2,7 @@ import { useEffect, useState, useCallback } from 'react'; import Link from 'next/link'; +import { PageHeader } from '@bytelyst/dashboard-components'; import { useAuth } from '@/lib/auth-context'; import { listItems, updateItemStatus, type TrackerItem } from '@/lib/tracker-client'; @@ -56,10 +57,11 @@ export default function BoardPage() { return (
-
-

Board

-

Kanban view of all items

-
+ +

Kanban view of all items

{error && (
diff --git a/dashboards/tracker-web/src/app/dashboard/items/[id]/page.tsx b/dashboards/tracker-web/src/app/dashboard/items/[id]/page.tsx index 88ab3180..64eafe54 100644 --- a/dashboards/tracker-web/src/app/dashboard/items/[id]/page.tsx +++ b/dashboards/tracker-web/src/app/dashboard/items/[id]/page.tsx @@ -1,7 +1,8 @@ 'use client'; import { useEffect, useState } from 'react'; -import { useParams, useRouter } from 'next/navigation'; +import { useParams } from 'next/navigation'; +import { PageHeader, LoadingSpinner } from '@bytelyst/dashboard-components'; import { useAuth } from '@/lib/auth-context'; import { getItem, @@ -20,7 +21,6 @@ const VISIBILITIES = ['internal', 'public'] as const; export default function ItemDetailPage() { const { id } = useParams<{ id: string }>(); - const router = useRouter(); const { token } = useAuth(); const [item, setItem] = useState(null); @@ -109,21 +109,35 @@ export default function ItemDetailPage() { if (!item) { return ( -
- {error || 'Loading...'} +
+ {error ?

{error}

: }
); } return (
- {/* Back */} - + { + setEditTitle(item.title); + setEditDescription(item.description); + setEditing(true); + }} + className="rounded-md px-3 py-1.5 text-sm text-muted-foreground hover:bg-accent" + > + Edit + + ) + } + /> {error && (
@@ -131,7 +145,7 @@ export default function ItemDetailPage() {
)} - {/* Header */} + {/* Title/description editor */}
{editing ? (
@@ -163,26 +177,9 @@ export default function ItemDetailPage() {
) : ( - <> -
-

{item.title}

- -
- {item.description && ( -

- {item.description} -

- )} - + item.description && ( +

{item.description}

+ ) )}
diff --git a/dashboards/tracker-web/src/app/dashboard/items/page.tsx b/dashboards/tracker-web/src/app/dashboard/items/page.tsx index 0d76a324..045ed4b0 100644 --- a/dashboards/tracker-web/src/app/dashboard/items/page.tsx +++ b/dashboards/tracker-web/src/app/dashboard/items/page.tsx @@ -3,6 +3,7 @@ import { useEffect, useState, useCallback, useMemo } from 'react'; import Link from 'next/link'; import { DataTable, type ColumnDef } from '@bytelyst/data-table'; +import { PageHeader, LoadingSpinner } from '@bytelyst/dashboard-components'; import { useAuth } from '@/lib/auth-context'; import { listItems, createItem, deleteItem, type TrackerItem } from '@/lib/tracker-client'; @@ -191,18 +192,19 @@ export default function ItemsListPage() { return (
{/* Header */} -
-
-

Items

-

{total} items total

-
- -
+ setShowCreate(true)} + className="rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90" + > + + New Item + + } + /> +

{total} items total

{error && (
@@ -256,7 +258,9 @@ export default function ItemsListPage() { {/* Items table — @bytelyst/data-table (Wave 9.C.9) */} {loading ? ( -
Loading...
+
+ +
) : ( -
-

Dashboard

-

Overview of all tracked items

-
+ +

Overview of all tracked items

{error && (
@@ -81,7 +80,9 @@ export default function DashboardOverview() {
) : !error ? ( -
Loading stats...
+
+ +
) : null}
); diff --git a/dashboards/tracker-web/src/app/error.tsx b/dashboards/tracker-web/src/app/error.tsx index 83d116e0..bc7afe22 100644 --- a/dashboards/tracker-web/src/app/error.tsx +++ b/dashboards/tracker-web/src/app/error.tsx @@ -1,6 +1,7 @@ 'use client'; import { useEffect } from 'react'; +import { ErrorPage } from '@bytelyst/dashboard-components'; import { trackEvent } from '@/lib/telemetry'; export default function GlobalError({ @@ -19,19 +20,7 @@ export default function GlobalError({ return (
-
-
-

Something went wrong

-

- {error.message || 'An unexpected error occurred.'} -

- -
+
); }