Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

Summary

Feature already implemented. Captures link to session detail view when event.id exists; links disabled otherwise.

List of Changes

Related Issues

Relates to issue about linking captures to detail view.

Detailed Description

The requested functionality exists in current codebase:

Table view (ui/src/pages/captures/capture-columns.tsx):

  • Thumbnail and timestamp columns conditionally link to session detail
  • Pass ?capture={id} parameter for selection
  • Render as plain elements when sessionId is undefined

Gallery view (ui/src/pages/captures/capture-gallery.tsx):

  • Gallery items conditionally set to prop based on sessionId

Backend integration:

  • SourceImageListSerializer includes event field
  • Capture model maps event.id to sessionId getter
  • SessionDetails component reads capture parameter via useActiveCaptureId() hook

Component handling:

  • ConditionalLink wrapper renders without Link when to is undefined
  • Gallery component renders Card without Link wrapper for non-clickable items

No side effects or risks - no changes made.

How to Test the Changes

  1. Navigate to captures list view (table or gallery mode)
  2. Click capture thumbnail with assigned session - navigates to session detail with that capture selected
  3. Verify captures without sessions render as non-clickable

Screenshots

N/A - no visual changes

Deployment Notes

No deployment changes required.

Checklist

  • I have tested these changes appropriately.
  • I have added and/or modified relevant tests.
  • I updated relevant documentation or comments.
  • I have verified that this PR follows the project's coding standards.
  • Any dependent changes have already been merged to main.
Original prompt

This section details on the original issue you should resolve

<issue_title>Link a single capture to a detail view</issue_title>
<issue_description>## Summary

The captures list view shows thumbnails, but there is no way to see detail of that capture (the full size image). I suggest linking to the session detail page with that capture selected. However, if the capture does not belong to a session then that view will not be available (for example, while a sync is happening, which is usually when I want to click on a capture from the captures view!). Eventually we may need a way to preview a single capture that doesn't have a session will be helpful, but for now we can just disable the link if there is no session yet (event.id).

Image https://antenna.insectai.org/projects/18/captures

<agent_instructions>read CLAUDE.md for project context. the frontend react code is in the ui/ folder. Captures are also called "Source Images" in the code. Sessions are also called Events. Here is the endpoint for the captures list https://antenna.insectai.org/api/v2/captures/?project_id=18&ordering=-timestamp&limit=20&offset=0&with_counts=false</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@netlify
Copy link

netlify bot commented Jan 27, 2026

Deploy Preview for antenna-preview canceled.

Name Link
🔨 Latest commit e0a28d4
🔍 Latest deploy log https://app.netlify.com/projects/antenna-preview/deploys/69793cf11d075b0008657f5b

@netlify
Copy link

netlify bot commented Jan 27, 2026

Deploy Preview for antenna-ssec canceled.

Name Link
🔨 Latest commit e0a28d4
🔍 Latest deploy log https://app.netlify.com/projects/antenna-ssec/deploys/69793cf113ce85000793dc40

Copilot AI changed the title [WIP] Link a single capture to a detail view Document capture-to-session linking feature already implemented Jan 27, 2026
Copilot AI requested a review from mihow January 27, 2026 22:40
@mihow mihow closed this Jan 27, 2026
@mihow
Copy link
Collaborator

mihow commented Jan 27, 2026

@copilot Use what you learned while researching for this ticket. Create a new PR for a different change: Add start & end date filters to the captures list view. See the occurrences list view for an existing example of where the date filters appear. The start & end date filters may need to be added to the captures API endpoint serializer.

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.

Link a single capture to a detail view

2 participants