Repository navigation
Conversation
This was referenced Dec 2, 2026
Contributor
|
@AatmanAJ is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
Contributor
Author
|
@greptileai review |
1 similar comment
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
3 similar comments
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
5 similar comments
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
…ttings Notification rows drew the stock Material switch, which is a different size and colour from the 44x26 design switch every other settings row uses. They now show CapSwitchTrack. The two switch lines on Recording defaults each drew a top and a bottom hairline, so the rule between them was twice as thick as every other divider.
…oid-recording-engine
ad499fe made the upload events a shared flow so every collector sees them, which also means an event emitted while nobody collects is gone. The test asked for one Progress event at a time, so the burst of three concurrent segment uploads finished between two of its calls and it waited for the rest of its minute. It now collects from before the job begins. awaitJob subscribes before it checks the job for the same reason. The app is unaffected: RecordingCoordinator collects for its whole life.
Keeps this layer's theme root, which already wraps Root in the picture in picture box.
This branch has not been deployed
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.
Stacked on the recording engine PR (#4764), which sits on the earlier Android PRs. Only the top 15 commits are new here, from "render camera frames upright through GL" onwards (
b0ed15449toedc680317), then a merge of the recording engine PR (91cadad00), two fixes after review (19807755e,f68a4661b), a second merge of the recording engine PR (1ed64d194), a fix after review (712104580), a third merge of the recording engine PR with its review fixes (62a61d6fb), a fix for the notification permission (14cfec5ff), its test (092644604, made to wait for the camera in48d38ff0c) and a fourth merge of the recording engine PR, which brings in the sign-in fixes from #4734 (aae17d165), and a fifth merge of the recording engine PR (759a73c8f). It brings in the review fixes from the earlier Android PRs, among them: sign-out clears notifications and stops playback, Cap images send the video access token, paging carries on after a refresh and shows its errors, the screen stays on while a Cap plays, an upload that storage asks to send later is retried, and lint no longer fails when a newer Kotlin is released. Then come a fix after review (15861a5e8) and its test (5c23ceaf3), two more merges of the recording engine PR (666bf9bdf,9862f4e59), a fix that keeps a segment writer alive until its recording is saved (d45d50ed7), a merge of the recording engine PR that brings in its drain deadline (effb7ce6f) and a fix that says how much of a recording was kept when saving stops (dfdb927d4). A last merge of the recording engine PR (69b5716c9) brings in the recording engine's fix that keeps the debug pattern recorder's footage when saving stops early (077ea1786, #4764). Once the PRs below merge this shows only its own diff.This PR adds the camera recorder, the Android counterpart of the iOS Instant Mode camera recording.
What is in it
The Record tab and the Add menu's Record now open the recorder instead of the placeholder. Someone can record themselves with the front or back camera and the microphone, and when they stop, the link to the Cap is on their clipboard, while the segments upload through the recording engine from the previous PR.
GlFrameRendererdraws camera frames upright through OpenGL to the viewfinder and to the encoder, mirroring only the front camera's viewfinder and cropping each sensor to the recording's shape.MicrophoneCapturerecords 48 kHz mono on the capture clock.CameraCaptureopens, flips and closes the camera with Camera2.RecordModelis a port of the iOSRecordModel: preparing, camera denied, unavailable, ready, recording and finishing. It drives the camera throughRecorderCommandvalues, whichCameraRecordercarries out, so every transition runs on the JVM. Recording creates the job and begins its uploads, so the Cap is created while the first frames are encoded.RecentRecordings: up to six recordings, the newest three shown, each with its upload progress, ready or failed. The newest link is copied when its recording stops, or when its Cap is created if that comes later, as iOS does inRecordingCoordinator.swift, with a toast when the recorder is not showing. A failed upload shows why and has its Cap deleted. Tapping a row opens its Cap. The list starts empty when another account signs in.RecordingUploadFeed, with the same throttle, stale state and dismissal as other uploads.Screenshots
The recorder on the API 37 emulator, filming the emulator's virtual back camera scene, in the light and dark system themes. Taken at
1ed64d194, this PR's tip, so they include the status bar fix: the recorder is always dark and its status bar icons stay white in both themes. While recording, the system bars are hidden.In the dark recent list, Android's own clipboard preview shows the link that was just copied.
The last 30 seconds warning, on a free account 4:39 into a recording. The timer turns orange 30 seconds before the five minute stop. Light theme only.
Where it differs from iOS, on purpose
RecordModel, not the shared recording limits, so it is tested with the recorder's transitions.Tests
:capkit:test: 269 tests, 1 new: the wait for unfinished jobs ends while something else collects the recording events.:app:testDebugUnitTest: 489 tests onedc680317and 495 on the merge, 27 of them new (two more after review, below). RecordModelTest (22) goes through each row of the recorder's transition table on virtual time against a loopback server and real recording uploads: permissions, camera failure, recording, stopping, the too-short discard with its Cap deleted, a writer failure that keeps what is on disk, the 5 minute stop without waiting 5 minutes, discard, teardown, upload failure, interruption, backgrounding, a failed flip and rotation. RecordingCoordinatorTest (5) checks the automatic link copy, a failed upload's message and deleted Cap, the list's length, the updates fed to the upload notification from uploading to failed, and that another account starts with an empty list.:media:testDebugUnitTest: 61 tests, 31 of them new: FrameGeometryTest 9, PcmConverterTest 8, CameraChoiceTest 7 and FrameClockTest 7.Device pass
Pinned to one run at
13954befa, the screen recorder PR's tip, which contains this PR. Both emulators ran headless against a local fixture server. RecorderTest and the media camera tests ran once per API level.cap_cam_37)cap_cam_29)The 3 API 37 failures are the known Cap detail ones, listed separately because they are not in this PR's code:
CapDetailTest.playAndPauseandaShareLinkWithATimeOpensTheCapThere(Compose did not go idle while the emulator decoded the video) andaChosenSpeedIsKeptAfterTheAppIsOpenedAgain(touch input could not be injected). The skipped tests are all inCameraCaptureTest, which skips what the emulator's cameras cannot do: two cameras, a flip, or the frame rate it asks for. The crash buffers were empty after every suite.The front camera tests need an AVD with an emulated front camera. The
cap_phone_*AVDs havehw.camera.front=none, so this run usedcap_cam_37andcap_cam_29, booted with-camera-front emulatedand-camera-back emulated.Fixed after review
19807755e). The newRecorderTest.theRecorderShowsLightStatusBarIconsAndRestoresThemOnClosefailed without the fix on the API 37 emulator in the light theme and passes with it.f68a4661b). The newRecordModelTest.capProKeepsNoLimitWhenThePlanCannotBeFetchedfails without the fix.712104580). The newRecordModelTest.aProPlanConfirmedDuringARecordingLiftsTheFiveMinuteStopfails without the fix.14cfec5ff). The newRecordingNotificationsTest.closingTheRecorderAfterARecordingAsksForNotifications(092644604) revokes the permission, records 2 seconds of camera through the test's loopback relay, which now serves the recording endpoints, closes the recorder and waits for the system permission dialog.48d38ff0cmakes it wait for the camera to be ready before it records. On the API 37 emulator it fails without the fix, as no dialog appears, and passes with it.Modifier.keepScreenOn(), which Compose counts per window, so neither can clear the other's request (15861a5e8).CapDetailTest.aVideoThatStopsUnderTheRecorderLeavesTheScreenOnForTheRecordingplays a Cap, opens the recorder over it, starts a recording and pauses the video, then checks the screen is still kept on. It passes on the API 29 emulator and fails against the code before the fix (5c23ceaf3).UNFINISHEDfailure that carries the seconds it kept (feat(mobile-android): add the recording engine #4764). The recorder already kept the segments on disk after a writer failure; it now also says "Couldn't finish saving, N s kept" (dfdb927d4).RecordModelTest.anEncoderThatNeverFinishesSavesWhatWasKeptAndSaysSofails without the fix ("expected:<Couldn't finish saving, 3 s kept> but was:") and passes with it. The merge that brought in the deadline (effb7ce6f) metd45d50ed7inSegmentWriter.finish. That fix holds a finishing writer in a static set so it cannot be finalised with its codecs while it waits for the end of stream. Both are kept:finishstarts the deadline and adds the writer to the set, and releasing the writer, on success, failure or the deadline, removes it.Checked
./gradlew spotlessCheck :capkit:test :app:testDebugUnitTest :app:lintDebug :app:assembleDebug :app:assembleRelease :app:assembleDebugAndroidTest :media:testDebugUnitTest :media:lintDebug :media:assembleDebugAndroidTestpasses onedc680317, on the merge,91cadad00, onf68a4661bafter the review fixes, with 269 capkit, 496 app and 61 media JVM tests, on the second merge,1ed64d194, with 270 capkit, 505 app and 61 media JVM tests, on712104580with 270 capkit, 506 app and 61 media JVM tests, and on the third merge,62a61d6fb, on14cfec5ff, on092644604and on48d38ff0c, with 272 capkit, 506 app and 61 media JVM tests, on the fourth merge,aae17d165, with 272 capkit, 513 app and 61 media JVM tests, and on the fifth merge,759a73c8f, on15861a5e8and on5c23ceaf3, each with 273 capkit, 520 app and 61 media JVM tests. With the drain deadline, the check line passes at the top of the Android stack,276cfebaa, which containsdfdb927d4.Not checked
Confidence Score: 0/5

The PR is not ready to merge because earlier upload, navigation, and test failures remain.
Findings
Fix with agent prompt
Summary
This PR adds Android camera recording, live segment uploads, and a recorder page.
Reviews (53) · Last reviewed commit: "fix(mobile-android): format the camera f..." · Reviewed by Greptile