Bug Report
Application list items use key={app.menteeId}, but a mentee can hold multiple applications per cycle, producing duplicate React keys that can hide or mis-render cards.
admin-wcc-app/pages/admin/mentorship/index.tsx:215, 232, 249 and admin-wcc-app/components/mentorship/MentorApplicationsPanel.tsx:60 — key={app.menteeId}.
- The schema allows one application per
(mentee, mentor, cycle) (V19__...create_mentee_applications_table.sql, UNIQUE (mentee_id, mentor_id, cycle_id)), so a mentee who applied to several mentors yields several items sharing the same key. applicationId is returned by the backend but unused.
Reproduction
Pending Review tab for a cycle where mentee 42 applied to two mentors → two cards with key=42 → React logs duplicate-key errors and may render only one card, or reconcile the wrong card when the list updates after accept/decline — hiding applications from the admin.
Severity
Medium
Potential Risk
- Admins can't see all applications; stateful updates (accept/decline) may mutate the wrong card.
Suggested Fix
- Use the unique
applicationId as the React key everywhere these lists are rendered.
- Add a test/story with a mentee holding multiple applications and assert all cards render.
Bug Report
Application list items use
key={app.menteeId}, but a mentee can hold multiple applications per cycle, producing duplicate React keys that can hide or mis-render cards.admin-wcc-app/pages/admin/mentorship/index.tsx:215, 232, 249andadmin-wcc-app/components/mentorship/MentorApplicationsPanel.tsx:60—key={app.menteeId}.(mentee, mentor, cycle)(V19__...create_mentee_applications_table.sql, UNIQUE(mentee_id, mentor_id, cycle_id)), so a mentee who applied to several mentors yields several items sharing the same key.applicationIdis returned by the backend but unused.Reproduction
Pending Review tab for a cycle where mentee 42 applied to two mentors → two cards with
key=42→ React logs duplicate-key errors and may render only one card, or reconcile the wrong card when the list updates after accept/decline — hiding applications from the admin.Severity
Medium
Potential Risk
Suggested Fix
applicationIdas the React key everywhere these lists are rendered.