Repository navigation
Conversation
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 |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
1 similar comment
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
| .also { collecting.cancel() } | ||
| } | ||
|
|
||
| assertNotNull(idle) |
Contributor
There was a problem hiding this comment.
The new saving test only checks that the service reaches Idle. ScreenRecordingService also reaches Idle when it discards a recording, so this test can pass even when footage is lost. Wait for a video segment before stopping, then check that the recording remains saved with a positive duration.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/mobile-android/app/src/androidTest/kotlin/so/cap/mobile/ScreenRecordingTest.kt
Line: 328
Comment:
**Lost footage passes the test**
The new saving test only checks that the service reaches `Idle`. `ScreenRecordingService` also reaches `Idle` when it discards a recording, so this test can pass even when footage is lost. Wait for a video segment before stopping, then check that the recording remains saved with a positive duration.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.# Conflicts: # apps/mobile-android/README.md # apps/mobile-android/app/src/main/res/values/strings.xml
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 screen recording PR (#4767), which sits on the earlier Android PRs. Only 17 commits are new here:
18f7b915eto9f6bb8c1c, then merges of the screen recording PR ata815032ce,ea0b673b6andf6b46f39d, then258c555b4, a recording notification fix that now belongs to the screen recording PR, then a merge of the screen recording PR at86848ea4b, then the review fixes5ff41caf9,c383ffd72,6f50ca33c,0c6f44e7fanda8d5a33de, then merges of the screen recording PR at708826e8d, with its review fixes, at93baba987, which brings in the sign-in fixes from #4734, at26e17865dand327fd2925, with two fixes after review, and atff6ac86df,e2b7fe556,0ba4261deandfe5ddde9b. 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. A last merge of the screen recorder branch (8424af1d6) 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.The last PR in the Android stack: large screens, accessibility and release polish.
What is in it
proguard-rules.pro.:app:testReleaseShrunkUnitTestruns R8 again over the release classes with the configuration the release build printed, writing class files instead of DEX, and runsapp/src/testReleaseon the JVM against the shrunk classes: the Caps back stack saved and restored through Navigation 3's serialiser, which finds each route's serialiser by reflection; the iOS caps and bootstrap fixtures decoded and passed through the snapshot cache; and pending uploads written, marked uploaded and read back.baselineprofiletest module and generator, on the Baseline Profile Gradle plugin 1.5.0 and Macrobenchmark 1.5.0, plus ProfileInstaller 1.4.1 in the app../gradlew :app:generateBaselineProfilerecords a cold start on a connected device. The generated baseline and startup profiles are committed underapp/src/release/generated/baselineProfiles, recorded on an API 35 emulator.The fix for the recording notification on Android 10 (
258c555b4) and its test,ScreenRecordingTest.tappingTheNotificationStopsTheRecordingWhileOtherCapNotificationsShow, are in the screen recording PR (#4767), asea2f8ebb5, and come back here with the merge at86848ea4b, so they no longer show in this diff. The device runs below at258c555b4include that test.Fixed after review
5ff41caf9). Opening a Cap from the link sheet, a Loom import or the recorder while a Cap was open in two panes stacked a second Cap, so the library pane showed the first Cap instead of the library. It now replaces the open Cap and the pages opened from it; one pane still opens it on top. Test:LibraryTwoPaneTest.anotherCapReplacesTheOpenOneAndItsPagesInTwoPanes.5ff41caf9). Choosing the open Cap again in the library while its analytics were showing replaced it with a plain route, so a Cap opened at a time or a comment lost them and got a new player. It now keeps the open Cap and closes only the pages opened from it. Test:LibraryTwoPaneTest.reselectingALinkedCapKeepsItsTimeAndCommentAndClosesItsAnalytics.c383ffd72). Since sign-out was added in feat(mobile-android): add sign-in, the saved session and sign-out #4734, the sign-in screen showed while the old session's local data was still being removed in the background, so a quick new sign-in could lose its uploads and recordings to that cleanup. A new session is now saved only once every pending cleanup has finished, and the sign-in screen still shows at once. Test:AppModelTest.aNewSessionWaitsForTheLastSessionsDataToBeRemoved.0c6f44e7f). With the editor in the right pane, the library beside it stayed usable, so choosing another Cap, opening a link or importing from Loom replaced the open Cap and dropped the editor with its unsaved changes. The editor now covers the whole Caps area, as it does on a phone, so it can only be left through its own Cancel and Save, which already ask before discarding changes and wait for a save to finish. The library keeps its scroll position while the editor covers it (a8d5a33de), because all of its displays now share one saved state holder. Tests:EditorTest.theEditorCoversTheLibraryInTwoPanesandEditorTest.theLibraryKeepsItsPlaceAfterTheEditorInTwoPanes, on the tablet AVD (API 35), whereEditorTestandMainShellTestpass 17 of 17 ata8d5a33de.6f50ca33c). The Android job now runs:app:testReleaseShrunkUnitTestas well as building the release.5d4081dc1in the screen recording PR, merged atfe5ddde9b). The recent item used to be marked only after the link was on the clipboard, so anything woken by the clipboard could see it unmarked.Each test fails with its fix taken out and passes with it in place.
Screenshots
Tablet AVD (API 35, 2560 by 1600), light and dark: "Pick a Cap", a Cap open beside the library, and the Cap at font scale 2.0 with the marker badge on the timeline.
Foldable AVD (API 35), unfolded: "Pick a Cap", a Cap open beside the compact rows, and font scale 2.0.
The same Cap after folding, still open, on the outer display; then predictive back mid-gesture from a Cap on API 37 (the library previewed behind it) and API 35.
Where it differs from iOS, on purpose
<application>element now setsandroid:enableOnBackInvokedCallback="true"withtools:targetApi="33", so Android 13 to 15 play the back preview too. The app handles back only throughBackHandlerand the back dispatcher, with noonBackPressedor key overrides, so the existing back behaviour carries over.Tests
:capkit:test: 270 tests, none new in this PR.:app:testDebugUnitTest: 532 tests, 10 of them new. 7 in LibraryTwoPaneTest: the back stack splits at the last Cap; a stack without a Cap is all library; selecting a Cap replaces the open one and what was pushed from it; selecting the open Cap again keeps it, including its start time, and closes what was pushed from it; a folder opens under the open Cap in two panes, and only from the top screen in one. 3 in OrientationPolicyTest: a window 540 dp wide may rotate held either way, which fails with the old rule; a phone stays in portrait either way; a tablet rotates.:app:testReleaseShrunkUnitTest: 3 tests, all new in ReleaseShrinkTest.:media:testDebugUnitTest: 66 tests, none new in this PR.Device runs
On emulators against the fixture server. The instrumented suites ran on
258c555b4. The screens ran ond5ce89385, the commit before the orientation fix; the orientation checks ran on both.258c555b4, on the API 37 and API 29 phone AVDs booted with an emulated front and back camera. API 29: app 100 of 100 and media 41 of 41. API 37: app 97 of 100 and media 41 of 41. The crash buffers were empty after every suite.playAndPauseandaShareLinkWithATimeOpensTheCapTherewith "ComposeNotIdleException: Idling resource timed out: possibly due to compose being busy.", andaChosenSpeedIsKeptAfterTheAppIsOpenedAgain, which opened the speed menu but could not find the "1.5×" option. In an earlier run on this emulator, atd5ce89385, the fixture video did not play: its H.264 decoder failed inMediaCodec.queueInputBufferand the Cap screen showed "This video can't play right now.", which is the likely cause.9f6bb8c1cand again atea0b673b6.d5ce89385and on API 33 atea0b673b6: back from a Cap in a folder goes to the folder, the library, then the home screen. New folder and Open a Cap link close on one back, in 3 of 3 tries each from a fresh launch on API 33. Import from Loom closed on one back in 2 of 3 tries on API 35 and 37; on API 35 the first back of the other try closed the keyboard, as it does in any sheet with a focused field. On API 33 the link field had the keyboard up in all 3 tries, and the first back closed the keyboard and left the sheet open. Back from the Record page returns to the library. Mid-gesture, API 37 previews the library behind the page and API 35 insets the page with the arrow; API 33 shows the arrow only.9f6bb8c1cwith the app's baseline and startup profiles, signed with a debug key,am start -WTotalTime to the sign-in screen, a force-stop before every launch. 10 launches with the profile installed through ProfileInstaller and compiled withcmd package compile -f -m speed-profile, and 10 aftercmd package compile --reset, alternating one of each so that load on the shared host falls on both. With the profile: median 189.5 ms, 176 to 220 ms. Reset: median 194 ms, 184 to 215 ms. On this emulator the journey ends at sign-in and the difference is within the spread, so this shows the profile installs and compiles, not a measurable start-up gain; a library screen journey and a physical device would say more.93baba987, on the API 37 AVD:SignInTestandBrowserSignInTestpass 15 of 15, andScreenRecordingTest.signingOutFromCapDuringARecordingStopsItBeforeRemovingItsFilespasses.Checked
./gradlew spotlessCheck :capkit:test :app:testDebugUnitTest :app:lintDebug :app:assembleDebug :app:assembleRelease :app:assembleDebugAndroidTest :app:testReleaseShrunkUnitTest :baselineprofile:compileNonMinifiedReleaseKotlin :baselineprofile:assembleNonMinifiedRelease :media:testDebugUnitTest :media:lintDebug :media:assembleDebugAndroidTestpasses on258c555b4, with 270 capkit, 532 app, 3 shrunk release and 66 media JVM tests, ona8d5a33de, with 272 capkit, 537 app, 3 shrunk release and 66 media JVM tests, on the merge708826e8d, with 272 capkit, 538 app, 3 shrunk release and 66 media JVM tests, and on the merges93baba987,26e17865dand327fd2925, each with 272 capkit, 545 app, 3 shrunk release and 66 media JVM tests, and on the mergesff6ac86df,e2b7fe556and0ba4261de, each with 273 capkit, 552 app, 3 shrunk release and 66 media JVM tests, and on the mergefe5ddde9b, with 273 capkit, 553 app, 3 shrunk release and 66 media JVM tests.serializer()methods by name either way, so the tests show the shrunk app restores its back stack, not that those rules are what make it work.Not checked
Confidence Score: 5/5

The changes appear safe to merge, with one non-blocking gap remaining in the recording test.Findings
Fix with agent prompt
Summary
Adds Android large-screen layouts, accessibility hints, release shrinking checks, and baseline profiles.
Reviews (21) · Last reviewed commit: "Merge branch 'feat/mobile-android-screen..." · Reviewed by Greptile