-
Notifications
You must be signed in to change notification settings - Fork 0
feat: enhance account list and open commands with better UX #2
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
Conversation
- Fix account list to update UI independently for each account - Replace Promise.all with independent async fetches - Each account's live data updates as soon as it's available - Fast RPCs no longer blocked by slow ones - Improved perceived performance - Add optional address parameter to account open command - Support EIP-3770 format (shortName:address) for one-step opening - Support bare address with chain prompt - Support fully interactive mode (no arguments) - Better error handling for empty chains configuration - Update README with new account open usage examples 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Pull Request Overview
This PR enhances the account list and open commands with better user experience and performance. The account list now fetches live data independently for each Safe account instead of blocking on all fetches, while the account open command adds flexible address input options including EIP-3770 format support.
Key Changes:
- Account list now updates UI progressively as each Safe's data becomes available
- Account open command supports three input modes: EIP-3770 format, bare address with chain prompt, and fully interactive
- Added documentation for the new account open usage patterns
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ui/screens/AccountListScreen.tsx | Refactored to fetch Safe data independently rather than using Promise.all, enabling progressive UI updates |
| src/commands/account/open.ts | Added optional address parameter with EIP-3770 parsing and multiple input modes |
| src/cli.ts | Updated command signature to accept optional address argument |
| README.md | Added documentation examples for the three account open usage modes |
| AGENTS.md | New file with pre-commit command checklist for development workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| completedCountRef.current = 0 | ||
|
|
||
| // Fetch live data independently for each safe | ||
| deployedSafes.forEach(async (safe) => { |
Copilot
AI
Oct 25, 2025
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.
Using forEach with an async callback does not properly handle async operations. The async function is executed but forEach doesn't await it, and the array of promises is not tracked. Use for...of loop or Promise.allSettled instead to properly handle the async operations.
| completedCountRef.current++ | ||
| if (completedCountRef.current === deployedSafes.length) { | ||
| setFetchingLive(false) | ||
| if (onExit) onExit() | ||
| } |
Copilot
AI
Oct 25, 2025
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 onExit callback is called prematurely when a chain is not found for a single Safe. This should only be called after all Safes have been processed. Move this call outside the chain check and only invoke it in the finally block where completion is tracked.
| completedCountRef.current++ | |
| if (completedCountRef.current === deployedSafes.length) { | |
| setFetchingLive(false) | |
| if (onExit) onExit() | |
| } |
Summary
Changes
Account List Performance Fix
Account Open Enhancement
Added three usage modes:
safe account open sep:0x742d35Cc6634C0532925a3b844Bc454e4438f44esafe account open 0x742d35Cc6634C0532925a3b844Bc454e4438f44e(prompts for chain)safe account open(prompts for both chain and address)Better error handling for empty chains configuration.
Documentation
Test plan
🤖 Generated with Claude Code