Personality Report route calls Groq without the 15-second AbortSignal used by the sibling AI Insights route
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 246
- Forks
- 436
- Merge medio
- 9 h 33 min
- PR fusionados (30 d)
- 213
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Priyanshu-byte-coder/devtrack
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Priyanshu-byte-coder/devtrack#4067 ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Priyanshu-byte-coder/devtrack#4066 ·
Los mantenedores suelen responder en 1 día
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModalPosiblemente ocupada @Nandaninaulaa la tomó hace 4 días. Abiertogood first issue level 1 level:beginner status:assigned type:design
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
Priyanshu-byte-coder/devtrack#3889 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Goals form: square arcade buttons for recurrence, Create goal and RefreshPosiblemente ocupada @KartikeyG-world la tomó hace 4 días. Abiertogood first issue level 1 level:beginner status:assigned type:design
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Priyanshu-byte-coder/devtrack#3877 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Goals: the error banner and the "No goals yet" hint show at the same timePosiblemente ocupada @KartikeyG-world la tomó hace 4 días. Abiertogood first issue level 1 level:beginner status:assigned type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Priyanshu-byte-coder/devtrack#3872 · 6 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Priyanshu-byte-coder/devtrack
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
makecindy/cindy#15342 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
kwitsch/claude-code-plugin-tooling#219 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
no-repo-link tool-submission
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
BraveOPotato/NoSignups#2618 ·
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100