Personality Report route calls Groq without the 15-second AbortSignal used by the sibling AI Insights route
メンテナーはふだん 1 日以内に返信
評価
この issue はまだ評価されていません。
説明
Describe the bug
On /dashboard/personality the AI branch calls Groq through groqChatCompletion without a request-level deadline. When Groq gets slow the serverless worker holds the user's request open until the Vercel function timeout fires, so the loading spinner stays stuck instead of falling back to the rule-based report. The sibling /api/ai-insights route already guards the same helper with a 15-second AbortSignal.timeout, so this is a one-sided gap.
To Reproduce
- Sign in with GitHub and open
/dashboard/personality(hitting?refresh=trueis the surest way to drive the Groq branch). - Picture a slow Groq response: the first candidate model taking 30 to 45 seconds before the SDK gives up on it, or the Groq edge pausing before any bytes come back. No infra is needed to see the shape of the problem, it is visible in the code.
- Watch the route: there is no
AbortSignalon thegroqChatCompletioncall, so nothing on the server side cuts the request short. The worker waits for Groq, the user waits for the worker, and on Vercel the function keeps running until the platform timeout hits. - Compare the same stall against
/api/ai-insights. That route times out at 15 seconds and the rule-based fallback goes out to the client.
Expected behavior
A stalled Groq call on /api/personality aborts at 15 seconds and the route returns the rule-based personality report, matching the sibling /api/ai-insights behavior. The user should never sit on the spinner for the full Vercel function timeout.
Environment
- Next.js 16 (App Router)
- Node runtime (
>=22.12perpackage.jsonengines) - Groq LLM API (
https://api.groq.com/openai/v1/chat/completions) - Vercel deploy target (
devtrack.live)
Are you able to fix this?
Yes, happy to open a PR mirroring the sibling route's signal.
Additional context
The asymmetry sits between two callsites of the same helper:
src/app/api/personality/route.ts:259callsgroqChatCompletion({...})with no second argument.src/app/api/ai-insights/route.ts:247-250calls the same helper with{ signal: AbortSignal.timeout(15_000) }.
src/lib/groq.ts:36-46 already threads init.signal through to fetch, so the helper itself does not need any changes. The fix is a one-argument addition on the personality route plus a vitest case in test/personality-route.test.ts to lock the new behavior in.
- 主要言語
- TypeScript
- スター
- 246
- フォーク
- 436
- 平均マージ
- 9時間 33分
- マージ済み PR(30日)
- 213
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Priyanshu-byte-coder/devtrack のほかの issue
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Priyanshu-byte-coder/devtrack#4067 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Priyanshu-byte-coder/devtrack#4066 ·
メンテナーはふだん 1 日以内に返信
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModal対応中かも @Nandaninaulaa が 4 日前に担当しました。 オープンgood first issue level 1 level:beginner status:assigned type:design
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
Priyanshu-byte-coder/devtrack#3889 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Goals form: square arcade buttons for recurrence, Create goal and Refresh対応中かも @KartikeyG-world が 4 日前に担当しました。 オープンgood first issue level 1 level:beginner status:assigned type:design
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
Priyanshu-byte-coder/devtrack#3877 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Goals: the error banner and the "No goals yet" hint show at the same time対応中かも @KartikeyG-world が 4 日前に担当しました。 オープンgood first issue level 1 level:beginner status:assigned type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
Priyanshu-byte-coder/devtrack#3872 · コメント 6 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
Priyanshu-byte-coder/devtrack の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
makecindy/cindy#15342 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
kwitsch/claude-code-plugin-tooling#219 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
no-repo-link tool-submission
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
BraveOPotato/NoSignups#2618 ·
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100