feat(Daylight): capture bay light with RAW preservation and Mastodon publishing - #312
Open
kyleve wants to merge 7 commits into
Open
feat(Daylight): capture bay light with RAW preservation and Mastodon publishing#312kyleve wants to merge 7 commits into
kyleve wants to merge 7 commits into
Conversation
Groundwork for the dedicated camera app. Adds offline solar scheduling, immutable sequence settings, local staging, image selection, and adapter interfaces. Validated with ./test DaylightCoreTests (passed).
Adds a serial AVFoundation camera, bounded filtered preview, shared Core Image recipes, local Vision scoring, and original-plus-adjustment Photos transactions. Validated with ./test DaylightCoreTests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Daylight, a dedicated foreground iPhone camera for sunrise and sunset sequences. The default schedule takes 13 photos per event at five-minute intervals. Each supported shutter capture preserves RAW/Apple ProRAW and a JPEG companion in one Photos asset. JPEG-only configurations are identified in history.
The app includes live framing, rear-camera lens selection, zoom and exposure compensation, manual test shots, editable coordinates/time zone/windows, sequence history, and a dark unattended screen. Photographic editing is deferred; originals remain available for future transformations.
Architecture
DaylightCoreowns NOAA scheduling, the serial-executor camera service, Photos archival, Vision ranking, atomic versioned storage, and capture/delivery orchestration.DaylightMastodonowns account configuration, account-bound Keychain credentials, JPEG upload limits, metadata removal, retries, durable media checkpoints, and post receipts.DaylightUIuses Broadway, localized strings, main-actor observable models, and the shared snapshot harness. New unit bundles joinStuff-iOS-Tests; one image bundle joinsStuffSnapshotTests.Recovery and review focus
Capture must remain foreground. Arming disables automatic locking and dims the display; disarming and backgrounding restore the prior settings. Missed slots are recorded without catch-up bursts. RAW/JPEG bytes are staged before Photos and publishing. Pending, failed, and ambiguous work retains its files; Photos assets are never automatically deleted.
Mastodon receives one selected non-utility image after each sequence closes. Test shots never publish. Uncertain status submissions stop for reconciliation before the one-hour idempotency window expires. Review the camera delegate's paired callbacks, Photos resource transaction/receipt, and persisted submission checkpoint boundaries.
Foreground runs own their state updates and camera cleanup. A completed capture cycle cannot undo a stop request, and old run cleanup cannot stop a newer session. Highlight delivery registration completes before selection permits staged-file cleanup.
Photos permission failures retry after a persisted delay. Unknown outcomes retain receipts for reconciliation. History includes explicit Photos and publishing recovery, including recording an existing post URL without submitting again. Replacement posts retain their original account binding, delivery identity, and prior checkpoints.
Mastodon retries validate wall time and uptime immediately before submission. Clock discontinuities, reboot, and unverifiable older submissions require reconciliation. Damaged Mastodon configuration disables publishing while local capture remains available; reconnecting preserves the damaged file.
Compatibility
Captures from the early pre-RAW build retain their Photos identifiers when format and delivery checkpoints are absent. Live framing requests camera access independently of archive loading, with cancellation checked before preview startup.
Testing
./test --all: 2,050 tests passed, including the app build, architecture checks, and backup-upgrader regressions../test --no-generate --no-build --snapshots --only DaylightUISnapshotTests --record never: six suites and fourteen reviewed image references passed. Recovery forms include standard and accessibility text sizes../swiftformat --lint,./sf-symbols --lint,./xcstrings --lint,./shellcheck, and./attribution --check: passed../ide --no-openand synchronized agent instructions.71ad15b2on the paired iPhone 17 Pro Max with--no-launch.Device acceptance and follow-ups
The paired iPhone is not the eventual camera device. Real RAW/Photos capture, sustained thermal behavior, a complete sunrise/sunset cycle, and live Mastodon delivery still require physical acceptance and account credentials. The installer and device checklist are included. Website/kve.me, Instagram, and optional editing are tracked in
Daylight/TODOs.md.