You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users have no way to tell from the UI that captures in their deployment aren't grouped into sessions. The state manifests as occurrences without a session, stale taxa counts on the project, and no actionable hint — triage today requires Django shell access or the Django admin (only available to staff). We already have a clean pattern for this: the "capture set is empty — click Populate" card. Let's do the same for ungrouped captures.
Observed on a production deployment (2026-04-23): one camera had ~165k (~25%) of its source images with event = NULL, and a corresponding ~70% of that project's occurrences showed "no session" in the UI. From the user's perspective, nothing looked broken — the data was just quietly wrong.
The ask
Expose an orphan count on Deployment (e.g. source_images_without_event_count) updated by Deployment.update_calculated_fields, same pattern as the existing capture-set size counters.
When > 0, surface a suggested action card on the deployment page (and bubble up to the project page), matching the "This capture set is empty — click Populate" pattern. Wording: "N captures aren't grouped into a session. Click Regroup to fix."
The action fires regrouping as a Job (not a bare celery task), so progress / cancel / retry / logs are visible in the jobs UI like every other user-triggered operation. This is what Expose session regrouping as a job stage when syncing images #1157 already proposes; this ticket is about adding the upstream UI that dispatches it.
On the occurrences list page, if the current filter includes null-session occurrences, show a non-blocking banner linking to the deployment(s) responsible.
Why a separate ticket
The surrounding "make regrouping reliable and visible" problem is already tracked and being worked on — I'm not duplicating that work:
Fix incorrect session grouping #904 (OPEN PR) — refactors group_images_into_events with a use_existing flag so incremental regroups after a sync don't redo everything, and adds admin "Fix Sessions" / "Remove from Event" actions. This is the "don't regroup unnecessarily" piece.
What none of those tickets cover is the user-facing fix-me affordance: once the data is orphaned (either from a pre-#904 sync, a partial sync, or any future corner case), a non-staff user has no way to notice or self-serve a fix. That's the gap this ticket is asking to close.
Acceptance
Deployment page shows a dismissable/actionable card when orphan count > 0, identical in shape to the capture-set "empty — populate" card.
Summary
Users have no way to tell from the UI that captures in their deployment aren't grouped into sessions. The state manifests as occurrences without a session, stale taxa counts on the project, and no actionable hint — triage today requires Django shell access or the Django admin (only available to staff). We already have a clean pattern for this: the "capture set is empty — click Populate" card. Let's do the same for ungrouped captures.
Observed on a production deployment (2026-04-23): one camera had ~165k (~25%) of its source images with
event = NULL, and a corresponding ~70% of that project's occurrences showed "no session" in the UI. From the user's perspective, nothing looked broken — the data was just quietly wrong.The ask
Deployment(e.g.source_images_without_event_count) updated byDeployment.update_calculated_fields, same pattern as the existing capture-set size counters.> 0, surface a suggested action card on the deployment page (and bubble up to the project page), matching the "This capture set is empty — click Populate" pattern. Wording: "N captures aren't grouped into a session. Click Regroup to fix."Why a separate ticket
The surrounding "make regrouping reliable and visible" problem is already tracked and being worked on — I'm not duplicating that work:
group_images_into_eventswith ause_existingflag so incremental regroups after a sync don't redo everything, and adds admin "Fix Sessions" / "Remove from Event" actions. This is the "don't regroup unnecessarily" piece.max_time_gapa per-project setting.sample_interval()rejectsmax_num#1266 (this repo) — unrelated but same class of "job silently leaves DB in partial state, UI shows no signal."What none of those tickets cover is the user-facing fix-me affordance: once the data is orphaned (either from a pre-#904 sync, a partial sync, or any future corner case), a non-staff user has no way to notice or self-serve a fix. That's the gap this ticket is asking to close.
Acceptance