Skip to content

fix(ios): gateway error shows twice on the Settings Gateway page#98856

Merged
steipete merged 4 commits into
openclaw:mainfrom
Lokimorty:fix-gateway-toast-duplication
Jul 2, 2026
Merged

fix(ios): gateway error shows twice on the Settings Gateway page#98856
steipete merged 4 commits into
openclaw:mainfrom
Lokimorty:fix-gateway-toast-duplication

Conversation

@Lokimorty

@Lokimorty Lokimorty commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users opening Settings > Gateway on iOS would see the same gateway connection error twice: once as the app-wide toast at the top of the screen and again as a duplicate banner section embedded at the top of the Gateway details page. The toast also appeared and disappeared without animation, and once swiped away it could stay hidden forever when the same error kept recurring.

Why This Change Was Made

Gateway problems now surface through a single owner — the root toast in RootTabs — so the embedded settings-page banner, its details sheet, and the settings-side action helpers were deleted rather than kept as a second path. The toast springs in smoothly from the top (respecting Reduce Motion) and supports swipe-up to dismiss. Dismissal only lasts until the next problem report: NodeAppModel counts every report (including re-reports of a value-equal problem, which SwiftUI observation alone cannot see), so a report while hidden re-shows the toast, and a report while it is already visible shakes it instead of stacking a duplicate. The toast also keeps the reset-onboarding primary action the settings banner used to own — auth-token-mismatch problems show "Reset onboarding" and run the full GatewayOnboardingReset flow. The onboarding wizard and quick-setup sheet keep their embedded banners intentionally, since they are presented as covers where the root toast is not visible.

User Impact

Gateway errors appear exactly once, as an animated toast that users can swipe up to hide; it reliably returns on the next failure and shakes when the same error fires while it is on screen. Retry, Details, and Reset onboarding actions all remain available from the toast. The settings layer shrank by 76 lines; the net prod growth (+21 lines) is the new report-signal, shake, and swipe-dismiss behavior.

Evidence

  • Verified by running the app on the iOS 26.5 simulator against a dead-port gateway (connection refused): toast animates in, swipe-up dismisses, re-triggering the error re-shows it, and a re-report while visible shakes it. Screen recording attached below.
  • GatewayProblemPrimaryActionTests ran on the iOS 26.5 simulator: 3/3 passed, including a new test pinning the "Reset onboarding" title for reset-suggesting problems.
  • pnpm native:i18n:sync regenerated apps/.i18n/native-source.json; pnpm native:i18n:check is green (this was the failing native-i18n CI job).
  • swiftformat --lint clean on all touched files; RootTabsSourceGuardTests assertions verified against the updated sources, including guards that the settings page no longer embeds GatewayProblemBanner, that the root toast owns swipe dismissal and the reset action, and that every problem report re-surfaces or shakes the toast.
  • Adversarial review pass on the diff confirmed and fixed two gesture edge cases: a drag cancelled by toast removal no longer leaves a stale offset (onDisappear reset), and swipe-dismiss state is a plain flag rather than a captured problem value.
gateway-toast-demo.mp4

@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 7:17 AM ET / 11:17 UTC.

Summary
The PR removes the Settings > Gateway embedded gateway-problem banner, moves recovery actions to the RootTabs toast, adds repeat-report swipe/shake toast state, refreshes native i18n inventory, and updates iOS source-guard/action coverage.

PR surface: Other +66. Total +66 across 9 files.

Reproducibility: yes. from source inspection, though I did not run the simulator: current main renders the same appModel.lastGatewayProblem in RootTabs and again at the top of Settings > Gateway.

Review metrics: none identified.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Let the remaining required CI jobs finish green before merge.

Mantis proof suggestion
A short current-head iOS visual pass would be useful because the changed behavior is an animated, swipeable toast and Settings page duplicate removal. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: verify on iOS simulator that Settings > Gateway shows only the root gateway error toast, swipe-up hides it, and a repeated dead-port failure re-shows or shakes it.

Risk before merge

  • [P1] Several broad CI jobs were still in progress at review time; maintainers should wait for the current head's required checks to finish green before merge.

Maintainer options:

  1. Decide the mitigation before merge
    Land the current resolved branch after required checks finish, keeping RootTabs as the single steady-state gateway problem surface while preserving onboarding and quick-setup local banners.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • No ClawSweeper repair lane is needed because this review found no narrow code defect to fix; the remaining action is normal maintainer merge review and completed CI.

Security
Cleared: The diff is limited to iOS Swift UI/model/test files plus generated native i18n inventory and does not introduce a concrete security or supply-chain concern.

Review details

Best possible solution:

Land the current resolved branch after required checks finish, keeping RootTabs as the single steady-state gateway problem surface while preserving onboarding and quick-setup local banners.

Do we have a high-confidence way to reproduce the issue?

Yes from source inspection, though I did not run the simulator: current main renders the same appModel.lastGatewayProblem in RootTabs and again at the top of Settings > Gateway.

Is this the best way to solve the issue?

Yes. Centralizing steady-state gateway problem UI in RootTabs deletes the duplicate settings path while keeping details, retry, trust, reset-onboarding actions, and local cover banners available.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 574604e3dae6.

Label changes

Label justifications:

  • P2: This is a normal-priority iOS Settings/Gateway UX bug fix with limited blast radius and no blocking code finding from this review.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): The PR body includes after-fix iOS simulator proof, and the linked attachment is a valid 14.767-second MP4 recording for the visible gateway-toast behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix iOS simulator proof, and the linked attachment is a valid 14.767-second MP4 recording for the visible gateway-toast behavior.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR body includes after-fix iOS simulator proof, and the linked attachment is a valid 14.767-second MP4 recording for the visible gateway-toast behavior.
Evidence reviewed

PR surface:

Other +66. Total +66 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 9 336 270 +66
Total 9 336 270 +66

What I checked:

Likely related people:

  • steipete: Authored the merged Settings/navigation refactor at feat(ios): modernize navigation and settings #98811 and added the final recovery-state commit on this PR branch; the live PR is also assigned to this account. (role: recent area contributor and assigned follow-up owner; confidence: high; commits: 313560d5b98e, 4cfafa38833e; files: apps/ios/Sources/Design/SettingsProTabActions.swift, apps/ios/Sources/Design/SettingsProTabSections.swift, apps/ios/Sources/RootTabs.swift)
  • ngutman: Authored the merged structured iOS gateway connection problem UX in feat(ios): improve gateway connection error ux #62650, including the shared problem model and banner surface this PR narrows to one steady-state owner. (role: gateway problem UX introducer; confidence: medium; commits: 6380c872bcc2; files: apps/ios/Sources/Gateway/GatewayProblemView.swift, apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayConnectionProblem.swift, apps/ios/Sources/Model/NodeAppModel.swift)
  • Lokimorty: Beyond proposing this branch, authored the merged adjacent iOS Settings navigation fix at fix(ios): back from settings details returns to the originating screen #98898 touching RootTabs and RootTabsSourceGuardTests. (role: recent adjacent iOS contributor; confidence: medium; commits: 9d3e2633658c; files: apps/ios/Sources/RootTabs.swift, apps/ios/Tests/RootTabsSourceGuardTests.swift)
  • joshavant: Current checkout blame for the duplicated RootTabs and SettingsProTabSections gateway-problem surfaces points to the merged docs: update mobile app release messaging #98843 commit, though the commit title suggests this is a weaker routing signal than the focused iOS gateway UX history. (role: recent current-line contributor; confidence: low; commits: 0cdce792213a; files: apps/ios/Sources/RootTabs.swift, apps/ios/Sources/Design/SettingsProTabSections.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 2, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 2, 2026
@steipete steipete self-assigned this Jul 2, 2026
@steipete
steipete requested a review from a team as a code owner July 2, 2026 10:41
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: telegram Channel integration: telegram app: android App: android app: web-ui App: web-ui gateway Gateway runtime labels Jul 2, 2026
@steipete
steipete force-pushed the fix-gateway-toast-duplication branch from e45bc0c to 6b25164 Compare July 2, 2026 11:06
@openclaw-barnacle openclaw-barnacle Bot added size: L and removed docs Improvements or additions to documentation channel: discord Channel integration: discord channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: telegram Channel integration: telegram app: android App: android app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling channel: feishu Channel integration: feishu extensions: anthropic-vertex size: XL labels Jul 2, 2026
Lokimorty and others added 4 commits July 2, 2026 12:10
Gateway connection errors on the Settings > Gateway page appeared twice:
as the app-wide toast and again as an embedded banner section. Remove the
embedded banner (and its now-dead sheet/action helpers) so problems surface
only via the root toast, animate the toast in smoothly from the top, and
support swipe-up to dismiss with re-arm on new problems.
A swiped-away toast stayed hidden when a retry failed with an identical
problem, because value equality alone produces no observable change. The
model now counts every problem report; a report while hidden re-shows the
toast, and a report while visible shakes it instead of stacking a new one.
…i18n inventory

The root toast is now the only gateway problem surface outside covers, so it
must keep the reset-onboarding primary action the removed settings banner had:
auth-token-mismatch problems now show Reset onboarding and run the full
GatewayOnboardingReset flow. Also refreshes the native i18n inventory for the
changed Swift strings.
@steipete
steipete force-pushed the fix-gateway-toast-duplication branch from 6b25164 to 4cfafa3 Compare July 2, 2026 11:11
@steipete
steipete merged commit 4f933cc into openclaw:main Jul 2, 2026
72 checks passed
@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

LeonidasLux pushed a commit to LeonidasLux/openclaw that referenced this pull request Jul 3, 2026
…nclaw#98856)

* fix(ios): show gateway errors once as a swipeable animated toast

Gateway connection errors on the Settings > Gateway page appeared twice:
as the app-wide toast and again as an embedded banner section. Remove the
embedded banner (and its now-dead sheet/action helpers) so problems surface
only via the root toast, animate the toast in smoothly from the top, and
support swipe-up to dismiss with re-arm on new problems.

* fix(ios): re-surface gateway toast on repeated problem reports

A swiped-away toast stayed hidden when a retry failed with an identical
problem, because value equality alone produces no observable change. The
model now counts every problem report; a report while hidden re-shows the
toast, and a report while visible shakes it instead of stacking a new one.

* fix(ios): keep reset-onboarding action on the gateway toast and sync i18n inventory

The root toast is now the only gateway problem surface outside covers, so it
must keep the reset-onboarding primary action the removed settings banner had:
auth-token-mismatch problems now show Reset onboarding and run the full
GatewayOnboardingReset flow. Also refreshes the native i18n inventory for the
changed Swift strings.

* fix(ios): preserve gateway problem recovery state

---------

Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 3, 2026
…nclaw#98856)

* fix(ios): show gateway errors once as a swipeable animated toast

Gateway connection errors on the Settings > Gateway page appeared twice:
as the app-wide toast and again as an embedded banner section. Remove the
embedded banner (and its now-dead sheet/action helpers) so problems surface
only via the root toast, animate the toast in smoothly from the top, and
support swipe-up to dismiss with re-arm on new problems.

* fix(ios): re-surface gateway toast on repeated problem reports

A swiped-away toast stayed hidden when a retry failed with an identical
problem, because value equality alone produces no observable change. The
model now counts every problem report; a report while hidden re-shows the
toast, and a report while visible shakes it instead of stacking a new one.

* fix(ios): keep reset-onboarding action on the gateway toast and sync i18n inventory

The root toast is now the only gateway problem surface outside covers, so it
must keep the reset-onboarding primary action the removed settings banner had:
auth-token-mismatch problems now show Reset onboarding and run the full
GatewayOnboardingReset flow. Also refreshes the native i18n inventory for the
changed Swift strings.

* fix(ios): preserve gateway problem recovery state

---------

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants