Skip to content

Add photo station capture and reuse workflow - #5

Closed
noobydp wants to merge 2 commits into
codex/photo-stations-management-uifrom
codex/photo-stations-capture-reuse
Closed

noobydp wants to merge 2 commits into
codex/photo-stations-management-uifrom
codex/photo-stations-capture-reuse

Conversation

@noobydp

@noobydp noobydp commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

This adds the full reusable photo-station workflow to tracing. Users can capture from a camera, crop the capture area, reuse a saved station's corners when the setup matches, save the current setup as a new station, and continue into a save-and-new loop for repeated captures.

The PR includes:

  • a /trace camera capture page
  • capture crop overlay controls
  • station-aware upload metadata
  • station suggestions in the trace corner step
  • one-click reuse of matching station corners
  • corner redetection from the trace page
  • save-as-station support while confirming corners
  • save-and-new flow for repeated station captures
  • frontend API tests for station request payloads and capture upload metadata

Implementation Notes

This PR depends on the backend APIs and management UI from the previous two PRs.

The capture page can receive a selected station and pass that station id through upload. When the backend can apply the saved station during upload, the trace editor reflects that reused station state. If the station does not match the current image, the UI disables non-matching station options and reports a warning rather than silently applying bad corners.

The trace editor station logic was extracted into a dedicated usePhotoStations hook. That keeps station suggestions, reuse, redetect, active station state, save-as-station state, and station notices out of the already-large trace page component.

This also addresses review feedback from the original larger PR:

  • Wraps startCamera in useCallback.
  • Removes duplicated station-state logic from the trace page.
  • Adds frontend test coverage for the API request shapes used by the station workflow.

Tests

  • corepack pnpm@10.29.2 --dir frontend exec vitest run
  • corepack pnpm@10.29.2 --dir frontend lint
  • corepack pnpm@10.29.2 --dir frontend exec tsc --noEmit
  • python -m pytest backend/tests/test_photo_stations.py

Code and PR drafted with Codex

@noobydp

noobydp commented Jul 11, 2026

Copy link
Copy Markdown
Owner Author

Closed because this draft was created in the fork by mistake. Recreated against tracefinity/tracefinity as tracefinity#137.

@noobydp noobydp closed this Jul 11, 2026
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.

1 participant