fix(submissions): consume flat UserSubmissionResponse[] instead of nested .submission/.results
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- frontend
Línea de trabajo
Start in src/api/submissions.ts, where getUserSubmissions() wraps the flat backend array into the nested UserWithSubmissions shape, then read the UserSubmissionsPage component that consumes it. Compare against the UserSubmissionResponse fields the issue lists. Done when the page renders the flat list without crashing, the legacy UserWithSubmissions type is removed, and the layout change is agreed with a maintainer, since the two-panel-to-list redesign is a design choice.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
What is missing or painful today?
Backend GET /admin/users/:id/submissions returns a flat array of
UserSubmissionResponse {id, question_title, question_round, testcases_passed,
testcases_failed, runtime, memory, status, source_code, submission_time}.
Frontend getUserSubmissions() wraps this into UserWithSubmissions with nested
.submission and .results (always []), causing runtime crashes when opening a
user's submissions page.
The flat array from the backend has all the information needed question title,
timestamp, status, pass/fail counts, runtime, memory, and source code but the
frontend forces it into a broken nested structure that doesn't match the API.
Proposed solution
Proposed solution
- Rewrite getUserSubmissions() in src/api/submissions.ts to return
flat SubmissionWithResultsAndTestcases[] directly from the response. - Update UserSubmissionsPage to display flat data: question title,
timestamp, status badge (ACCEPTED/FAILED), pass/fail counts, runtime,
memory, and source code viewer with copy button. - Remove the legacy UserWithSubmissions type and the broken nested
.submission/.results structure. - Update the UserSubmissionsPage layout to use a single scrollable
list with expandable source code rows instead of the current
two-panel split design.
Alternatives considered
No response
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 1
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni 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 CodeChefVIT/cookoff-admin-11.0
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
fix(users): add target round and role payload to user upgrade endpointQuizá libre de nuevo @Rithish-2914 la tomó hace 54 días y no hay ningún pull request abierto. Abiertoenhancement
CodeChefVIT/cookoff-admin-11.0#22 · 1 asignado ·
-
fix(leaderboard): align leaderboard API response parsing and podium rankingsQuizá libre de nuevo @Rithish-2914 la tomó hace 54 días y no hay ningún pull request abierto. Abiertoenhancement
CodeChefVIT/cookoff-admin-11.0#19 · 1 asignado ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
Todos los issues de CodeChefVIT/cookoff-admin-11.0
Issues similares
-
nb stats: the high-error-rate anomaly and the error-causes line give different cause splits for the same errorsPosiblemente ocupada @jeanibarz la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 89/100
jeanibarz/agent-notebook#418 ·
Los mantenedores suelen responder en 1 día
-
Page sections overlap each other on every page (e.g. Seasons, Actors and Reviews on show pages)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
josephfung/curia#2563 ·
Los mantenedores suelen responder en 1 día
-
README demo: offer a controlled video variant next to the GIF for reduced motion and mobile dataAbiertoaccessibility
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
onetechgroupll/eigen-beam#26 ·
Los mantenedores suelen responder en 1 día
-
maintenance
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
killi199/time-tracking#532 ·
Los mantenedores suelen responder en 1 día