Skip to content

feat(mobile-android): polish large screens, accessibility and release builds - #4768

Open
AatmanAJ wants to merge 1444 commits into
CapSoftware:mainfrom
AatmanAJ:feat/mobile-android-polish
Open

AatmanAJ wants to merge 1444 commits into
CapSoftware:mainfrom
AatmanAJ:feat/mobile-android-polish

Conversation

@AatmanAJ

@AatmanAJ AatmanAJ commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on the screen recording PR (#4767), which sits on the earlier Android PRs. Only 17 commits are new here: 18f7b915e to 9f6bb8c1c, then merges of the screen recording PR at a815032ce, ea0b673b6 and f6b46f39d, then 258c555b4, a recording notification fix that now belongs to the screen recording PR, then a merge of the screen recording PR at 86848ea4b, then the review fixes 5ff41caf9, c383ffd72, 6f50ca33c, 0c6f44e7f and a8d5a33de, then merges of the screen recording PR at 708826e8d, with its review fixes, at 93baba987, which brings in the sign-in fixes from #4734, at 26e17865d and 327fd2925, with two fixes after review, and at ff6ac86df, e2b7fe556, 0ba4261de and fe5ddde9b. 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

  • Two panes on large screens. A window that is at least medium in both width and height (a tablet, or an open foldable) shows the Caps tab as the library beside the open Cap, with "Pick a Cap" and "Choose a Cap from your library to watch it here." until one is chosen. Both layouts read one back stack, split into library pages, the open Cap and what was pushed from it, so folding or unfolding keeps the Cap open, as the iOS split view does. The library pane is 300 to 380 dp wide and uses compact rows: a 116 dp thumbnail with a duration badge, the title, the owner and date, the stats, and the selected state. The long-press menu is shared with the card. Opening a folder in the library keeps the Cap open beside it, and back closes the open Cap before it leaves a folder.
  • Orientation. Outside fullscreen video a phone stays in portrait, and a window that is at least 600 by 480 dp held either way rotates freely, matching the iOS rule. Checking both ways round matters for windows 480 to 599 dp wide: they show two panes in landscape, and a check on the current size alone locked them in portrait once turned upright, so they could not turn back. The fullscreen player still asks for landscape and restores the policy when it closes. Android 16 already ignores orientation requests for apps targeting it on displays whose smallest width is 600 dp or more.
  • TalkBack. Sign-in, the library, the Cap screen, the player, comments and sharing were checked against the labels and hints the iPhone app gives VoiceOver. The labels were already in place. Four hints were missing and are now click labels: a reaction button ("add your reaction at the current moment"), a reaction count ("play from the first one"), a timeline marker ("play from this moment") and the composer's time pin ("change the moment this comment is attached to").
  • Font scale and reduced motion. The count on a timeline marker badge now keeps the fixed 9 point size the iOS badge uses instead of spilling over the timeline at large text. With animations removed, a reaction burst now stays in place for its 1.5 seconds instead of vanishing at once.
  • Edge to edge. Tab content now takes the horizontal safe drawing insets, so a foldable's inner display cutout or a side navigation bar cannot sit over the library or the player now that large screens rotate.
  • R8. Release builds are shrunk and obfuscated with the optimising Android defaults and the rules the libraries ship. The app needs no rules of its own, so there is no proguard-rules.pro. :app:testReleaseShrunkUnitTest runs R8 again over the release classes with the configuration the release build printed, writing class files instead of DEX, and runs app/src/testRelease on 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.
  • Baseline profile. A baselineprofile test 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:generateBaselineProfile records a cold start on a connected device. The generated baseline and startup profiles are committed under app/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), as ea2f8ebb5, and come back here with the merge at 86848ea4b, so they no longer show in this diff. The device runs below at 258c555b4 include that test.

Fixed after review

  • Opening another Cap in two panes (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.
  • Reselecting the open Cap (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.
  • Signing in again while the last session's data is still being removed (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.
  • The editor in two panes (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.theEditorCoversTheLibraryInTwoPanes and EditorTest.theLibraryKeepsItsPlaceAfterTheEditorInTwoPanes, on the tablet AVD (API 35), where EditorTest and MainShellTest pass 17 of 17 at a8d5a33de.
  • Shrunk release tests in CI (6f50ca33c). The Android job now runs :app:testReleaseShrunkUnitTest as well as building the release.
  • A recording's link is marked as copied before it reaches the clipboard (5d4081dc1 in the screen recording PR, merged at fe5ddde9b). 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.

Light Dark
Tablet, Pick a Cap, light Tablet, Pick a Cap, dark
Tablet, a Cap open beside the library, light Tablet, a Cap open beside the library, dark
Tablet, font scale 2.0, light Tablet, font scale 2.0, dark

Foldable AVD (API 35), unfolded: "Pick a Cap", a Cap open beside the compact rows, and font scale 2.0.

Light Dark
Unfolded, Pick a Cap, light Unfolded, Pick a Cap, dark
Unfolded, a Cap open, light Unfolded, a Cap open, dark
Unfolded, font scale 2.0, light Unfolded, font scale 2.0, dark

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.

Folded, light Folded, dark Back, API 37 Back, API 35
Folded, the Cap still open, light Folded, the Cap still open, dark Predictive back mid-gesture, API 37 Predictive back mid-gesture, API 35

Where it differs from iOS, on purpose

  • No held layout. iOS holds the split layout while the editor or the fullscreen player is up. On Android the fullscreen state lives in the player, which survives the layout change, so nothing is held. The editor is not in the app yet.
  • Predictive back on Android 13 to 15. With targetSdk 37 it was already on for Android 16 and later. The <application> element now sets android:enableOnBackInvokedCallback="true" with tools:targetApi="33", so Android 13 to 15 play the back preview too. The app handles back only through BackHandler and the back dispatcher, with no onBackPressed or key overrides, so the existing back behaviour carries over.
  • The baseline profile journey stops at sign-in. A release build cannot be pointed at the fixture server, so the library is not part of the journey yet.
  • New dependencies: Material 3 Adaptive 1.3.0 for the window size class, ProfileInstaller 1.4.1 (already on the classpath through Compose), and for the generator only, the Baseline Profile plugin and Macrobenchmark JUnit4 1.5.0 with 15 artefacts of their own. All are Apache 2.0, read from their POMs, and the README's licence table is updated.

Tests

  • capkit, :capkit:test: 270 tests, none new in this PR.
  • JVM, :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.
  • Shrunk release classes, :app:testReleaseShrunkUnitTest: 3 tests, all new in ReleaseShrinkTest.
  • Media module, :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 on d5ce89385, the commit before the orientation fix; the orientation checks ran on both.

  • Instrumented suites at 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.
  • The 3 API 37 failures are in CapDetailTest and pass on API 29: playAndPause and aShareLinkWithATimeOpensTheCapThere with "ComposeNotIdleException: Idling resource timed out: possibly due to compose being busy.", and aChosenSpeedIsKeptAfterTheAppIsOpenedAgain, which opened the speed menu but could not find the "1.5×" option. In an earlier run on this emulator, at d5ce89385, the fixture video did not play: its H.264 decoder failed in MediaCodec.queueInputBuffer and the Cap screen showed "This video can't play right now.", which is the likely cause.
  • MainShellTest (5 tests, including both back cases) passes on the tablet AVD (API 35) and an API 35 phone, and on an API 33 phone at 9f6bb8c1c and again at ea0b673b6.
  • Two panes: the screenshots above. Folding with a Cap open keeps it open on the outer display, and unfolding brings back the two panes.
  • Orientation, on an API 35 phone (1080 by 2424): at 411 dp wide the app stays in portrait, and fullscreen video turns to landscape. With the density set so the window is 540 dp wide, the app before the fix, launched in landscape, showed two panes and rotated, but once turned upright it locked to portrait and stayed there when the device turned back. With the fix it follows the device both ways, fullscreen video still turns to landscape and gives the rotation back when it closes, and at the normal density it still stays in portrait.
  • Predictive back, with the system back animation on, on API 35 and 37 at d5ce89385 and on API 33 at ea0b673b6: 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.
  • Cold start, API 35 phone AVD, the release build of 9f6bb8c1c with the app's baseline and startup profiles, signed with a debug key, am start -W TotalTime to the sign-in screen, a force-stop before every launch. 10 launches with the profile installed through ProfileInstaller and compiled with cmd package compile -f -m speed-profile, and 10 after cmd 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.
  • After the merge at 93baba987, on the API 37 AVD: SignInTest and BrowserSignInTest pass 15 of 15, and ScreenRecordingTest.signingOutFromCapDuringARecordingStopsItBeforeRemovingItsFiles passes.

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:assembleDebugAndroidTest passes on 258c555b4, with 270 capkit, 532 app, 3 shrunk release and 66 media JVM tests, on a8d5a33de, with 272 capkit, 537 app, 3 shrunk release and 66 media JVM tests, on the merge 708826e8d, with 272 capkit, 538 app, 3 shrunk release and 66 media JVM tests, and on the merges 93baba987, 26e17865d and 327fd2925, each with 272 capkit, 545 app, 3 shrunk release and 66 media JVM tests, and on the merges ff6ac86df, e2b7fe556 and 0ba4261de, each with 273 capkit, 552 app, 3 shrunk release and 66 media JVM tests, and on the merge fe5ddde9b, with 273 capkit, 553 app, 3 shrunk release and 66 media JVM tests.
  • With the kotlinx serialization consumer rules removed from the configuration, the shrunk tests still pass: R8 keeps the route companions and their 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

  • On a device or emulator, still to run:
    1. Opening a folder with a Cap open in two panes, then back, and rotating the tablet and the unfolded foldable themselves.
    2. TalkBack through sign-in, the library (cards and compact rows), the Cap screen, the player, comments and sharing, including the four new hints.
    3. Font scale 2.0 on screens other than the Cap screen, and a reaction burst with animations removed.
    4. Edge to edge in landscape on the foldable, with a display cutout at the side.
    5. Predictive back on the password sheet, and closing the open Cap in two panes before leaving a folder.
    6. The minified release build beyond cold start: sign in, play, upload, record with the camera and the screen.
    7. A baseline profile journey past sign-in, and cold start on a physical device.
  • A physical phone or tablet.

Confidence Score: 0/5RetriggerView in Greptile

The import fix is sound, but earlier recording and navigation defects still block merging.

Findings

  1. P1 Opening deletes failed recordings ▶
  2. P1 Old requests start recordings again ▶
  3. P1 Sidebar folder buttons stop working ▶
  4. P1 Organization analytics is unreachable ▶
  5. P1 Recording starts after closing ▶
  6. P2 Camera preference does nothing ▶
  7. P2 Returning resets library position ▶
  8. P2 Setup offers unavailable overlay controls ▶
  9. P2 System bars cover close ▶
  10. P2 Canceled uploads stay active ▶
  11. P2 Loom cancellation does nothing ▶
  12. P2 Background uploads lose finished notices ▶
  13. P2 Permission buttons overlap the dial ▶
  14. P2 Clearance marker sits too low ▶
  15. P2 Large picker labels get clipped ▶
Fix with agent prompt
### Issue 1
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/MainShell.kt:524-527
On the failed-upload screen, “Open Cap” stays enabled when `capId` exists. This callback calls `dismissAfter()`, which discards the saved recording and schedules its Cap for deletion, then opens that same Cap. A user trying to inspect the failed upload loses the recording they could otherwise retry.

Keep the recording when opening it, or disable this action until the upload succeeds.

### Issue 2
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/MainShell.kt:undefined-151
After saving, the recorder closes by setting `recorderOpen` to false without clearing `recorderLaunchRequest`. A `start = true` request stays there. Opening the recorder again creates a fresh `handledLaunch`, so the old request starts another recording.

Clear the consumed request when the recorder closes after saving. This affects Record another and later normal opens after a widget or tile recording.

### Issue 3
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/MainShell.kt:282-287
In two panes, opening a Cap makes the sidebar's folder buttons do nothing: `backStack.lastOrNull()` is the Cap, not `Route.Caps`. If a folder was opened first, its back arrow calls `removeLastOrNull()`, which closes the Cap instead of leaving the folder.

Restore pane-aware folder navigation with `openFromLibrary`, and remove the folder's own route when its back arrow is pressed.

### Issue 4
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/MainShell.kt:undefined-109
Removing `Route.Analytics` removes the only way to open organization-wide analytics. The remaining `AnalyticsScreen` entry always creates `AnalyticsScope.Cap`, and neither settings nor the recorder provides a replacement. Users can no longer see organization-wide views, trends, or top Caps inside the app. Keep an entry to organization analytics in the new layout.

### Issue 5
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/record/RecordingCountdown.kt:undefined-29
The new dispatcher also runs `action()` on `Dispatchers.Default`, so `model.record()` can run alongside the main-thread teardown. After its last `stateVersion` check, `record()` writes files through `recordings.begin()` before sending Start and setting the recording phase. Closing the page during that write makes `teardown()` see Ready and skip discarding the job. The background call can then start recording after the page closes.

Keep the timer off the main thread if needed, but return to the caller's dispatcher before running the action.

### Issue 6
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/settings/RecordingDefaultsScreen.kt:82-85
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.

### Issue 7
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/home/LibraryContent.kt:103-105
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.

### Issue 8
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/auth/FirstRunScreen.kt:107-112
The new “Show over other apps” row sends users to grant a permission the app does not declare. Neither Android manifest declares `SYSTEM_ALERT_WINDOW`, and there is no overlay window implementation. Users cannot enable the promised stop pill or camera bubble, and the row stays at “Allow.” Remove this option until the feature is supported, or wire up the permission and feature together.

### Issue 9
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/record/AfterScreen.kt:80-82
`AfterScreen` places its close button just 8 dp from the window’s top edge without taking safe drawing insets. `MainActivity` draws edge to edge, and this overlay sits outside the inset Caps content. The status bar or a display cutout can cover the button, making it harder to see and tap.

Apply safe drawing insets to the controls while keeping the decorative background full screen.

### Issue 10
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/services/UploadActions.kt:56-57
Canceling a recording upload deletes its files and server Cap, but `RecordingCoordinator` ignores the `Discarded` event. Its upload screen therefore stays in `Uploading`. The pending `LiveUpdate` timer can also post the canceled notification again after 45 seconds.

Route cancellation through the coordinator, clear the recent item, and stop its notification updates.

### Issue 11
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/app/Notifications.kt:156-161
Loom imports also receive “Cancel upload,” but the receiver only handles file uploads and recordings. A Loom import matches neither branch, so tapping Cancel only hides its notification. The import keeps running, and its next progress update can show the notification again.

Hide this action for Loom until it has a working cancel path.

### Issue 12
apps/mobile-android/capkit/src/main/kotlin/so/cap/kit/RecordingUploads.kt:undefined-58
`MutableSharedFlow` without replay drops events when nobody is listening. `extraBufferCapacity` does not keep them for future listeners. A cold process started by `RecordingUploadWorker` calls `resumeAll()` without starting `RecordingCoordinator`; its collector starts only in `MainActivity`. Completion events emitted then are lost, so opening the app later no longer delivers their finished notifications through the coordinator.

Preserve pending events or start their consumer before background uploads resume.

### Issue 13
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/record/RecorderHome.kt:486-487
`UpperContent` cannot fit the new camera permission panel above the dial on shorter phones. In a 640 dp-tall window at normal text size, the available space ends at 167 dp, but `minimumTop` is 146 dp. The panel's two text blocks and two buttons need much more than that 21 dp gap. Clamping its top to 146 dp draws the buttons over the dial labels.

Add a short-window layout or scrolling fallback instead of overriding the available bottom edge.

### Issue 14
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/record/RecorderHome.kt:205-211
The marker’s offset already includes `dialAccessibilityScale`, and its parent applies that scale again. At font scale 2, the marker sits about 53 dp below the crown’s highest possible point. The new assertion can therefore pass while text overlaps the crown.

Place the marker at the unscaled crown boundary inside this layer, or outside the layer at the scaled boundary.

### Issue 15
apps/mobile-android/app/src/main/kotlin/so/cap/mobile/features/record/RecordScreen.kt:656-661
The restored `ModePicker` fixes each option at 34 dp high, but `labelLarge` uses a 22 sp line height. At font scale 2, the text exceeds that space and gets clipped. Let the options grow with their text. The overlap tests substitute an empty box for this control, so they do not catch this.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The latest change restores the missing clip import in RecordScreen.kt.

  • Android users can sign in, browse and watch Caps, and record videos.
  • Large windows show the Caps library beside the open Cap.
  • Android screens add spoken hints and adapt to window and display settings.
  • Android release builds use R8 shrinking and include generated startup profiles.
  • Mobile sign-in and sharing calls carry the details Android needs.

Reviews (52) · Last reviewed commit: "Merge branch 'final-round/importfix-scre..." · Reviewed by Greptile

@vercel

vercel Bot commented Dec 2, 2026

Copy link
Copy Markdown
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.

Comment thread .github/workflows/ci.yml Resolved
@AatmanAJ

AatmanAJ commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@AatmanAJ

AatmanAJ commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@AatmanAJ

AatmanAJ commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

2 similar comments
@AatmanAJ

AatmanAJ commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@AatmanAJ

AatmanAJ commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@AatmanAJ

AatmanAJ commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@AatmanAJ

AatmanAJ commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@AatmanAJ

AatmanAJ commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@AatmanAJ

AatmanAJ commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

1 similar comment
@AatmanAJ

AatmanAJ commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@AatmanAJ

AatmanAJ commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@AatmanAJ

AatmanAJ commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

Comment on lines +237 to +242
CapRadioRow(
stringResource(R.string.cap_audience_organization),
selected = cap.isPublic && restricted,
onClick = {
management.setAudience(isPublic = true, LinkAccess.RESTRICTED)
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 security 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.

Comment on lines +54 to +57
SettingsDetailSwitchLine(
label = stringResource(R.string.recording_defaults_camera),
checked = defaults.cameraOn,
onCheckedChange = settings::setRecordingCameraOn,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Comment on lines +102 to +104
val folderInsertionStamp = library.folderInsertionStamp
LaunchedEffect(folderInsertionStamp) {
if (folderInsertionStamp > 0) listState.scrollToItem(0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Comment on lines +141 to +155
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 -> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Comment on lines +436 to +439
onOpenFolders = {
session.beginFolder()
tab = AppTab.Caps
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

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.

Comment on lines +482 to +484
QuietRow(
label = stringResource(R.string.settings_help),
onClick = { openInAppBrowser(context, "https://cap.so/help") },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

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.

Comment on lines +436 to +443
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() },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

@AatmanAJ

AatmanAJ commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

Comment on lines +229 to +230
val audience = management.sharingAudience
if (audience != null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

@AatmanAJ

AatmanAJ commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

@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.

This branch has not been deployed

No deployments
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