Skip to content

fix(ctf): show a teammate's solve on the challenge list and detail - #2987

Merged
Brad-Edwards merged 2 commits into
devfrom
fix/ctf-team-solved-visibility
Nov 19, 2026
Merged

Brad-Edwards merged 2 commits into
devfrom
fix/ctf-team-solved-visibility

Conversation

@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Problem

In a team-mode event, a teammate's correct flag counts once for the team score. The challenge list and the challenge detail page set solved only from the participant's own submissions. The other team members saw the challenge as unsolved, also after a reload.

Change

  • ctf/api/projections.py: add team_solved to the participant challenge list and detail. It is true when any member of the participant's team has a correct submission for the challenge. It is always false outside team mode or for a participant without a team.
  • Participant serializers, openapi/v1.json, frontend/src/api/schema.d.ts: the new field.
  • ChallengesPage and ChallengeDetailPage: show a team solve as "Solved by your team". The detail page keeps the flag form, because the individual score counts only the participant's own solves.

Verification

  • tests/ctf/test_participant_api.py passes, with two new tests (teammate solve, solo event).
  • ChallengesPage.test.tsx and ChallengeDetailPage.test.tsx pass, with two new tests.
  • tsc --noEmit, eslint, ruff check, and ruff format pass on the changed files.

In team mode a teammate's correct flag counts once for the team score, but
the challenge list and detail showed it as unsolved for the other members.
Add team_solved to both participant projections. The pages show it as
"Solved by your team" and keep the flag form, so a member can still submit
for the individual score.
@Brad-Edwards
Brad-Edwards merged commit e837ddd into dev Nov 19, 2026
101 checks passed
@Brad-Edwards
Brad-Edwards deleted the fix/ctf-team-solved-visibility branch November 19, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant