Skip to content

feat(web): add semantic design system foundation#14

Merged
kl3inIT merged 2 commits into
mainfrom
agent/frontend-design-system-foundation
Jul 23, 2026
Merged

feat(web): add semantic design system foundation#14
kl3inIT merged 2 commits into
mainfrom
agent/frontend-design-system-foundation

Conversation

@kl3inIT

@kl3inIT kl3inIT commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • introduce semantic light/dark tokens while retaining shadcn/Radix and AI Elements
  • centralize Sonner configuration and derive shell titles from typed TanStack Router metadata
  • remove component-level dark color overrides and validate Assistant/Documents across themes and narrow layout

Checks

  • corepack pnpm lint
  • corepack pnpm typecheck
  • corepack pnpm build
  • real-browser login, Assistant, Documents, light/dark, and 390px viewport

Notes

  • the existing large AI/markdown chunk warning remains outside this foundation slice

Summary by CodeRabbit

  • New Features
    • Added a consistent light and dark theme foundation across the application.
    • Improved styling for buttons, forms, menus, tabs, badges, switches, and assistant composer.
    • Added themed toast notifications with consistent placement, styling, and accessibility settings.
    • Page titles now reflect the active route, including browser tab titles.
    • Added a favicon.
  • Documentation
    • Added frontend design-system guidance and implementation planning documentation.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kl3inIT, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ecfb1b29-cadb-452d-aaf1-95aacf9fc969

📥 Commits

Reviewing files that changed from the base of the PR and between 8f3aa3c and d1e4764.

📒 Files selected for processing (4)
  • docs/increments/completed/2026-07-23-frontend-design-system-foundation/design.md
  • docs/increments/completed/2026-07-23-frontend-design-system-foundation/plan.md
  • web/src/components/app-shell/app-shell.tsx
  • web/src/styles/base.css
📝 Walkthrough

Walkthrough

This PR establishes semantic light/dark theme tokens, migrates shared UI styling to those tokens, adds global base styles, centralizes Sonner toasts in AppToaster, derives shell titles from typed route metadata, and documents the design-system contract and delivery plan.

Changes

Frontend design system foundation

Layer / File(s) Summary
Theme token foundation
web/src/styles/*, web/src/index.css, docs/increments/active/.../design.md, docs/increments/active/.../plan.md
Adds light/dark semantic tokens, Tailwind mappings, global base styles, compatibility aliases, and stylesheet imports.
Semantic component styling
web/src/components/ui/*, web/src/components/ai-elements/conversation.tsx, web/src/features/*, web/index.html
Updates shared controls, badges, tabs, conversation actions, assistant composer, and Documents tabs to use semantic styling tokens; adds a favicon link.
Application composition and route titles
web/src/components/app-toaster.tsx, web/src/main.tsx, web/src/components/app-shell/app-shell.tsx, web/src/routes/_authenticated/*, web/src/route-metadata.d.ts, docs/guidelines/*
Adds the themed AppToaster, wires it into the application, derives titles from typed route metadata, and documents the semantic theme contract and verification criteria.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

Toast composition

sequenceDiagram
  participant Feature
  participant AppToaster
  participant Sonner
  Feature->>Sonner: call toast
  AppToaster->>Sonner: render configured host
  AppToaster->>Sonner: apply resolved light/dark theme
  Sonner-->>Feature: display toast
Loading

Route title derivation

sequenceDiagram
  participant TanStackRouter
  participant AppShell
  participant BrowserDocument
  TanStackRouter->>AppShell: provide active route matches
  AppShell->>AppShell: select deepest staticData.title
  AppShell->>BrowserDocument: set document.title
  AppShell-->>TanStackRouter: render shell with page title
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a semantic design system foundation in the web app.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/frontend-design-system-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.

@kl3inIT
kl3inIT marked this pull request as ready for review July 22, 2026 17:38

@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: 3

🤖 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 `@docs/increments/active/2026-07-23-frontend-design-system-foundation/plan.md`:
- Around line 21-22: Complete the documentation lifecycle for this increment:
consolidate the current facts, specs, tests, and decisions, then move the
increment from the active collection to the completed collection. Mark the
corresponding checklist item in the increment plan as complete after both
actions are finished.

In `@web/src/components/app-shell/app-shell.tsx`:
- Around line 11-18: Update the pageTitle fallback in the useMatches selector so
the standalone product title is not suffixed with “· OrgMemory” by the
useEffect. Preserve the existing route-title formatting while ensuring unmatched
routes produce only the product title.

In `@web/src/styles/base.css`:
- Line 23: Update the text-rendering declaration near the base styles to use the
lowercase lint-compliant keyword optimizelegibility, preserving the existing
rendering behavior.
🪄 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: 94935308-0e81-44f3-ac26-231660060527

📥 Commits

Reviewing files that changed from the base of the PR and between 63c1be1 and 8f3aa3c.

⛔ Files ignored due to path filters (1)
  • web/public/favicon.svg is excluded by !**/*.svg
📒 Files selected for processing (25)
  • docs/guidelines/frontend-design-system.md
  • docs/increments/active/2026-07-23-frontend-design-system-foundation/design.md
  • docs/increments/active/2026-07-23-frontend-design-system-foundation/plan.md
  • web/index.html
  • web/src/components/ai-elements/conversation.tsx
  • web/src/components/app-shell/app-shell.tsx
  • web/src/components/app-toaster.tsx
  • web/src/components/ui/badge.tsx
  • web/src/components/ui/button.tsx
  • web/src/components/ui/dropdown-menu.tsx
  • web/src/components/ui/input-group.tsx
  • web/src/components/ui/input.tsx
  • web/src/components/ui/select.tsx
  • web/src/components/ui/switch.tsx
  • web/src/components/ui/tabs.tsx
  • web/src/features/assistant/components/assistant-page.tsx
  • web/src/features/sources/components/sources-page.tsx
  • web/src/index.css
  • web/src/main.tsx
  • web/src/route-metadata.d.ts
  • web/src/routes/_authenticated/index.tsx
  • web/src/routes/_authenticated/sources.tsx
  • web/src/styles/base.css
  • web/src/styles/theme.css
  • web/src/styles/tokens.css
📜 Review details
🧰 Additional context used
📓 Path-based instructions (7)
**/*

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • web/src/routes/_authenticated/index.tsx
  • web/src/routes/_authenticated/sources.tsx
  • web/src/features/assistant/components/assistant-page.tsx
  • web/index.html
  • web/src/features/sources/components/sources-page.tsx
  • web/src/components/app-toaster.tsx
  • web/src/components/ui/badge.tsx
  • web/src/route-metadata.d.ts
  • docs/increments/active/2026-07-23-frontend-design-system-foundation/plan.md
  • web/src/components/ui/select.tsx
  • web/src/components/ui/input.tsx
  • web/src/styles/base.css
  • web/src/components/ui/switch.tsx
  • web/src/main.tsx
  • docs/guidelines/frontend-design-system.md
  • web/src/index.css
  • web/src/components/ui/button.tsx
  • docs/increments/active/2026-07-23-frontend-design-system-foundation/design.md
  • web/src/components/app-shell/app-shell.tsx
  • web/src/components/ai-elements/conversation.tsx
  • web/src/components/ui/tabs.tsx
  • web/src/components/ui/dropdown-menu.tsx
  • web/src/styles/theme.css
  • web/src/styles/tokens.css
  • web/src/components/ui/input-group.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

For frontend files, use Oxlint, TypeScript typecheck, the production build, and browser tests when the UI flow matters.

Files:

  • web/src/routes/_authenticated/index.tsx
  • web/src/routes/_authenticated/sources.tsx
  • web/src/features/assistant/components/assistant-page.tsx
  • web/src/features/sources/components/sources-page.tsx
  • web/src/components/app-toaster.tsx
  • web/src/components/ui/badge.tsx
  • web/src/route-metadata.d.ts
  • web/src/components/ui/select.tsx
  • web/src/components/ui/input.tsx
  • web/src/components/ui/switch.tsx
  • web/src/main.tsx
  • web/src/components/ui/button.tsx
  • web/src/components/app-shell/app-shell.tsx
  • web/src/components/ai-elements/conversation.tsx
  • web/src/components/ui/tabs.tsx
  • web/src/components/ui/dropdown-menu.tsx
  • web/src/components/ui/input-group.tsx
**/*.{ts,tsx,js,jsx,json,html,css,scss}

📄 CodeRabbit inference engine (CLAUDE.md)

Do not run JetBrains IDE inspection on TypeScript, TSX, or web configuration files.

Files:

  • web/src/routes/_authenticated/index.tsx
  • web/src/routes/_authenticated/sources.tsx
  • web/src/features/assistant/components/assistant-page.tsx
  • web/index.html
  • web/src/features/sources/components/sources-page.tsx
  • web/src/components/app-toaster.tsx
  • web/src/components/ui/badge.tsx
  • web/src/route-metadata.d.ts
  • web/src/components/ui/select.tsx
  • web/src/components/ui/input.tsx
  • web/src/styles/base.css
  • web/src/components/ui/switch.tsx
  • web/src/main.tsx
  • web/src/index.css
  • web/src/components/ui/button.tsx
  • web/src/components/app-shell/app-shell.tsx
  • web/src/components/ai-elements/conversation.tsx
  • web/src/components/ui/tabs.tsx
  • web/src/components/ui/dropdown-menu.tsx
  • web/src/styles/theme.css
  • web/src/styles/tokens.css
  • web/src/components/ui/input-group.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/routes/_authenticated/index.tsx
  • web/src/routes/_authenticated/sources.tsx
  • web/src/features/assistant/components/assistant-page.tsx
  • web/src/features/sources/components/sources-page.tsx
  • web/src/components/app-toaster.tsx
  • web/src/components/ui/badge.tsx
  • web/src/route-metadata.d.ts
  • web/src/components/ui/select.tsx
  • web/src/components/ui/input.tsx
  • web/src/components/ui/switch.tsx
  • web/src/main.tsx
  • web/src/components/ui/button.tsx
  • web/src/components/app-shell/app-shell.tsx
  • web/src/components/ai-elements/conversation.tsx
  • web/src/components/ui/tabs.tsx
  • web/src/components/ui/dropdown-menu.tsx
  • web/src/components/ui/input-group.tsx
docs/**/*.md

📄 CodeRabbit inference engine (docs/conventions.md)

docs/**/*.md: Keep ARCHITECTURE.md and specification documents limited to implemented facts; record intent in vision/roadmap documents, keep active increment plans separate, and explicitly supersede append-only decisions.
Do not create status-summary documents that duplicate existing sources of truth.

Files:

  • docs/increments/active/2026-07-23-frontend-design-system-foundation/plan.md
  • docs/guidelines/frontend-design-system.md
  • docs/increments/active/2026-07-23-frontend-design-system-foundation/design.md

⚙️ CodeRabbit configuration file

docs/**/*.md: Preserve the thin-map documentation harness. Current facts belong in
architecture, specs, and tests only after implementation; future intent
belongs in vision, roadmap, or one active increment. Flag duplicated or
contradictory sources of truth.

Files:

  • docs/increments/active/2026-07-23-frontend-design-system-foundation/plan.md
  • docs/guidelines/frontend-design-system.md
  • docs/increments/active/2026-07-23-frontend-design-system-foundation/design.md
docs/**/*

📄 CodeRabbit inference engine (docs/conventions.md)

Keep provider credentials out of clients, logs, documentation, and git.

Files:

  • docs/increments/active/2026-07-23-frontend-design-system-foundation/plan.md
  • docs/guidelines/frontend-design-system.md
  • docs/increments/active/2026-07-23-frontend-design-system-foundation/design.md
docs/increments/active/**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

For each increment, create docs/increments/active/YYYY-MM-DD-slug/design.md followed by plan.md; execute one coherent slice, consolidate current facts/specs/tests/decisions, and move the increment to completed.

Files:

  • docs/increments/active/2026-07-23-frontend-design-system-foundation/plan.md
  • docs/increments/active/2026-07-23-frontend-design-system-foundation/design.md
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: kl3inIT/OrgMemory

Timestamp: 2026-07-22T17:33:26.876Z
Learning: Do not copy old page layouts solely to preserve route parity; reuse old code only when it is generic, tested, and compatible with the new information architecture.
🪛 Biome (2.5.3)
web/src/styles/theme.css

[error] 1-101: Tailwind-specific syntax is disabled.

(parse)

🪛 Stylelint (17.14.0)
web/src/styles/base.css

[error] 23-23: Expected "optimizeLegibility" to be "optimizelegibility" (value-keyword-case)

(value-keyword-case)

web/src/styles/theme.css

[error] 1-1: Unexpected unknown at-rule "@theme" (scss/at-rule-no-unknown)

(scss/at-rule-no-unknown)

🔇 Additional comments (24)
web/src/components/app-toaster.tsx (1)

1-32: LGTM!

web/src/main.tsx (1)

10-10: LGTM!

Also applies to: 49-49

web/src/components/app-shell/app-shell.tsx (1)

1-2: LGTM!

web/src/route-metadata.d.ts (1)

1-7: LGTM!

web/src/routes/_authenticated/index.tsx (1)

7-7: LGTM!

web/src/routes/_authenticated/sources.tsx (1)

7-7: LGTM!

docs/increments/active/2026-07-23-frontend-design-system-foundation/design.md (1)

1-52: LGTM!

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

1-205: LGTM!

web/src/components/ui/switch.tsx (1)

20-28: LGTM!

web/src/components/ui/tabs.tsx (1)

65-68: LGTM!

web/src/components/ai-elements/conversation.tsx (1)

88-90: LGTM!

Also applies to: 156-158

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

109-109: LGTM!

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

63-63: LGTM!

web/index.html (1)

7-7: 🎯 Functional Correctness

No change needed.

/favicon.svg maps to the existing web/public/favicon.svg asset.

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

1-101: 📐 Maintainability & Code Quality

Configure CSS tooling for Tailwind v4 directives.

@theme inline is valid Tailwind v4 syntax, but Biome and Stylelint currently report this file as a parse/unknown-at-rule error. If either tool is part of the PR gate, configure the parser/at-rule allowlist or exclude Tailwind-authored CSS; do not rewrite this directive. Tailwind documents @theme and @theme inline as supported syntax. (tailwindcss.com)

Source: Linters/SAST tools

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

1-19: 🎯 Functional Correctness

Keep global CSS on source tokens, not generated Tailwind aliases.

base.css consumes --color-border, --color-background, and --color-foreground, while web/src/styles/theme.css is documented as the Tailwind exposure layer. Verify the compiled CSS, or use the source roles --border, --background, and --foreground directly so global styles do not depend on utility-generated aliases. Tailwind notes that unused theme variables may be omitted from final output. (tailwindcss.com)

web/src/index.css (1)

3-5: LGTM!

docs/guidelines/frontend-design-system.md (1)

34-50: LGTM!

web/src/components/ui/button.tsx (1)

8-22: LGTM!

web/src/components/ui/badge.tsx (1)

14-16: LGTM!

web/src/components/ui/dropdown-menu.tsx (1)

77-77: LGTM!

web/src/components/ui/input-group.tsx (1)

17-17: LGTM!

Also applies to: 27-30, 139-139, 155-155

web/src/components/ui/input.tsx (1)

11-13: LGTM!

web/src/components/ui/select.tsx (1)

40-40: LGTM!

Comment on lines +21 to +22
- [ ] Consolidate docs, move the increment to completed, commit, push, open a PR,
and resolve actionable CI or CodeRabbit findings.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Complete the active increment’s documentation lifecycle.

The plan leaves consolidation and moving this increment from active/ to completed/ unchecked. Finish those steps before treating the increment as delivered.

As per path instructions, active increments must consolidate current facts/specs/tests/decisions and move to completed after execution.

🤖 Prompt for 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.

In `@docs/increments/active/2026-07-23-frontend-design-system-foundation/plan.md`
around lines 21 - 22, Complete the documentation lifecycle for this increment:
consolidate the current facts, specs, tests, and decisions, then move the
increment from the active collection to the completed collection. Mark the
corresponding checklist item in the increment plan as complete after both
actions are finished.

Source: Path instructions

Comment thread web/src/components/app-shell/app-shell.tsx
Comment thread web/src/styles/base.css Outdated
@kl3inIT
kl3inIT merged commit 9a27d05 into main Jul 23, 2026
5 checks passed
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