Skip to content

fix: resolve 4 bugs in DoubtDesk - #1180

Closed
saurabhhhcodes wants to merge 1 commit into
knoxiboy:mainfrom
saurabhhhcodes:fix/DoubtDesk-19796
Closed

fix: resolve 4 bugs in DoubtDesk#1180
saurabhhhcodes wants to merge 1 commit into
knoxiboy:mainfrom
saurabhhhcodes:fix/DoubtDesk-19796

Conversation

@saurabhhhcodes

@saurabhhhcodes saurabhhhcodes commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

User description

Description

This PR fixes real bugs found in the codebase:

  • Added explicit radix to parseInt: without 10, strings like '0x1F' or '08' parse in unintended bases.
  • Added explicit radix to parseInt: without 10, strings like '0x1F' or '08' parse in unintended bases.
  • Added explicit radix to parseInt: without 10, strings like '0x1F' or '08' parse in unintended bases.
  • Added explicit radix to parseInt: without 10, strings like '0x1F' or '08' parse in unintended bases.

Type of Change

  • Bug fix (non-breaking change fixing an issue)

How Has This Been Tested?

  • Local manual testing

Checklist

  • My code follows the style guidelines
  • I have performed a self-review

Related Issue

Ref: #1179


CodeAnt-AI Description

Ensure numeric IDs, grades, and session timestamps are read as decimal values

What Changed

  • Session expiration checks now interpret stored activity timestamps consistently as decimal numbers
  • Room grade updates, reply actions, and doubt bookmarks now interpret numeric input as decimal values
  • Prevents inputs beginning with zero or hexadecimal-style prefixes from being interpreted incorrectly

Impact

✅ Reliable session expiration
✅ Correct classroom grade updates
✅ Accurate reply and bookmark lookups

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Bug Fixes
    • Improved reliability when bookmarking doubts and updating replies.
    • Improved session activity-time tracking for more accurate elapsed-time displays.
    • Updated room grade-level handling to support consistent numeric values.

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Karan Mani Tripathi 's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codeant-ai

codeant-ai Bot commented Aug 3, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 6dc3aab Aug 03, 2026 · 06:58 06:59

@codeant-ai

codeant-ai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@github-actions github-actions Bot added gssoc'26 GSSoC program issue level:intermediate Intermediate level task type:bug Bug fix labels Aug 3, 2026
@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

We are closing this pr as it has no linking issue to it. If your is actually related to a isssue assigned to u then create a new pr and link the issue in discription.

@github-actions github-actions Bot added the invalid This doesn't seem right label Aug 3, 2026
@github-actions github-actions Bot closed this Aug 3, 2026
@github-actions github-actions Bot added size/xs and removed size:XS This PR changes 0-9 lines, ignoring generated files labels Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8d50db40-d023-4220-a263-13072713bed3

📥 Commits

Reviewing files that changed from the base of the PR and between 1a16173 and 6dc3aab.

📒 Files selected for processing (4)
  • src/app/api/doubts/[id]/bookmark/route.ts
  • src/app/api/replies/action/[id]/route.ts
  • src/app/api/rooms/[id]/route.ts
  • src/components/auth/SessionTracker.tsx

Walkthrough

The changes add explicit base-10 radix arguments to parsing calls in API routes and session tracking. The rooms route change is malformed and prevents valid parsing or compilation.

Changes

Parsing updates

Layer / File(s) Summary
API route parsing
src/app/api/doubts/[id]/bookmark/route.ts, src/app/api/replies/action/[id]/route.ts, src/app/api/rooms/[id]/route.ts
Bookmark and reply ID parsing now specifies radix 10. The rooms route contains malformed toString(, 10) syntax.
Session timestamp parsing
src/components/auth/SessionTracker.tsx
Session timestamp parsing now specifies radix 10. Session expiration behavior is unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: review-needed

Suggested reviewers: knoxiboy

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Biome (2.5.5)
src/app/api/rooms/[id]/route.ts

File contains syntax errors that prevent linting: Line 82: Expected an expression but instead found ','.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/app/api/rooms/[id]/route.ts

Parsing error: Argument expression expected.


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc'26 GSSoC program issue invalid This doesn't seem right level:intermediate Intermediate level task size/xs type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant