Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
9c38f6d
refactor(events): turn services/events.py into a package
vidit-admin Oct 3, 2026
451c107
refactor(events): extract the typed errors into events/errors.py
vidit-admin Oct 3, 2026
5654d11
refactor(events): extract the coordinate checks into events/coordinat…
vidit-admin Oct 3, 2026
618cc23
refactor(events): extract the secondary source links into events/sour…
vidit-admin Oct 3, 2026
cc54b5a
refactor(events): extract the shared write rules into events/rules.py
vidit-admin Oct 3, 2026
991a902
refactor(events): extract the detections readiness predicate into eve…
vidit-admin Oct 3, 2026
909d4b3
refactor(events): extract the direct create into events/create.py
vidit-admin Oct 3, 2026
a3f9ab1
refactor(events): extract the request writes into events/request.py
vidit-admin Oct 3, 2026
fad8fdb
refactor(events): extract the geolocate transition into events/geoloc…
vidit-admin Oct 3, 2026
db345af
refactor(events): extract the published-row correction into events/re…
vidit-admin Oct 3, 2026
350f73b
refactor(events): extract the batch completion into events/batch.py
vidit-admin Oct 3, 2026
5bf9dcc
refactor(events): extract close into events/closure.py and map the pa…
vidit-admin Oct 3, 2026
f9addc9
docs(events): map the events package and re-point moved references
vidit-admin Oct 3, 2026
c59deae
chore(planning): drop the services map row
vidit-admin Oct 3, 2026
0340288
refactor(events): cite _publish_detection at its batch module path
vidit-admin Oct 3, 2026
cb7e19c
docs(events): nest the events tree and re-point the floor citations
vidit-admin Oct 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Format roughly follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Unreleased

### Changed

- **The events service is a package, one module per write verb** ([#371](https://github.com/vidithq/vidit/pull/371), [`backend/app/services/events/`](backend/app/services/events), [`docs/engineering.md`](docs/engineering.md)). `services/events/` holds `create`, `request`, `geolocation`, `revision`, `batch` and `closure`, one write verb each, over the shared `errors`, `coordinates`, `source_links`, `rules` and `readiness` modules. The package root re-exports the public API, so every caller imports from `app.services.events` as before. The code moved unchanged.

### Fixed

- **The map detail panel shows only the selected event** ([#357](https://github.com/vidithq/vidit/pull/357), [`frontend/src/app/map/page.tsx`](frontend/src/app/map/page.tsx), [`frontend/src/components/map/DetailSidePanel.tsx`](frontend/src/components/map/DetailSidePanel.tsx), [`docs/design.md`](docs/design.md#layout)). A failed load shows the error with a Retry control instead of the previous event, on the map and in the collection page's step player, and a late response for an earlier pin is discarded. The panel takes the whole read as one prop, so a caller cannot drop the error. Reopening a pin after closing it reads the event again.
Expand Down
9 changes: 5 additions & 4 deletions backend/app/routers/events/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,11 @@ def list_detections(
publish floor (``ready``) or to those that don't (``incomplete``), ``all``
being the whole queue; anything else is a 422, as ``view`` is on
:func:`list_events`. The floor is :func:`detection_ready_predicate`, the SQL
projection of the one ``services.events._publish_detection`` enforces. Filtering
here rather than over the loaded page is the point: the queue pages at 10
rows over imports of several hundred, so a page-local filter answers about
ten detections while the analyst reads it as an answer about the queue.
projection of the one ``services/events/batch._publish_detection``
enforces. Filtering here rather than over the loaded page is the point: the
queue pages at 10 rows over imports of several hundred, so a page-local
filter answers about ten detections while the analyst reads it as an answer
about the queue.

``total`` counts the filtered set, so the page arithmetic describes what is
being walked; ``ready_total`` and ``incomplete_total`` always count the
Expand Down
2 changes: 1 addition & 1 deletion backend/app/routers/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _warn_if_truncated(rows: list[Tag], *, view: str) -> list[Tag]:
USER_CREATABLE_CATEGORIES = {"free"}

# Server-managed taxonomy: every new geolocation must carry one tag from it
# (enforced in `services/events.py`). Surfaced as the required selector on
# (enforced in `services/events/rules.py`). Surfaced as the required selector on
# the submit form via `?curated=true`.
CURATED_CATEGORIES = ("capture_source",)

Expand Down
Loading
Loading