fix: coachmark position + recurring sync-mode default override#146
fix: coachmark position + recurring sync-mode default override#146
Conversation
Three references in website/index.html (hero, secondary CTA, footer nav link) bumped from v1.5.1 to v1.5.2 so the download link lands on the v1.5.2 hotfix release.
Smoke report: on Home, the sync card sits low enough that the tooltip below it gets clipped by the bottom-nav bar. Switch to BoxWithConstraints so we can measure viewport height; if the distance from spotlight.bottom to viewport.bottom is less than the tooltip's minimum height, render the tooltip ABOVE the spotlight instead. Otherwise keep the existing below-spotlight placement.
…stration Recurring user report: a freshly created wallet would default to RECENT sync mode and start a 30-day re-scan, even though WalletRepository.markFreshWalletSyncMode had just written NEW_WALLET to the per-wallet key on creation. Root cause: HomeViewModel computed firstTimeSyncMode based purely on the network (mainnet -> RECENT, testnet -> NEW_WALLET) and used it whenever hasCompletedInitialSync was false. registerAccount then wrote that value into the per-wallet key with savePreference = true, silently overwriting whatever markFreshWalletSyncMode had set seconds earlier. Each previous fix patched a single write site; the override at the registration layer kept the bug alive. Two-layer fix: 1. WalletPreferences gains getSyncModeOrNull() that returns null when no value has been written for the wallet/network. The existing getSyncMode() still has a sensible default but is now NEW_WALLET (was RECENT) — RECENT was the wrong choice for a fresh wallet with no past activity. Tests updated. 2. HomeViewModel checks getSyncModeOrNull first. If a per-wallet value exists (from markFreshWalletSyncMode or the post-import sheet), it wins. The network-default heuristic only kicks in for legacy upgraders whose per-wallet key was never written.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 11 minutes and 26 seconds.Comment |
Two fixes from v1.5.2 smoke + user reports. Queues for v1.6.0 (per the deferred-bumps plan).
1. Coachmark tooltip clipped at the bottom of Home
Reported by a user on Telegram: the "Got it" button on the sync coachmark gets cut off by the bottom nav bar on most phones because the sync card sits low on Home.
`SyncCoachmark` now uses `BoxWithConstraints` to measure viewport height and flips the tooltip ABOVE the spotlight when there is not enough room below. Otherwise keeps existing below-spotlight placement.
2. Recurring sync-mode default override
User report: "I set sync option to new wallet, so it's not needed to sync. That should be the default if a new wallet is created. I don't think I set it to something else before that."
This bug has been "fixed" multiple times. Each previous patch addressed a single write site. The actual root cause is at the registration layer:
So fresh wallets on mainnet always end up at `RECENT` and start a 30-day re-scan the user did not ask for.
Fix in two layers
Layer 1 — WalletPreferences
Layer 2 — HomeViewModel
Three-step resolution on first-registration:
Test plan