Feat/active wallet - #4
Merged
Merged
Conversation
Make "one active wallet" a first-class concept so the app's processing stays focused on a single account at a time (trial-decryption is CPU-bound, so concurrent group syncs only thrash). Backend: - Settings.active_group_id persists the chosen wallet. - AppState.sync_gate: an app-wide "one sync at a time" lock held for the whole of every wallet_sync, so no two groups ever sync concurrently. - get_active_wallet / set_active_wallet commands. Switching cancels the previously active group's in-flight sync (safe — sync resumes next time); a no-op when the wallet is already active. Frontend: - New Wallets switcher page (4 · Zcash → "Wallets"): lists each Pallas group with its last-known balance and an active indicator; selecting one makes it active and opens it. Switching away from a wallet with an in-progress send/ceremony prompts for confirmation before abandoning it (sync is cancelled silently). - Replaced the Groups sidebar dropdown with a plain Groups link (management stays under 2 · Groups) and a Wallets nav item that surfaces the active wallet as a one-click sub-link. - Opening a wallet asserts it as active (self-healing invariant for direct navigation / deep links; the switcher is the guarded path). Incoming signing requests stay global (Inbox/attention badges unchanged), so switching focus never drops time-sensitive signing duties for other groups. Backend builds, tsc clean, no new clippy warnings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reposition the active group's quick-nav: the "2 · Groups" section now shows Groups plus, for the active group, sub-links to its Details (key info / participants) and its Wallet — where group management naturally lives. The "Wallets" entry under 4 · Zcash is now just the switcher link. The active wallet is still chosen on the switcher; this only surfaces its Details/Wallet in the Groups section. tsc clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
USCMig
added a commit
that referenced
this pull request
Aug 16, 2026
Brings the branch up to current main (active-wallet PR #4, log-viewer PR #5) so it can open a clean PR. Two conflicts resolved: - state.rs / wallet.rs: main added a global `sync_gate` (one wallet syncs at a time) via the active-wallet model; this branch had added a per-group `sync_locks` map to fix the "database is locked" race. The global gate is strictly stronger — only one sync ever runs — so it subsumes the per-group lock. Kept `sync_gate`, dropped `sync_locks` (and its now-unused Arc import). The db-lock fix is preserved: holding the gate across the whole sync_group call means a restarting sync can't race a cancelled one's open db connection. - Kept this branch's `SyncOptions { batch_size, pipelined }` and the experimental pipelined-sync path (the point of the branch); only the locking mechanism changed. The log-viewer commit (cherry-picked to main as PR #5) merges as identical content — no duplicate get_logs/clear_logs. Backend + tsc build clean; clippy unchanged at the 7-warning baseline. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UX improvements to minimize multi-group sync issues and UI for managing wallets