Skip to content

Add remote shooting and camera control functionality#10

Open
rock3r wants to merge 1 commit intomasterfrom
remote-shutter
Open

Add remote shooting and camera control functionality#10
rock3r wants to merge 1 commit intomasterfrom
remote-shutter

Conversation

@rock3r
Copy link
Owner

@rock3r rock3r commented Feb 7, 2026

This PR introduces remote shooting and camera control across the app, including
a new Remote Control UI flow, view model orchestration, and vendor‑specific
protocol/delegate implementations for Sony and Ricoh. It also adds a custom
detekt rule to prevent fully‑qualified app references, with tests, and updates
AGENTS.md to make ./gradlew check a mandatory end‑of‑task step.

Key Changes

Remote Control UI/Navigation

  • Added a new Remote Control route and RemoteShootingScreen to allow users
    to trigger the shutter and monitor camera status.
  • Wired the screen into navigation and device UI so it is reachable from
    connected devices.

ViewModel + State Orchestration

  • Implemented RemoteShootingViewModel to manage:
    • Remote connection state and delegate availability
    • Live status updates (battery, storage, shooting mode, capture status)
    • Error/empty states for unsupported vendors or disconnected devices

Vendor Abstractions

  • Added RemoteControlDelegate and RemoteControlCapabilities interfaces to
    encapsulate vendor‑specific control and telemetry.
  • Extended vendor registration and connection layers to expose remote control
    support consistently across vendors.

Vendor Implementations

  • Implemented SonyRemoteControlDelegate and RicohRemoteControlDelegate.
  • Added protocol decoding/encoding for vendor notifications and commands,
    including FF02/CC09/CC10/CC0F where applicable.
  • Ensured behavior aligns with BLE‑only capabilities while leaving room for
    future Wi‑Fi tier support.

UI/UX Enhancements

  • Added a Remote Control action/button to DeviceCard shown only when a device
    is connected and supports remote control.
  • Added/updated vector assets for:
    • camera/shooting modes
    • drive modes
    • capture/focus/shutter status
    • battery levels

Tests

  • Added comprehensive unit tests for:
    • Remote control protocol parsing
    • Delegate behavior for Sony/Ricoh
    • Remote shooting UI components
    • DeviceCard remote‑control visibility
  • Migrated Compose UI tests to JVM unit tests where possible to avoid requiring
    Android instrumentation.

Detekt Rule (No FQNs)

  • Added a custom detekt rule that flags fully‑qualified
    dev.sebastiano.camerasync.* references (encourages imports).
  • Added rule tests to ensure:
    • FQNs are detected
    • package/import lines are ignored

Documentation

  • Updated AGENTS.md to make ./gradlew check a mandatory end‑of‑task step.

Testing

  • ./gradlew check

Notes

  • Lint still warns about khronicle-core’s lint.jar lacking a registry
    manifest; we are intentionally leaving this as‑is pending upstream fix.

Note

Medium Risk
Touches BLE scanning/protocol code and foreground-service sync lifecycle (including per-device refresh and connection teardown), which can impact connectivity stability and battery usage; changes are sizable but largely additive behind capability checks.

Overview
Adds an end-to-end Remote Shooting flow: a new NavRoute.RemoteControl, RemoteShootingScreen, and RemoteShootingViewModel, plus a connected-only “Remote shooting” action on device cards that navigates into per-device control/telemetry.

Extends the vendor/connection layer to support remote control via new RemoteControlCapabilities/RemoteControlDelegate APIs, adds delegate creation/caching on CameraConnection, and updates sync logic to use new SyncCapabilities (replacing CameraCapabilities) and a cached supportsLocationSync() hot-path check.

Implements vendor-specific remote control over BLE for Ricoh and Sony (new GATT/protocol decoding, trigger-capture sequences, battery/storage/mode status observation), improves BLE scanning by adding manufacturer-data filters (notably Ricoh), and hardens connection lifecycle management (singleton DeviceConnectionManager, connection flow, stale-job-safe teardown, and a new single-device refresh intent/action in MultiDeviceSyncService).

Build/test plumbing is updated to run Robolectric/Compose UI tests in unit tests (isIncludeAndroidResources, manifest property wiring, release unit test disabled), adds remote-control-related test dependencies, and updates AGENTS.md to require ./gradlew check.

Written by Cursor Bugbot for commit ae9e414. This will update automatically on new commits. Configure here.

@rock3r rock3r force-pushed the remote-shutter branch 2 times, most recently from d09a96f to adc526f Compare February 10, 2026 03:07
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

- Add a Remote Control navigation route and RemoteShootingScreen to
  enable manual camera control and live status monitoring.
- Implement RemoteShootingViewModel to coordinate UI state, connection
  lifecycle, and delegate interactions.
- Introduce RemoteControlDelegate/RemoteControlCapabilities contracts to
  support vendor-specific remote control logic with BLE now and Wi‑Fi
  tiering later.
- Implement SonyRemoteControlDelegate and RicohRemoteControlDelegate
  with protocol-specific decoding of shooting status, battery, storage,
  and mode data.
- Extend SonyProtocol and RicohProtocol with new encoders/decoders for
  remote control notifications and command payloads (e.g., FF02, CC09,
  CC10, CC0F, etc.).
- Update CameraVendor/CameraConnection to expose remote control support
  and delegate access.
- Add Remote Control entrypoint on DeviceCard, gated to connected
  devices.
- Add vector assets for camera modes, drive modes, focus/shutter status,
  and battery indicators.
- Add/migrate Compose UI tests to JVM unit tests for remote shooting UI
  components and DeviceCard behavior.
- Add comprehensive unit tests for protocol parsing, delegate behavior,
  and coordinator interactions.
- Add a detekt custom rule forbidding fully qualified app references and
  add tests for that rule.
- Document in AGENTS.md that ./gradlew check is mandatory at the end of
  every task.
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