Skip to content

feat: Add multi-account mailbox switcher with safety checks#1272

Open
Risktaker001 wants to merge 2 commits into
Stellar-Mail:mainfrom
Risktaker001:feature/account-switcher
Open

feat: Add multi-account mailbox switcher with safety checks#1272
Risktaker001 wants to merge 2 commits into
Stellar-Mail:mainfrom
Risktaker001:feature/account-switcher

Conversation

@Risktaker001

@Risktaker001 Risktaker001 commented Jun 25, 2026

Copy link
Copy Markdown

Closes #105
Description**

This PR implements a polished account switcher menu designed for power users who manage multiple Stealth addresses, test accounts, or organization mailboxes. It allows seamless transitions between local mailbox profiles while ensuring full safety checks are in place to prevent data loss or accidental session overrides during sensitive actions.


Changes

UI & Component Layer

  • Responsive Switcher Menu: Added a highly polished dropdown/modal switcher integrated into both desktop sidebars and mobile navigation drawers. It displays the active address, network type, and real-time syncing states.
  • Profile Management: Built explicit sub-interfaces within the switcher to let users add new profiles, rename existing ones, pin frequently accessed mailboxes to the top, or delete local profile keys.

Context & State Management

  • Local Profiles Persistence: Implemented local state storage to manage active addresses and names locally (as per implementation notes, local storage will act as the baseline until cloud/auth persistence is integrated).
  • Identity & Policy Cascading: Switching profiles cleanly broadcasts changes to the global application context, immediately updating the visible mailbox identity, incoming message filters, and network-specific policy engines.

Guardrails & Interceptors

  • Unsafe Switch Guard: Hooked into the active compose and transaction signing states. If a user tries to switch accounts with an unsent draft open or a pending transaction approval active, a confirmation modal forces an explicit opt-in to prevent state loss.

Acceptance Criteria Verification

  • Context Syncing: Switching a profile dynamically updates all downstream context components, addresses, and network parameters.
  • Unsafe Switch Blockers: Users receive clear warning modals before losing unsent drafts or leaving pending transaction sign-offs.
  • Responsive Layout: Adaptive styling functions seamlessly on both responsive desktop sidebars and mobile tap targets.
  • Local Storage Compliance: Account profiles, local custom names, and pinned order rules are cleanly persisted on-device via local storage drivers.

Testing Checklist

Switching & Management Verification

  • Create 3 separate stealth addresses locally, rename them, and verify they list correctly in the menu.
  • Toggle a "pinned" state on the third account and verify it shifts to the top of the selection list.
  • Verify that switching accounts immediately clears the previous account's visible message inbox and populates the newly selected identity's records.

Safety & UX Boundary Conditions

  • Open a draft, type text, and attempt to switch profiles (Should prompt with an "Unsaved Changes" warning dialog).
  • Trigger a transaction approval modal, then try to switch accounts (Should block with a "Pending Approval" warning).
  • Verify mobile layout scaling ensures address hashes do not overflow or clip on narrow device viewports.

Developer added 2 commits June 22, 2026 02:40
…stic rollback

- New action-motions.ts with 13+ motion presets for archive, star, snooze, approve, block, refund, and copy-proof actions
- ActionIcon component providing haptic-like animated icon state changes with reduced-motion support
- useOptimisticAction hook for optimistic updates with visible rollback on failure
- Integrated animated icons into EmailView reader toolbar (snooze, archive, trash, star)
- Row collapse/slide-out animations for EmailList removal events
- Comprehensive ACTION_MOTIONS.md documentation with tokens, examples, and a11y notes
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.

app-ui: implement account and mailbox switcher

1 participant