Skip to content

17.0.0: manual exposure crash fix; Portrait reworked and switched off - #275

Merged
darioalessandro merged 12 commits into
masterfrom
portrait-apple-parity
Nov 16, 2026
Merged

darioalessandro merged 12 commits into
masterfrom
portrait-apple-parity

Conversation

@darioalessandro

@darioalessandro darioalessandro commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

This is release 17.0.0. What users get is the manual exposure crash fix from #272. Portrait is in the build but switched off, so nobody sees it yet.

What users get

  • The crash on iPhone 18 Pro when switching the camera to manual exposure from the remote is fixed (Fix: manual exposure crashed the app on iPhone 18 Pro #272, already on master, first shipped here).
  • Version 17 only pairs with version 17, so every device has to update.
  • The release notes are that one crash fix, in all 17 locales. They do not mention Portrait.

Portrait is off

FeatureFlags.ENABLE_PORTRAIT_MODE is false. With it off, no camera reports Portrait, so no remote offers the mode, and depth capture never turns on. There is one gate for all of that, CaptureEngine.offersPortrait.

What Portrait is when the flag flips

  • A Portrait photo is the capture file as it came off the sensor, with depth and the person, hair, skin, teeth and glasses mattes inside. Photos draws the blur and lets you change it later, the way Apple's Camera does. There is no Baked option and no toggle.
  • Up to 24MP, picked from the sizes the camera's format lists.
  • The preview streamed to the remote and the Watch is blurred from live depth.
  • An f-stop ruler on the remote, f/1.4 to f/16, sets that preview blur for every camera in the rig.

Wire

  • CommandAction.SetPortrait = 36, carrying portrait_aperture.
  • CameraState.portrait: PortraitState { aperture, min_aperture, max_aperture }. Its presence is the capability.
  • supports_portrait keeps its slot as deprecated, because build 131 (16.1.0) went up to App Store Connect with it.

What was checked

  • The app and the tests build for Mac Catalyst.
  • The unit tests for the wire, the camera coordinator, the director, the loopback pair and the capture engine pass on Mac Catalyst. One test there, testDepthTurnsWithTheFrame, fails because it expects phone rotation and a Mac does not rotate. It runs on the simulator in CI.
  • New tests cover the flag gate, the camera clamping and storing the f-number, and the rule that only a Portrait capture with depth keeps the capture file.

Before the flag flips on

Nothing in Portrait has run on a phone since the first probe on an iPhone 18 Pro. Open items:

  • The f-stop ruler only changes the preview. The saved photo opens in Photos at the system's own aperture. Either write the f-number into the file or drop the ruler.
  • The aspect tile still shows in Portrait but every Portrait photo is 4:3.
  • The preview blur runs on every captured frame, before the app decides whether to send it. It should run only on frames that are sent.
  • The preview keeps the middle of the frame sharp, not the spot the camera is focused on.
  • On a device: how the blur looks, whether depth lines up with the frame, the preview frame rate, Depth Control in Photos, and an older dual-camera phone.

🤖 Generated with Claude Code

darioalessandro and others added 10 commits November 11, 2026 23:33
CommandAction.SetPortraitAperture = 36 carries the f-number in
CommandParameters.portrait_aperture. CameraState.portrait reports the
applied aperture and the range the camera accepts, present exactly when
supports_portrait is set. A command with no f-number is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ture

PortraitRenderer.render(_:aperture:aspectRatio:) is the still blur that
lived in CaptureEngine, now at a given f-number. Its range comes from
CIDepthBlurEffect's inputAperture attributes (f/1.4...f/16 if absent),
default f/4.5. The engine stores the clamped aperture, reports it in
PortraitState and uses it for every Portrait still.

PortraitPreviewBlur is a pass-through stub for the live preview blur.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CameraControlling.setPortraitAperture forwards through CameraRig to the
engine. The coordinator applies it in every phase but taking a picture
(busy) and not-a-camera, answering once with the state tagged
.setportraitaperture. Docs list it with the other control commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he capability

CameraState.portrait replaces supports_portrait: a camera that can take
Portrait stills reports the block, one that can't omits it. SetPortrait
(action 36) carries portrait_aperture (0 = keep) and portrait_output
(Unknown = keep). PortraitOutput is Baked or Editable; the camera opens
Editable at f/4.5 and reports both. The aperture range is f/1.4...f/16,
narrowed to what CIDepthBlurEffect accepts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ig settings

Portrait's aperture and output are rig settings, like the aspect: one
value each, sent with SetPortrait to every camera that reports a Portrait
block and differs, re-sent to a camera that joins or comes back from a
lens swap with something else, and counted in flight like every control
command. The rig opens at what the first camera reports, and its ruler
spans the range every camera accepts; a narrower camera narrows the rig.
The screen reads the cameras' reports, never the tap.

In Portrait mode the director shows an f-stop ruler (the exposure
rulers' column pill, configured: log2, 1/3-stop clicks, full stops tall)
and the rig tray gets an Editable / Baked picker with a one-line
explanation. The mode labels and the new strings are in all 15 locales.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In Portrait the camera attaches an AVCaptureDepthDataOutput next to the
photo depth delivery and keeps the newest disparity map. On the preview
lane each frame is blurred with CIMaskedVariableBlur: the subject's
disparity (median of the map's middle third) stays sharp, the radius
grows away from it and with a wider aperture. Output keeps the input's
pixel format and size. Outside Portrait the path is one atomic load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Editable (the default) delivers the capture file untouched, with depth,
the portrait matte and the hair/skin/teeth/glasses mattes embedded, so
Photos offers Depth Control. One pure decision, PortraitRenderer.delivery,
picks bake, pass-through or plain crop.

Portrait now asks for every offered semantic matte (on after depth, off
before it) and embeds them per shot. depthBlurEffectFilter(forImageData:)
loads disparity, matte, hair and glasses on its own; a test pins the
inputs. A Baked still from a HEIC with a gain map runs the blur on the
expanded HDR image too and Core Image writes a fresh gain map, keeping the
capture's metadata and orientation (iOS 18+, HEIC; SDR path otherwise).

The Portrait photo ceiling rises to 24MP, always picked from the format's
own supportedMaxPhotoDimensions. The hardware test now covers both outputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

📊 Test Coverage Report

✅ 826/851 tests passed · ⏭️ 25 skipped

Metric Coverage
App code (excl. generated + vendored Theater) ██████████░░░░░░░░░░ 48.8% 🔴
Whole target ██████████░░░░░░░░░░ 49.8% 🔴

🎥 Capture & session core

File Coverage Lines
CaptureEngine.swift ███░░░░░░░░░░░░░░░░░ 13.1% 309/2366 🔴
RecordingPipeline.swift ████████████████░░░░ 80.7% 706/875 🟢
FrameStreamingCoordinator.swift ██░░░░░░░░░░░░░░░░░░ 12.0% 32/267 🔴
FrameStreamer.swift ███████████████████░ 92.6% 113/122 🟢
RemoteCmdFlatBuffers.swift ██████████████████░░ 92.3% 1215/1317 🟢
📁 Full report — 104 files
File Coverage Lines
DebugLog.swift █████████████████████ 104.8% 22/21 🟢
JPEGFrameEncoder.swift ████████████████████ 100.0% 12/12 🟢
AppActivityMonitor.swift ████████████████████ 100.0% 31/31 🟢
CameraPreviewMode.swift ████████████████████ 100.0% 13/13 🟢
AppTheme.swift ████████████████████ 100.0% 33/33 🟢
ZoomScale.swift ████████████████████ 100.0% 56/56 🟢
Messages.swift ████████████████████ 100.0% 7/7 🟢
ZoomScaleSeed.swift ████████████████████ 100.0% 14/14 🟢
MonitorChrome.swift ████████████████████ 100.0% 12/12 🟢
PeerSessionCore.swift ████████████████████ 100.0% 26/26 🟢
ClockOffsetEstimator.swift ████████████████████ 100.0% 24/24 🟢
ExposurePolicy.swift ████████████████████ 100.0% 42/42 🟢
StreamingConfig.swift ████████████████████ 100.0% 34/34 🟢
MultipeerMessages.swift ████████████████████ 100.0% 12/12 🟢
FocusedCameraControlState.swift ████████████████████ 100.0% 6/6 🟢
Locked.swift ████████████████████ 100.0% 19/19 🟢
FrameCreditWindow.swift ████████████████████ 100.0% 9/9 🟢
CameraLink.swift ████████████████████ 100.0% 59/59 🟢
AppDelegate.swift ████████████████████ 100.0% 16/16 🟢
HEICFrameEncoder.swift ████████████████████ 100.0% 17/17 🟢
PeerCompatibility.swift ████████████████████ 100.0% 42/42 🟢
RigQualityMenu.swift ████████████████████ 99.4% 167/168 🟢
DeviceScannerViewModel.swift ████████████████████ 98.9% 183/185 🟢
FrameSender.swift ████████████████████ 98.4% 184/187 🟢
FocusPointMapping.swift ████████████████████ 97.6% 40/41 🟢
CaptureSyncMetadata.swift ███████████████████░ 97.0% 65/67 🟢
MultiCamChrome.swift ███████████████████░ 96.9% 31/32 🟢
RemoteCmds.swift ███████████████████░ 96.0% 335/349 🟢
MulticamViewModel.swift ███████████████████░ 95.1% 154/162 🟢
VP9FrameEncoder.swift ███████████████████░ 94.7% 195/206 🟢
DiscoveredPeers.swift ███████████████████░ 94.4% 17/18 🟢
WatchSharedTypes.swift ███████████████████░ 94.0% 236/251 🟢
WatchPreviewStreamer.swift ███████████████████░ 93.6% 44/47 🟢
MulticamController.swift ███████████████████░ 92.9% 1546/1664 🟢
FrameStreamer.swift ███████████████████░ 92.6% 113/122 🟢
RemoteCmdFlatBuffers.swift ██████████████████░░ 92.3% 1215/1317 🟢
WelcomeView.swift ██████████████████░░ 89.3% 492/551 🟢
VideoTransferProgressView.swift █████████████████░░░ 84.0% 295/351 🟢
PortraitPreviewBlur.swift ████████████████░░░░ 81.7% 147/180 🟢
UIImage+gif.swift ████████████████░░░░ 81.6% 129/158 🟢
CameraDeviceDescriptor.swift ████████████████░░░░ 81.0% 34/42 🟢
RecordingPipeline.swift ████████████████░░░░ 80.7% 706/875 🟢
CameraProgressOverlayView.swift ████████████████░░░░ 78.6% 187/238 🟡
UICmds.swift ████████████████░░░░ 78.1% 75/96 🟡
SessionCoordinator.swift ████████████████░░░░ 77.8% 1876/2410 🟡
FlatBufferSchemas_generated.swift (excluded from app-code metric) ███████████████░░░░░ 77.3% 909/1176 🟡
SettingsView.swift ███████████████░░░░░ 76.2% 593/778 🟡
RolePickerView.swift ███████████████░░░░░ 76.2% 314/412 🟡
StreamLog.swift ███████████████░░░░░ 75.0% 15/20 🟡
WelcomeViewModel.swift ███████████████░░░░░ 74.1% 100/135 🟡
CameraRecordingTimerView.swift ███████████████░░░░░ 73.8% 127/172 🟡
SettingsViewModel.swift ██████████████░░░░░░ 70.6% 89/126 🟡
DeviceScannerView.swift ██████████████░░░░░░ 70.1% 1142/1630 🟡
MonitorView.swift ██████████████░░░░░░ 68.3% 540/791 🟡
SwiftConstants.swift █████████████░░░░░░░ 66.7% 12/18 🟡
UIAlertController.swift █████████████░░░░░░░ 66.0% 35/53 🟡
WelcomeViewController.swift █████████████░░░░░░░ 64.1% 41/64 🟡
ScannerLobby.swift ████████████░░░░░░░░ 62.5% 5/8 🟡
CameraViewModel.swift ████████████░░░░░░░░ 59.9% 160/267 🟡
StoreManager.swift ███████████░░░░░░░░░ 54.6% 83/152 🟡
SceneDelegate.swift ██████████░░░░░░░░░░ 51.9% 14/27 🟡
UIViewController+SwiftUIHosting.swift ██████████░░░░░░░░░░ 48.4% 15/31 🔴
FrameStreamReceiver.swift ██████████░░░░░░░░░░ 47.7% 244/512 🔴
FrameCodecs.swift █████████░░░░░░░░░░░ 47.1% 24/51 🔴
MonitorViewModel.swift █████████░░░░░░░░░░░ 44.0% 11/25 🔴
PurchaseManaging.swift ████████░░░░░░░░░░░░ 42.0% 21/50 🔴
MulticamView.swift ████████░░░░░░░░░░░░ 40.7% 560/1376 🔴
CameraScreenView.swift ████████░░░░░░░░░░░░ 39.3% 262/667 🔴
MulticamViewController.swift ███████░░░░░░░░░░░░░ 37.4% 131/350 🔴
ExposureControls.swift ███████░░░░░░░░░░░░░ 35.3% 126/357 🔴
EnumExtensions.swift ███████░░░░░░░░░░░░░ 33.9% 40/118 🔴
HEVCFrameEncoder.swift ██████░░░░░░░░░░░░░░ 31.9% 110/345 🔴
CaptureTally.swift █████░░░░░░░░░░░░░░░ 25.0% 13/52 🔴
RulerPill.swift █████░░░░░░░░░░░░░░░ 24.5% 152/621 🔴
DeviceScannerViewController.swift █████░░░░░░░░░░░░░░░ 24.3% 117/482 🔴
CameraRig.swift █████░░░░░░░░░░░░░░░ 23.7% 150/632 🔴
WatchSessionManager.swift ████░░░░░░░░░░░░░░░░ 20.8% 37/178 🔴
MediaProcessors.swift ███░░░░░░░░░░░░░░░░░ 17.5% 11/63 🔴
OrientationUtils.swift ███░░░░░░░░░░░░░░░░░ 16.7% 3/18 🔴
SessionDebugConsole.swift ███░░░░░░░░░░░░░░░░░ 15.0% 74/494 🔴
CaptureEngine.swift ███░░░░░░░░░░░░░░░░░ 13.1% 309/2366 🔴
FrameStreamingCoordinator.swift ██░░░░░░░░░░░░░░░░░░ 12.0% 32/267 🔴
RolePickerController.swift ██░░░░░░░░░░░░░░░░░░ 10.2% 23/226 🔴
PeerLinkStatus.swift █░░░░░░░░░░░░░░░░░░░ 7.1% 10/141 🔴
CameraCountdownTorch.swift █░░░░░░░░░░░░░░░░░░░ 4.9% 3/61 🔴
WatchRemoteCameraController.swift █░░░░░░░░░░░░░░░░░░░ 3.2% 9/279 🔴
SoundManager.swift ░░░░░░░░░░░░░░░░░░░░ 2.1% 1/47 🔴
RecordingTimer.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/52 🔴
ViewfinderGestureLayer.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/165 🔴
CameraPermissionsView.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/676 🔴
CameraHostController.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/205 🔴
RemoteShutterHelpView.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/1372 🔴
CameraPermissionErrorView.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/416 🔴
ZoomPill.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/116 🔴
PreviewSurface.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/100 🔴
PhotosAccessDeniedView.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/613 🔴
MicrophonePermissionPromptView.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/347 🔴
Photos.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/12 🔴
LocalNetworkPermissionView.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/747 🔴
PermissionManager.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/185 🔴
PhotosAccessHelper.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/347 🔴
UIAlertPresenter.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/43 🔴
MultipeerService.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/123 🔴
Data+MD5.swift ░░░░░░░░░░░░░░░░░░░░ 0.0% 0/4 🔴

Generated from 9d1ddbe · workflow run

A Portrait still is now always the capture file with its depth, so Photos
draws the blur. The Baked output, its tray picker, the still renderer and
the output field on the wire are gone; SetPortrait carries the f-number only.

Portrait ships switched off: FeatureFlags.ENABLE_PORTRAIT_MODE is false, and
CaptureEngine.offersPortrait is the one gate for what the camera reports and
for depth capture.

Wire: supports_portrait keeps its slot as deprecated and the PortraitState
block is appended after it.

Version 17.0.0 (build 132), with release notes for every locale.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@darioalessandro darioalessandro changed the title Portrait: live blur, f-stop control, editable depth photos, 24MP HDR stills 17.0.0: manual exposure crash fix; Portrait reworked and switched off Nov 16, 2026
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@darioalessandro
darioalessandro merged commit 5a45cca into master Nov 16, 2026
2 checks passed
@darioalessandro
darioalessandro deleted the portrait-apple-parity branch November 16, 2026 05:43
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