Skip to content

feat(frontend): finalize Discord portal URL mapping and legal pages - #168

Merged
LucasSantana-Dev merged 1 commit into
mainfrom
feature/discord-portal-urls
Mar 12, 2026
Merged

LucasSantana-Dev merged 1 commit into
mainfrom
feature/discord-portal-urls

Conversation

@LucasSantana-Dev

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

Copy link
Copy Markdown
Owner

Resumo

  • adiciona páginas públicas de termos e privacidade (/terms-of-service, /privacy-policy) com aliases (/terms, /privacy)
  • adiciona testes de rotas legais não autenticadas no frontend
  • finaliza mapeamentos de URL no vercel.json: /install -> /api/auth/discord e fallback SPA /:path* -> /index.html
  • documenta valores finais do Discord Developer Portal (General Information, Installation e Activities URL Mapping)
  • reconstrói a branch sobre main após merge da PR feat(webapp): add guild rbac with role-based dashboard access #165 para manter escopo limpo (sem RBAC herdado)

Verificação

  • npm run test --workspace=packages/frontend -- src/App.legalRoutes.test.tsx src/App.authRoutes.test.tsx src/components/Layout/Sidebar.test.tsx src/stores/guildStore.test.ts src/services/api.test.ts
  • npm run lint
  • npm run db:generate
  • npm run build --workspace=packages/shared
  • npm run type:check

Observações

Summary by CodeRabbit

  • New Features

    • Added publicly accessible Terms of Service and Privacy Policy pages with canonical and alias routes.
    • Added Discord app installation endpoint for streamlined Discord integration.
  • Bug Fixes

    • Fixed Vercel deep link behavior with improved SPA fallback handling.
  • Documentation

    • Added Discord Developer Portal URL mapping configuration to README.
  • Tests

    • Added test coverage for legal routes accessibility.

@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 12, 2026 3:06am

Request Review

@netlify

netlify Bot commented Mar 11, 2026 •

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit e151a2e
🔍 Latest deploy log https://app.netlify.com/projects/regal-bunny-0c8efe/deploys/69b22da7adb4a90008d2a458
😎 Deploy Preview https://deploy-preview-168--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.

@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 29 minutes and 52 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: 18fda7b9-995a-4b59-b132-360a73bf05a1

📥 Commits

Reviewing files that changed from the base of the PR and between 73fc391 and e151a2e.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • README.md
  • packages/frontend/src/App.legalRoutes.test.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/pages/TermsOfService.tsx
  • vercel.json
📝 Walkthrough

Walkthrough

This PR adds public legal routes (/terms-of-service, /privacy-policy with aliases /terms, /privacy) and an install endpoint (/install) for Discord app metadata and OAuth setup. Frontend pages for legal content are introduced with routing logic to render them independently of authentication state. Vercel configuration is updated to proxy /install to /api/auth/discord, and comprehensive documentation is added to the README.

Changes

Cohort / File(s) Summary
Documentation
CHANGELOG.md, README.md
Added public legal routes, install endpoint, and Vercel URL mappings for Discord app setup. README documents Discord Developer Portal configuration.
Frontend Routing & Control Flow
packages/frontend/src/App.tsx
Added legal route detection and early rendering path that bypasses authentication checks for legal pages. Introduced lazy-loaded TermsOfService and PrivacyPolicy components with LegalRoutes wrapper and catch-all redirect to /terms-of-service.
Legal Page Components
packages/frontend/src/pages/TermsOfService.tsx, packages/frontend/src/pages/PrivacyPolicy.tsx
New static page components rendering terms and privacy policy sections with GitHub issues links and last updated timestamps.
Routing Tests
packages/frontend/src/App.legalRoutes.test.tsx
New test suite verifying legal route rendering for unauthenticated users, covering canonical and alias paths, with mocked authentication store.
Deployment Configuration
vercel.json
Added rewrites for /install endpoint (→ /api/auth/discord) and catch-all SPA fallback (/:path* → /index.html).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

size/m

🚥 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 'feat(frontend): finalize Discord portal URL mapping and legal pages' accurately summarizes the main changes: adding legal pages (terms/privacy), configuring Discord portal URL mappings, and completing the frontend setup.

✏️ 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/discord-portal-urls

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.

@github-actions

github-actions Bot commented Mar 11, 2026 •

Copy link
Copy Markdown

Size Change: +1.77 kB (+0.6%)

Total Size: 296 kB

Filename Size Change
packages/frontend/dist/assets/ActionPanel-3Kqo5QiF.js 0 B -470 B (removed) 🏆
packages/frontend/dist/assets/ActionPanel-DDuJFn3o.js 470 B +470 B (new file) 🆕
packages/frontend/dist/assets/AutoMessages-B2oAAe1G.js 1.55 kB +1.55 kB (new file) 🆕
packages/frontend/dist/assets/AutoMessages-BhSl58cT.js 0 B -1.55 kB (removed) 🏆
packages/frontend/dist/assets/AutoMod-CG14oYG_.js 0 B -2.73 kB (removed) 🏆
packages/frontend/dist/assets/AutoMod-FVnTb2cV.js 2.73 kB +2.73 kB (new file) 🆕
packages/frontend/dist/assets/badge-8Rh2ibPB.js 0 B -450 B (removed) 🏆
packages/frontend/dist/assets/badge-BKcV9wpd.js 449 B +449 B (new file) 🆕
packages/frontend/dist/assets/Card-BV8PcI8-.js 377 B +377 B (new file) 🆕
packages/frontend/dist/assets/Card-DpYSQlg5.js 0 B -378 B (removed) 🏆
packages/frontend/dist/assets/CommandsConfig-B2CV59oT.js 1.43 kB +1.43 kB (new file) 🆕
packages/frontend/dist/assets/CommandsConfig-HcchwTmR.js 0 B -1.43 kB (removed) 🏆
packages/frontend/dist/assets/Config-brRtdCA3.js 1.59 kB +1.59 kB (new file) 🆕
packages/frontend/dist/assets/Config-D-NmXqYi.js 0 B -1.59 kB (removed) 🏆
packages/frontend/dist/assets/CustomCommands-CiP-R94R.js 0 B -2.1 kB (removed) 🏆
packages/frontend/dist/assets/CustomCommands-sEiAJhkp.js 2.1 kB +2.1 kB (new file) 🆕
packages/frontend/dist/assets/DashboardOverview-BWHgMSeA.js 0 B -2.77 kB (removed) 🏆
packages/frontend/dist/assets/DashboardOverview-DtOMeZIt.js 2.77 kB +2.77 kB (new file) 🆕
packages/frontend/dist/assets/Features-C8YbIgyO.js 0 B -2.38 kB (removed) 🏆
packages/frontend/dist/assets/Features-DZUU6174.js 2.38 kB +2.38 kB (new file) 🆕
packages/frontend/dist/assets/index-C64Ji00r.css 0 B -13.7 kB (removed) 🏆
packages/frontend/dist/assets/index-Cnerp75O.js 68.8 kB +68.8 kB (new file) 🆕
packages/frontend/dist/assets/index-DMLqFOb0.css 13.8 kB +13.8 kB (new file) 🆕
packages/frontend/dist/assets/index-DWcr1emO.js 0 B -68.6 kB (removed) 🏆
packages/frontend/dist/assets/input-DXKzZUkb.js 0 B -428 B (removed) 🏆
packages/frontend/dist/assets/input-qqELiHpi.js 425 B +425 B (new file) 🆕
packages/frontend/dist/assets/label-BKrsDSuZ.js 0 B -443 B (removed) 🏆
packages/frontend/dist/assets/label-DHZYuuDo.js 444 B +444 B (new file) 🆕
packages/frontend/dist/assets/LastFm-Bf-3VIUc.js 1.68 kB +1.68 kB (new file) 🆕
packages/frontend/dist/assets/LastFm-C5sunhcQ.js 0 B -1.68 kB (removed) 🏆
packages/frontend/dist/assets/Login-BKTWWpbQ.js 0 B -2.29 kB (removed) 🏆
packages/frontend/dist/assets/Login-RLGKhiW1.js 2.29 kB +2.29 kB (new file) 🆕
packages/frontend/dist/assets/Lyrics-CALQ0CEU.js 1.28 kB +1.28 kB (new file) 🆕
packages/frontend/dist/assets/Lyrics-Cs0NVKCw.js 0 B -1.28 kB (removed) 🏆
packages/frontend/dist/assets/Moderation-fY9T0Aiy.js 0 B -3.75 kB (removed) 🏆
packages/frontend/dist/assets/Moderation-jUvuxCn7.js 3.75 kB +3.75 kB (new file) 🆕
packages/frontend/dist/assets/ModerationConfig-BUyvcz-w.js 0 B -1.92 kB (removed) 🏆
packages/frontend/dist/assets/ModerationConfig-ZahtloJM.js 1.93 kB +1.93 kB (new file) 🆕
packages/frontend/dist/assets/Music-D2Ta51D_.js 6.03 kB +6.03 kB (new file) 🆕
packages/frontend/dist/assets/Music-qBQRBj9c.js 0 B -6.04 kB (removed) 🏆
packages/frontend/dist/assets/MusicConfig-BTD_dHY4.js 0 B -1.6 kB (removed) 🏆
packages/frontend/dist/assets/MusicConfig-CCFQxl3Y.js 1.6 kB +1.6 kB (new file) 🆕
packages/frontend/dist/assets/PrivacyPolicy-DRgRuFzn.js 756 B +756 B (new file) 🆕
packages/frontend/dist/assets/select-BiAFsUlk.js 0 B -1.19 kB (removed) 🏆
packages/frontend/dist/assets/select-BsX8XyVX.js 1.19 kB +1.19 kB (new file) 🆕
packages/frontend/dist/assets/ServerLogs-BVheQo-H.js 0 B -2.82 kB (removed) 🏆
packages/frontend/dist/assets/ServerLogs-HFmgM5z0.js 2.82 kB +2.82 kB (new file) 🆕
packages/frontend/dist/assets/ServerSettings-B74A2CZk.js 2.74 kB +2.74 kB (new file) 🆕
packages/frontend/dist/assets/ServerSettings-kUGyHKlj.js 0 B -2.74 kB (removed) 🏆
packages/frontend/dist/assets/ServersPage-B6kn5EeF.js 0 B -2.63 kB (removed) 🏆
packages/frontend/dist/assets/ServersPage-jRRI6AVH.js 2.63 kB +2.63 kB (new file) 🆕
packages/frontend/dist/assets/Skeleton-CiqcwDBH.js 0 B -228 B (removed) 🏆
packages/frontend/dist/assets/Skeleton-DdVDsx5s.js 226 B +226 B (new file) 🆕
packages/frontend/dist/assets/switch-CfbmYrTT.js 0 B -514 B (removed) 🏆
packages/frontend/dist/assets/switch-CZ_AirLb.js 514 B +514 B (new file) 🆕
packages/frontend/dist/assets/TermsOfService-dxNnsZqU.js 794 B +794 B (new file) 🆕
packages/frontend/dist/assets/TrackHistory-CS87TOjP.js 1.83 kB +1.83 kB (new file) 🆕
packages/frontend/dist/assets/TrackHistory-GBH5ViBO.js 0 B -1.82 kB (removed) 🏆
packages/frontend/dist/assets/TwitchNotifications-DdQt9xC9.js 1.55 kB +1.55 kB (new file) 🆕
packages/frontend/dist/assets/TwitchNotifications-DsLZ4yPs.js 0 B -1.55 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/vendor-ui-B0ovq5CV.js 64.5 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 (1)
packages/frontend/src/App.tsx (1)

41-50: Consider using a Set for LEGAL_PATHS.

SonarCloud suggests using a Set with .has() instead of an array with .includes(). While the performance difference is negligible for 4 elements, Set is semantically clearer for membership checks.

♻️ Optional refactor to use Set
-const LEGAL_PATHS = [
-    '/terms-of-service',
-    '/terms',
-    '/privacy-policy',
-    '/privacy',
-]
+const LEGAL_PATHS = new Set([
+    '/terms-of-service',
+    '/terms',
+    '/privacy-policy',
+    '/privacy',
+])

 function isLegalPath(pathname: string) {
-    return LEGAL_PATHS.includes(pathname)
+    return LEGAL_PATHS.has(pathname)
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/frontend/src/App.tsx` around lines 41 - 50, Replace the array-based
membership check with a Set to make intent clear: change LEGAL_PATHS to a Set
(e.g., new Set([...])) and update isLegalPath(pathname: string) to use
LEGAL_PATHS.has(pathname) instead of .includes; update references to LEGAL_PATHS
and isLegalPath accordingly.
🤖 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/App.tsx`:
- Around line 41-50: Replace the array-based membership check with a Set to make
intent clear: change LEGAL_PATHS to a Set (e.g., new Set([...])) and update
isLegalPath(pathname: string) to use LEGAL_PATHS.has(pathname) instead of
.includes; update references to LEGAL_PATHS and isLegalPath accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6904cea6-626d-4f8c-b347-a7c721cce3bd

📥 Commits

Reviewing files that changed from the base of the PR and between a2a9852 and 73fc391.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • README.md
  • packages/frontend/src/App.legalRoutes.test.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/pages/TermsOfService.tsx
  • vercel.json
📜 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: compressed-size
  • GitHub Check: SonarCloud Scan
  • GitHub Check: Quality Gates
🧰 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/pages/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/App.legalRoutes.test.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/pages/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/App.legalRoutes.test.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/pages/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/App.legalRoutes.test.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/pages/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/App.legalRoutes.test.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/pages/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/App.legalRoutes.test.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/pages/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/App.legalRoutes.test.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/pages/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/App.legalRoutes.test.tsx
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/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.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/pages/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.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/pages/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.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/pages/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/App.legalRoutes.test.tsx
**/[A-Z]*.{ts,tsx,jsx}

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

Components must use PascalCase naming

Files:

  • packages/frontend/src/pages/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/App.legalRoutes.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
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
packages/frontend/src/{main,App}.tsx

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

Entry point for the Lucky Frontend React app is packages/frontend/src/main.tsx which connects to App.tsx

Files:

  • packages/frontend/src/App.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/App.legalRoutes.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/App.legalRoutes.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/App.legalRoutes.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/App.legalRoutes.test.tsx
🧠 Learnings (21)
📓 Common learnings
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-backend-api.mdc:0-0
Timestamp: 2026-03-09T20:20:38.694Z
Learning: Applies to packages/backend/src/{services,middleware}/**/*.{ts,tsx} : Implement Discord OAuth for authentication in backend services
📚 Learning: 2026-03-09T20:20:56.356Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.356Z
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/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/App.legalRoutes.test.tsx
📚 Learning: 2026-03-09T20:20:56.356Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.356Z
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/pages/TermsOfService.tsx
  • packages/frontend/src/pages/PrivacyPolicy.tsx
  • packages/frontend/src/App.tsx
📚 Learning: 2026-03-09T20:20:56.356Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.356Z
Learning: Applies to packages/frontend/src/{stores,services}/**/*.{ts,tsx} : Store application state in `packages/frontend/src/stores/` and API calls in `packages/frontend/src/services/api.ts`

Applied to files:

  • packages/frontend/src/pages/TermsOfService.tsx
  • packages/frontend/src/App.tsx
  • packages/frontend/src/App.legalRoutes.test.tsx
📚 Learning: 2026-03-09T20:20:56.356Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.356Z
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/pages/TermsOfService.tsx
  • packages/frontend/src/App.tsx
📚 Learning: 2026-03-09T20:20:32.245Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/documentation.mdc:0-0
Timestamp: 2026-03-09T20:20:32.245Z
Learning: Applies to README.md : Update README.md if behavior changed

Applied to files:

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

Applied to files:

  • CHANGELOG.md
📚 Learning: 2026-03-09T20:21:31.459Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/quality.mdc:0-0
Timestamp: 2026-03-09T20:21:31.459Z
Learning: Applies to src/**/*.{ts,tsx,js,jsx} : Implement lazy loading and optimize critical rendering path for frontend performance

Applied to files:

  • packages/frontend/src/App.tsx
📚 Learning: 2026-03-09T20:20:56.356Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.356Z
Learning: Applies to packages/frontend/src/components/**/*.{ts,tsx} : Organize UI components in `packages/frontend/src/components/` directory

Applied to files:

  • packages/frontend/src/App.tsx
📚 Learning: 2026-03-09T20:20:23.892Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-09T20:20:23.892Z
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/App.tsx
📚 Learning: 2026-03-09T20:20:38.694Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-backend-api.mdc:0-0
Timestamp: 2026-03-09T20:20:38.694Z
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/App.tsx
  • packages/frontend/src/App.legalRoutes.test.tsx
📚 Learning: 2026-03-09T20:20:56.356Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.356Z
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/App.tsx
📚 Learning: 2026-03-09T20:20:56.356Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.356Z
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/App.tsx
📚 Learning: 2026-03-09T20:21:08.612Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-project.mdc:0-0
Timestamp: 2026-03-09T20:21:08.612Z
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/App.legalRoutes.test.tsx
📚 Learning: 2026-03-09T20:21:31.459Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/quality.mdc:0-0
Timestamp: 2026-03-09T20:21:31.459Z
Learning: Applies to tests/**/*.test.{ts,tsx,js,jsx} : Add integration tests where appropriate

Applied to files:

  • packages/frontend/src/App.legalRoutes.test.tsx
📚 Learning: 2026-03-09T20:20:56.356Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-frontend.mdc:0-0
Timestamp: 2026-03-09T20:20:56.356Z
Learning: Applies to packages/frontend/tests/**/*.{ts,tsx,js} : Write tests in `packages/frontend/tests/` using existing test patterns (e.g., Playwright for e2e if configured)

Applied to files:

  • packages/frontend/src/App.legalRoutes.test.tsx
📚 Learning: 2026-03-09T20:20:38.694Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-backend-api.mdc:0-0
Timestamp: 2026-03-09T20:20:38.694Z
Learning: Applies to packages/backend/tests/**/*.{ts,tsx} : Organize tests in `packages/backend/tests/` with unit tests under `unit/` and integration tests under `integration/`, following existing patterns with fixtures and setup

Applied to files:

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

Applied to files:

  • packages/frontend/src/App.legalRoutes.test.tsx
📚 Learning: 2026-03-09T20:21:38.098Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/subagent-backend.mdc:0-0
Timestamp: 2026-03-09T20:21:38.098Z
Learning: Applies to packages/backend/tests/**/*.ts : Follow existing patterns for unit and integration tests in `packages/backend/tests/`

Applied to files:

  • packages/frontend/src/App.legalRoutes.test.tsx
📚 Learning: 2026-03-09T20:21:58.991Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/subagent-frontend.mdc:0-0
Timestamp: 2026-03-09T20:21:58.991Z
Learning: Write unit and integration tests in `packages/frontend/tests`; use Playwright for E2E tests when changing user flows

Applied to files:

  • packages/frontend/src/App.legalRoutes.test.tsx
📚 Learning: 2026-03-09T20:22:47.453Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-09T20:22:47.453Z
Learning: For unit tests and Jest ESM mocks, use the `testing-lucky` skill

Applied to files:

  • packages/frontend/src/App.legalRoutes.test.tsx
🪛 GitHub Check: SonarCloud Code Analysis
packages/frontend/src/pages/TermsOfService.tsx

[warning] 52-52: Ambiguous spacing after previous element a

See more on https://sonarcloud.io/project/issues?id=LucasSantana-Dev_Nexus&issues=AZze_MY-Az53QaNi6_6k&open=AZze_MY-Az53QaNi6_6k&pullRequest=168

packages/frontend/src/pages/PrivacyPolicy.tsx

[warning] 51-51: Ambiguous spacing after previous element a

See more on https://sonarcloud.io/project/issues?id=LucasSantana-Dev_Nexus&issues=AZze_MZTAz53QaNi6_6l&open=AZze_MZTAz53QaNi6_6l&pullRequest=168

packages/frontend/src/App.tsx

[warning] 41-41: LEGAL_PATHS should be a Set, and use LEGAL_PATHS.has() to check existence or non-existence.

See more on https://sonarcloud.io/project/issues?id=LucasSantana-Dev_Nexus&issues=AZze_MZqAz53QaNi6_6m&open=AZze_MZqAz53QaNi6_6m&pullRequest=168

🔇 Additional comments (7)
vercel.json (1)

6-18: LGTM!

The rewrite rules are correctly ordered—more specific routes (/api/:path*, /install) precede the SPA catch-all (/:path*). The /install proxy to /api/auth/discord aligns with the backend route registration shown in packages/backend/src/routes/auth.ts:16-18.

README.md (1)

185-200: LGTM!

The Discord Developer Portal documentation is accurate and aligns with the new routes (/terms-of-service, /privacy-policy) and the /install proxy configured in vercel.json. As per coding guidelines, README.md must be updated when behavior changes.

CHANGELOG.md (1)

26-31: LGTM!

Changelog entries accurately document the new public legal routes, aliases, install redirect, and Activities URL mapping. The entries follow the Keep a Changelog format and are correctly placed under the [Unreleased] section. As per coding guidelines, CHANGELOG.md must be updated with all changes.

Also applies to: 52-56

packages/frontend/src/pages/PrivacyPolicy.tsx (1)

1-58: LGTM!

Well-structured static page using semantic HTML (<main>, <header>, <section>) and Lucky design tokens. The external link correctly uses target='_blank' with rel='noreferrer'.

The SonarCloud warning about "ambiguous spacing" on line 51 is a false positive—the {' '} whitespace pattern before the anchor is idiomatic JSX for inline text with links.

packages/frontend/src/pages/TermsOfService.tsx (1)

1-59: LGTM!

Consistent structure with PrivacyPolicy.tsx—uses semantic HTML, Lucky design tokens, and properly configured external links. The SonarCloud warning is the same false positive for idiomatic JSX whitespace handling.

packages/frontend/src/App.tsx (1)

165-178: LGTM!

The LegalRoutes component correctly handles canonical paths and aliases with a sensible fallback to /terms-of-service. The early return in App for legal paths (before auth checks) ensures these public pages render immediately without waiting for authentication—good UX design.

The useLocation() call is valid since <App> is wrapped in <BrowserRouter> at main.tsx:24 (confirmed by the context snippet).

Also applies to: 195-205

packages/frontend/src/App.legalRoutes.test.tsx (1)

1-74: LGTM!

Well-structured tests that verify behavior, not implementation. The mock correctly provides all useAuthStore properties, findByRole properly handles lazy-loaded content, and queryByRole with not.toBeInTheDocument() correctly asserts absence. Coverage includes both canonical paths and aliases.

@LucasSantana-Dev

Copy link
Copy Markdown
Owner Author

Merge attempt blocked by base branch policy (2026-03-11 20:11:58 -03 / 2026-03-11 23:11:58 UTC).\n\nEvidence:\n- merge command: \n- result: base branch policy prohibits merge (no admin bypass used)\n- current state: , , , \n- checks snapshot: Quality Gates/Security/Sonar/CodeRabbit/GitGuardian/Vercel/compressed-size are green; neutral Netlify checks are completed.\n\nPer policy, no admin bypass was used. Continuing sequential flow to PR #164 conflict resolution.

@LucasSantana-Dev

Copy link
Copy Markdown
Owner Author

Merge remains blocked under no-admin-bypass policy.

Latest merge attempt:
gh pr merge 168 --squash --auto --delete-branch --match-head-commit 73fc391cb5925b3157b6f03b1320040d3a4bd403

Result:

  • GraphQL: Pull request Auto merge is not allowed for this repository (enablePullRequestAutoMerge)

Current state snapshot:

  • mergeable=MERGEABLE
  • mergeStateStatus=BLOCKED
  • reviewDecision=APPROVED
  • required checks are green (gh pr checks 168)

No admin bypass used. This PR cannot be merged until repository policy/settings are adjusted (or admin merge is explicitly allowed).

@LucasSantana-Dev
LucasSantana-Dev enabled auto-merge (squash) March 12, 2026 02:41
@LucasSantana-Dev

Copy link
Copy Markdown
Owner Author

Merge attempt blocked by base branch policy (no admin bypass used).\n\nEvidence snapshot (2026-03-11 America/Sao_Paulo):\n- PR is mergeable and approved; checks are green.\n- returns: "base branch policy prohibits the merge".\n- Active ruleset on is with , , and constraints.\n\nCurrent status: auto-merge request is enabled and waiting, but merge remains blocked by repository policy.

@LucasSantana-Dev

Copy link
Copy Markdown
Owner Author

Superseding previous malformed automation note (shell escaping issue).

Merge attempt is blocked by base branch policy (no admin bypass used).

Evidence snapshot (2026-03-11 America/Sao_Paulo):

  • PR is MERGEABLE and APPROVED.
  • All required checks are green.
  • Direct guarded merge attempt returned: "the base branch policy prohibits the merge".
  • Active main ruleset id 12822499 includes update + code_scanning (CodeQL) + code_quality constraints.

Current status: auto-merge request is enabled and waiting, but merge remains blocked by repository policy.

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit 33f14fb into main Mar 12, 2026
16 checks passed
@LucasSantana-Dev
LucasSantana-Dev deleted the feature/discord-portal-urls branch March 12, 2026 03:40

This branch was successfully deployed

1 active deployment
Preview — e151a2ea Deployed Mar 12, 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