8000 docs/17: the live camera preview, a design for approval by rleibman · Pull Request #136 · rleibman/thicket · GitHub
[go: up one dir, main page]

Skip to content

docs/17: the live camera preview, a design for approval - #136

Merged
rleibman merged 2 commits into
mainfrom
docs/camera-preview-design
Nov 2, 2026
Merged

rleibman merged 2 commits into
mainfrom
docs/camera-preview-design

Conversation

@rleibman
@rleibman rleibman commented Nov 1, 2026
Copy link
Copy Markdown
Owner

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:

  • a general embedding point, Element.Platform: each renderer hosts a platform module's native view generically, sized by the layout;
  • the preview as its own modules (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):

  1. The embedding point, or a built-in WidgetKind? Recommended: the embedding point.
  2. GTK: a GStreamer/PipeWire preview (an optional dependency, loaded with dlopen), or Unavailable for now? Recommended: Unavailable first; GTK after Android and Apple.
  3. macOS: a preview with the Mac's camera, or Unavailable as decision 7 has it? Recommended: build it; it's the iOS code.
  4. A virtual camera (v4l2loopback) for GTK's CI? Only if (2) is "build it"; it's a system install.
  5. v1 scope: preview, front/back and still capture only (no video, frames, zoom or torch)?

§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

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>
< 8000 /div>
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 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>
@rleibman
rleibman merged commit 8e4a673 into main Nov 2, 2026
2 checks passed
rleibman added a commit that referenced this pull request Nov 2, 2026
Conflicts in build.sbt, docs/14, docs/16 and the decision log, both sides kept.

Measured: checkLinux exit 0; platforms/Test/compile clean. #127 is Apple-only,
so the GTK (138) and Android (90) gallery counts from b566122 stand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rleibman added a commit that referenced this pull request Nov 2, 2026
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>
rleibman added a commit that referenced this pull request Nov 2, 2026
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>
rleibman added a commit that referenced this pull request Nov 2, 2026
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>
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.

2 participants

0