Skip to content

fix: add setting to disable all toasts - #829

Open
ovitrif wants to merge 1 commit into
masterfrom
fix/disable-all-toasts
Open

ovitrif wants to merge 1 commit into
masterfrom
fix/disable-all-toasts

Conversation

@ovitrif

@ovitrif ovitrif commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #828
Twin: synonymdev/bitkit-android#1371

This PR adds a Dev Settings toggle that hides all toasts, for testing and demo recordings.

Description

  • Adds a "Disable All Toasts" toggle to Dev Settings so testers can record demos and run manual tests without toasts covering the screen.
  • Hides every toast, including error toasts and their haptics, only while dev mode and the toggle are both on, so turning dev mode off brings toasts back without touching the toggle.

Out of Scope

  • Settings: no toggle outside Dev Settings; release builds reach it by enabling dev mode from Support.
  • Dev Settings: turning the toggle on does not dismiss a toast already on screen; it applies to toasts shown after it is on.

Design

N/A — no design available.

Preview

QA Notes

Journeys

  • temporary disable-all-toasts.xml — toasts stay hidden while dev mode and the toggle are on, and return once dev mode is off

    disable-all-toasts.xml
    <journey name="disable all toasts">
      <description>Precondition: onboarded dev build with dev mode on (the default for debug builds) and "Disable All Toasts" off. Proves the Dev Settings toggle hides every toast while dev mode is on, and that turning dev mode off brings toasts back.</description>
      <actions>
        <action>Open Settings, then the Advanced tab, then Dev Settings (id "DevSettings")</action>
        <action>Turn on "Disable All Toasts" (id "DisableAllToastsToggle")</action>
        <action>Go back to the Advanced tab and open the Rapid-Gossip-Sync server settings (id "RGSServer"), type another URL into the server URL field (id "RGSUrl"), and tap "Reset To Default" (id "ResetToDefault")</action>
        <action>Verify the connected URL (id "ConnectedUrl") shows the default server again, so the reset ran</action>
        <action>Verify the RGS toast (id "RgsUpdatedToast") is not visible</action>
        <action>Open Settings, then Support, and tap the app version 5 times to turn dev mode off</action>
        <action>Verify the dev mode toast (id "DevModeDisabledToast") is visible</action>
        <action>Tap the app version 5 times again to turn dev mode on</action>
        <action>Verify the dev mode toast (id "DevModeEnabledToast") is not visible</action>
        <action>Open Settings, then the Advanced tab, then Dev Settings (id "DevSettings"), and turn off "Disable All Toasts" (id "DisableAllToastsToggle")</action>
      </actions>
    </journey>

Manual Tests

N/A

Automated Checks

  • added ToastSuppressionTests.swift — toasts are hidden only while dev mode and the toggle are both on

@ovitrif ovitrif self-assigned this Sep 29, 2026
@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Low risk] Adds a developer-only toggle to suppress toast notifications.

The PR is not safe to merge until enabling the toggle also clears an existing toast.

Findings

  1. P1 Existing toast stays visible ▶
  2. P2 Toast check can pass incorrectly ▶

Summary

The PR adds a Dev Settings preference that suppresses toast presentation and toast-associated haptics while dev mode is enabled, plus a predicate test and a settings journey.

  • Suppression does not clear a toast already on screen.
  • The journey’s absence check can pass without exercising successful toast suppression.

Reviews (1) · Last reviewed commit: "fix: add setting to disable all toasts"

Comment thread Bitkit/Views/Settings/DevSettingsView.swift
Comment thread journeys/settings/disable-all-toasts.xml Outdated

@jvsena42 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No findings. The visible-toast-on-enable case is accepted as out of scope in the description.

Checked and clean:

  • The toggle only appears in Dev Settings, via @AppStorage, off by default. areToastsDisabled falls back to Env.isDebug like the other showDevSettings readers.
  • The guard at the top of AppViewModel.toast(type:…) is the only path to ToastWindowManager.showToast, and haptics are suppressed too.
  • SupportScreen flips showDevSettings before toasting, so there is no flash on dev-mode changes.
  • AppReset clears the key.
  • ToastSuppressionTests covers the three predicate states.

Parity with synonymdev/bitkit-android#1371: same semantics and tag.

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.

fix: add setting to disable all toasts

2 participants