Skip to content

Refactor App.tsx into modular layout components#103

Merged
KIvanow merged 2 commits intomasterfrom
feature/102-registration-flow-sidebar
Apr 7, 2026
Merged

Refactor App.tsx into modular layout components#103
KIvanow merged 2 commits intomasterfrom
feature/102-registration-flow-sidebar

Conversation

@jamby77
Copy link
Copy Markdown
Collaborator

@jamby77 jamby77 commented Apr 7, 2026

Summary

  • Extract inline components from App.tsx into src/components/layout/: AppLayout, AppSidebar, NavItem, CommunityBanner, FeedbackModal
  • Add shadcn UI primitives: Sidebar, Sheet, Input, and use-mobile hook
  • Responsive sidebar transitions with peer-data-[state]

Test plan

  • Verify sidebar renders correctly with all nav items
  • Verify locked features still show tooltip and redirect to settings
  • Verify CLI toggle, feedback modal, and community banner work as before
  • Verify print styles still hide sidebar
  • pnpm build passes clean

🤖 Generated with Claude Code


Note

Medium Risk
Mostly a UI refactor, but it replaces the core navigation layout with a new responsive sidebar/sheet system and changes positioning/print rules, which could regress routing, sidebar state, or CLI panel placement.

Overview
Refactors App.tsx by extracting the inline layout/nav/feedback/community-banner logic into a dedicated components/layout module (AppLayout, AppSidebar, NavItem, CommunityBanner, FeedbackModal), leaving App.tsx focused on providers and top-level bootstrapping.

Introduces new shadcn-style primitives (Sidebar, Sheet, Input) plus a useIsMobile hook to support a responsive, collapsible sidebar with persisted open/closed state, and updates CliPanel positioning to follow the new sidebar (peer-based left offset + transitions) and updated print-hiding selectors.

Reviewed by Cursor Bugbot for commit 4b19ff3. Bugbot is set up for automated code reviews on this repo. Configure here.

…sidebar

Extract inline components into src/components/layout/, add shadcn
Sidebar/Sheet/Input primitives, responsive sidebar transitions.
@jamby77 jamby77 requested a review from KIvanow April 7, 2026 11:17
@jamby77
Copy link
Copy Markdown
Collaborator Author

jamby77 commented Apr 7, 2026

Cursor messed up commit history, so reopening as fresh PR from fresh branch

Comment thread apps/web/src/components/layout/AppSidebar.tsx
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4b19ff3. Configure here.


{showFeedback && <FeedbackModal onClose={() => setShowFeedback(false)} />}

<main className="min-h-screen flex flex-col pl-0 transition-[padding] duration-200 ease-linear md:peer-data-[state=expanded]:pl-64">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mobile sidebar has no trigger button to open

High Severity

On mobile (below 768px), the Sidebar component renders as a Sheet overlay that starts closed (openMobile defaults to false). However, no SidebarTrigger (hamburger button) is rendered anywhere in AppLayout or AppSidebar to let users open it. The SidebarTrigger component is exported from sidebar.tsx but never used. The old code had a fixed sidebar always visible at all screen sizes. Now on mobile, navigation is completely inaccessible — there's no UI element to open the sheet and Ctrl+B isn't available on phones.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4b19ff3. Configure here.

@KIvanow KIvanow merged commit ef1962a into master Apr 7, 2026
2 checks passed
@KIvanow KIvanow deleted the feature/102-registration-flow-sidebar branch April 7, 2026 11:35
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants