fix(vision): include remote camera in isVisionSetupComplete check

The isVisionSetupComplete flag was only checking for local camera
setup (cameraDeviceId + calibration), which caused remote camera
mode to be treated as "not configured" even when connected.

Now considers vision setup complete if either:
- Local camera: has camera device AND calibration
- Remote camera: has remote session ID (phone handles calibration)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock 2026-01-01 15:36:27 -06:00
parent e80ef04f45
commit a8fb77e8e3
1 changed files with 5 additions and 1 deletions

View File

@ -310,8 +310,12 @@ export function MyAbacusProvider({ children }: { children: React.ReactNode }) {
}, [])
// Vision callbacks
// Setup is complete if either:
// - Local camera: has camera device AND calibration
// - Remote camera: has remote session ID (phone handles calibration)
const isVisionSetupComplete =
visionConfig.cameraDeviceId !== null && visionConfig.calibration !== null
(visionConfig.cameraDeviceId !== null && visionConfig.calibration !== null) ||
visionConfig.remoteCameraSessionId !== null
const setVisionEnabled = useCallback((enabled: boolean) => {
setVisionConfig((prev) => {