Personality Report route calls Groq without the 15-second AbortSignal used by the sibling AI Insights route
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
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.
- Dominant language
- TypeScript
- Stars
- 246
- Forks
- 436
- Avg merge
- 9h 33m
- Merged PRs (30d)
- 213
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Priyanshu-byte-coder/devtrack
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Priyanshu-byte-coder/devtrack#4067 ·
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Priyanshu-byte-coder/devtrack#4066 ·
Maintainers usually reply within 1 day
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModalPossibly taken @Nandaninaulaa claimed this 5 days ago. Opengood first issue level 1 level:beginner status:assigned type:design
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Priyanshu-byte-coder/devtrack#3889 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Goals form: square arcade buttons for recurrence, Create goal and RefreshPossibly taken @KartikeyG-world claimed this 5 days ago. Opengood first issue level 1 level:beginner status:assigned type:design
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Priyanshu-byte-coder/devtrack#3877 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Goals: the error banner and the "No goals yet" hint show at the same timePossibly taken @KartikeyG-world claimed this 5 days ago. Opengood first issue level 1 level:beginner status:assigned type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Priyanshu-byte-coder/devtrack#3872 · 6 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in Priyanshu-byte-coder/devtrack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
callstackincubator/simlock#2113 ·
Maintainers usually reply within 1 day
-
BUG: Backend Docker build fails due to Go version mismatchPossibly taken @Aakriti0207 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 93/100
gittuf/visualizer#203 ·
Maintainers usually reply within 2 days
-
bug 🐛
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
BaaRai/ARTEX#981 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day