Skip to content

Conversation

annavik
Copy link
Member

@annavik annavik commented Aug 28, 2025

Summary

In #929, we setup a view to make it possible to adjust default filters for a project. In this PR, we apply the filters. The changes includes both frontend and backend updates.

List of Changes

  • [FE] Update reject options to use default filters ✅
  • [FE] Exclude score threshold control from occurrence view ✅
  • [FE] Exclude score threshold control from species view ✅
  • [FE] Exclude score threshold control from playback view ✅
  • [FE] Inform and link to default filters from list views ✅
  • [BE] Apply score threshold filters backend side ⏳
  • [BE] Apply score taxa filters backend side ⏳
  • [FE and BE] Make it possible to ignore default filters on demand ⏳
  • [BE] Consider setting default exclude & include taxa for existing projects

What has been tested

  • Reject options work when identifying, use the new "exclude Taxa" choices
  • Threshold filter applies to all list views
  • Threshold filter applies to all detail views
  • Threshold filter applies to nested stats & lists (the detections in the session detail view)

Related Issues

Screenshots

Informing about default filters and linking to settings:
Screenshot 2025-08-28 at 11 13 32

To make it possible to exclude filters on demand, one idea is to include a toggle:
Screenshot 2025-08-28 at 11 13 58

Notes for development

This requires an update to the Nova package (our UI kit)

yarn install  # if running the ui on host machine
docker compose build ui  # if running the UI using docker stack

Copy link

netlify bot commented Aug 28, 2025

Deploy Preview for antenna-preview canceled.

Name Link
🔨 Latest commit 2312da0
🔍 Latest deploy log https://app.netlify.com/projects/antenna-preview/deploys/68c0524657320000083befcf

Base automatically changed from feat/default-filters-form to main August 29, 2025 08:42
@mohamedelabbas1996
Copy link
Contributor

mohamedelabbas1996 commented Sep 5, 2025

The following API views now apply the default classification threshold filter when returning data. If needed, this behavior can be overridden by including apply_defaults=false in the query parameters, along with a custom classification_threshold.

  1. GET /api/v2/occurrences/
    Returns filtered occurrences based on the default classification score threshold.

  2. GET /api/v2/taxa/
    Returns taxa with example occurrences that are filtered using the default threshold.

  3. GET /api/v2/captures/
    Returns annotated counts (occurrences_count, taxa_count) filtered by the default threshold.

  4. GET /api/v2/events/
    Returns taxa_count filtered by the default threshold.

  5. GET /api/v2/status/summary/
    Summary view applies the default threshold filter before returning occurrence-based statistics (occurrences_count, taxa_count).

@mihow mihow changed the title [Draft] Apply default filters [Draft] Introduce default filters feature Sep 11, 2025
@mihow
Copy link
Collaborator

mihow commented Sep 16, 2025

@annavik @mohamedelabbas1996 should this PR be closed now that we have #944 and #945?

@annavik
Copy link
Member Author

annavik commented Sep 16, 2025

@annavik @mohamedelabbas1996 should this PR be closed now that we have #944 and #945?

Yes, however I think we should clean up #945 a bit. With the separated approach, I think we should rebase 945 on 944.

Closing this though! :)

@annavik annavik closed this Sep 16, 2025
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.

3 participants