Skip to content

Cutoff layout issues#816

Open
praveenperera wants to merge 10 commits into
masterfrom
cutoff-layout-issues
Open

Cutoff layout issues#816
praveenperera wants to merge 10 commits into
masterfrom
cutoff-layout-issues

Conversation

@praveenperera

@praveenperera praveenperera commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix compact-screen layout cutoff issues across Android and iOS send, wallet setup, recovery-word, TapSigner, and onboarding restore flows.

Address review feedback by restoring Android svc power stayon state after stay-awake test helpers run, removing an invalid weighted spacer from a scrollable Compose column, centralizing iOS compact-layout threshold logic, sharing the TapSigner background view, restoring the active iCloud restore pulse animation, and allowing the iOS swipe-to-send control to grow with Dynamic Type.

Testing

  • just fmt
  • just clippy
  • just compile-ios
  • just compile-android
  • just lint-swift
  • just lint-android

Manual Device Coverage

Use one small and one large form factor per platform. On each screen, verify primary actions are visible or reachable, bottom actions are not clipped by safe areas/navigation bars, scrolling still works where needed, and horizontal content stays within the viewport.

iOS

  • Small iOS device/simulator
  • Large iOS device/simulator

Screens to cover:

  • New wallet select
  • Hot wallet select
  • Hot wallet create / recovery words pager
  • Hot wallet import
  • Verify recovery words
  • Verification complete
  • Onboarding secret words
  • Onboarding cloud backup enable
  • Startup device restore
  • Send confirmation / swipe to send
  • Send fee-rate sheet
  • Wallet secret words
  • Coin control UTXO list
  • TapSigner choose chain code
  • TapSigner advanced chain code
  • TapSigner setup success
  • TapSigner import success
  • TapSigner setup retry
  • TapSigner import retry

Android

  • Small Android device/emulator
  • Large Android device/emulator

Screens to cover:

  • New wallet select
  • Hot wallet select
  • Hot wallet create / recovery words pager
  • Hot wallet import
  • Verify recovery words
  • Verification complete
  • Onboarding cloud restore offer/prompt
  • Send confirmation / swipe to send
  • TapSigner choose chain code
  • TapSigner advanced chain code
  • Number-pad PIN entry

Checklist

Summary by CodeRabbit

  • New Features

    • Added compact-layout support across key onboarding, wallet setup, TapSigner, and send screens so content fits better on smaller displays and with larger text.
    • Improved screenshot-based layout auditing for Android and iOS to catch clipped or inaccessible UI before release.
  • Bug Fixes

    • Adjusted spacing, scrolling, and bottom actions on several screens to keep primary actions visible and usable.
    • Prevented test runs from sleeping the device, improving reliability of UI checks.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds Android and iOS UI layout-regression/audit test suites with screenshot capture and viewport-fit assertions, applies Compose test tags and layout refactors (BoxWithConstraints scrolling) across several Android screens, applies GeometryReader-driven scrollable layout decisions across many iOS screens, tweaks onboarding hero icon sizing/previews on both platforms, and introduces device "stay-awake" tooling for Android instrumentation tests via a shared test rule and new xtask CLI commands.

Changes

Android Compose Layout Audit Testing

Layer / File(s) Summary
Layout audit test infrastructure
android/app/src/androidTest/java/org/bitcoinppl/cove/test/LayoutRegressionTest.kt, LayoutScreenshot.kt
Adds a LayoutRegressionTest annotation and screenshot-saving helpers (file + MediaStore) used by audit tests.
Compact layout audit test suite
.../flows/AndroidCompactLayoutAuditTest.kt
Introduces a test suite rendering compact viewport screens, managing manager/signer lifecycles, capturing screenshots, and asserting nodes fit within viewport bounds.
HotWalletCreateScreen layout test
.../flows/NewWalletFlow/hot_wallet/HotWalletCreateScreenTest.kt
Adds a test capturing screenshots and asserting the primary action button remains within viewport bounds after scrolling.
Compose test tags across screens
.../NewWalletSelectScreen.kt, HotWalletCreateScreen.kt, HotWalletImportScreen.kt, HotWalletSelectScreen.kt, VerificationCompleteScreen.kt, VerifyWordsScreen.kt, SendFlowConfirmScreen.kt, TapSignerAdvancedChainCode.kt, TapSignerChooseChainCode.kt, NumberPadPinView.kt
Adds testTag modifiers to viewports and interactive elements, and refactors several screens to use BoxWithConstraints/scrollable columns.
Onboarding hero sizing and previews
OnboardingCloudRestorePromptViews.kt, OnboardingTheme.kt, screenshotTest/.../PreviewScreenshotTests.kt
Introduces shared inner ring/badge size constants and adds new @Preview functions including a cloud-variant screenshot test.

Estimated code review effort: 4 (Complex) | ~70 minutes

iOS Responsive Layout Refactor and Layout Tests

Layer / File(s) Summary
Onboarding hero icon sizing
OnboardingRecoveryTheme.swift, DeviceRestoreView.swift
Updates OnboardingStatusHero inner badge/ring sizing constants, adds a preview, and reuses the hero view in DeviceRestoreContent.
New wallet flow scrollable layouts
NewWalletSelectScreen.swift, HotWalletSelectScreen.swift, HotWalletCreateScreen.swift
Refactors screens to compute scrollable-vs-fixed layouts via GeometryReader/sizeCategory and extracts prompt/action helper views.
Verify words and verification complete layouts
VerificationCompleteScreen.swift, VerifyWordsScreen.swift
Applies the scrollable-layout decision pattern with conditional spacers and extracted bottom-action helpers.
TapSigner flow scrollable layouts
TapSignerAdvancedChainCode.swift, TapSignerChooseChainCode.swift, TapSignerImportRetryView.swift, TapSignerImportSuccessView.swift, TapSignerSetupRetryView.swift, TapSignerSetupSuccessView.swift
Applies the same layout pattern, extracting backgroundView and usesScrollableLayout helpers across TapSigner screens.
Send, secret words, onboarding backup, and coin control layouts
SendFlowConfirmScreen.swift, SecretWordsScreen.swift, OnboardingBackupViews.swift, UtxoListScreen.swift
Reworks reserved-height/scroll layout for send confirmation, secret words, onboarding backup, and extracts the coin control Continue button into a bottom overlay.
HotWalletCreateScreenLayoutTests suite and project wiring
ios/CoveTests/HotWalletCreateScreenLayoutTests.swift, Cove.xcodeproj/project.pbxproj
Adds an XCTest suite using OCR/pixel-based layout assertions and screenshot utilities, wired into the Xcode project build phases.

Estimated code review effort: 4 (Complex) | ~75 minutes

Android Device Stay-Awake Tooling

Layer / File(s) Summary
AndroidDeviceStayAwakeRule and FullLaunchTestRule refactor
test/AndroidDeviceStayAwakeRule.kt, test/FullLaunchTestRule.kt
Introduces a TestRule with a withStayAwake helper that reads/restores device settings, and simplifies FullLaunchTestRule to delegate to it.
xtask stay-awake commands and justfile wiring
rust/xtask/src/android.rs, rust/xtask/src/main.rs, justfile
Adds run_with_stay_awake/run_manual_ui_tests with settings-restoring and package-cleanup guards, new CLI commands, and simplified justfile recipes.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Just as justfile
  participant Xtask as xtask CLI
  participant Guard as AndroidStayAwakeGuard
  participant Adb as adb
  Just->>Xtask: android-ui-manual / android-stay-awake
  Xtask->>Adb: read stay_on_while_plugged_in, screen_off_timeout
  Xtask->>Adb: apply stay-awake settings, dismiss keyguard
  Xtask->>Xtask: run_manual_ui_tests / run command
  Xtask->>Guard: restore settings on drop
  Guard->>Adb: restore prior settings
Loading
sequenceDiagram
  participant Test as AndroidCompactLayoutAuditTest
  participant Compose as ComposeContentTestRule
  participant Screenshot as LayoutScreenshot
  participant Assert as assertNodeInsideViewport
  Test->>Compose: renderCompact(screenName, content)
  Test->>Compose: scroll to bottom-tagged node
  Test->>Screenshot: saveNodeScreenshotToLayoutAudit(tag, name)
  Test->>Assert: check node bounds vs viewport
  Assert-->>Test: pass/fail on fit
Loading

Possibly related PRs

  • bitcoinppl/cove#722: Modifies the existing FullLaunchTestRule harness that this PR further refactors for stay-awake handling.
  • bitcoinppl/cove#811: Also touches FullLaunchTestRule's stay-awake/stay_on_while_plugged_in toggle and restore logic.
  • bitcoinppl/cove#421: Introduces NumberPadPinView, which this PR instruments with test tags for layout audit coverage.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is relevant, but it's too vague to identify the main Android/iOS layout work. Use a concise title that names the main change, such as compact-screen layout fixes across Android and iOS.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description matches the template well, with Summary, Testing, Platform Coverage, and Checklist sections filled in.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cutoff-layout-issues

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes compact-screen layout cutoffs across the mobile app. The main changes are:

  • Android compact-layout screenshots and instrumentation helpers.
  • Scrollable Android wallet, recovery-word, send, TapSigner, and onboarding layouts.
  • iOS compact-layout thresholds, TapSigner backgrounds, restore animation, and swipe-to-send sizing.
  • Shared Android stay-awake cleanup for manual UI runs and layout tests.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
rust/xtask/src/android.rs Adds xtask Android stay-awake commands and cleanup guards for manual UI testing.
android/app/src/androidTest/java/org/bitcoinppl/cove/test/AndroidDeviceStayAwakeRule.kt Adds a reusable instrumentation-test rule for keeping Android devices awake during layout tests.
android/app/src/androidTest/java/org/bitcoinppl/cove/test/FullLaunchTestRule.kt Routes full-launch tests through the shared Android stay-awake helper.

Reviews (4): Last reviewed commit: "Refine layout test helpers and detekt ru..." | Re-trigger Greptile

Comment thread rust/xtask/src/android.rs
@praveenperera praveenperera force-pushed the cutoff-layout-issues branch from c518dd7 to f4d2441 Compare July 3, 2026 16:14

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 8

🧹 Nitpick comments (4)
android/app/src/main/java/org/bitcoinppl/cove/flows/OnboardingFlow/OnboardingCloudRestorePromptViews.kt (1)

371-372: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate magic value across files for hero inner-circle sizing.

innerRingSize = 68.dp here duplicates innerBadgeSize = 68.dp introduced independently in OnboardingTheme.kt (OnboardingStatusHero). Both hero composables now hardcode the same value in two places; if one is tuned later the other can silently drift out of sync. The iOS counterpart (OnboardingRecoveryTheme.swift) centralizes a single innerBadgeSize for this purpose.

Consider hoisting a shared constant (e.g., in OnboardingTheme.kt) that both OnboardingCloudSearchHero and OnboardingStatusHero reference.

Also applies to: 394-394

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@android/app/src/main/java/org/bitcoinppl/cove/flows/OnboardingFlow/OnboardingCloudRestorePromptViews.kt`
around lines 371 - 372, The hero inner-circle size is hardcoded twice, causing
duplicated magic values between OnboardingCloudSearchHero and
OnboardingStatusHero. Hoist the shared 68.dp value into a single reusable
constant in OnboardingTheme.kt (for example alongside OnboardingStatusHero’s
existing innerBadgeSize) and update OnboardingCloudRestorePromptViews.kt to
reference that constant so both composables stay in sync.
android/app/src/androidTest/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletCreateScreenTest.kt (1)

118-147: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider extracting shared viewport/screenshot-mode helpers.

auditViewportWidth(), auditViewportHeight(), and screenshotMode() duplicate the viewport-sizing pattern used in AndroidCompactLayoutAuditTest.kt (e.g. its auditViewportHeight() usage). As more per-screen layout tests are added to this suite, keeping this logic in one place (e.g. test/LayoutScreenshot.kt or a new test/LayoutViewport.kt) would prevent divergence between test files.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@android/app/src/androidTest/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletCreateScreenTest.kt`
around lines 118 - 147, Extract the repeated viewport/screenshot argument
parsing from HotWalletCreateScreenTest’s screenshotMode(), auditViewportWidth(),
auditViewportHeight(), and saveViewportScreenshot() into a shared test helper so
it matches the pattern already used by AndroidCompactLayoutAuditTest. Create or
reuse a central utility such as test/LayoutScreenshot.kt or
test/LayoutViewport.kt, then update this test to call the shared helper methods
instead of duplicating the InstrumentationRegistry argument parsing and default
viewport values.
ios/Cove/Flows/NewWalletFlow/NewWalletSelectScreen.swift (1)

38-53: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Repeated GeometryReader/scroll-decision boilerplate across screens.

The GeometryReaderscrollableLayoutScrollView(mainContent) vs bottomActionLayout() scaffolding, plus usesScrollableLayout, is duplicated nearly verbatim across this file, HotWalletSelectScreen.swift, TapSignerAdvancedChainCode.swift, and TapSignerChooseChainCode.swift (and reportedly more screens per the PR description). Consider extracting a shared ViewModifier/generic container (e.g. ScrollableOrFixedLayout<Content>) that takes the scroll-decision closure and content builders, to reduce copy-paste drift risk (as already seen with the height-threshold inconsistency above).

Also applies to: 107-233

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ios/Cove/Flows/NewWalletFlow/NewWalletSelectScreen.swift` around lines 38 -
53, The GeometryReader-based scroll vs fixed-layout decision is duplicated in
NewWalletSelectScreen’s main layout and across the related select screens, so
extract it into a shared reusable container or ViewModifier (for example, a
generic ScrollableOrFixedLayout) that owns the available-height check and the
ScrollView vs bottomActionLayout branching. Update the existing uses of
usesScrollableLayout, mainContent, and bottomActionLayout to route through that
shared helper so the threshold logic and sizing behavior live in one place and
stay consistent.
ios/Cove/Flows/NewWalletFlow/HotWallet/VerifyWords/VerificationCompleteScreen.swift (1)

12-12: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Replace sizeCategory with dynamicTypeSize. @Environment(\.sizeCategory) is deprecated; use @Environment(\.dynamicTypeSize) here and compare against .xxLarge.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ios/Cove/Flows/NewWalletFlow/HotWallet/VerifyWords/VerificationCompleteScreen.swift`
at line 12, Replace the deprecated sizeCategory environment usage in
VerificationCompleteScreen with dynamicTypeSize. Update the environment property
on the view to use `@Environment`(\.dynamicTypeSize), and adjust any size checks
in the same screen to compare against .xxLarge instead of the old
UIContentSizeCategory-based value.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@android/app/src/main/java/org/bitcoinppl/cove/flows/SendFlow/SendFlowConfirmScreen.kt`:
- Around line 158-210: The scrollable Column in SendFlowConfirmScreen is using a
weighted Spacer, which is invalid inside verticalScroll and can crash during
measurement. Remove Spacer(Modifier.weight(1f)) from the Column in
SendFlowConfirmScreen and use a non-weight layout approach instead, such as
arranging the content with verticalArrangement or inserting a fixed-size Spacer.
Keep the existing AmountWidget, SummaryWidget, and SwipeToSendStub structure
intact while adjusting the Column layout so it no longer relies on weight inside
the scroll container.

In `@ios/Cove/Flows/NewWalletFlow/HotWallet/HotWalletCreateScreen.swift`:
- Around line 38-90: The layout breakpoint check is duplicated in
HotWalletCreateScreen’s usesScrollableLayout and the same threshold logic
appears in several other wallet/onboarding views, so centralize it in a shared
helper instead of keeping the hardcoded sizeCategory and 812 comparison inline.
Add a reusable method or GeometryProxy extension such as
usesCompactLayout(sizeCategory:) and update HotWalletCreateScreen.body to call
it, then migrate the matching threshold logic in the other screens to the same
helper so future breakpoint changes happen in one place.

In `@ios/Cove/Flows/NewWalletFlow/HotWallet/HotWalletSelectScreen.swift`:
- Around line 163-165: The usesScrollableLayout(availableHeight:) logic in
HotWalletSelectScreen currently ignores availableHeight and relies only on
sizeCategory, which can keep the fixed layout on compact-height devices. Update
that method to combine the Dynamic Type check with the compact-height fallback,
matching the existing sizeCategory >= .extraExtraLarge || availableHeight <= 812
pattern so small devices still switch to the scrollable layout.

In
`@ios/Cove/Flows/NewWalletFlow/HotWallet/VerifyWords/VerificationCompleteScreen.swift`:
- Around line 115-118: The usesScrollableLayout(availableHeight:) helper is
duplicated with the same 812 threshold across VerificationCompleteScreen and the
related wallet screens, so extract it into a shared helper instead of keeping
per-screen copies. Move the logic into a common location such as a View
extension (or another shared utility) that takes sizeCategory and
availableHeight, then update VerificationCompleteScreen, VerifyWordsScreen,
SecretWordsScreen, HotWalletCreateScreen, HotWalletSelectScreen, and
NewWalletSelectScreen to call the shared implementation.

In `@ios/Cove/Flows/Onboarding/StartupRecovery/DeviceRestoreView.swift`:
- Around line 121-123: The restoringHeroIcon helper is currently using the
default static OnboardingStatusHero state, so the restore flow is missing the
in-progress pulse animation. Update DeviceRestoreView so the restoring state
explicitly passes pulse: true to OnboardingStatusHero, and if .idle should
remain static, split the shared helper or state-specific builders so only the
restoring path enables pulsing.

In `@ios/Cove/Flows/SendFlow/SendFlowConfirmScreen.swift`:
- Around line 11-16: The swipe control height is still hardcoded via
sendConfirmationActionReservedHeight, which prevents Dynamic Type from expanding
the action area and can clip larger text. Update SendFlowConfirmScreen and the
SwipeToSendView sizing logic so the action height is derived from its content
and padding instead of a fixed 70pt reservation; use the existing
sendConfirmationActionTopPadding and sendConfirmationActionBottomPadding
constants when calculating the final height.

In `@ios/Cove/Flows/TapSignerFlow/TapSignerImportRetryView.swift`:
- Around line 106-122: The background pattern and scroll-threshold logic are
duplicated across multiple TapSigner views, so move the shared `backgroundView`
behavior into a reusable `TapSignerResultBackground` component and extract
`usesScrollableLayout(availableHeight:)` into a common layout helper. Update
`TapSignerImportRetryView` and the matching duplicated views to use the shared
symbols instead of local copies, and centralize the breakpoint/pattern image
there so future changes only happen in one place.

In `@justfile`:
- Around line 158-166: The android stay-awake doc block contains a duplicated
summary line, so clean up the comment in justfile by removing the repeated “Run
an Android device command from android/ with stay-awake enabled.” text and
keeping a single clear description near the android-stay-awake recipe. Use the
surrounding comment block for the recipe and the references to
AndroidDeviceStayAwakeRule to preserve the intended guidance without the
copy/paste leftover.

---

Nitpick comments:
In
`@android/app/src/androidTest/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletCreateScreenTest.kt`:
- Around line 118-147: Extract the repeated viewport/screenshot argument parsing
from HotWalletCreateScreenTest’s screenshotMode(), auditViewportWidth(),
auditViewportHeight(), and saveViewportScreenshot() into a shared test helper so
it matches the pattern already used by AndroidCompactLayoutAuditTest. Create or
reuse a central utility such as test/LayoutScreenshot.kt or
test/LayoutViewport.kt, then update this test to call the shared helper methods
instead of duplicating the InstrumentationRegistry argument parsing and default
viewport values.

In
`@android/app/src/main/java/org/bitcoinppl/cove/flows/OnboardingFlow/OnboardingCloudRestorePromptViews.kt`:
- Around line 371-372: The hero inner-circle size is hardcoded twice, causing
duplicated magic values between OnboardingCloudSearchHero and
OnboardingStatusHero. Hoist the shared 68.dp value into a single reusable
constant in OnboardingTheme.kt (for example alongside OnboardingStatusHero’s
existing innerBadgeSize) and update OnboardingCloudRestorePromptViews.kt to
reference that constant so both composables stay in sync.

In
`@ios/Cove/Flows/NewWalletFlow/HotWallet/VerifyWords/VerificationCompleteScreen.swift`:
- Line 12: Replace the deprecated sizeCategory environment usage in
VerificationCompleteScreen with dynamicTypeSize. Update the environment property
on the view to use `@Environment`(\.dynamicTypeSize), and adjust any size checks
in the same screen to compare against .xxLarge instead of the old
UIContentSizeCategory-based value.

In `@ios/Cove/Flows/NewWalletFlow/NewWalletSelectScreen.swift`:
- Around line 38-53: The GeometryReader-based scroll vs fixed-layout decision is
duplicated in NewWalletSelectScreen’s main layout and across the related select
screens, so extract it into a shared reusable container or ViewModifier (for
example, a generic ScrollableOrFixedLayout) that owns the available-height check
and the ScrollView vs bottomActionLayout branching. Update the existing uses of
usesScrollableLayout, mainContent, and bottomActionLayout to route through that
shared helper so the threshold logic and sizing behavior live in one place and
stay consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ade3c718-0e2e-4317-8a5e-a71d8d796405

📥 Commits

Reviewing files that changed from the base of the PR and between db1d7bd and c518dd7.

📒 Files selected for processing (41)
  • android/app/src/androidTest/java/org/bitcoinppl/cove/flows/AndroidCompactLayoutAuditTest.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletCreateScreenTest.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/test/AndroidDeviceStayAwakeRule.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/test/FullLaunchTestRule.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/test/LayoutRegressionTest.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/test/LayoutScreenshot.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/NewWalletSelectScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletCreateScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletImportScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletSelectScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/VerificationCompleteScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/VerifyWordsScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/OnboardingFlow/OnboardingCloudRestorePromptViews.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/OnboardingFlow/OnboardingTheme.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/SendFlow/SendFlowConfirmScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/TapSignerFlow/TapSignerAdvancedChainCode.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/TapSignerFlow/TapSignerChooseChainCode.kt
  • android/app/src/main/java/org/bitcoinppl/cove/views/NumberPadPinView.kt
  • android/app/src/screenshotTest/java/org/bitcoinppl/cove/screenshots/PreviewScreenshotTests.kt
  • ios/Cove.xcodeproj/project.pbxproj
  • ios/Cove/Flows/CoinControlFlow/UtxoListScreen.swift
  • ios/Cove/Flows/NewWalletFlow/HotWallet/HotWalletCreateScreen.swift
  • ios/Cove/Flows/NewWalletFlow/HotWallet/HotWalletSelectScreen.swift
  • ios/Cove/Flows/NewWalletFlow/HotWallet/VerifyWords/VerificationCompleteScreen.swift
  • ios/Cove/Flows/NewWalletFlow/HotWallet/VerifyWords/VerifyWordsScreen.swift
  • ios/Cove/Flows/NewWalletFlow/NewWalletSelectScreen.swift
  • ios/Cove/Flows/Onboarding/OnboardingBackupViews.swift
  • ios/Cove/Flows/Onboarding/StartupRecovery/DeviceRestoreView.swift
  • ios/Cove/Flows/SelectedWalletFlow/SecretWordsScreen.swift
  • ios/Cove/Flows/SendFlow/SendFlowConfirmScreen.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerAdvancedChainCode.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerChooseChainCode.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerImportRetryView.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerImportSuccessView.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerSetupRetryView.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerSetupSuccessView.swift
  • ios/Cove/Views/OnboardingRecoveryTheme.swift
  • ios/CoveTests/HotWalletCreateScreenLayoutTests.swift
  • justfile
  • rust/xtask/src/android.rs
  • rust/xtask/src/main.rs

Comment thread ios/Cove/Flows/NewWalletFlow/HotWallet/HotWalletCreateScreen.swift
Comment thread ios/Cove/Flows/NewWalletFlow/HotWallet/HotWalletSelectScreen.swift Outdated
Comment thread ios/Cove/Flows/Onboarding/StartupRecovery/DeviceRestoreView.swift Outdated
Comment thread ios/Cove/Flows/SendFlow/SendFlowConfirmScreen.swift
Comment thread ios/Cove/Flows/TapSignerFlow/TapSignerImportRetryView.swift Outdated
Comment thread justfile Outdated
Comment thread rust/xtask/src/android.rs
@praveenperera praveenperera force-pushed the cutoff-layout-issues branch from 22f9bb0 to 2b8f1e6 Compare July 3, 2026 20:05
Make the recovery words screen scroll on compact Android and iOS heights so the primary action can fully enter the viewport. Add focused layout regression tests and move Android stay-awake test wrapping into xtask so device testing restores the previous setting.
Increase the inner badge size for shared onboarding status heroes so cloud icons no longer touch the rings. Add isolated previews and an Android preview screenshot entry to make the component easier to verify.
Refactor compact-screen wallet and signing flows

Move key CTAs into fixed bottom-safe areas so primary actions remain visible.

Add screenshot assertions that catch clipped or hidden actions in compact layouts.
Increase both Android wake-related settings during UI test runs

Set  alongside  and
restore both values after each run so long-running tests are less likely
to be interrupted by idle sleep. Add iOS regression coverage for large
recovery-word layouts by asserting word cards stay inside the horizontal
viewport while still validating screenshot and CTA placement.
Reserve compact-screen space for bottom actions and add stable test tags so wallet and send confirmation screens remain accessible with small viewports.
Add viewport-aware compact audit checks and reusable screenshot capture for Android and iOS layout flows, and keep test devices awake during long-running screenshot runs.
Unify compact layout detection across iOS wallet and send flows.\nMove shared threshold logic into Constants for reuse.\nMake swipe-to-send height responsive to rendered content, so long\nlocalized labels remain fully visible.
Preserve and restore all Android device wake settings used by tests.
Keep the previous power mode in place after each test run so
subsequent commands inherit the preexisting configuration.
Split top and bottom sections into separate vertical groups in the
send confirmation screen so controls stay anchored while amount
and summary content can remain stable across layout changes.
@praveenperera praveenperera force-pushed the cutoff-layout-issues branch from 2b8f1e6 to 0317613 Compare July 6, 2026 18:28
Adjust Detekt to allow mixed-case function names and ignore unused private Compose preview helpers, matching existing Android UI code patterns. In the iOS hot wallet layout tests, rename the bottom-edge assertion to target the blue primary action and extract the repeated light-word-card pixel detection into shared helpers for clearer, reusable screenshot checks.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
ios/Cove/Constants.swift (1)

21-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Deduplicate the 812 magic number.

isMiniDevice and compactLayoutHeightThreshold both hardcode 812 independently. Have isMiniDevice reference the new constant so the boundary has a single source of truth.

♻️ Proposed fix
-let isMiniDevice = screenHeight <= 812
-let compactLayoutHeightThreshold: CGFloat = 812
+let compactLayoutHeightThreshold: CGFloat = 812
+let isMiniDevice = screenHeight <= compactLayoutHeightThreshold
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ios/Cove/Constants.swift` around lines 21 - 22, The 812 threshold is
duplicated in the device layout constants, so update Constants.swift so
isMiniDevice uses compactLayoutHeightThreshold instead of hardcoding the value
itself. Keep compactLayoutHeightThreshold as the single source of truth and have
the isMiniDevice calculation reference that symbol directly so any future
boundary change only happens in one place.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@ios/Cove/Constants.swift`:
- Around line 21-22: The 812 threshold is duplicated in the device layout
constants, so update Constants.swift so isMiniDevice uses
compactLayoutHeightThreshold instead of hardcoding the value itself. Keep
compactLayoutHeightThreshold as the single source of truth and have the
isMiniDevice calculation reference that symbol directly so any future boundary
change only happens in one place.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 08a569c4-9c9f-41ac-b5a9-6f9e87b80457

📥 Commits

Reviewing files that changed from the base of the PR and between c518dd7 and c6394fc.

📒 Files selected for processing (43)
  • android/app/src/androidTest/java/org/bitcoinppl/cove/flows/AndroidCompactLayoutAuditTest.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletCreateScreenTest.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/test/AndroidDeviceStayAwakeRule.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/test/FullLaunchTestRule.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/test/LayoutRegressionTest.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/test/LayoutScreenshot.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/NewWalletSelectScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletCreateScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletImportScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletSelectScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/VerificationCompleteScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/VerifyWordsScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/OnboardingFlow/OnboardingCloudRestorePromptViews.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/OnboardingFlow/OnboardingTheme.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/SendFlow/ConfirmScreen/SendFlowConfirmScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/TapSignerFlow/TapSignerAdvancedChainCode.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/TapSignerFlow/TapSignerChooseChainCode.kt
  • android/app/src/main/java/org/bitcoinppl/cove/views/NumberPadPinView.kt
  • android/app/src/screenshotTest/java/org/bitcoinppl/cove/screenshots/PreviewScreenshotTests.kt
  • android/detekt.yml
  • ios/Cove.xcodeproj/project.pbxproj
  • ios/Cove/Constants.swift
  • ios/Cove/Flows/CoinControlFlow/UtxoListScreen.swift
  • ios/Cove/Flows/NewWalletFlow/HotWallet/HotWalletCreateScreen.swift
  • ios/Cove/Flows/NewWalletFlow/HotWallet/HotWalletSelectScreen.swift
  • ios/Cove/Flows/NewWalletFlow/HotWallet/VerifyWords/VerificationCompleteScreen.swift
  • ios/Cove/Flows/NewWalletFlow/HotWallet/VerifyWords/VerifyWordsScreen.swift
  • ios/Cove/Flows/NewWalletFlow/NewWalletSelectScreen.swift
  • ios/Cove/Flows/Onboarding/OnboardingBackupViews.swift
  • ios/Cove/Flows/Onboarding/StartupRecovery/DeviceRestoreView.swift
  • ios/Cove/Flows/SelectedWalletFlow/SecretWordsScreen.swift
  • ios/Cove/Flows/SendFlow/ConfirmScreen/SwipeToSendView.swift
  • ios/Cove/Flows/SendFlow/SendFlowConfirmScreen.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerAdvancedChainCode.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerChooseChainCode.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerContainer.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerImportRetryView.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerImportSuccessView.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerSetupRetryView.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerSetupSuccessView.swift
  • ios/Cove/Views/OnboardingRecoveryTheme.swift
  • ios/CoveTests/HotWalletCreateScreenLayoutTests.swift
  • justfile
💤 Files with no reviewable changes (21)
  • ios/Cove/Flows/TapSignerFlow/TapSignerContainer.swift
  • ios/Cove/Flows/Onboarding/StartupRecovery/DeviceRestoreView.swift
  • ios/Cove/Flows/CoinControlFlow/UtxoListScreen.swift
  • ios/Cove/Views/OnboardingRecoveryTheme.swift
  • justfile
  • ios/Cove/Flows/SendFlow/SendFlowConfirmScreen.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerImportSuccessView.swift
  • ios/Cove/Flows/SendFlow/ConfirmScreen/SwipeToSendView.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerSetupRetryView.swift
  • ios/Cove/Flows/NewWalletFlow/NewWalletSelectScreen.swift
  • ios/Cove/Flows/Onboarding/OnboardingBackupViews.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerSetupSuccessView.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerImportRetryView.swift
  • ios/Cove/Flows/SelectedWalletFlow/SecretWordsScreen.swift
  • ios/Cove/Flows/NewWalletFlow/HotWallet/VerifyWords/VerifyWordsScreen.swift
  • ios/Cove/Flows/NewWalletFlow/HotWallet/VerifyWords/VerificationCompleteScreen.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerAdvancedChainCode.swift
  • ios/Cove/Flows/TapSignerFlow/TapSignerChooseChainCode.swift
  • ios/Cove/Flows/NewWalletFlow/HotWallet/HotWalletCreateScreen.swift
  • ios/Cove/Flows/NewWalletFlow/HotWallet/HotWalletSelectScreen.swift
  • ios/CoveTests/HotWalletCreateScreenLayoutTests.swift
✅ Files skipped from review due to trivial changes (6)
  • android/app/src/androidTest/java/org/bitcoinppl/cove/test/LayoutRegressionTest.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletImportScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/TapSignerFlow/TapSignerAdvancedChainCode.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletSelectScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/NewWalletSelectScreen.kt
  • android/app/src/main/java/org/bitcoinppl/cove/views/NumberPadPinView.kt
🚧 Files skipped from review as they are similar to previous changes (13)
  • android/app/src/androidTest/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletCreateScreenTest.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/TapSignerFlow/TapSignerChooseChainCode.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/test/LayoutScreenshot.kt
  • android/app/src/screenshotTest/java/org/bitcoinppl/cove/screenshots/PreviewScreenshotTests.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/OnboardingFlow/OnboardingTheme.kt
  • ios/Cove.xcodeproj/project.pbxproj
  • android/app/src/main/java/org/bitcoinppl/cove/flows/OnboardingFlow/OnboardingCloudRestorePromptViews.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/VerifyWordsScreen.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/test/FullLaunchTestRule.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/HotWalletCreateScreen.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/test/AndroidDeviceStayAwakeRule.kt
  • android/app/src/androidTest/java/org/bitcoinppl/cove/flows/AndroidCompactLayoutAuditTest.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/NewWalletFlow/hot_wallet/VerificationCompleteScreen.kt

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