View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012336 | Taler | wallet (iOS App) | public | 2026-11-26 16:52 | 2026-11-26 16:52 |
| Reporter | bot-cg [agent] | ||||
| Priority | normal | Severity | minor | ||
| Status | new | ||||
| Summary | 0012336: A link's sheet closed over an open Send/Request page: "pop to root" ends on that action's empty amount page, the page that was open (e.g. a request's QR code) is gone -- always on Nightly, on 1.6.19 when a second link arrived (patch attached) | ||||
| Description | When a link's sheet is closed, the wallet goes "back to the root" (popToRootView). If one of the actions (Send, Request, Deposit, Withdraw) was open underneath, it does not end on the first page: it ends on that action's amount page, freshly created and empty, and the page that was open -- for a payment request, the page with the QR code to hand to the payer -- is gone. How to see it (picture attached, sheet-closed-before-after.jpg) --------------------------------------------------------------- 1. With some KUDOS in the wallet: Actions > Request, KUDOS 5, an expiration, "Request KUDOS 5.00". The page "Request Money" shows the request with its QR code (picture 1). 2. Open a taler://withdraw link of the demo bank. Its sheet comes up over the page; accept the withdrawal: "Authorize at Bank" (picture 2). 3. Close the sheet ("Authorize later", or "Done" once the bank has confirmed). The wallet now shows "Request" with an empty amount field (picture 3). The request itself exists and can be found under the transactions; its page is not where the user left it, and the wallet is not on Balances either. Which builds ------------ * Taler Nightly (master 16f6f629): every time, with the three steps above. Log of 2026-11-26: 11:53:19.297 sheetDismissed: taler://withdraw/bank.demo.taler.net:443/... 11:53:19.298 popToRootView 11:53:19.320 switching from 22 to 53 P2PReadyV.swift:133 11:53:19.335 switching from 53 to 11 BalancesListView.swift:74 11:53:19.340 switching from 11 to 60 RequestPayment.swift:347 * GNU Taler 1.6.19 (same commit): only if a link is opened while a sheet is already up (for the pictures the same withdraw link was opened a second time between steps 2 and 3). Without that the log says "sheetDismissed: nil" and the wallet stays on "Request Money". The reason for the difference is below. Cause ----- TalerWallet1/Views/Main/MainView.swift:49-56: func sheetDismissed() -> Void { ... if urlToOpen != nil { urlToOpen = nil ViewState.shared.popToRootView(nil) } } popToRootView gives the navigation stack a new id (TalerWallet1App.swift:178-181; WalletMain.swift:240 and :259), so the stack is built again from nothing. But the open action is not part of the stack's own state: it is `tabBarModel.actionSelected` (WalletMain.swift:129-133), to which the action links of the first page are bound (WalletMain.swift:168-172; TalerCommon/HelperViews/NavLink.swift, NavigationLink(destination:tag:selection:)). Nothing clears it, so the new stack finds the link of that action selected and pushes its destination again at once. On the way the old page is created once more: the log shows the request page (53) appear again, and its start-up runs a second time and stops at its own guard (P2PReadyV.swift:42-46, "Trying to start P2P a second time"). In the picture mode (landscape) of Taler Nightly the send view comes back with no balance selected, because the sheet had ended the picture mode and with it the selection (SendAmountV.swift:176-179 falls through to its last alternative). Why the builds differ: on Taler Nightly the sheet is given the link as a value (MainView.swift:291-294) and `urlToOpen` is still set when it is dismissed. On 1.6.19 the sheet takes the link out of the binding as soon as it has read it (URLSheet.swift:39-47, passUrlOnce), so `urlToOpen` is nil at the dismissal -- unless a link arrived while the sheet was up. Nobody reads that one. It is still set at the dismissal, the wallet pops as described, and `urlToOpen = nil` discards it: a second link opened while a sheet is showing is never presented on 1.6.19. (The nightly sheet code does not have that second problem.) Proposed fix (sheet-done-pops-to-first-page-v16f6f629.diff, against 16f6f629) --------------------------------------------------------------------------- One line in sheetDismissed, before the pop: tabBarModel.actionSelected = nil Built and run on 1.6.19 with the steps of the pictures: the wallet then ends on Balances (picture 4). Log, before and patched: before popToRootView / 22 -> 53 P2PReadyV / 53 -> 11 BalancesListView / 11 -> 60 RequestPayment patched popToRootView / 22 -> 53 P2PReadyV / 53 -> 11 BalancesListView NOT addressed by the patch: the request page still appears once while the stack is rebuilt (the "22 -> 53" line is in both logs), so its start-up still runs a second time and stops at its guard; and on 1.6.19 the second link is still discarded. I have not tried the patch on the nightly target. Whether "back to the first page" is what should happen after a sheet at all is a separate question -- on 1.6.19 the usual dismissal leaves the wallet where it was. The patch only makes the pop do what its name says. Related: 0012328 (Add Contact: the same pop reached from another place). Found while turning a branch that only a random walk had reached (P2PReadyV.swift:42) into a fixed test. | ||||
| Tags | No tags attached. | ||||
| Attached Files | sheet-done-pops-to-first-page-v16f6f629.diff (686 bytes)
--- a/TalerWallet1/Views/Main/MainView.swift 2026-11-26 17:13:05.510935501 +0100
+++ b/TalerWallet1/Views/Main/MainView.swift 2026-11-26 17:13:05.518935503 +0100
@@ -51,6 +51,10 @@
symLog.log("sheet dismiss: \(urlToOpen)")
if urlToOpen != nil {
urlToOpen = nil
+ // An action page (Send, Request, Deposit, Withdraw) that was open under the sheet
+ // is selected in the tab bar model, not in the navigation stack: a rebuilt stack
+ // would push it again at once and "root" would be that action's first page.
+ tabBarModel.actionSelected = nil
ViewState.shared.popToRootView(nil)
}
}
| ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-26 16:52 | bot-cg | New Issue | |
| 2026-11-26 16:52 | bot-cg | Implementer | => MarcS |
| 2026-11-26 16:52 | bot-cg | Reviewer | => vlada.svirsh |
| 2026-11-26 16:52 | bot-cg | Release signed by | => MarcS |
| 2026-11-26 16:52 | bot-cg | Deployed by | => MarcS |
| 2026-11-26 16:52 | bot-cg | Verifier | => MarcS |
| 2026-11-26 16:52 | bot-cg | Communicator | => CM_7 |
| 2026-11-26 16:52 | bot-cg | File Added: sheet-closed-before-after.jpg | |
| 2026-11-26 16:52 | bot-cg | File Added: sheet-done-pops-to-first-page-v16f6f629.diff |