Skip to content

fix: show toasts above sheet - #1273

Merged
jvsena42 merged 10 commits into
masterfrom
codex/boost-toast-overlay
Sep 17, 2026
Merged

jvsena42 merged 10 commits into
masterfrom
codex/boost-toast-overlay

Conversation

@pwltr

@pwltr pwltr commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1267

Description

This PR keeps every toast above an open sheet.

Android previously used two sheet implementations: app-level sheets used SheetHost with BottomSheetScaffold, while standalone sheets such as Boost used ModalBottomSheet in a separate window. That window boundary placed the root toast behind the modal scrim and prevented its backdrop blur from sampling the sheet.

Standalone sheets now register with a root overlay host and render through the same shared SheetHost implementation as Send and Receive. The app keeps one Haze-backed root toast overlay above every sheet, so duplicate and dimmed toasts are removed while the existing close, blur, drag, scrim, back-dismiss, and keyboard behavior remains available. Shared IME padding keeps form fields and actions above the keyboard, and a scrim tap during the opening animation now fully clears the pending sheet.

Toast gestures are now vertical only: an upward swipe follows the finger and dismisses after the existing threshold, a downward drag has resisted rubber-band movement and springs back, and horizontal swipes do not move or dismiss the toast.

Design

N/A — no design available.

Preview

Home & Receive Sheet:

demo.mp4

Boost Sheet:

demo.mp4

QA Notes

Manual Tests

  • 1. Activity Detail → Boost Transaction → increase the fee past the maximum: one Fee Invalid toast appears at the screen top above the sheet.
  • 2. Activity Detail → Boost Transaction → decrease the fee past the minimum: one Fee Invalid toast appears at the screen top above the sheet.
  • 3. Trigger a toast → swipe upward past the threshold: the toast dismisses and the open sheet remains interactive.
  • 4. Trigger a toast → drag downward: the toast follows with resistance and springs back without dismissing.
  • 5. Trigger a toast → swipe horizontally: the toast does not move or dismiss.
  • 6. Settings → Advanced → Watch-only accounts → account details → Copy XPUB: one blurred Copied toast appears above the sheet.
  • 7. regression: Home → Send and Home → Receive: both sheets retain their existing drag, scrim, and back-dismiss behavior.
  • 8. regression: Open Add Tag or Add Contact → focus the text field: the underlying screen remains visible beneath the scrim, and the field and actions remain above the keyboard.
  • 9. regression: From the PIN screen, open Forgot PIN: the sheet appears above the PIN screen and dismisses normally.
  • 10. regression: Home → tap Send and immediately tap the scrim: the opening sheet dismisses and Send can be opened again.

Automated Checks

  • SheetHostTest.kt: covers a scrim dismissal during the sheet opening animation and existing dismissal behavior.
  • BottomSheetOverlayHostTest.kt: covers overlay registration/removal, toast interaction above a sheet, ignored horizontal and downward swipes, and upward dismissal.
  • compileDevDebugAndroidTestKotlin and just lint passed. Detekt reported existing baseline findings only.
  • just test ran 2,542 tests with one unrelated transient TrezorBridgeTransportTest failure; that complete test file passed on immediate rerun.
  • The focused instrumented test could not start locally because ADB could not read the emulator API level. Android test sources compile; the UI Tests workflow runs after merge or by manual dispatch.

@pwltr pwltr changed the title fix: show boost toast above sheet fix: show toasts above sheet Sep 16, 2026
@pwltr pwltr mentioned this pull request Sep 16, 2026
5 tasks done
@pwltr
pwltr marked this pull request as ready for review September 16, 2026 16:06
@pwltr

pwltr commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Waiting for CI checks

@greptile-apps

greptile-apps Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

This PR is not safe to merge until the transaction sheet retains the dependencies needed to render its amount header.

Findings

  1. P1 Transaction amount disappears ▶

Summary

This PR consolidates standalone and app-level sheets under a shared root overlay so the global toast layer renders above sheet scrims and can blur the combined content.

  • Adds a shared BottomSheetOverlayState and composition local.
  • Reimplements standalone BottomSheet rendering through SheetHost.
  • Generalizes SheetHost configuration and dismissal observation.
  • Moves the transaction sheet below the root toast in composition order.
  • Introduces a regression where transaction sheets no longer receive the dependencies required to render their amount header.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  MA[MainActivity] --> CV[ContentView]
  MA --> NTS[NewTransactionSheet registration]
  CV --> SH[App-level SheetHost]
  CV --> OH[BottomSheetOverlayHost]
  NTS --> OS[BottomSheetOverlayState]
  OS --> OH
  OH --> SSH[Standalone SheetHost]
  MA --> TO[Root ToastOverlay]
  SH --> TO
  SSH --> TO
Loading

Reviews (1) · Last reviewed commit: "fix: preserve content behind overlay she..."

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Regtest APK

Built from c713022 (run).

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

@pwltr
pwltr requested review from jvsena42 and ovitrif September 17, 2026 11:19
@pwltr
pwltr added this pull request to stack #1302 September 17, 2026 11:24
ovi-reviewer[bot]

This comment was marked as resolved.

@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


Reaudit: diff 6 files.

Findings:
N/A

Audit:
Skipped - no security surface in the diff (score 0, threshold 3).

Coverage:
QA: Manual Tests await all reviewers to approve, author can run it now via comment: @ovi-reviewer test


Reviewed by grok-4.6-xhigh via gh-pr-review-loop skill
Commands: @ovi-reviewer test · retest · audit (author or owner)

@pwltr
pwltr requested a review from jvsena42 September 17, 2026 12:51

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

Clean fixes 👏🏻

@ovitrif

ovitrif commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Tested and verified manually.

@piotr-iohk

Copy link
Copy Markdown
Collaborator

QA reviewed on c713022.

Ran on Pixel_6 emulator-5554 (built locally via build-android-apk.sh, onchain fixture): Send/Receive scrim, Send opening-scrim, Add Tag keyboard, Boost Fee Invalid toast above the sheet. iOS skipped: no twin. Upward swipe on that toast dismissed Boost while the tx was still Confirming.

Twin: no twin found.

Findings

MEDIUM

  • [device] An upward swipe over the Fee Invalid toast dismissed the Boost overlay sheet while the send was still Confirming (Boost still available). BottomSheetOverlayHostTest.toastAboveRegisteredSheetDismissesOnlyUpward swipes the toast node only and still sees the sheet; a finger/adb swipe in that band also hits the full-screen overlay SheetHost scrim. Author QA item 3 is “toast dismisses and the open sheet remains interactive.”

Fee Invalid toast above Boost, plus at max

After upward swipe: Boost sheet gone, still Confirming

Scale

HIGH must be fixed before merge · MEDIUM good to fix here or in a follow-up · LOW non-blocking, nit
[coverage] untested path or stale test · [ids] missing/mismatched test identifier · [security] funds, auth, secrets · [twin] iOS/Android drift · [bug] defect found by reading · [device] seen on emulator/simulator

@jvsena42
jvsena42 merged commit ac6a315 into master Sep 17, 2026
28 of 30 checks passed
@jvsena42
jvsena42 deleted the codex/boost-toast-overlay branch September 17, 2026 22:15
@pwltr

pwltr commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Findings

MEDIUM

  • [device] An upward swipe over the Fee Invalid toast dismissed the Boost overlay sheet while the send was still Confirming (Boost still available). BottomSheetOverlayHostTest.toastAboveRegisteredSheetDismissesOnlyUpward swipes the toast node only and still sees the sheet; a finger/adb swipe in that band also hits the full-screen overlay SheetHost scrim. Author QA item 3 is “toast dismisses and the open sheet remains interactive.”

@piotr-iohk I'm not able to reproduce a single swipe dismissing both layers. When the gesture starts on the toast, only the toast dismisses and the Boost sheet remains. When it starts outside the toast, it reaches the scrim and dismisses the sheet instead. Could you share the swipe start/end coordinates or a recording in a follow-up issue so I can reproduce the exact gesture?

@piotr-iohk

Copy link
Copy Markdown
Collaborator

@piotr-iohk I'm not able to reproduce a single swipe dismissing both layers. When the gesture starts on the toast, only the toast dismisses and the Boost sheet remains. When it starts outside the toast, it reaches the scrim and dismisses the sheet instead. Could you share the swipe start/end coordinates or a recording in a follow-up issue so I can reproduce the exact gesture?

Sorry, I re-checked and that was false positive.

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.

[Bug]: Boost sheet toast duplication

4 participants