Skip to content

feat(web): standardize shared page layouts - #67

Merged
kl3inIT merged 2 commits into
mainfrom
agent/ui-page-foundation
Jul 26, 2026
Merged

feat(web): standardize shared page layouts#67
kl3inIT merged 2 commits into
mainfrom
agent/ui-page-foundation

Conversation

@kl3inIT

@kl3inIT kl3inIT commented Jul 26, 2026

Copy link
Copy Markdown
Owner

What

  • add a namespaced PageLayout contract with narrow, standard, wide, full, and canvas variants
  • add responsive SplitLayout, shared content/filter/empty patterns, breadcrumbs, and a semantic DataTable
  • migrate Sources, Knowledge graph, Asset, MCP, and Administration surfaces to the shared system
  • add TanStack Table for repeated table mechanics while keeping existing shadcn table markup
  • consolidate the increment, conventions, roadmap, and current domain specs

Why

The existing pages repeated width, gutter, scrolling, header, toolbar, and empty-state markup. This made the Knowledge graph inherit a centered document layout and allowed each feature to develop a different page dialect. The new contract applies the reusable layout approach observed in the local Onyx reference without copying its styling or introducing a new aesthetic.

Stack decisions

  • keep React, Vite, Tailwind, Radix/shadcn, TanStack Query, TanStack Router, Zustand, Zod, and Playwright
  • add TanStack Table because multiple current tables need the same accessible sorting and later controlled server-state mechanics
  • defer Motion until a concrete presence/layout/gesture interaction exists; current transitions remain CSS
  • defer Vitest/Testing Library, Storybook, drag-and-drop, virtualization, and a form framework until their owning workflows justify them

Verification

  • corepack pnpm -C web lint
  • corepack pnpm -C web typecheck
  • corepack pnpm -C web build
  • corepack pnpm -C web test:e2e — 8 passed
  • Playwright browser inspection at 1440x900 and 390x844 for Asset catalog and Knowledge graph

Notes

  • frontend-only change; JetBrains backend inspection is not applicable
  • Vite still reports the pre-existing large-chunk advisory for graph/markdown-related bundles
  • 31 changed files, below the agreed 100-file review bound

Summary by CodeRabbit

  • New Features
    • Added reusable page layout and split-pane layout components, plus standardized header/canvas sections.
    • Introduced new UI patterns including breadcrumbs, filter bars, content blocks, empty states, and a sortable DataTable with customizable columns.
    • Updated administration, assets, sources, MCP connect, and knowledge graph pages to use the shared layouts and components.
  • Tests
    • Added unit testing setup for new/updated components and expanded CI to run focused component tests.
  • Style
    • Standardized global layout tokens (page widths/gutters, panel sizing, z-index layers, and elevation).

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 94dfa573-c7e5-424a-bcc2-4fdde8a5d634

📥 Commits

Reviewing files that changed from the base of the PR and between d58dcd5 and 42c6765.

⛔ Files ignored due to path filters (5)
  • docs/conventions.md is excluded by !docs/**
  • docs/increments/completed/2026-07-26-shared-page-system/design.md is excluded by !docs/**
  • docs/increments/completed/2026-07-26-shared-page-system/plan.md is excluded by !docs/**
  • docs/roadmap.md is excluded by !docs/**
  • web/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/pnpm-lock.yaml
📒 Files selected for processing (19)
  • .github/workflows/ci.yml
  • web/package.json
  • web/src/components/layouts/page-layout.test.tsx
  • web/src/components/layouts/split-layout-components.tsx
  • web/src/components/patterns/data-table.test.tsx
  • web/src/components/patterns/data-table.tsx
  • web/src/components/ui/breadcrumb.tsx
  • web/src/features/admin/components/admin-connectors-page.tsx
  • web/src/features/admin/components/admin-groups-page.tsx
  • web/src/features/admin/components/admin-mappings-page.tsx
  • web/src/features/admin/components/admin-users-page.tsx
  • web/src/features/admin/components/connection-detail-page.tsx
  • web/src/features/assets/components/asset-catalog-page.tsx
  • web/src/features/assets/components/asset-detail-page.tsx
  • web/src/features/sources/components/knowledge-graph-panel.tsx
  • web/test/e2e/asset-registry-golden-poc.spec.ts
  • web/test/setup.ts
  • web/tsconfig.app.json
  • web/vite.config.ts

📝 Walkthrough

Walkthrough

Changes

Shared UI modernization

Layer / File(s) Summary
Layout, navigation, and visual primitives
web/src/components/layouts/*, web/src/components/ui/breadcrumb.tsx, web/src/styles/tokens.css
Adds reusable page, split-layout, breadcrumb, and application layout-token primitives.
Reusable content and table patterns
web/src/components/patterns/*
Adds Content, ContentAction, EmptyState, FilterBar, and sortable generic DataTable components.
Admin, asset, and MCP page adoption
web/src/features/admin/components/*, web/src/features/assets/components/*, web/src/features/mcp/components/*
Refactors pages to use shared headers, breadcrumbs, content patterns, empty states, loading states, and layout wrappers.
Sources documents and table flow
web/src/features/sources/components/sources-page.tsx, web/src/features/sources/components/sources-table.tsx
Applies shared tabs, filtering, empty-state, and DataTable components to the sources documents view.
Admin table migrations
web/src/features/admin/components/*, web/src/features/admin/components/connection-detail-page.tsx
Migrates administrative tables to typed DataTable column configurations and converts connection settings to definition-list markup.
Knowledge graph split layout
web/src/features/sources/components/graph/*, web/src/features/sources/components/knowledge-graph-panel.tsx
Places the graph canvas and properties panel within the new page-canvas and split-layout structure.
Unit testing and CI wiring
web/package.json, web/test/*, web/vite.config.ts, .github/workflows/ci.yml
Adds Vitest configuration, component tests, testing-library setup, scripts, and a focused CI test step.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.12% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: standardizing shared page layouts across the web app.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/ui-page-foundation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/src/components/layouts/split-layout-components.tsx`:
- Around line 5-10: Update SplitRoot and the related SplitMain/aside layout
behavior to provide a responsive narrow-screen state before the fixed aside
forces the main pane to zero width. At the breakpoint covering the aside’s
minimum width plus the main pane requirement, stack the panes, collapse the
aside, or expose it through an accessible responsive drawer; ensure the primary
content remains reachable and the collapsed/drawer state has appropriate
accessible labeling and controls.

In `@web/src/components/patterns/data-table.tsx`:
- Around line 24-29: Update the `@tanstack/react-table` module augmentation by
importing RowData and constraining ColumnMeta’s TData generic to extend RowData,
while leaving TValue and the existing metadata properties unchanged.

In `@web/src/components/ui/breadcrumb.tsx`:
- Around line 52-60: Update BreadcrumbPage to remove the role="link" and
aria-disabled="true" attributes, while retaining aria-current="page" on the
span.

In `@web/src/features/sources/components/graph/graph-properties-panel.tsx`:
- Line 85: Position the relevant SplitLayout.Root/container context before the
absolute panel rendered by SplitLayout.Aside, ensuring the mobile right-3/top-3
overlay is contained within the canvas. Add a relative positioning context at
the appropriate parent level while preserving the existing lg:relative desktop
behavior and panel layout.

In `@web/src/features/sources/components/knowledge-graph-panel.tsx`:
- Around line 280-311: Update the onExpandEntity handler to catch fetchQuery
failures from exploreKnowledgeGraphOptions and surface them through toast.error,
preserving the existing success, authorization-refresh, and no-new-neighbors
flows. Ensure the async callback resolves after handling the error so the void
caller does not produce an unhandled rejection.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2748b3b6-e3f3-4a1f-9271-832c1bcd9fe6

📥 Commits

Reviewing files that changed from the base of the PR and between 33186a2 and d58dcd5.

⛔ Files ignored due to path filters (7)
  • docs/conventions.md is excluded by !docs/**
  • docs/increments/completed/2026-07-26-shared-page-system/design.md is excluded by !docs/**
  • docs/increments/completed/2026-07-26-shared-page-system/plan.md is excluded by !docs/**
  • docs/roadmap.md is excluded by !docs/**
  • docs/specs/domains/asset-registry.md is excluded by !docs/**
  • docs/specs/domains/secure-knowledge-graph.md is excluded by !docs/**
  • web/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/pnpm-lock.yaml
📒 Files selected for processing (24)
  • web/package.json
  • web/src/components/layouts/page-layout-components.tsx
  • web/src/components/layouts/page-layout.ts
  • web/src/components/layouts/split-layout-components.tsx
  • web/src/components/layouts/split-layout.ts
  • web/src/components/patterns/content.tsx
  • web/src/components/patterns/data-table.tsx
  • web/src/components/patterns/empty-state.tsx
  • web/src/components/patterns/filter-bar.tsx
  • web/src/components/ui/breadcrumb.tsx
  • web/src/features/admin/components/admin-page.tsx
  • web/src/features/admin/components/admin-user-permissions-page.tsx
  • web/src/features/assets/components/asset-breadcrumb.tsx
  • web/src/features/assets/components/asset-catalog-page.tsx
  • web/src/features/assets/components/asset-detail-page.tsx
  • web/src/features/assets/components/asset-state.tsx
  • web/src/features/assets/components/governance-workspace-page.tsx
  • web/src/features/assets/components/pack-journey-page.tsx
  • web/src/features/mcp/components/mcp-connect-page.tsx
  • web/src/features/sources/components/graph/graph-properties-panel.tsx
  • web/src/features/sources/components/knowledge-graph-panel.tsx
  • web/src/features/sources/components/sources-page.tsx
  • web/src/features/sources/components/sources-table.tsx
  • web/src/styles/tokens.css
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: CI Gate
🧰 Additional context used
📓 Path-based instructions (3)
**/*

📄 CodeRabbit inference engine (CLAUDE.md)

**/*: Record current behavior in architecture/specification documentation only after it exists in code; keep intended behavior in vision, roadmap, or an active increment, and do not duplicate state.
Before using unfamiliar Spring Boot 4, Spring Modulith 2, Spring AI 2, Gradle, React, Vite, Tailwind, or TypeScript APIs, consult current official documentation via Context7 and the project orgmemory-* verification skills.
Before retrieval, AI, MCP, permission, upload, graph, or export work, read docs/guidelines/agent-safety.md.
Never commit .env files, provider keys, tokens, or customer data.
Run the relevant verification gates from docs/guidelines/testing-harness.md; use a terminating clean test as the context gate, and do not treat bootRun as verification.

Files:

  • web/src/components/layouts/split-layout.ts
  • web/src/components/patterns/filter-bar.tsx
  • web/src/components/layouts/page-layout.ts
  • web/src/features/assets/components/asset-breadcrumb.tsx
  • web/package.json
  • web/src/components/patterns/empty-state.tsx
  • web/src/components/layouts/split-layout-components.tsx
  • web/src/components/patterns/content.tsx
  • web/src/features/admin/components/admin-user-permissions-page.tsx
  • web/src/features/assets/components/asset-state.tsx
  • web/src/features/sources/components/sources-table.tsx
  • web/src/components/layouts/page-layout-components.tsx
  • web/src/features/assets/components/asset-catalog-page.tsx
  • web/src/features/mcp/components/mcp-connect-page.tsx
  • web/src/components/ui/breadcrumb.tsx
  • web/src/features/assets/components/governance-workspace-page.tsx
  • web/src/components/patterns/data-table.tsx
  • web/src/features/assets/components/asset-detail-page.tsx
  • web/src/styles/tokens.css
  • web/src/features/sources/components/sources-page.tsx
  • web/src/features/assets/components/pack-journey-page.tsx
  • web/src/features/sources/components/graph/graph-properties-panel.tsx
  • web/src/features/sources/components/knowledge-graph-panel.tsx
  • web/src/features/admin/components/admin-page.tsx
**/*.{ts,tsx,js,jsx,css,scss,html}

📄 CodeRabbit inference engine (CLAUDE.md)

For frontend files, run Oxlint, TypeScript typecheck, the production build, and browser tests when the UI flow matters; do not run JetBrains IDE inspection on TypeScript, TSX, or web configuration.

Files:

  • web/src/components/layouts/split-layout.ts
  • web/src/components/patterns/filter-bar.tsx
  • web/src/components/layouts/page-layout.ts
  • web/src/features/assets/components/asset-breadcrumb.tsx
  • web/src/components/patterns/empty-state.tsx
  • web/src/components/layouts/split-layout-components.tsx
  • web/src/components/patterns/content.tsx
  • web/src/features/admin/components/admin-user-permissions-page.tsx
  • web/src/features/assets/components/asset-state.tsx
  • web/src/features/sources/components/sources-table.tsx
  • web/src/components/layouts/page-layout-components.tsx
  • web/src/features/assets/components/asset-catalog-page.tsx
  • web/src/features/mcp/components/mcp-connect-page.tsx
  • web/src/components/ui/breadcrumb.tsx
  • web/src/features/assets/components/governance-workspace-page.tsx
  • web/src/components/patterns/data-table.tsx
  • web/src/features/assets/components/asset-detail-page.tsx
  • web/src/styles/tokens.css
  • web/src/features/sources/components/sources-page.tsx
  • web/src/features/assets/components/pack-journey-page.tsx
  • web/src/features/sources/components/graph/graph-properties-panel.tsx
  • web/src/features/sources/components/knowledge-graph-panel.tsx
  • web/src/features/admin/components/admin-page.tsx
web/src/**/*.{ts,tsx}

⚙️ CodeRabbit configuration file

web/src/**/*.{ts,tsx}: OAuth access and refresh tokens must never enter browser JavaScript or
browser storage. Use the HttpOnly BFF session, CSRF-protected mutations,
generated Hey API data clients, accessible states, and both light and
dark themes. Handwritten transport is reserved for documented protocol
flows such as navigation redirects and streaming.

Files:

  • web/src/components/layouts/split-layout.ts
  • web/src/components/patterns/filter-bar.tsx
  • web/src/components/layouts/page-layout.ts
  • web/src/features/assets/components/asset-breadcrumb.tsx
  • web/src/components/patterns/empty-state.tsx
  • web/src/components/layouts/split-layout-components.tsx
  • web/src/components/patterns/content.tsx
  • web/src/features/admin/components/admin-user-permissions-page.tsx
  • web/src/features/assets/components/asset-state.tsx
  • web/src/features/sources/components/sources-table.tsx
  • web/src/components/layouts/page-layout-components.tsx
  • web/src/features/assets/components/asset-catalog-page.tsx
  • web/src/features/mcp/components/mcp-connect-page.tsx
  • web/src/components/ui/breadcrumb.tsx
  • web/src/features/assets/components/governance-workspace-page.tsx
  • web/src/components/patterns/data-table.tsx
  • web/src/features/assets/components/asset-detail-page.tsx
  • web/src/features/sources/components/sources-page.tsx
  • web/src/features/assets/components/pack-journey-page.tsx
  • web/src/features/sources/components/graph/graph-properties-panel.tsx
  • web/src/features/sources/components/knowledge-graph-panel.tsx
  • web/src/features/admin/components/admin-page.tsx
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: kl3inIT/OrgMemory

Timestamp: 2026-07-26T16:54:02.879Z
Learning: Material decisions about domain boundaries, authorization, persistence, publication, concurrency, cache isolation, or parity scope require an independent Claude Fable 5 architecture debate before implementation, recorded in the active increment or an ADR.
📚 Learning: 2026-07-23T03:36:09.053Z
Learnt from: kl3inIT
Repo: kl3inIT/OrgMemory PR: 16
File: web/src/features/admin/components/admin-mappings-page.tsx:190-211
Timestamp: 2026-07-23T03:36:09.053Z
Learning: In the OrgMemory admin UI, preserve the principal display ordering returned by the backend instead of re-sorting on the client. The server-owned order (e.g., unmapped views first, then deterministic ordering by source-system, connection, kind, and external-key as defined in SourcePrincipalAdminService#listPrincipals) must be used as-is to avoid mismatches with the server’s intended admin mappings/principals list.

Applied to files:

  • web/src/features/admin/components/admin-user-permissions-page.tsx
  • web/src/features/admin/components/admin-page.tsx
🔇 Additional comments (30)
web/src/features/sources/components/sources-page.tsx (5)

8-10: LGTM!

Also applies to: 47-50


76-106: LGTM!


108-147: LGTM!


149-190: LGTM!


192-196: LGTM!

Also applies to: 212-215, 237-241

web/src/features/sources/components/sources-table.tsx (2)

2-5: LGTM!

Also applies to: 32-139


141-153: LGTM!

web/src/features/sources/components/graph/graph-properties-panel.tsx (1)

16-16: LGTM!

Also applies to: 122-122, 144-144, 197-197, 346-346, 590-591

web/src/features/sources/components/knowledge-graph-panel.tsx (3)

16-20: LGTM!

Also applies to: 50-50, 117-208


227-266: LGTM!


491-493: LGTM!

Also applies to: 545-548, 722-722

web/src/features/mcp/components/mcp-connect-page.tsx (1)

4-150: LGTM!

Also applies to: 190-190, 199-201

web/src/components/layouts/page-layout-components.tsx (1)

6-146: LGTM!

web/src/components/layouts/page-layout.ts (1)

1-19: LGTM!

web/src/components/layouts/split-layout.ts (1)

1-7: LGTM!

web/src/styles/tokens.css (1)

5-7: LGTM!

Also applies to: 94-109, 211-211

web/package.json (1)

34-34: LGTM!

web/src/components/patterns/content.tsx (1)

5-83: LGTM!

web/src/components/patterns/empty-state.tsx (1)

5-38: LGTM!

web/src/components/patterns/filter-bar.tsx (1)

5-34: LGTM!

web/src/features/admin/components/admin-page.tsx (1)

4-6: LGTM!

Also applies to: 29-32, 107-113, 122-130

web/src/features/admin/components/admin-user-permissions-page.tsx (1)

3-16: LGTM!

Also applies to: 27-33, 90-116, 238-238

web/src/features/assets/components/asset-breadcrumb.tsx (1)

1-63: LGTM!

web/src/features/assets/components/asset-catalog-page.tsx (2)

5-26: LGTM!

Also applies to: 57-101


103-176: 🗄️ Data Integrity & Integration

No change needed. The /assets/$assetId route defines validateSearch with release?: string, so both explicit release values and an omitted {} search object are accepted.

web/src/features/assets/components/asset-detail-page.tsx (2)

181-188: 🎯 Functional Correctness | ⚡ Quick win

Guard against a blank page title.

title={release?.title ?? asset.draft?.title} can resolve to undefined when an asset has neither a release nor a draft title, rendering an empty <h1> in the shared PageHeader. A trivial fallback avoids the empty-header edge case.

🩹 Proposed fix
       <PageLayout.Header
-        title={release?.title ?? asset.draft?.title}
+        title={release?.title ?? asset.draft?.title ?? "Untitled asset"}
         description={release?.summary ?? asset.draft?.summary}

16-16: LGTM!

Also applies to: 34-40, 52-52, 137-160, 189-254, 268-270, 311-311, 385-385, 459-462, 544-553, 690-690, 738-740

web/src/features/assets/components/asset-state.tsx (1)

3-18: LGTM!

Also applies to: 29-46

web/src/features/assets/components/governance-workspace-page.tsx (1)

15-15: LGTM!

Also applies to: 36-36, 67-121, 144-155, 535-537

web/src/features/assets/components/pack-journey-page.tsx (1)

14-22: LGTM!

Also applies to: 65-224

Comment thread web/src/components/layouts/split-layout-components.tsx
Comment thread web/src/components/patterns/data-table.tsx
Comment thread web/src/components/ui/breadcrumb.tsx
Comment thread web/src/features/sources/components/knowledge-graph-panel.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant