Skip to content

fix: correct SearchPageProps type and remove unnecessary await from params#576

Open
ngoiyaeric wants to merge 2 commits intomainfrom
fix/search-params-type-error
Open

fix: correct SearchPageProps type and remove unnecessary await from params#576
ngoiyaeric wants to merge 2 commits intomainfrom
fix/search-params-type-error

Conversation

@ngoiyaeric
Copy link
Copy Markdown
Collaborator

@ngoiyaeric ngoiyaeric commented Apr 13, 2026

This PR fixes a type error in the SearchPageProps interface and removes unnecessary await from params in the search page, which was causing issues with multi-modal features in the Vercel deployment.

Summary by CodeRabbit

  • Refactor
    • Optimized search page parameter handling for improved performance. No user-facing changes to functionality.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 13, 2026

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

Project Deployment Actions Updated (UTC)
qcx Ready Ready Preview, Comment Apr 13, 2026 1:35pm

@qodo-code-review
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Fix SearchPageProps type and remove unnecessary await from params

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Corrects SearchPageProps type from Promise to synchronous object
• Removes unnecessary await statements from params destructuring
• Fixes type mismatch in generateMetadata and SearchPage functions
Diagram
flowchart LR
  A["SearchPageProps<br/>params: Promise"] -->|"Remove Promise wrapper"| B["SearchPageProps<br/>params: object"]
  C["await params<br/>in functions"] -->|"Remove await"| D["Direct params<br/>destructuring"]
  B --> E["Type alignment<br/>with Next.js"]
  D --> E
Loading

Grey Divider

File Changes

1. app/search/[id]/page.tsx 🐞 Bug fix +3/-3

Remove Promise wrapper and await from params

• Changed SearchPageProps interface params type from Promise<{ id: string }> to `{ id: string
 }`
• Removed await keyword from params destructuring in generateMetadata function
• Removed await keyword from params destructuring in SearchPage function
• Maintains existing comment about keeping implementation as-is for now

app/search/[id]/page.tsx


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown
Contributor

qodo-code-review bot commented Apr 13, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 13, 2026

Warning

Rate limit exceeded

@ngoiyaeric has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 6 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 51 minutes and 6 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4dfaed0b-9b79-41b6-badc-054f8d3fed54

📥 Commits

Reviewing files that changed from the base of the PR and between 2a6d9cf and 79249bc.

📒 Files selected for processing (3)
  • app/search/[id]/page.tsx
  • components/chat-panel.tsx
  • components/chat.tsx

Walkthrough

Updated SearchPageProps interface in app/search/[id]/page.tsx to make params a synchronous object instead of a Promise. Removed corresponding await statements from both generateMetadata and the main SearchPage component. Control flow logic remains unchanged.

Changes

Cohort / File(s) Summary
Search Page Props Update
app/search/[id]/page.tsx
Changed params property type from Promise<{ id: string }> to { id: string } and removed await params destructuring from generateMetadata and SearchPage component functions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

Review effort 3/5

Poem

🐰 Promises unwound with gentle care,
Params now sync without a prayer,
Await statements fade away,
Cleaner code to greet the day! 🎉

🚥 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 describes the main change: correcting the SearchPageProps type from Promise to synchronous and removing the corresponding await statements.

✏️ 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/search-params-type-error

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.

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