pyronear / pyronear/pyro-annotator

Groups list: validated_by_username has no reader since the Reviewed column was replaced

Open
#321 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: code quality
Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
1d 2h
Merged PRs (30d)
2

Description

Since #316 replaced the groups list's "Reviewed" column with "Annotators", validated_by_username on SequenceGroupListItem has no reader anywhere in the app — and the list query still pays a LEFT JOIN users on every request to populate it.

It was added only three days earlier (#257, docs/specs/2026-08-03-group-validated-by-design.md) to show who validated a group next to the validated badge. That badge is gone from the list; SequenceGroupAnnotatePage shows a "Validated" badge but never the username, so the attribution is now invisible end-to-end.

Where it lives

  • annotation_api/src/app/api/api_v1/endpoints/sequence_groups.pyUser.username.label("validated_by_username") in the list select, plus .outerjoin(User, User.id == SequenceGroup.validated_by_user_id)
  • annotation_api/src/app/schemas/sequence_group.pySequenceGroupListItem.validated_by_username
  • frontend/src/types/api.ts — same field on the TS interface

SequenceGroup.validated_by_user_id (the column) is not in question — only the denormalized username on the list row.

Decide between

  1. Drop it — remove the field, the label and the join. Cheapest list query; attribution stays available via validated_by_user_id if a UI ever wants it again.
  2. Surface it again — show "validated · username" on the group detail page, where the Validated badge already lives, and keep the list field only if that page starts reading the list item.

Either way, is_validated stays on the list item: the "to label" tooltip branches on it (propagation only fires for validated groups).

Worth noting the wider gap: after #316 no row on /classify/groups shows validation state at all, so on the Labeled tab you cannot tell a validated group from an unvalidated one. If that turns out to matter in use, the answer may be a compact validated marker rather than reinstating the whole column — but that is a product call, not part of this cleanup.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the list query in annotation_api/src/app/api/api_v1/endpoints/sequence_groups.py, then inspect the field in annotation_api/src/app/schemas/sequence_group.py and frontend/src/types/api.ts. Decide whether attribution should be removed or surfaced on the detail page, and verify that the chosen outcome removes the unused join and field or makes the username visible where the Validated badge appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
api, backend, frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.