Skip to content

fix(camera): switch-camera error + duplicate result buttons - #51

Merged
slaveofcode merged 2 commits into
developfrom
fix/camera-switch
Jul 31, 2026
Merged

fix(camera): switch-camera error + duplicate result buttons#51
slaveofcode merged 2 commits into
developfrom
fix/camera-switch

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

Two camera bugs from user testing:

  1. Switch camera → 'Could not start the camera' and stuck. useCamera requested the new stream before releasing the old one; on single-stream devices that throws NotReadableError. Now it releases the current camera first, and if the switch fails it falls back to the previous camera so you're never stranded on the error screen.
  2. Duplicate 'Copy image' / 'Edit in Annotator' buttons in the Camera Capture result — ImageResult already renders those via ResultActions; removed CameraTool's redundant copies.

481 tests pass (+2 for switch recovery/release), lint clean, build green.

slaveofcode and others added 2 commits July 31, 2026 10:17
Promote to production: Camera Capture
1. useCamera released the old stream only AFTER acquiring the new one, so
   switching threw NotReadableError (device busy) → 'Could not start the camera',
   and the error UI hid the switch button (stuck). Now release before re-opening,
   and if a switch fails, fall back to the previous camera so the user is never
   stranded.
2. CameraTool rendered its own Copy/Edit-in-Annotator buttons on top of the ones
   ImageResult already provides — removed the duplicates (keep Retake).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
goodwebtools f258b4e Jul 31 2026, 03:53 AM

@slaveofcode
slaveofcode merged commit 5181068 into develop Jul 31, 2026
1 of 2 checks passed
@slaveofcode
slaveofcode deleted the fix/camera-switch branch July 31, 2026 03:52
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