Skip to content

Feat/active wallet - #4

Merged
USCMig merged 2 commits into
mainfrom
feat/active-wallet
Aug 5, 2026
Merged

Feat/active wallet#4
USCMig merged 2 commits into
mainfrom
feat/active-wallet

Conversation

@USCMig

@USCMig USCMig commented Aug 5, 2026

Copy link
Copy Markdown
Owner

UX improvements to minimize multi-group sync issues and UI for managing wallets

USCMig and others added 2 commits August 5, 2026 12:37
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
USCMig merged commit f3452bb into main Aug 5, 2026
1 check passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant