Skip to content

Conversation

@aimensahnoun
Copy link
Member

@aimensahnoun aimensahnoun commented Jan 2, 2026

Changes:

  • Add typesafe routing (Link is now aware of what exist and what does not in our file based routing)
  • Fix broken routing
  • Fix logically wrong routing

Summary by CodeRabbit

  • Chores
    • Reorganized navigation routes for clearer structure: payments, subscriptions, and invoices now use updated paths.
    • Updated some navigation links to standard web links for external resources.
    • Refined redirect behavior after creating invoices and recurring payments.
    • Enabled experimental typed routes support in Next.js configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 2, 2026

Walkthrough

Enables Next.js typed routes via configuration, updates internal route references to reflect a new routing structure (/payments → /payouts, /subscription-plans → /subscriptions, /invoice-me → /invoices/me, /dashboard → /invoices), and replaces certain Next.js Link components with standard HTML anchor tags for external and demo URLs.

Changes

Cohort / File(s) Summary
Configuration
next.config.mjs
Added experimental.typedRoutes: true to Next.js config for typed route support
Route Navigation Updates
src/app/(dashboard)/home/page.tsx,
src/app/not-found.tsx,
src/components/invoice/invoice-creator.tsx,
src/components/header.tsx
Updated internal route hrefs: /payments/payouts, /subscription-plans/subscriptions, /dashboard/invoices, /invoice-me/invoices/me
Link Component Replacements
src/app/(auth)/signin/page.tsx,
src/components/version-badge.tsx
Replaced Next.js Link component with standard HTML <a> elements; added rel="noopener noreferrer" for external links
Path Constant Logic
src/app/(dashboard)/invoices/me/_components/invoice-me-link.tsx,
src/app/(dashboard)/subscriptions/_components/subscription-plan-link.tsx
Introduced linkPath constants; refactored URL construction to separate internal path from full URL logic; updated link href to use path-only values instead of full URLs
Redirect Target Update
src/app/(dashboard)/payouts/recurring/create/_components/blocks/create-recurring-payment-form.tsx
Changed post-submission redirect from /payments/recurring to /payouts/recurring

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ 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 captures the main objective of the PR: updating broken and incorrect route redirects across multiple files.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c30045b and b6eb1c0.

📒 Files selected for processing (10)
  • next.config.mjs
  • src/app/(auth)/signin/page.tsx
  • src/app/(dashboard)/home/page.tsx
  • src/app/(dashboard)/invoices/me/_components/invoice-me-link.tsx
  • src/app/(dashboard)/payouts/recurring/create/_components/blocks/create-recurring-payment-form.tsx
  • src/app/(dashboard)/subscriptions/_components/subscription-plan-link.tsx
  • src/app/not-found.tsx
  • src/components/header.tsx
  • src/components/invoice/invoice-creator.tsx
  • src/components/version-badge.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**/*

⚙️ CodeRabbit configuration file

**/*: - Only comment on issues that would block merging — ignore minor or stylistic concerns.

  • Restrict feedback to errors, security risks, or functionality-breaking problems.
  • Do not post comments on code style, formatting, or non-critical improvements.
  • Keep reviews short: flag only issues that make the PR unsafe to merge.
  • Limit review comments to 3–5 items maximum, unless additional blockers exist.
  • Group similar issues into a single comment instead of posting multiple notes.
  • Skip repetition — if a pattern repeats, mention it once at a summary level only.
  • Do not add general suggestions; focus strictly on merge-blocking concerns.
  • If there are no critical problems, respond with minimal approval (e.g., 'Looks good'). Do not add additional review.
  • Avoid line-by-line commentary unless it highlights a critical bug or security hole.
  • Highlight only issues that could cause runtime errors, data loss, or severe maintainability issues.
  • Ignore minor optimization opportunities — focus solely on correctness and safety.
  • Provide a top-level summary of critical blockers rather than detailed per-line notes.
  • Comment only when the issue must be resolved before merge — otherwise, remain silent.
  • When in doubt, err on the side of fewer comments — brevity and blocking issues only.
  • Avoid posting any refactoring issues

Files:

  • next.config.mjs
  • src/app/(dashboard)/invoices/me/_components/invoice-me-link.tsx
  • src/app/(dashboard)/payouts/recurring/create/_components/blocks/create-recurring-payment-form.tsx
  • src/app/(dashboard)/home/page.tsx
  • src/components/invoice/invoice-creator.tsx
  • src/app/(auth)/signin/page.tsx
  • src/app/(dashboard)/subscriptions/_components/subscription-plan-link.tsx
  • src/app/not-found.tsx
  • src/components/version-badge.tsx
  • src/components/header.tsx
🧬 Code graph analysis (1)
src/components/invoice/invoice-creator.tsx (1)
src/server/trpc.ts (1)
  • router (11-11)
⏰ 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). (1)
  • GitHub Check: Build

Comment @coderabbitai help to get the list of available commands and usage tips.

@aimensahnoun aimensahnoun linked an issue Jan 2, 2026 that may be closed by this pull request
Base automatically changed from 01-02-chore_update_dev_scripts to main January 5, 2026 12:13
@aimensahnoun aimensahnoun merged commit 96ef285 into main Jan 5, 2026
4 checks passed
@aimensahnoun aimensahnoun deleted the fix/update-routing branch January 5, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request Commerce - Fix wrong/broken redirects

3 participants