Skip to content

Refactor App.tsx into modular layout components#102

Closed
jamby77 wants to merge 21 commits intomasterfrom
registration-flow-sidebar
Closed

Refactor App.tsx into modular layout components#102
jamby77 wants to merge 21 commits intomasterfrom
registration-flow-sidebar

Conversation

@jamby77
Copy link
Copy Markdown
Collaborator

@jamby77 jamby77 commented Apr 7, 2026

Summary

  • Extracted inline components from App.tsx into src/components/layout/: AppLayout, AppSidebar, NavItem, CommunityBanner, FeedbackModal
  • Added shadcn UI primitives: Sidebar, Sheet, Input, and use-mobile hook
  • Wrapped layout with SidebarProvider for shadcn sidebar support

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
  • Run pnpm build — passes clean

🤖 Generated with Claude Code


Note

Medium Risk
Touches licensing/entitlement and introduces a new registration email flow plus runtime license activation/persistence, which can impact access control and onboarding if misconfigured. Also adds CORS/env changes and substantial UI layout refactoring that could affect navigation and CLI panel behavior.

Overview
UI layout refactor: Extracts the large inline layout from App.tsx into modular components (AppLayout, AppSidebar, NavItem, FeedbackModal) and switches to new shadcn primitives (Sidebar, Sheet, Input, useIsMobile) for a responsive, collapsible sidebar and updated CLI panel positioning/print hiding.

Early-access licensing UX: Adds a new Settings → License section that lets Community users request a free license key via VITE_REGISTRATION_URL and activate a key via a new POST /license/activate, with immediate license-status refresh; locked nav items now route to Settings with a “Register free” tooltip/badge, and webhook upgrade copy is updated accordingly.

Backend licensing/registration: Adds a v1/registrations endpoint in the entitlement service that creates/reuses a customer and issues (or re-sends) an Enterprise license key via a new Resend-based EmailService; entitlement validation now supports cloud tenant resolution via tenantId, and the licenses service gains runtime activation with safe state handling, disk persistence of the key, and more robust error propagation/parsing (with new tests).

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

KIvanow and others added 20 commits April 4, 2026 21:25
- Handle TOCTOU race in registration by catching Prisma P2002 errors
- Add GET to CORS allowed methods so non-registration endpoints work
- Set mode 0o600 on persisted license key file
- Create new license for re-registering customers with no active one
- Remove dead error prop from UpgradePrompt
- Remove process.env mutation in activateLicenseKey
- Fix fallback registration URL port from 3002 to 3001

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Kristiyan Ivanov <k.ivanow@gmail.com>
Co-authored-by: Kristiyan Ivanov <k.ivanow@gmail.com>
Co-authored-by: Kristiyan Ivanov <k.ivanow@gmail.com>
Co-authored-by: Kristiyan Ivanov <k.ivanow@gmail.com>
Co-authored-by: Kristiyan Ivanov <k.ivanow@gmail.com>
Co-authored-by: Kristiyan Ivanov <k.ivanow@gmail.com>
Co-authored-by: Kristiyan Ivanov <k.ivanow@gmail.com>
- Handle TOCTOU race in registration by catching Prisma P2002 errors
- Add GET to CORS allowed methods so non-registration endpoints work
- Set mode 0o600 on persisted license key file
- Create new license for re-registering customers with no active one
- Remove dead error prop from UpgradePrompt
- Remove process.env mutation in activateLicenseKey
- Fix fallback registration URL port from 3002 to 3001

Co-Authored-By: Claude <noreply@anthropic.com>
Resolve conflicts keeping:
- TooltipProvider wrapper and error prop pattern from master
- Validate-before-persist activation flow from branch
- ServiceUnavailableException error handling from branch
- Masked license key logging from master
- CORS and registration URL fixes from branch

Co-Authored-By: Claude <noreply@anthropic.com>
@jamby77 jamby77 requested a review from KIvanow April 7, 2026 10:04
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 3 potential issues.

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 267f626. Configure here.

Base automatically changed from registration-flow to master April 7, 2026 10:24
@KIvanow
Copy link
Copy Markdown
Member

KIvanow commented Apr 7, 2026

btw, do we need the CLI entry in the sidebar as well, when we have it at the bottom of the screen? It can free some ui space if we remove it from the sidebar

@jamby77
Copy link
Copy Markdown
Collaborator Author

jamby77 commented Apr 7, 2026

btw, do we need the CLI entry in the sidebar as well, when we have it at the bottom of the screen? It can free some ui space if we remove it from the sidebar

Agree

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Thank you for your contribution! Before we can merge this PR, you need to sign our Contributor License Agreement.

To sign, please comment below with:

I have read the CLA Document and I hereby sign the CLA


I have read the CLA Document and I hereby sign the CLA


2 out of 3 committers have signed the CLA.
✅ (KIvanow)[https://github.com/KIvanow]
✅ (jamby77)[https://github.com/jamby77]
@cursoragent
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@jamby77
Copy link
Copy Markdown
Collaborator Author

jamby77 commented Apr 7, 2026

recheck

…sidebar

Extract inline components into src/components/layout/, add shadcn
Sidebar/Sheet/Input primitives, resolve merge conflicts with master.
@jamby77 jamby77 force-pushed the registration-flow-sidebar branch from c8bdcf2 to 28c75f8 Compare April 7, 2026 11:10
@jamby77 jamby77 closed this Apr 7, 2026
@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.

3 participants