AntFleet

Disagreement · f411be15-openai-1

Next.js route/page props typed as Promise and awaited (type mismatch against Next conventions)

solo GPT-5
repo e24ef98c·PR #11·reviewed 1 week ago

GPT-5 finding

Next.js route/page props typed as Promise and awaited (type mismatch against Next conventions)

lowmaintainabilityhigh
  • apps/web/app/benchmarks/page.tsx
  • apps/web/app/receipts/[id]/page.tsx
  • apps/web/app/receipts/[id]/page.tsx
Next.js app router provides plain objects for params/searchParams, not Promises. Awaiting them works at runtime (await returns non-promises verbatim) but it reduces type-safety, can mask real async boundaries, and diverges from Next’s documented types, making future refactors riskier.

Recommendation

Adjust types to match Next.js conventions and remove unnecessary awaits: - BenchmarksPage: `({ searchParams }: { searchParams?: SearchParams })` and use `const params = searchParams ?? {}`. - Receipt pages: `generateMetadata({ params }: { params: RouteParams })` and `ReceiptDetailPage({ params }: { params: RouteParams })`, then use params directly.

Other reviewer

The other reviewer flagged nothing in this file/line range.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →