Skip to content

Add OrcaHello review state for machine detections - #997

Open
adrmac wants to merge 1 commit into
adrian/next-1/data-layerfrom
adrian/next-1/ai-detections
Open

Add OrcaHello review state for machine detections#997
adrmac wants to merge 1 commit into
adrian/next-1/data-layerfrom
adrian/next-1/ai-detections

Conversation

@adrmac

@adrmac adrmac commented Mar 12, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds a client-side useAIDetections hook to pull live detections from the Orcahello / AIforOrcas API, in order to providing temporary scaffolding for the server-side effort in progress. At present, the Orcasound detections endpoint returns HUMAN and MACHINE detections, but lacks critical metadata from Orcahello about the 'review state' (e.g. confirmed, false positive, unknown, unreviewed -- based on the 'reviewed' and 'found' fields that are missing in Orcasound).

This PR stacks on #995 which added the useSightings for live sightings data from Acartia, and includes some refactoring of the types and transforms in the CombinedData schema for better simplicity.

The overall hook structure works like this:

  • useCombinedData
    • calls useDetectionsQuery, useSightings, and useAIDetections
    • runs each raw response through a transform function (see /utils/dataTransforms) that normalizes fields, matches feed locations, and adds type and reviewState
    • returns a combined dataset for downstream counting and filtering
    • types/DataTypes.ts includes standardized types for raw and transformed Orcasound detections, Orcahello detections, and Acartia sightings
    • All hooks use stable React Query keys and can be called locally from pages or components.

In this PR, I demonstrate using the combined data hook to enrich the ReportCount component on the /listen/[feed] pages (introduced in #995). Other applications could include list filters for the /reports page, or indicators on the candidate detail pages.

@adrmac
adrmac requested a review from paulcretu as a code owner March 12, 2026 17:31
@coderabbitai

coderabbitai Bot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bd9785e0-ccc0-46d1-84e9-54c7ae968bee

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch adrian/next-1/ai-detections
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.

Change the reviews.profile setting to assertive to make CodeRabbit's nitpick more issues in your PRs.

@paulcretu
paulcretu temporarily deployed to orcasite-pr-997 March 12, 2026 17:33 Inactive
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.

2 participants