Skip to content

fix: apply screen gutter to profile cleanup recovery - #2114

Open
jvsena42 wants to merge 4 commits into
fix/restore-identity-backgroundfrom
fix/profile-cleanup-gutter
Open

jvsena42 wants to merge 4 commits into
fix/restore-identity-backgroundfrom
fix/profile-cleanup-gutter

Conversation

@jvsena42

@jvsena42 jvsena42 commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Fixes #1749

Dependency: #1686

Stacked on fix/restore-identity-background (#1686): the cleanup-pending branch of ProfileScreen.kt (added by #1693, merged into that branch) does not exist on master yet. Merge #1686 first; this PR then retargets to master.

Description

  • The cleanup-pending branch of ProfileScreen.kt now wraps its text, Retry/Disconnect buttons and progress indicator in a column with the standard 16dp horizontal gutter. The top bar stays outside the gutter, aligned as on the other Profile states.
  • The 32dp GradientCircularProgressIndicator was drawn at x=0 inside a clipped ScreenColumn, so the left half of its stroke was cut off. It now sits centred, 24dp below the buttons, inside the gutter (ProfileRecoveryProgress).
  • Added test tags ProfileRecoveryContent and ProfileRecoveryProgress, and a 320dp-wide preview of the busy state.
  • No change to cleanup admission, replay, ownership, busy or confirmation gates: the conditions, callbacks and enabled flags are the same.
  • iOS: ProfileRemovalRecoveryView (fix: bind profile removal to its original owner bitkit-ios#1143) already applies .padding(.horizontal, 16) to the whole stack, with a native ProgressView; no iOS change.
  • Review fixes: the recovery column now scrolls (verticalScroll, 16dp bottom padding), so a large font on a short screen cannot push the buttons off; the instrumented test also runs at 320dp width in Greek at font scale 1.3, and its imports are ordered.

Out of Scope

  • None.

Design

N/A — no design available. Margins follow Profile active (16dp gutter); there is no frame for the cleanup-pending state.

Preview

Android emulator (Pixel 9 AVD, Android 17), dev/regtest debug build at ab231fa, cleanup-pending state seeded as in the runbook. No before shots (base build skipped).

Case Result Screenshot
1 Default width, EN: text and Disconnect 16 dp from both edges pass 1 after
2 Narrow 320 dp: wraps inside the gutter, button fully visible pass 2 narrow
3 Greek, font 1.3, 320 dp pass 3 el
3 Russian, font 1.3, 320 dp pass 3 ru
4 Busy: Disconnect dimmed, spinner centred with full ring pass 4 busy

Figma Profile active (16 dp gutter reference): figma

QA Notes

Setup

  • Dev/regtest debug build (to.bitkit.dev) of this branch, onboarded disposable wallet with Paykit UI on.
  • Seed the local recovery marker (no remote mutation), then open Profile:
    adb shell am force-stop to.bitkit.dev
    adb shell "run-as to.bitkit.dev sh -c 'mkdir -p files/datastore && printf %s \"{\\\"version\\\":1,\\\"attemptId\\\":\\\"3f1c2e4a-8b7d-4c6e-9a1f-2d3e4f5a6b7c\\\",\\\"scope\\\":\\\"PROFILE\\\"}\" > files/datastore/profile_removal.json'"
    adb shell monkey -p to.bitkit.dev 1
    Home ProfileButton opens Profile in the cleanup-pending state. Retry needs a live failed remote attempt in the same process, so it is absent here; the instrumented test covers it.
  • Narrow width: adb shell wm size 720x1280 && adb shell wm density 360. Long translation: adb shell cmd locale set-app-locales to.bitkit.dev --locales el (or ru). Reset after.

Journeys

N/A — not drivable; see Manual Tests.

Manual Tests

  • 1. Seeded cleanup-pending Profile, default width → text and ProfileRecoveryDisconnect 16dp from both edges, top bar unchanged — seeding app storage is not in Capabilities
  • 2. Same at 320dp width → text wraps inside the gutter, button fully visible — seeding app storage is not in Capabilities
  • 3. 320dp width, Greek and Russian, font scale 1.3 → text and button inside the gutter, nothing clipped — seeding app storage is not in Capabilities
  • 4. Tap Disconnect → confirm → buttons disabled, ProfileRecoveryProgress centred with its full ring visible, Back ignored while busy, recovery state clears afterwards — seeding app storage is not in Capabilities

Automated Checks

  • added ProfileRecoveryContentTest.kt — text, Retry and Disconnect start at 16dp and end 16dp from the right edge; the busy indicator stays inside the gutter (instrumented)

Evidence

  • At fbf9bbeee, local: compileDevDebugKotlin + compileDevDebugAndroidTestKotlin, ProfileViewModelTest, detekt --rerun-tasks and lintDevDebug passed (Gradle --no-daemon --max-workers=4). The instrumented test compiles; it has not run (no device).
  • Device run on an emulator at ab231fa: cases 1-4 pass (screenshots in Preview). ProfileRecoveryContentTest on the emulator: 4/4 pass via adb shell am instrument; the Gradle connectedDevDebugAndroidTest run and the first direct run crashed in Hilt_FcmService ("component was not created") before/during the test, unrelated to the profile code. First cold start after install showed one ANR dialog under heavy host load.
  • Independent review (fresh-context agent, claude-opus-5-5): no HIGH or MEDIUM findings. LOW fixes applied in ab231fa61. At ab231fa61: compileDevDebugKotlin + compileDevDebugAndroidTestKotlin, detekt and lintDevDebug passed; the instrumented test is still unrun (no device).
  • Review round 2: expected English text resolved with the host locale (piotr-iohk): fixed with a configuration context in the forced locale (3cc80605c). Scrolling untested (greptile): added a 400dp-tall, Greek, font scale 1.5 phase that requires performScrollTo to reach Disconnect (9ccca3e67). androidTest compiles; detekt and lintDevDebug passed. The instrumented test is not run locally (no device).

Gaps

  • Case 4 reached the busy state through the seeded marker only; a real remote cleanup failure (Retry visible) was not exercised on a device.

Models used

  • Planning/scoping: claude-opus-5-5 (reasoning: Not exposed)
  • Implementation: claude-opus-5-5 (reasoning: Not exposed)
  • Review: claude-opus-5-5 (reasoning: Not exposed)
  • Review rounds: 1

Metadata note: the agent session exposes the model ID but no reasoning-effort setting.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jvsena42 jvsena42 self-assigned this Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Regtest APK

Built from 9ccca3e (run).

Download bitkit-dev-debug universal APK (expires in 30 days).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jvsena42
jvsena42 marked this pull request as ready for review November 26, 2026 16:30
@jvsena42
jvsena42 requested review from a team, ovitrif and piotr-iohk and removed request for a team November 26, 2026 16:30
@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no blocking issues remain.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no blocking issues remain.

Summary

The profile cleanup recovery screen adds standard horizontal margins, centres the busy indicator, and lets users scroll to the buttons on short screens.

  • Profile recovery content now fits inside the screen margins and can scroll.

Reviews (2) · Last reviewed commit: "test: prove cleanup recovery content scr..." · Reviewed by Greptile

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: full PR diff against its merge base, at ab231fa.

1 actionable finding — resolve or provide an evidence-backed rebuttal.

The production UI change in ProfileScreen.kt wraps the recoveryPending content in a scrollable 16dp-padded Column (ProfileRecoveryContent), centers the 32dp GradientCircularProgressIndicator (ProfileRecoveryProgress) with 24dp top spacing and 16dp bottom padding, and keeps AppTopBar, ownership, busy, confirmation, and replay gates intact. Compatibility with dependency synonymdev/bitkit-android#1686 at 3c2682a was checked for ProfileContent recovery contracts and ProfileRecoveryContentTest tags/flows only (not a full review of #1686).

Existing unresolved review thread: discussion_r4711156532 (verified against pinned source: cleanupRecoveryContentKeepsStandardGutter does not bound viewport height or scroll to ProfileRecoveryDisconnect, so removing verticalScroll would not fail that test). No other prior findings apply.

iOS parity: inspected Bitkit/Views/Profile/ProfileRemovalRecoveryView.swift in synonymdev/bitkit-ios#1143 at e9354eb (scoped to the recovery view only); iOS already applies .padding(.horizontal, 16) to the stack with a native ProgressView(). Source inspection does not establish visual equivalence.

Validation: CI at ab231fa615d1b72de7ae576d7a1d498ff4930e92 passed build-and-test, lint, detekt, and compose-ui / ui-tests (277 Compose UI tests executed, 0 failed in job 139995137374); re-triggered CI/E2E runs were still in progress at review time.

Recommended before device testing

  • Fix the non-English locale lookup in ProfileRecoveryContentTest.cleanupRecoveryContentKeepsStandardGutter (F1) and address the open short-screen scroll test coverage thread discussion_r4711156532 if desired.
  • Wait for dependency synonymdev/bitkit-android#1686 to merge before retargeting and merging #2114.

Suggested additional test cases

  • Android (short viewport or landscape at 320dp width, Greek el, font scale 1.3): open seeded cleanup-pending Profile, scroll the ProfileRecoveryContent column vertically, and verify ProfileRecoveryDisconnect (and ProfileRecoveryProgress while busy) scroll fully into view inside the 16dp gutter without clipping.
  • Android (RTL locale ar): open seeded cleanup-pending Profile with adb shell cmd locale set-app-locales to.bitkit.dev --locales ar and verify Arabic copy and ProfileRecoveryDisconnect align within the 16dp start/end margins.

Device testing: not performed in this review. The author reports manual cases 1–4 passing on a Pixel 9 emulator (Android 17) at ab231fa61 with screenshots in the PR description (seeded marker only; live remote cleanup failure with Retry visible was not exercised on device).

Findings

  • [LOW] Resolve English expected string with Locale.ENGLISH context in cleanupRecoveryContentKeepsStandardGutter — inline at app/src/androidTest/java/to/bitkit/ui/screens/profile/ProfileRecoveryContentTest.kt:150.

Reviewer model: gemini-4-neon
Reasoning effort: high

@talosmachina talosmachina left a comment

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.

No findings. Wraps the Profile cleanup-pending state in a scrolling 16dp-gutter column and centres the progress indicator. Reviewed ab231fa, light tier, static: not built here, CI is the gate.

What I checked, and 3 candidates I ruled out

Read in full: the ProfileScreen.kt diff against its base fix/restore-identity-background, ProfileRecoveryContentTest.kt diff, ScreenColumn and Modifier.screen()
CI: build, build-and-test, detekt, lint green; compose-ui / ui-tests, which runs the new instrumented test, still pending at review time.

Ruled out

  • Unbounded verticalScroll: ScreenColumn is fillMaxSize() via Modifier.screen(), and the scroll column is a non-weighted child, so it gets the remaining bounded height.
  • Behaviour change in the gates: Retry and Disconnect keep the same onClick, enabled = !uiState.isSigningOut and test tags; only their container moved.
  • Progress indicator placement: it is now inside the column, under isSigningOut, with align(Alignment.CenterHorizontally), so it no longer sits at x=0 against the clip.

Merge confidence: 4/5, the instrumented test that covers it is still running in compose-ui.

Reviewer model: claude-opus-5-5
Reasoning effort: Not exposed (the reviewing run's metadata does not carry it)

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

Verdict: ✅ Approve

Findings: No new findings. The existing QA review already covers the non-blocking locale assertion and committed short-screen test coverage gaps.

QA for ab231fa:

Built the unmodified app at ab231fa. Supplemental Compose instrumentation rendered ProfileContent on Android 11 in a 320×330dp viewport at font scale 1.3, using controlled recovery state.

Greek recovery content scrolls on a short narrow screen ✅ Measured gutters, reachable controls, the full centred spinner and busy guards passed.

greek-2x.2x.mp4

Russian recovery content scrolls on a short narrow screen ✅ Measured gutters, reachable controls, the full centred spinner and busy guards passed.

russian-2x.2x.mp4

Arabic recovery content keeps both gutters while scrolling ✅ RTL text and controls keep their gutters, with the full centred spinner reachable by scrolling.

arabic-2x.2x.mp4

Bounds assertions checked the 16dp margins and progress alignment. Each case checked Retry/Disconnect callbacks, cancellation, confirmation, disabled controls and hardware Back suppression while busy. Recovery state clearance was simulated by the test.

Manual cases 1–4 were not repeated: the author's QA evidence reports them passing at this same head. Live remote-failure cleanup/replay was not driven; the additional checks exercise the changed layout and UI callbacks, with no remote mutation.

iOS counterpart: synonymdev/bitkit-ios#1143, inspected at e9354eb, already uses 16dp horizontal padding and native ProgressView. The gutter/spinner intent matches; top-bar arrangement differs. No iOS device comparison was run.

Coverage: full stacked-base diff, 3c2682a..ab231fa, including surrounding recovery guards and sibling Profile states. The preview, test source and changelog were also reviewed statically.


Reviewed by gpt-6.1-sol-high

@jvsena42
jvsena42 marked this pull request as draft November 26, 2026 19:54
jvsena42 and others added 2 commits November 26, 2026 16:56
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@ovitrif ovitrif left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

utAck

@jvsena42
jvsena42 marked this pull request as ready for review November 26, 2026 21:36
@jvsena42
jvsena42 requested a review from piotr-iohk November 26, 2026 21:36

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: changes since ab231fa, including affected code paths, at 9ccca3e. Baseline: previous review (unchanged ProfileScreen.kt and changelog.d/next/1749.fixed.md inherited).

No new actionable code findings.

ProfileRecoveryContentTest.kt now resolves expected English and Greek strings via the same forced-locale Configuration context (cleanupText), and verifies scrolling on short screens in a 320x400dp Greek container at font scale 1.5 (ProfileRecoveryDisconnect starts not displayed and becomes displayed after performScrollTo).

CI compose-ui / ui-tests executed all 277 @ComposeUi instrumented tests (including the 4 tests in ProfileRecoveryContentTest.kt) on the PR merge commit (66c14e4, merging 9ccca3e into 3c2682a) with 0 failures; build-and-test and lint also passed at 9ccca3e.

Compatibility and parity: checked ProfileUiState and recovery layout contracts against dependency synonymdev/bitkit-android#1686 at 3c2682a (only these shared contracts were checked, not a full review of #1686; #1686 remains open and must merge before retargeting to master). Compared against ProfileRemovalRecoveryView.swift in synonymdev/bitkit-ios#1143 at e9354eb, which already applies 16pt horizontal padding with a native ProgressView; visual parity was not runtime-compared in this code-only review.

Ready for device testing: No new code blockers in this follow-up; ready for device testing of manual cases 1-4 on this branch.

Device testing: Not performed in this review (code-only pass). The author reports manual cases 1-4 passing on a Pixel 9 AVD at ab231fa (production ProfileScreen.kt is unchanged between ab231fa and 9ccca3e), with the gap that a live remote cleanup failure showing Retry was not exercised on device.

Earlier findings reconciled at this revision: 2 verified fixed.

Reviewer model: gemini-4-neon
Reasoning effort: high

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

Verdict: ✅ Approve

Posted as a comment: not every planned case passed.

Findings: No new findings. Both earlier test findings are fixed at 9ccca3e.

QA for 9ccca3e:

Check: expected recovery text uses the rendered locale ✅ Source inspection confirms English and Greek expectations use the same locale as the content.

cleanupText(locale) creates a locale-specific configuration context before resolving profile__cleanup_pending. It replaces the host-locale English lookup identified in the earlier finding.

Check: the short-screen assertion requires scrolling ✅ Source inspection confirms Disconnect starts offscreen and must scroll into view.

The Greek phase keeps the 320dp width, restricts height to 400dp and raises font scale to 1.5. It asserts ProfileRecoveryDisconnect is initially not displayed, then calls performScrollTo().assertIsDisplayed(), addressing the earlier coverage finding.

No new build or device run was needed for this test-only delta. Evidence retained:

  • Current-head device report: the author reports all four ProfileRecoveryContentTest tests passing on Android 17, including both changes above.
  • Current-head QA review: confirms the changed class passed in Compose UI CI. The CI log independently confirms a successful instrumented run on merge 66c14e4, containing 9ccca3e.
  • Previous device review at ab231fa: Greek, Russian and Arabic short-screen layouts, gutters, spinner and busy/confirmation guards passed; manual cases 1–4 rely on the author's screenshots at that head. ProfileScreen.kt and all production code remain unchanged, so these cases were not repeated.

Live remote-failure cleanup/replay was not driven: this delta changes only instrumentation, and the layout's Retry state was already covered through controlled UI state. It adds no cleanup or replay behavior.

The iOS counterpart, synonymdev/bitkit-ios#1143, still applies 16pt horizontal padding and native ProgressView in ProfileRemovalRecoveryView at e9354eb. The gutter/spinner intent matches; no iOS device comparison was run.

Coverage: complete delta ab231fa..9ccca3e, the surrounding test class and reached recovery layout, plus reconciliation of both earlier findings. No production changes need a new device case. This remains stacked on #1686; its separate findings are outside this review.


Reviewed by gpt-6.1-sol-high

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Device QA passed at 9ccca3e6 on an Android 13 emulator with a disposable regtest wallet.

  • PASS · Scroll and gutter. At Greek font scale 1.5 on a short screen, Disconnect scrolled fully into view. The control retained 16 dp insets on both sides of the app viewport.
  • PASS · Busy state. The real local cleanup disabled Disconnect and showed the full, centered progress ring. The cleanup marker cleared.
  • PASS · Live remote Retry. A homeserver relay outage during logout produced the failure in the running app. The same process exposed Retry. I scrolled to it on the short Greek screen, restored the homeserver and confirmed Retry. The app returned to the wallet and cleared the cleanup marker.

The layout and spinner checks used the source-equivalent CI APK with the documented local recovery marker. The live Retry build used a test-only pause to align the outage with logout. The stack still depends on #1686.

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.

4 participants