Skip to content

fix: router redirect to / when the user put a path dont exits#30

Merged
Zay-M3 merged 2 commits into
mainfrom
fix/erros
Apr 16, 2026
Merged

fix: router redirect to / when the user put a path dont exits#30
Zay-M3 merged 2 commits into
mainfrom
fix/erros

Conversation

@Zay-M3
Copy link
Copy Markdown
Owner

@Zay-M3 Zay-M3 commented Apr 16, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved routing behavior to handle requests for non-existent paths—users are now automatically redirected to the home page instead of encountering broken page states.

@Zay-M3 Zay-M3 self-assigned this Apr 16, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

Warning

Rate limit exceeded

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

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 56 minutes and 45 seconds.

⌛ 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: c4f46361-eb5b-4c47-890c-32c2f9af9191

📥 Commits

Reviewing files that changed from the base of the PR and between 8d09e95 and 5caf500.

📒 Files selected for processing (2)
  • app/client/src/hooks/useChat.ts
  • app/client/src/storage/authStore.ts
📝 Walkthrough

Walkthrough

The route configuration adds a catch-all redirect to handle unmatched nested paths, routing them to the home page. Simultaneously, debugging logging is introduced to the authentication store to track Google sign-in flow and backend responses.

Changes

Cohort / File(s) Summary
Catch-All Route Configuration
app/client/src/routes/route.tsx
Imports Navigate from react-router-dom and adds a root-level catch-all route (path: "*") that redirects unmatched paths to / with history replacement.
Authentication Debug Logging
app/client/src/storage/authStore.ts
Adds three console.log statements in loginWithGoogle to log Google sign-in success confirmation, raw ID token, and backend response object.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A catch-all route hops into place,
Stray paths now find their way with grace,
While logs now track the Google dance,
With tokens and responses at a glance—
Debugging hops along the way! 🔍✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a catch-all route that redirects unmatched paths to the root. The wording is slightly informal but conveys the core intent clearly.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/erros

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/client/src/storage/authStore.ts`:
- Around line 75-77: Remove any console.log that prints the idToken credential;
specifically delete or redact the lines that log "ID Token:" and any direct
idToken value in app/client/src/storage/authStore.ts. Keep a non-sensitive log
like "Google sign-in successful" or a status code if needed, but never output
idToken or other tokens; also remove the similar log at the later occurrence
(the one noted at line 87). Search for any other console logging of the idToken
variable in this file and remove or replace with non-sensitive metadata.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d5aab86b-8713-4214-ab09-f01bea5aaa31

📥 Commits

Reviewing files that changed from the base of the PR and between ef37680 and 8d09e95.

📒 Files selected for processing (2)
  • app/client/src/routes/route.tsx
  • app/client/src/storage/authStore.ts

Comment thread app/client/src/storage/authStore.ts Outdated
@Zay-M3 Zay-M3 merged commit 0b1e6ab into main Apr 16, 2026
2 checks passed
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.

1 participant