Repository navigation
docs/17: the live camera preview, a design for approval - #136
Conversation
docs/16 §16.10 item 6: the owner said yes to tier 3 on 2026-11-01. Proposes a general embedding point (Element.Platform, handled once per renderer) with the preview as modules of its own, per-platform implementations, the lifecycle, how each platform would be measured, the order of work, and five questions for the owner (§17.8). Nothing is built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The change is a design proposal leaving five unresolved architecture decisions explicitly posed for the owner, so finalizing that direction requires a human judgment call rather than automated approval.
No open issues 🎉
What changed in this PR
This is a documentation-only PR that adds a design proposal for a live camera preview widget (docs/17-camera-preview.md) and links it from the device-services plan (docs/16-device-services.md). It follows the repo's "tier 3, each its own design" process: the owner approved tier 3 on 2026-11-01, and this doc presents the design and ends with five explicit questions (§17.8) for the owner to decide before any code is written. No framework or app code changes.
The core proposal is to avoid baking Camera2/AVFoundation/GStreamer into every renderer by introducing a general embedding point (Element.Platform / WidgetKind.Platform) that hosts a platform module's native view generically, with the preview implemented as its own modules (thicket-camera-preview, -android, -gtk, -apple). I verified all internal cross-references (docs/16 §16.3/§16.6/§16.9 decision 7/§16.10 item 5, docs/12 §12.10, docs/05 §5.7), the issue references (#130/#133 are indeed the camera-capture PRs), API consistency with the existing Camera.capturePhoto/availability shape, the date (2026-11-01 = today, not future), and table formatting — all are accurate and internally consistent. No objective issues were found to comment on.
Changes:
- Add
docs/17-camera-preview.md: the camera-preview design, per-platform approach, lifecycle/threading, measurement plan, work order, and five decision questions. - Update
docs/16-device-services.md§16.10 item 6 to record that the owner wants tier 3 and point to the new design doc.
| File | Description |
|---|---|
docs/17-camera-preview.md |
New design doc proposing the preview widget, the Element.Platform embedding point, per-platform implementations, lifecycle, verification plan, and owner decision questions. |
docs/16-device-services.md |
Living-doc update: §16.10 item 6 now notes tier 3 is wanted (2026-11-01) and links to docs/17. |
No code-level defects, broken references, spelling errors, or inconsistencies were identified in this docs-only change. The PR is a design awaiting the owner's decisions on the five open questions in §17.8.
Review effort: Balanced
One conflict in docs/16 §16.10: main's camera bullet kept, and this branch's pointer to docs/17 for tier 3. Docs only; nothing to measure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides grew the Apple galleries: - GalleryIos/GalleryMac: Services get device, clipboard and haptics. - GallerySelfTest: storage -> device -> clipboard -> sheet -> big list, both check groups kept. - build.sbt: the Apple galleries depend on deviceApple, clipboardApple and hapticsApple. - verify-apple.sh's header, docs/12's Apple counts (the two measured apart; the combined run is the Mac's) and the decision log keep both. Measured: platforms/Test/compile clean (type-checks the Apple Scala). Not measured: the Apple self-tests on the combined gallery, which need the Mac. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides grew the Apple galleries: Services get device, motion, clipboard and haptics; the self-test runs storage -> device -> motion -> clipboard -> sheet -> big list; the Apple galleries depend on motionIos, clipboardApple and hapticsApple. Docs keep both sides (README, docs/12, 14, 16); the decision log's 2026-11-01 entry moved back to the top. Measured: platforms/Test/compile clean. #127 is Apple-only, so cc3ee5a's GTK (137) and Android (86) counts stand. Not measured: the Apple self-tests on the combined gallery (the Mac's). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides grew the Apple galleries: Services get device, location, clipboard and haptics; the self-test runs storage -> device -> location -> clipboard -> sheet -> big list; the Apple galleries depend on locationApple, clipboardApple and hapticsApple. docs/12, 14 and the decision log keep both sides; its 2026-11-01 entry moved back to the top. Measured: platforms/Test/compile clean. Shared gallery code is unchanged from 427494e but for #127's Apple-only additions. Not measured: the Apple self-tests on the combined gallery (the Mac's). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tier 3, which you said yes to: the live camera preview's design (
docs/17-camera-preview.md), for you to decide before any code. Docs only.The main proposal. A preview is a widget, and every renderer handles every widget. Making it one more built-in kind would put Camera2, AVFoundation and a GStreamer pipeline into the three renderers, and so into every app. Instead it proposes:
Element.Platform: each renderer hosts a platform module's native view generically, sized by the layout;thicket-camera-preview,-android,-gtk,-apple).The same point would later serve maps, a web view or a video player.
What needs your answer (§17.8):
WidgetKind? Recommended: the embedding point.dlopen), orUnavailablefor now? Recommended:Unavailablefirst; GTK after Android and Apple.Unavailableas decision 7 has it? Recommended: build it; it's the iOS code.v4l2loopback) for GTK's CI? Only if (2) is "build it"; it's a system install.§17.6 says how each platform would be measured. §17.7 gives the order of work, each step its own PR.
🤖 Generated with Claude Code