-
Notifications
You must be signed in to change notification settings - Fork 4
fix: improve home pull-to-refresh #532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Improved Home pull-to-refresh feedback and added on-demand exchange-rate updates. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <journey name="pull to refresh rates"> | ||
| <description> | ||
| Pulling to refresh on Home also refreshes exchange rates, independently of the wallet and | ||
| activity refresh. Precondition: onboarded dev wallet on Home (id "HomeScrollView" visible) and | ||
| network access to the rates backend. Rates also refresh on app start and every two minutes of | ||
| polling (`Env.fxRateRefreshInterval`), so pull at least 20s after the last "Currency rates | ||
| refreshed successfully" line and well before the next polling tick, or the log check passes for | ||
| the wrong reason. The success line and any error toast are not in `snapshot-ui`; read the app log | ||
| and take a screenshot. Unlike Android, this journey does not assert a separate widget refresh; | ||
| issue #344 only adds an exchange-rate refresh to the iOS Home pull. | ||
| </description> | ||
| <actions> | ||
| <action>Resolve the app group logs for the simulator under test: UDID=<the simulator this journey is running on>; GROUP=$(xcrun simctl get_app_container "$UDID" to.bitkit groups | awk '{print $2}'); ls -t "$GROUP/logs"</action> | ||
| <action>Resolve the app group again, run `grep "Currency rates refreshed" "$GROUP"/logs/*.log`, and note the time of the last line</action> | ||
| <action>Verify the home screen (id "HomeScrollView") is visible</action> | ||
| <action>Run `xcodebuildmcp simulator snapshot-ui`, note the elementRef for "HomeScrollView", then run `xcodebuildmcp ui-automation swipe --within-element-ref <ref> --direction down --distance 0.7` and note the UTC time</action> | ||
| <action>Verify the newest log (list the logs again) gains a "Currency rates refreshed successfully" line within 10s of the pull</action> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The journey never checks the spinner, which is what #519 is about. The description says to take a screenshot, but no action does. The indicator is |
||
| <action>Verify no "Currency rates refresh failed" line was added for the pull</action> | ||
| </actions> | ||
| </journey> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spinner can stay up for about 3 minutes, and pulls are ignored the whole time.
If the rates host is reachable at the network level but never answers (captive portal, blackholed route, slow backend),
CurrencyService.fetchLatestRatesmakes 3 attempts with the default 60sURLSessiontimeout plus 1s/2s backoff, about 183s in total. The spinner and the 60pt padding stay for that whole time. Every pull hits thebeginRefreshing()guard and does nothing. Rate failures are never toasted, so the spinner then disappears without any feedback. Before this change, a pull with a running node ended as soon as the wallet/activity sync finished.Keeping the spinner for rates-only pulls was the fix for the earlier feedback thread, so I'm not asking to undo it. Capping this await (for example, race
currencyRefreshagainst a ~10s sleep and let the fetch keep running in the background) keeps that feedback without the long lock-out.