Skip to content

refactor(web): reset frontend to production shell - #4

Merged
kl3inIT merged 2 commits into
mainfrom
agent/frontend-foundation-cleanup
Jul 21, 2026
Merged

refactor(web): reset frontend to production shell#4
kl3inIT merged 2 commits into
mainfrom
agent/frontend-foundation-cleanup

Conversation

@kl3inIT

@kl3inIT kl3inIT commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • remove the legacy prototype product screens while retaining shadcn/ui primitives and AI Elements
  • establish Vite 8/Oxlint and TanStack Router/Query loading, error, not-found, and crash boundaries
  • keep browser authentication as the only current product flow and document the frontend boundary

Verification

  • corepack pnpm lint
  • corepack pnpm typecheck
  • corepack pnpm build
  • JetBrains inspections on every touched TS/TSX file (one known false-positive for the same-document skip-link)
  • Playwright CLI smoke: login, authenticated shell/account menu, dark theme, and 404; no console errors

Summary by CodeRabbit

  • New Features

    • Introduced a dedicated authenticated workspace entry with improved session loading, retry, and crash recovery flows.
    • Added shared, consistent loading and application error screens across session-related pages.
    • Added a centralized query setup for background refresh behavior.
  • Bug Fixes

    • Improved theme handling (light/dark) for more reliable toggling.
    • Enhanced error routing and not-found behavior with clearer recovery actions.
  • Chores

    • Enabled Oxlint-based linting in the build pipeline and updated frontend design-system guidance.
    • Tweaked responsive viewport sizing and base typography rendering.
  • Removed

    • Removed multiple prototype screens and legacy layout elements (e.g., registry/topbar/detail pages) as part of the vertical-slice cleanup.

@coderabbitai

coderabbitai Bot commented Jul 21, 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: 1b01439b-5931-4e36-904a-cf77c26057e1

📥 Commits

Reviewing files that changed from the base of the PR and between d3b7454 and 328b2c4.

📒 Files selected for processing (2)
  • web/src/components/app-shell.tsx
  • web/src/index.css

📝 Walkthrough

Walkthrough

The web frontend is reset around a minimal login and authenticated workspace flow. It centralizes query and error handling, introduces shared loading/error states, simplifies the app shell, removes prototype product pages and asset APIs, and adds linting, dependency, metadata, and design-system updates.

Changes

Secure web flow

Layer / File(s) Summary
Frontend foundation and tooling
docs/guidelines/frontend-design-system.md, docs/increments/active/.../plan.md, web/.oxlintrc.json, web/package.json, web/index.html, web/src/components/ui/button.tsx, web/src/index.css
Frontend ownership guidance, Oxlint configuration, build scripts, dependencies, browser metadata, Radix Slot usage, and viewport styling are updated.
Shared runtime state handling
web/src/lib/query-client.ts, web/src/components/states/*, web/src/main.tsx
Query defaults and error toasts are centralized, loading and application-error components are added, and the root render tree gains lazy devtools plus query and crash boundaries.
Routing and authentication flow
web/src/router.tsx, web/src/pages/login.tsx, web/src/components/auth-gate.tsx, web/src/pages/workspace.tsx
Routes are reduced to login and workspace, login search state is validated, session loading/errors support retry, and workspace rendering is gated by authentication.
Workspace shell and prototype reset
web/src/components/app-shell.tsx, web/src/components/mode-toggle.tsx, web/src/pages/registry.tsx
The shell now renders account controls and an empty main region, theme detection uses the resolved theme, and the registry prototype is removed.

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

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant Router
  participant LoginPage
  participant AuthGate
  participant WorkspacePage
  Browser->>Router: navigate to login or workspace
  Router->>LoginPage: provide validated search state
  LoginPage->>AuthGate: check browser session
  AuthGate->>WorkspacePage: render workspace when authenticated
  AuthGate->>LoginPage: show loading or retryable error when session is unresolved
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: resetting the web frontend into a production shell.
✨ 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/frontend-foundation-cleanup

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Biome (2.5.3)
web/src/index.css

File contains syntax errors that prevent linting: Line 4: Tailwind-specific syntax is disabled.; Line 77: Tailwind-specific syntax is disabled.


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 21, 2026 10:15

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

🤖 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/app-shell.tsx`:
- Around line 18-26: Update the initials function’s fallback handling so an
absent name and email produce a two-character fallback such as “OM” rather than
deriving only the first character from the single-token “OrgMemory” string;
preserve the existing name- and email-based initials 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: e7093c20-ac2c-4d8b-8150-73d16bcf3aa9

📥 Commits

Reviewing files that changed from the base of the PR and between e9a373d and d3b7454.

⛔ Files ignored due to path filters (1)
  • web/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/pnpm-lock.yaml
📒 Files selected for processing (39)
  • docs/guidelines/frontend-design-system.md
  • docs/increments/active/2026-07-20-secure-knowledge-vertical-slice/plan.md
  • web/.oxlintrc.json
  • web/index.html
  • web/package.json
  • web/src/App.tsx
  • web/src/components/app-shell.tsx
  • web/src/components/auth-gate.tsx
  • web/src/components/layout/page-title.tsx
  • web/src/components/layout/topbar.tsx
  • web/src/components/mode-toggle.tsx
  • web/src/components/states/application-error.tsx
  • web/src/components/states/page-loading.tsx
  • web/src/components/ui/button.tsx
  • web/src/features/assets/asset-type-specs.ts
  • web/src/features/assets/asset-type.ts
  • web/src/features/assets/demo-data.ts
  • web/src/features/assets/status-badge.tsx
  • web/src/features/assets/use-assets.ts
  • web/src/features/assets/workflow-diagram.tsx
  • web/src/features/organization/use-organization-context.ts
  • web/src/index.css
  • web/src/lib/api.ts
  • web/src/lib/query-client.ts
  • web/src/main.tsx
  • web/src/pages/analytics.tsx
  • web/src/pages/ask-memory.tsx
  • web/src/pages/asset-detail.tsx
  • web/src/pages/create-asset.tsx
  • web/src/pages/dashboard.tsx
  • web/src/pages/knowledge-graph.tsx
  • web/src/pages/knowledge-transfer.tsx
  • web/src/pages/login.tsx
  • web/src/pages/registry.tsx
  • web/src/pages/review-queue.tsx
  • web/src/pages/settings.tsx
  • web/src/pages/workspace.tsx
  • web/src/router.tsx
  • web/src/types/cytoscape-fcose.d.ts
💤 Files with no reviewable changes (22)
  • web/src/pages/dashboard.tsx
  • web/src/App.tsx
  • web/src/pages/registry.tsx
  • web/src/pages/create-asset.tsx
  • web/src/components/layout/page-title.tsx
  • web/src/features/assets/asset-type.ts
  • web/src/pages/analytics.tsx
  • web/src/features/assets/demo-data.ts
  • web/src/features/assets/use-assets.ts
  • web/src/pages/asset-detail.tsx
  • web/src/types/cytoscape-fcose.d.ts
  • web/src/components/layout/topbar.tsx
  • web/src/pages/review-queue.tsx
  • web/src/pages/knowledge-transfer.tsx
  • web/src/features/assets/workflow-diagram.tsx
  • web/src/features/organization/use-organization-context.ts
  • web/src/pages/settings.tsx
  • web/src/features/assets/status-badge.tsx
  • web/src/pages/ask-memory.tsx
  • web/src/pages/knowledge-graph.tsx
  • web/src/lib/api.ts
  • web/src/features/assets/asset-type-specs.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
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/states/page-loading.tsx
  • web/src/lib/query-client.ts
  • web/src/components/states/application-error.tsx
  • web/src/components/mode-toggle.tsx
  • web/src/components/ui/button.tsx
  • web/src/pages/workspace.tsx
  • web/src/components/auth-gate.tsx
  • web/src/pages/login.tsx
  • web/src/main.tsx
  • web/src/components/app-shell.tsx
  • web/src/router.tsx
docs/**/*.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-20-secure-knowledge-vertical-slice/plan.md
  • docs/guidelines/frontend-design-system.md
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: kl3inIT/OrgMemory

Timestamp: 2026-07-21T10:08:58.300Z
Learning: Do not copy old page layouts merely to preserve route parity; reuse old code only when it is generic, tested, and compatible with the new information architecture.
Learnt from: CR
Repo: kl3inIT/OrgMemory

Timestamp: 2026-07-21T10:08:58.300Z
Learning: Add product routes one vertical slice at a time and do not restore deleted prototype pages.
🪛 Stylelint (17.14.0)
web/src/index.css

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

(value-keyword-case)

🔇 Additional comments (16)
docs/guidelines/frontend-design-system.md (1)

19-39: LGTM!

docs/increments/active/2026-07-20-secure-knowledge-vertical-slice/plan.md (1)

64-69: LGTM!

web/.oxlintrc.json (1)

1-17: LGTM!

web/package.json (1)

9-13: LGTM!

Also applies to: 14-33, 43-48

web/index.html (1)

6-8: LGTM!

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

3-3: LGTM!

Also applies to: 51-51

web/src/lib/query-client.ts (1)

1-17: LGTM!

web/src/components/states/application-error.tsx (1)

1-40: LGTM!

web/src/components/states/page-loading.tsx (1)

1-14: LGTM!

web/src/main.tsx (1)

1-20: LGTM!

Also applies to: 21-37, 38-52

web/src/router.tsx (1)

1-11: LGTM!

Also applies to: 12-44, 45-63, 64-64, 65-82, 83-83, 84-92

web/src/pages/login.tsx (1)

1-18: LGTM!

Also applies to: 19-35, 36-37

web/src/components/auth-gate.tsx (1)

1-4: LGTM!

Also applies to: 14-23, 25-32

web/src/pages/workspace.tsx (1)

1-11: LGTM!

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

1-17: LGTM!

Also applies to: 28-83

web/src/components/mode-toggle.tsx (1)

6-7: LGTM!

Comment thread web/src/components/app-shell.tsx
@kl3inIT
kl3inIT merged commit 02745b1 into main Jul 21, 2026
4 of 5 checks passed
@kl3inIT
kl3inIT deleted the agent/frontend-foundation-cleanup branch July 21, 2026 13:15
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