Repository navigation
Conversation
|
@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. |
|
@greptileai review |
|
@greptileai review |
|
@greptileai review |
|
@greptileai review |
|
@greptileai review |
|
@greptileai review |
|
@greptileai review |
1 similar comment
|
@greptileai review |
|
@greptileai review |
|
@greptileai review |
| CapRadioRow( | ||
| stringResource(R.string.cap_audience_organization), | ||
| selected = cap.isPublic && restricted, | ||
| onClick = { | ||
| management.setAudience(isPublic = true, LinkAccess.RESTRICTED) | ||
| }, |
There was a problem hiding this comment.
Organization-only links become public
The share sheet offers “Only people in your organization” even when the organization has no email restriction. Choosing it sends public = true with LinkAccess.RESTRICTED, but the server only restricts public links when allowedEmailDomain is set. This can make a private Cap viewable by anyone with its link.
Only offer this choice when the server can enforce it, or add a server-enforced organization-only audience.
How this was verified: The organization-only choice publishes the Cap, while isLinkRestricted requires a nonempty allowedEmailDomain before restricting viewers.
Knowledge Base Used: Web application routes and components
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/cap/MoreMenu.kt
Line: 237-242
Comment:
**Organization-only links become public**
The share sheet offers “Only people in your organization” even when the organization has no email restriction. Choosing it sends `public = true` with `LinkAccess.RESTRICTED`, but the server only restricts public links when `allowedEmailDomain` is set. This can make a private Cap viewable by anyone with its link.
Only offer this choice when the server can enforce it, or add a server-enforced organization-only audience.
**How this was verified:** The organization-only choice publishes the Cap, while `isLinkRestricted` requires a nonempty `allowedEmailDomain` before restricting viewers.
**Knowledge Base Used:** [Web application routes and components](https://app.greptile.com/-/switch-tenant?tenant=cap&next=%2Fcustom-context%2Fknowledge-base%2Fcapsoftware%2Fcap%2F-%2Fdocs%2Fweb-application-routes.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| SettingsDetailSwitchLine( | ||
| label = stringResource(R.string.recording_defaults_camera), | ||
| checked = defaults.cameraOn, | ||
| onCheckedChange = settings::setRecordingCameraOn, |
There was a problem hiding this comment.
Camera preference does nothing
The new “Start with the camera on” switch saves cameraOn, but the recorder never reads it. RecordModel always starts in camera mode, and RecordScreen still requests camera permission on entry. Users who turn the switch off therefore see no change. Apply the saved choice when opening the recorder.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/settings/RecordingDefaultsScreen.kt
Line: 54-57
Comment:
**Camera preference does nothing**
The new “Start with the camera on” switch saves `cameraOn`, but the recorder never reads it. `RecordModel` always starts in camera mode, and `RecordScreen` still requests camera permission on entry. Users who turn the switch off therefore see no change. Apply the saved choice when opening the recorder.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| val folderInsertionStamp = library.folderInsertionStamp | ||
| LaunchedEffect(folderInsertionStamp) { | ||
| if (folderInsertionStamp > 0) listState.scrollToItem(0) |
There was a problem hiding this comment.
Returning resets library position
Once a folder has been created, folderInsertionStamp stays positive for the session. Every new composition of LibraryContent then scrolls to the top, even when Navigation restores a later position. After opening a Cap or covering the library with the editor, users must scroll back to where they were. Consume the insertion event once rather than treating every positive stamp as a new insertion.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/home/LibraryContent.kt
Line: 102-104
Comment:
**Returning resets library position**
Once a folder has been created, `folderInsertionStamp` stays positive for the session. Every new composition of `LibraryContent` then scrolls to the top, even when Navigation restores a later position. After opening a Cap or covering the library with the editor, users must scroll back to where they were. Consume the insertion event once rather than treating every positive stamp as a new insertion.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| when { | ||
| showsDesignedEmpty -> { | ||
| LibraryEmptyState(Modifier.fillMaxSize()) | ||
| } | ||
| loadedEmpty -> { | ||
| Box(Modifier.fillMaxSize(), Alignment.Center) { | ||
| EmptyState( | ||
| icon = R.drawable.ic_video_library, | ||
| title = stringResource(R.string.home_folder_empty_title), | ||
| modifier = Modifier.padding(horizontal = CapTheme.pageMargin), | ||
| description = stringResource(R.string.home_empty_space), | ||
| ) | ||
| } | ||
| } | ||
| else -> { |
There was a problem hiding this comment.
First upload status disappears
The new empty-library branches skip the LazyColumn containing UploadBanner. During a first upload, the library stays empty while the file is prepared and before the server creates its Cap. Failed preparation or a rejected create request leaves it empty too, hiding progress and the failure message. Render the banner outside the empty-content choice, or keep the list while visibleJob exists.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/home/LibraryContent.kt
Line: 141-155
Comment:
**First upload status disappears**
The new empty-library branches skip the `LazyColumn` containing `UploadBanner`. During a first upload, the library stays empty while the file is prepared and before the server creates its Cap. Failed preparation or a rejected create request leaves it empty too, hiding progress and the failure message. Render the banner outside the empty-content choice, or keep the list while `visibleJob` exists.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| onOpenFolders = { | ||
| session.beginFolder() | ||
| tab = AppTab.Caps | ||
| }, |
There was a problem hiding this comment.
Settings → Folders changes tabs without returning capsStack to Route.Caps. On a phone, a previously opened folder or Cap appears instead. Only HomeScreen renders NewFolderSheet, so beginFolder() creates a draft but no sheet appears. Return to the library root before opening the draft, or host the sheet above the Caps pages.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/mobile-android/app/src/main/kotlin/so/cap/mobile/MainShell.kt
Line: 436-439
Comment:
**Folders opens the wrong page**
Settings → Folders changes tabs without returning `capsStack` to `Route.Caps`. On a phone, a previously opened folder or Cap appears instead. Only `HomeScreen` renders `NewFolderSheet`, so `beginFolder()` creates a draft but no sheet appears. Return to the library root before opening the draft, or host the sheet above the Caps pages.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| QuietRow( | ||
| label = stringResource(R.string.settings_help), | ||
| onClick = { openInAppBrowser(context, "https://cap.so/help") }, |
There was a problem hiding this comment.
Help & Support now opens /help, replacing the existing /docs support URL. The web app has no /help page or matching redirect, so users asking for help reach a missing page. Keep using environment.supportUrl.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/settings/SettingsScreen.kt
Line: 482-484
Comment:
**Help opens a missing page**
Help & Support now opens `/help`, replacing the existing `/docs` support URL. The web app has no `/help` page or matching redirect, so users asking for help reach a missing page. Keep using `environment.supportUrl`.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| val upgraded = session.plan?.upgraded | ||
| QuietRow( | ||
| label = stringResource(R.string.settings_plan), | ||
| value = | ||
| if (upgraded == null) "" | ||
| else if (upgraded) stringResource(R.string.settings_plan_pro) | ||
| else stringResource(R.string.settings_plan_free), | ||
| trailing = { if (upgraded == null) SettingsSpinner() }, |
There was a problem hiding this comment.
Failed plan lookup keeps spinning
The new plan row shows a spinner whenever session.plan is null, including after refreshPlan() fails. The redesign removed both the planError retry button and the Settings refresh action. A failed first request now leaves users unable to see or retry their plan status here. Show the error and restore a retry action.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/settings/SettingsScreen.kt
Line: 436-443
Comment:
**Failed plan lookup keeps spinning**
The new plan row shows a spinner whenever `session.plan` is null, including after `refreshPlan()` fails. The redesign removed both the `planError` retry button and the Settings refresh action. A failed first request now leaves users unable to see or retry their plan status here. Show the error and restore a retry action.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
@greptileai review |
| val audience = management.sharingAudience | ||
| if (audience != null) { |
There was a problem hiding this comment.
Sharing choices disappear on failure
A failed organizationSettings() request hides every audience choice, including “Only you and your team.” loadSharingAudience() swallows the error, so owners cannot make a public Cap private from this sheet and see no explanation or retry action.
Keep the private choice outside the settings-dependent block, and show a retry for the public choices.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/cap/MoreMenu.kt
Line: 229-230
Comment:
**Sharing choices disappear on failure**
A failed `organizationSettings()` request hides every audience choice, including “Only you and your team.” `loadSharingAudience()` swallows the error, so owners cannot make a public Cap private from this sheet and see no explanation or retry action.
Keep the private choice outside the settings-dependent block, and show a retry for the public choices.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
@greptileai review |
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.
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: 0/5

The import fix is sound, but earlier recording and navigation defects still block merging.
Findings
Fix with agent prompt
Summary
The latest change restores the missing
clipimport inRecordScreen.kt.Reviews (52) · Last reviewed commit: "Merge branch 'final-round/importfix-scre..." · Reviewed by Greptile