Skip to content

feat(frontend): redesign app shell and login with premium editorial UX - #160

Merged
LucasSantana-Dev merged 2 commits into
mainfrom
feature/ui-shell-login-rework
Mar 11, 2026
Merged

LucasSantana-Dev merged 2 commits into
mainfrom
feature/ui-shell-login-rework

Conversation

@LucasSantana-Dev

@LucasSantana-Dev LucasSantana-Dev commented Mar 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • redesign Layout with contextual top framing and active guild context panel
  • rebuild Sidebar navigation styling, active-state clarity, mobile drawer parity, and server selector affordances
  • redesign login page into neo-editorial split layout while preserving auth flow behavior
  • stabilize active-link testing with data-active markers and refresh visual snapshot baselines for intentional UI deltas
  • update README and CHANGELOG entries for shell/login revamp

Test plan

  • npm run test --workspace=packages/frontend -- src/components/ui/DesignPrimitives.test.tsx src/components/Layout/Sidebar.test.tsx src/pages/Login.test.tsx
  • npm run type:check --workspace=packages/frontend
  • npm run lint --workspace=packages/frontend
  • npm run test:e2e --workspace=packages/frontend -- tests/e2e/visual/login-page.spec.ts tests/e2e/visual/pages.spec.ts --update-snapshots

Summary by CodeRabbit

  • New Features

    • Redesigned app shell with neo-editorial dark framing, responsive sidebar, and dynamic route-aware titles and subtitles
    • Enhanced active navigation states with clearer server selector interface
  • Refactor

    • Removed unused legacy layout components
  • Style

    • Login page redesigned with improved visual hierarchy and feature highlights
    • Updated navigation typography and active link indicators with mobile drawer parity

@vercel

vercel Bot commented Mar 11, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lucky Ready Ready Preview, Comment Mar 11, 2026 4:50am

@coderabbitai

coderabbitai Bot commented Mar 11, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@LucasSantana-Dev has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 56 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 03204c4c-3316-40e2-a8a5-a75928b9ceaf

📥 Commits

Reviewing files that changed from the base of the PR and between 1f2b15a and 9afda87.

📒 Files selected for processing (2)
  • packages/frontend/src/components/Layout/Layout.test.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
📝 Walkthrough

Walkthrough

This PR removes legacy layout components and introduces a comprehensive neo-editorial shell design across the frontend app shell, sidebar, and login page. Changes include route-aware dynamic titles, server selection UI enhancements, improved active navigation states, and responsive layout adjustments.

Changes

Cohort / File(s) Summary
Documentation
CHANGELOG.md, README.md
Added entries documenting removal of legacy layout components and introduction of neo-editorial shell with responsive sidebar and contextual page framing.
Layout Components
packages/frontend/src/components/Layout/Layout.tsx, packages/frontend/src/components/Layout/Sidebar.tsx
Introduced route-aware UI in Layout with dynamic titles/subtitles derived from current pathname; restructured outer wrapper and header. Extensive refactor of Sidebar: reordered imports, updated section titles to title-case, added server dropdown with toggle state, enhanced active link styling with data-active attributes and left-side indicator bars, adjusted mobile/desktop widths, updated avatar/text styling, refined transitions and focus states.
Layout Tests
packages/frontend/src/components/Layout/Sidebar.test.tsx
Updated active link styling assertions to check data-active attributes instead of CSS classes (bg-lucky-red/10).
Login Page
packages/frontend/src/pages/Login.tsx
Redesigned login interface from single-column to two-column layout with left column containing branding and feature highlights, right column with Discord authentication and feature cards; added decorative icons (Sparkles, ShieldCheck, Zap); changed login handler invocation pattern.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • LuckasSantana-Dev/Lucky#159 — Both PRs directly modify frontend layout by removing legacy components and introducing neo-editorial shell with updated UI primitives across Layout, Sidebar, and Login.

Suggested labels

size/xl

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main changes: a redesign of the app shell and login page with a premium editorial UX approach, which aligns perfectly with the comprehensive UI/UX overhaul detailed in the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/ui-shell-login-rework

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 and usage tips.

@LucasSantana-Dev
LucasSantana-Dev changed the base branch from feature/ui-foundation-neo-editorial to main March 11, 2026 04:39
@LucasSantana-Dev
LucasSantana-Dev force-pushed the feature/ui-shell-login-rework branch from e729504 to 1f2b15a Compare March 11, 2026 04:40
@netlify

netlify Bot commented Mar 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for regal-bunny-0c8efe ready!

Name Link
🔨 Latest commit 9afda87
🔍 Latest deploy log https://app.netlify.com/projects/regal-bunny-0c8efe/deploys/69b0f445dda1f400084e89b2
😎 Deploy Preview https://deploy-preview-160--regal-bunny-0c8efe.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Mar 11, 2026 •

Copy link
Copy Markdown

Size Change: +953 B (+0.33%)

Total Size: 293 kB

Filename Size Change
packages/frontend/dist/assets/AutoMessages-Ct8Nmezd.js 0 B -1.55 kB (removed) 🏆
packages/frontend/dist/assets/AutoMessages-DtWnxO6f.js 1.56 kB +1.56 kB (new file) 🆕
packages/frontend/dist/assets/AutoMod-DFodmLfI.js 0 B -2.73 kB (removed) 🏆
packages/frontend/dist/assets/AutoMod-Dv8JTzwv.js 2.73 kB +2.73 kB (new file) 🆕
packages/frontend/dist/assets/badge-9niNSxzk.js 0 B -453 B (removed) 🏆
packages/frontend/dist/assets/badge-CkJiemo9.js 452 B +452 B (new file) 🆕
packages/frontend/dist/assets/Card-CSXbhwpW.js 0 B -380 B (removed) 🏆
packages/frontend/dist/assets/Card-JghqLSsO.js 379 B +379 B (new file) 🆕
packages/frontend/dist/assets/CommandsConfig-Cm4IyZ4u.js 0 B -1.42 kB (removed) 🏆
packages/frontend/dist/assets/CommandsConfig-Dsbt147q.js 1.43 kB +1.43 kB (new file) 🆕
packages/frontend/dist/assets/Config-BsA9FTAK.js 0 B -1.61 kB (removed) 🏆
packages/frontend/dist/assets/Config-DAoJT7Wb.js 1.61 kB +1.61 kB (new file) 🆕
packages/frontend/dist/assets/CustomCommands-C0EedHAp.js 0 B -2.1 kB (removed) 🏆
packages/frontend/dist/assets/CustomCommands-Dtqav2Yx.js 2.1 kB +2.1 kB (new file) 🆕
packages/frontend/dist/assets/DashboardOverview-CXkbC2AU.js 0 B -2.93 kB (removed) 🏆
packages/frontend/dist/assets/DashboardOverview-YN0PQeKI.js 2.93 kB +2.93 kB (new file) 🆕
packages/frontend/dist/assets/Features-3xEP4_B4.js 2.39 kB +2.39 kB (new file) 🆕
packages/frontend/dist/assets/Features-sp1GcJ06.js 0 B -2.38 kB (removed) 🏆
packages/frontend/dist/assets/index-_u21MfKz.js 67.7 kB +67.7 kB (new file) 🆕
packages/frontend/dist/assets/index-CG9Qe6I1.js 0 B -67.1 kB (removed) 🏆
packages/frontend/dist/assets/index-l-kiezM7.css 0 B -13.9 kB (removed) 🏆
packages/frontend/dist/assets/index-v0-Wp3gm.css 13.9 kB +13.9 kB (new file) 🆕
packages/frontend/dist/assets/input-Ca158ffh.js 0 B -426 B (removed) 🏆
packages/frontend/dist/assets/input-DzluwtKk.js 425 B +425 B (new file) 🆕
packages/frontend/dist/assets/label-CEd1OFEl.js 444 B +444 B (new file) 🆕
packages/frontend/dist/assets/label-ClvQAZAg.js 0 B -443 B (removed) 🏆
packages/frontend/dist/assets/LastFm-BBnFYlBK.js 0 B -1.52 kB (removed) 🏆
packages/frontend/dist/assets/LastFm-C1z3nn0D.js 1.52 kB +1.52 kB (new file) 🆕
packages/frontend/dist/assets/Login-CjmEn_2g.js 0 B -2.22 kB (removed) 🏆
packages/frontend/dist/assets/Login-D7L7Ifub.js 2.29 kB +2.29 kB (new file) 🆕
packages/frontend/dist/assets/Lyrics-BwfcwqV0.js 0 B -1.3 kB (removed) 🏆
packages/frontend/dist/assets/Lyrics-Cq4VHFm3.js 1.31 kB +1.31 kB (new file) 🆕
packages/frontend/dist/assets/Moderation-C41mlPfb.js 3.75 kB +3.75 kB (new file) 🆕
packages/frontend/dist/assets/Moderation-CyESPUxH.js 0 B -3.76 kB (removed) 🏆
packages/frontend/dist/assets/ModerationConfig-BFoy8idt.js 0 B -1.93 kB (removed) 🏆
packages/frontend/dist/assets/ModerationConfig-CbBodfVW.js 1.93 kB +1.93 kB (new file) 🆕
packages/frontend/dist/assets/Music-Bdp5osr8.js 0 B -6.09 kB (removed) 🏆
packages/frontend/dist/assets/Music-Cr2uc_iH.js 6.09 kB +6.09 kB (new file) 🆕
packages/frontend/dist/assets/MusicConfig-B1dkqjle.js 0 B -1.62 kB (removed) 🏆
packages/frontend/dist/assets/MusicConfig-DauxsUfa.js 1.62 kB +1.62 kB (new file) 🆕
packages/frontend/dist/assets/select-BHVB91_X.js 0 B -1.19 kB (removed) 🏆
packages/frontend/dist/assets/select-BLvr4UOp.js 1.19 kB +1.19 kB (new file) 🆕
packages/frontend/dist/assets/ServerLogs-CikHpoUv.js 2.82 kB +2.82 kB (new file) 🆕
packages/frontend/dist/assets/ServerLogs-zeUr3zjk.js 0 B -2.82 kB (removed) 🏆
packages/frontend/dist/assets/ServerSettings-BLBS1wpp.js 0 B -1.89 kB (removed) 🏆
packages/frontend/dist/assets/ServerSettings-CA-8OJ1R.js 1.89 kB +1.89 kB (new file) 🆕
packages/frontend/dist/assets/ServersPage-6DuwVHV-.js 0 B -2.4 kB (removed) 🏆
packages/frontend/dist/assets/ServersPage-Blhzk8wu.js 2.4 kB +2.4 kB (new file) 🆕
packages/frontend/dist/assets/Skeleton-6O4LaQh7.js 0 B -229 B (removed) 🏆
packages/frontend/dist/assets/Skeleton-DhiZOoVZ.js 229 B +229 B (new file) 🆕
packages/frontend/dist/assets/switch-C4fh8gY8.js 0 B -516 B (removed) 🏆
packages/frontend/dist/assets/switch-CBQhYbdi.js 515 B +515 B (new file) 🆕
packages/frontend/dist/assets/TrackHistory-C_q62901.js 0 B -1.84 kB (removed) 🏆
packages/frontend/dist/assets/TrackHistory-Cghe69_n.js 1.84 kB +1.84 kB (new file) 🆕
packages/frontend/dist/assets/TwitchNotifications-D3f8631e.js 1.57 kB +1.57 kB (new file) 🆕
packages/frontend/dist/assets/TwitchNotifications-DR_aEWQn.js 0 B -1.57 kB (removed) 🏆
packages/frontend/dist/assets/useGuildSelection-DnMv1cBy.js 0 B -295 B (removed) 🏆
packages/frontend/dist/assets/useGuildSelection-Ne__Oc2x.js 293 B +293 B (new file) 🆕
packages/frontend/dist/assets/vendor-ui-BgsQoYQd.js 64.5 kB +64.5 kB (new file) 🆕
packages/frontend/dist/assets/vendor-ui-DSWwm_-g.js 0 B -64.2 kB (removed) 🏆
ℹ️ View Unchanged
Filename Size
packages/frontend/dist/assets/usePageMetadata-Dudc5JrX.js 287 B
packages/frontend/dist/assets/vendor-forms-C1Gy4syj.js 21.1 kB
packages/frontend/dist/assets/vendor-radix-BTf9AecN.js 33.5 kB
packages/frontend/dist/assets/vendor-react-Bu1Oeml_.js 17.3 kB
packages/frontend/dist/assets/vendor-state-Szs8I3iE.js 25 kB
packages/frontend/dist/assets/zod-CLxBCFgw.js 1.58 kB

compressed-size-action

@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.

🧹 Nitpick comments (2)
packages/frontend/src/components/Layout/Sidebar.tsx (1)

82-373: Consider splitting this component to meet the 250-line limit.

At ~373 lines, this file exceeds the project's 250-line maximum. Consider extracting focused subcomponents:

  • SidebarServerDropdown for the server context selector (lines 125-238)
  • SidebarNavigation for the nav sections (lines 240-291)
  • SidebarUserProfile for the user section (lines 293-325)

This can be addressed in a follow-up PR.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/frontend/src/components/Layout/Sidebar.tsx` around lines 82 - 373,
Sidebar is over the 250-line limit; extract the server selector, nav, and user
blocks into focused subcomponents. Create SidebarServerDropdown that
encapsulates the server dropdown UI and state (replace the server dropdown JSX
currently using selectedGuild, guilds, botGuilds, selectGuild and
serverDropdownOpen toggle), SidebarNavigation that renders navSections and uses
the isActive function to render each Link (move the navSections map and item
rendering), and SidebarUserProfile that renders the Avatar/user info and logout
button (move user, logout usage). Update the Sidebar component to import and
render these three new components, pass the necessary props (selectedGuild,
guilds, selectGuild to SidebarServerDropdown; navSections and isActive to
SidebarNavigation; user and logout to SidebarUserProfile), and remove the moved
JSX/state (serverDropdownOpen and related handlers, navigation JSX, and user
JSX) from Sidebar so the top-level component is slim.
packages/frontend/src/pages/Login.tsx (1)

74-92: Consider using an arrow function wrapper for the onClick handler.

While passing login directly works (the unused MouseEvent argument is silently ignored), wrapping it maintains a cleaner contract between the event handler and the store action:

🔧 Optional improvement
 <Button
-    onClick={login}
+    onClick={() => login()}
     disabled={isLoading}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/frontend/src/pages/Login.tsx` around lines 74 - 92, The Button
onClick currently passes the store action login directly which may receive the
MouseEvent; change the handler to an arrow wrapper so the event is not
forwarded—replace onClick={login} with an arrow wrapper that calls login (e.g.,
onClick={() => login()}) to keep the DOM event separate from the store action
and preserve a clean handler contract for the login function.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/frontend/src/components/Layout/Sidebar.tsx`:
- Around line 82-373: Sidebar is over the 250-line limit; extract the server
selector, nav, and user blocks into focused subcomponents. Create
SidebarServerDropdown that encapsulates the server dropdown UI and state
(replace the server dropdown JSX currently using selectedGuild, guilds,
botGuilds, selectGuild and serverDropdownOpen toggle), SidebarNavigation that
renders navSections and uses the isActive function to render each Link (move the
navSections map and item rendering), and SidebarUserProfile that renders the
Avatar/user info and logout button (move user, logout usage). Update the Sidebar
component to import and render these three new components, pass the necessary
props (selectedGuild, guilds, selectGuild to SidebarServerDropdown; navSections
and isActive to SidebarNavigation; user and logout to SidebarUserProfile), and
remove the moved JSX/state (serverDropdownOpen and related handlers, navigation
JSX, and user JSX) from Sidebar so the top-level component is slim.

In `@packages/frontend/src/pages/Login.tsx`:
- Around line 74-92: The Button onClick currently passes the store action login
directly which may receive the MouseEvent; change the handler to an arrow
wrapper so the event is not forwarded—replace onClick={login} with an arrow
wrapper that calls login (e.g., onClick={() => login()}) to keep the DOM event
separate from the store action and preserve a clean handler contract for the
login function.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d92fb8c0-774d-487a-9ea5-bf0d00bce400

📥 Commits

Reviewing files that changed from the base of the PR and between 1261f09 and 1f2b15a.

⛔ Files ignored due to path filters (9)
  • packages/frontend/tests/e2e/visual/login-page.spec.ts-snapshots/login-button-hover-chromium-darwin.png is excluded by !**/*.png
  • packages/frontend/tests/e2e/visual/login-page.spec.ts-snapshots/login-page-chromium-darwin.png is excluded by !**/*.png
  • packages/frontend/tests/e2e/visual/login-page.spec.ts-snapshots/login-page-error-chromium-darwin.png is excluded by !**/*.png
  • packages/frontend/tests/e2e/visual/pages.spec.ts-snapshots/dashboard-page-chromium-darwin.png is excluded by !**/*.png
  • packages/frontend/tests/e2e/visual/pages.spec.ts-snapshots/features-page-chromium-darwin.png is excluded by !**/*.png
  • packages/frontend/tests/e2e/visual/pages.spec.ts-snapshots/servers-page-chromium-darwin.png is excluded by !**/*.png
  • packages/frontend/tests/e2e/visual/pages.spec.ts-snapshots/servers-page-error-chromium-darwin.png is excluded by !**/*.png
  • packages/frontend/tests/e2e/visual/pages.spec.ts-snapshots/servers-page-loading-chromium-darwin.png is excluded by !**/*.png
  • packages/frontend/tests/e2e/visual/pages.spec.ts-snapshots/sidebar-chromium-darwin.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • CHANGELOG.md
  • README.md
  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
  • packages/frontend/src/pages/Login.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: SonarCloud Scan
  • GitHub Check: Quality Gates
  • GitHub Check: compressed-size
🧰 Additional context used
📓 Path-based instructions (21)
**/*.{js,jsx,ts,tsx,vue,html}

📄 CodeRabbit inference engine (.cursor/rules/accessibility-openness.mdc)

Provide accessible UI components using semantic HTML and ARIA attributes where necessary

Files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/dependency-injection.mdc)

**/*.{ts,tsx,js,jsx}: Prefer constructor injection for classes that require dependencies
Avoid global mutable singletons unless necessary
Use explicit interfaces for external dependencies to make testing easier

**/*.{ts,tsx,js,jsx}: Include required references in PRs/code for non-trivial logic: TypeScript (official docs), MDN (JavaScript reference), and official docs for any runtime/framework/libraries used (e.g., Node.js, React) as applicable.
Before assuming behavior of an API, include the doc link and a ≤25-word quote when the change relies on it.

**/*.{ts,tsx,js,jsx}: Prefer named exports for clear usage and easier refactors in TypeScript/JavaScript
Keep import order consistent: external first, then internal modules
Remove dead code and unused imports

**/*.{ts,tsx,js,jsx}: Use PascalCase naming convention for React/UI components
Use camelCase naming convention for variables and functions
Use UPPER_SNAKE_CASE naming convention for constants
Maintain consistent import grouping and ordering within the project, keeping third-party imports separate from local imports
For external data sources (HTTP, database), always validate and sanitize input using type guards or schema validators

**/*.{ts,tsx,js,jsx}: Use Prettier with no semicolons, single quotes, 4-space indent, 80 character width
Files must not exceed 250 lines and this is enforced

Implement TypeScript typecheck and linter in CI quality checks

**/*.{ts,tsx,js,jsx}: Use TypeScript for enhanced type safety
Implement error handling and error logging
Avoid commenting code unless extremely necessary - code should explain itself with descriptive names
Leave NO todos, placeholders or missing pieces in the code
Variables and functions must use camelCase
Constants must use UPPER_SNAKE_CASE
Use arrow functions for methods and computed properties
Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements
Maintain consistent import grouping/order: external imports first, then...

Files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)

**/*.{js,jsx,ts,tsx}: Never throw strings. Throw Error (or typed subclasses) with descriptive messages
Include causal error as cause when available for better debugging
Define clear, stable error codes (e.g., ERR_AUTH_EXPIRED, ERR_NETWORK_TIMEOUT)
Provide optional metadata (e.g., details, retryable, status, correlationId) in error objects
Use domain error classes per area (e.g., AuthenticationError, ValidationError, NetworkError)
Log errors with structure (message, code, stack, cause, correlationId, user context where appropriate)
Mark retryable vs nonRetryable errors where helpful for operations
Set timeouts and handle aborts/cancellations; avoid dangling requests in API/network code
Implement backoff for transient failures; avoid infinite retries
Map HTTP status → domain errors; 4xx vs 5xx behave differently (e.g., retry for 5xx/network)

**/*.{js,jsx,ts,tsx}: Use functional components with hooks in React/React Native. Avoid class components.
Keep components focused on a single responsibility; extract complex logic into custom hooks.
Keep state local when possible. Use Context/Zustand/Redux only when necessary for state management.
If props or state traverse more than 3 levels, consider using context or a feature-scoped store instead of prop drilling.
Use performance optimization techniques: React.memo, useMemo, useCallback, Suspense (web), and virtualization for long lists; avoid unnecessary re-renders.
Web accessibility: use semantic HTML, labels, focus management, keyboard navigation, and aria-* attributes as needed.
React Native accessibility: use accessibility props (accessible, accessibilityLabel), proper roles and labels.
Identify and extract repetitive UI components proactively to components/ with clear props and minimal coupling.
Web styles: prefer co-located styles or design system tokens; avoid global style leakage.
React Native styles: prefer StyleSheet.create, design tokens, and theme providers; avoid in...

Files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)

**/*.{jsx,tsx}: Use toasts/snackbars for transient errors; avoid blocking modals for non-critical issues in React/React Native UI
Debounce/suppress duplicate toasts to prevent spam
Provide retry/refresh actions when meaningful (e.g., network failure) in error UI
Use error boundaries for render-time exceptions; show fallback UI in React
Respect accessibility: toasts should be announced (aria-live on web; accessibility hints on React Native)

Files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/pattern.mdc)

Introduce interfaces at module boundaries to enable testing and substitutions

**/*.{ts,tsx}: Avoid using any type in TypeScript. If unavoidable, use unknown with type guards and justify with a code comment
Prefer interface for defining public object shapes in TypeScript, use type for unions and utility types
Use TypeScript utility types such as Partial, Pick, Omit, Readonly, and Record when appropriate
Use I{Name} naming convention for interfaces in TypeScript
Use T{Name} naming convention for type aliases and utility types in TypeScript

**/*.{ts,tsx}: Functions must be less than 50 lines with cyclomatic complexity less than 10
Do not use any types - ESLint enforces this at error level

**/*.{ts,tsx}: Prefer types over interfaces for most cases
Don't ever use any - type safety always
Avoid enums; use const objects instead
For complex types, create a separate file to declare them and import them
Avoid using any type; if unavoidable, use unknown with type guards and justify with code comment
Prefer interface for public API shapes; use type for unions and utility types
Use TypeScript utility types (Partial, Pick, Omit, Readonly, Record)

Files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
packages/frontend/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/frontend/src/**/*.{ts,tsx}: Frontend errors are created by Axios interceptor and should be of type ApiError with status and details from backend
Frontend uses path alias @/ mapped to src/ - use this alias for all imports from the src directory

Do not depend on @lucky/shared package in frontend code; make API calls to backend via configured base URL (env)

Files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
**/*.{js,ts,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/documentation.mdc)

**/*.{js,ts,tsx,jsx}: Minimize comments in code; explain the 'why' when non-obvious, let code express the 'what' through clear naming
Document trade-offs briefly when deviating from ideal patterns

**/*.{js,ts,tsx,jsx}: Store secrets, ports, and hosts in environment variables (.env, .env.example) and never hardcode them
Avoid redundant or decorative AI comments; code should be self-explanatory and only commented when logic is non-obvious; prefer refactoring over lengthy comments

Files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
packages/frontend/src/components/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/lucky-frontend.mdc)

Organize UI components in packages/frontend/src/components/ directory

Files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
packages/frontend/src/{components,pages}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/lucky-frontend.mdc)

Use React functional components and hooks; keep components small and focused

Files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
packages/frontend/src/{components,pages}/**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/lucky-frontend.mdc)

Follow existing styling approach (e.g., Tailwind if present); avoid inline styles for layout and theming

Files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
packages/frontend/**

📄 CodeRabbit inference engine (.cursor/rules/lucky-project.mdc)

The frontend package uses React with Vite and must not depend on the shared package

Files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
**/[A-Z]*.{ts,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/typescript.mdc)

Components must use PascalCase naming

Files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
**/*.{test,spec}.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/frontend.mdc)

**/*.{test,spec}.{js,jsx,ts,tsx}: Test behavior, not implementation. Prefer Testing Library utilities for testing React/React Native components.
For React Native tests: mock native modules and test component interactions and accessibility labels.

Files:

  • packages/frontend/src/components/Layout/Sidebar.test.tsx
**/*.{test,spec}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/pattern.mdc)

**/*.{test,spec}.{ts,tsx,js,jsx}: Test behavior, not implementation details
Prefer unit tests for core logic; add integration tests at meaningful boundaries

Files:

  • packages/frontend/src/components/Layout/Sidebar.test.tsx
**/*.{test,spec}.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/testing-quality.mdc)

**/*.{test,spec}.{js,ts,jsx,tsx}: Use Jest + a React testing library for unit and component tests as applicable
Test behavior, not implementation details

Files:

  • packages/frontend/src/components/Layout/Sidebar.test.tsx
**/*.{spec,test}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/quality.mdc)

**/*.{spec,test}.{ts,tsx,js,jsx}: Use Jest for unit and integration tests
Test behavior, not implementation details
Run unit, integration tests, and coverage report in CI quality checks

Files:

  • packages/frontend/src/components/Layout/Sidebar.test.tsx
{CHANGELOG.md,README.md}

📄 CodeRabbit inference engine (.cursor/rules/agent-rules.mdc)

ALWAYS update CHANGELOG.md and README.md as changes are made.

Files:

  • README.md
  • CHANGELOG.md
README.md

📄 CodeRabbit inference engine (.cursor/rules/templates-examples.mdc)

README.md must be updated if behavior changed

Update README.md if behavior changed

Files:

  • README.md
packages/frontend/src/pages/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/lucky-frontend.mdc)

Organize pages in packages/frontend/src/pages/ directory (e.g., Login, Dashboard, Config, Features, ServersPage)

Files:

  • packages/frontend/src/pages/Login.tsx
CHANGELOG.md

📄 CodeRabbit inference engine (.cursor/rules/templates-examples.mdc)

CHANGELOG.md must be updated with all changes in pull requests

Always update CHANGELOG.md with all code changes

Update CHANGELOG.md with all changes, include breaking changes documentation, and reference issues and PRs

Files:

  • CHANGELOG.md
{CHANGELOG.md,docs/**}

📄 CodeRabbit inference engine (.cursor/rules/lucky-project.mdc)

Update CHANGELOG.md and relevant docs/ files when behavior or setup changes

Files:

  • CHANGELOG.md
🧠 Learnings (14)
📚 Learning: 2026-03-09T20:20:56.345Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.345Z
Learning: Applies to packages/frontend/src/{main,App}.tsx : Entry point for the Lucky Frontend React app is `packages/frontend/src/main.tsx` which connects to `App.tsx`

Applied to files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
📚 Learning: 2026-03-09T20:20:56.345Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.345Z
Learning: Applies to packages/frontend/src/{components,pages}/**/*.{ts,tsx} : Use React functional components and hooks; keep components small and focused

Applied to files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
📚 Learning: 2026-03-09T20:20:38.683Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-backend-api.mdc:0-0
Timestamp: 2026-03-09T20:20:38.683Z
Learning: Applies to packages/backend/src/routes/**/*.{ts,tsx} : Structure routes in `packages/backend/src/routes/` directory with separate files for auth, guilds, toggles, and index routes

Applied to files:

  • packages/frontend/src/components/Layout/Layout.tsx
📚 Learning: 2026-03-09T20:20:56.345Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.345Z
Learning: Applies to packages/frontend/src/{components,pages}/**/*.tsx : Follow existing styling approach (e.g., Tailwind if present); avoid inline styles for layout and theming

Applied to files:

  • packages/frontend/src/components/Layout/Layout.tsx
  • packages/frontend/src/components/Layout/Sidebar.test.tsx
  • packages/frontend/src/pages/Login.tsx
  • packages/frontend/src/components/Layout/Sidebar.tsx
📚 Learning: 2026-03-09T20:20:23.872Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-09T20:20:23.872Z
Learning: Applies to packages/frontend/src/**/*.{ts,tsx} : Frontend uses path alias `@/` mapped to `src/` - use this alias for all imports from the src directory

Applied to files:

  • packages/frontend/src/components/Layout/Layout.tsx
📚 Learning: 2026-03-09T20:20:56.345Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.345Z
Learning: Applies to packages/frontend/src/**/*.{ts,tsx} : Do not depend on `lucky/shared` package in frontend code; make API calls to backend via configured base URL (env)

Applied to files:

  • packages/frontend/src/components/Layout/Layout.tsx
📚 Learning: 2026-03-09T20:21:31.448Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/quality.mdc:0-0
Timestamp: 2026-03-09T20:21:31.448Z
Learning: Applies to **/*.{spec,test}.{ts,tsx,js,jsx} : Test behavior, not implementation details

Applied to files:

  • packages/frontend/src/components/Layout/Sidebar.test.tsx
📚 Learning: 2026-03-09T20:21:08.600Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-project.mdc:0-0
Timestamp: 2026-03-09T20:21:08.600Z
Learning: Applies to {packages/*/tests/**/*.test.{js,ts},tests/**/*.test.{js,ts}} : Add or adjust unit and integration tests when changing behavior; follow existing patterns in `packages/*/tests` and root `tests/` directories

Applied to files:

  • packages/frontend/src/components/Layout/Sidebar.test.tsx
📚 Learning: 2026-03-09T20:20:32.235Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/documentation.mdc:0-0
Timestamp: 2026-03-09T20:20:32.235Z
Learning: Applies to README.md : Update README.md if behavior changed

Applied to files:

  • README.md
📚 Learning: 2026-03-09T20:20:56.345Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.345Z
Learning: Applies to packages/frontend/src/pages/**/*.{ts,tsx} : Organize pages in `packages/frontend/src/pages/` directory (e.g., Login, Dashboard, Config, Features, ServersPage)

Applied to files:

  • packages/frontend/src/pages/Login.tsx
📚 Learning: 2026-03-09T20:20:38.683Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-backend-api.mdc:0-0
Timestamp: 2026-03-09T20:20:38.683Z
Learning: Applies to packages/backend/src/{services,middleware}/**/*.{ts,tsx} : Implement Discord OAuth for authentication in backend services

Applied to files:

  • packages/frontend/src/pages/Login.tsx
📚 Learning: 2026-03-09T20:21:58.981Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/subagent-frontend.mdc:0-0
Timestamp: 2026-03-09T20:21:58.981Z
Learning: Prefer user-Context7 for React, Vite, Tailwind, and TypeScript documentation; use user-browser-tools or cursor-ide-browser for E2E testing; use user-v0 or user-magicuidesign/mcp for UI ideas only

Applied to files:

  • packages/frontend/src/components/Layout/Sidebar.tsx
📚 Learning: 2026-03-09T20:21:08.600Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-project.mdc:0-0
Timestamp: 2026-03-09T20:21:08.600Z
Learning: Applies to {CHANGELOG.md,docs/**} : Update `CHANGELOG.md` and relevant `docs/` files when behavior or setup changes

Applied to files:

  • CHANGELOG.md
📚 Learning: 2026-03-09T20:20:32.235Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/documentation.mdc:0-0
Timestamp: 2026-03-09T20:20:32.235Z
Learning: Applies to **/docs/**/*.{md,mdx} : Document significant architectural design choices

Applied to files:

  • CHANGELOG.md
🔇 Additional comments (13)
README.md (1)

74-74: LGTM!

The README update accurately documents the new neo-editorial shell feature, aligning with the coding guidelines requirement to update README.md when behavior changes.

CHANGELOG.md (1)

37-40: LGTM!

The changelog entry comprehensively documents the UI shell and login page changes. The placement under "Changed" is appropriate since it modifies existing layout components.

packages/frontend/src/components/Layout/Sidebar.test.tsx (1)

94-95: LGTM!

Using data-active attributes for assertions is a best practice — it tests behavior rather than styling implementation details, making tests more resilient to CSS changes. This aligns with the coding guideline to "test behavior, not implementation details."

packages/frontend/src/components/Layout/Layout.tsx (3)

1-9: LGTM!

Clean import structure with proper type-only import for ReactNode and correctly typed LayoutProps interface.


10-49: LGTM!

The route-aware copy system is well-designed:

  • RouteCopy interface provides clear type structure
  • ROUTE_COPY constant maps specific routes to titles/subtitles
  • getRouteCopy handles nested routes (e.g., /music/history) with startsWith checks before falling back to exact matches, with a sensible default

51-86: LGTM!

The Layout component is well-structured:

  • Proper null-check on selectedGuild before accessing .name (line 67)
  • Semantic HTML with header and main elements
  • Consistent use of lucky-* design tokens
  • Appropriate heading hierarchy with h1
packages/frontend/src/pages/Login.tsx (3)

1-16: LGTM!

Clean import structure and hook usage. The selective state slicing with individual useAuthStore((state) => state.X) calls optimizes re-renders.


17-62: LGTM!

The left column branding section is well-structured with proper semantic elements, accessible images (alt="Lucky"), and consistent use of design tokens. The feature stats provide good visual appeal for the login page.


94-114: LGTM!

The feature cards and footer section use consistent styling with the design system tokens. The layout is responsive with sm:grid-cols-3.

packages/frontend/src/components/Layout/Sidebar.tsx (4)

1-28: LGTM!

Imports are well-organized with lucide-react icons grouped together. The addition of useState alongside useEffect is appropriate for the new dropdown state.


42-80: LGTM!

The title-case change (e.g., MAIN → Main) improves readability. Adding "Track History" to the Extras section is a good UX addition.


125-238: LGTM!

The server dropdown implementation is solid:

  • Proper ARIA attributes (aria-expanded, aria-haspopup="listbox")
  • Good empty-state UX with guidance to invite Lucky from the Dashboard
  • Clean animation with AnimatePresence
  • Correct filtering of botGuilds before rendering

240-291: LGTM!

The navigation links implementation is well-crafted:

  • data-active attribute enables stable test assertions
  • Active indicator bar (h-5 w-[3px]) provides clear visual feedback
  • Badge rendering with overflow handling (99+)

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

This branch was successfully deployed

1 active deployment
Preview — 9afda87a Deployed Mar 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant