Remove identities from the picker and close it from the toolbar - #246
Merged
Merged
Conversation
… the toolbar The test identity picker gains a round Close button at the leading edge of the toolbar, matching the existing "+", that returns to the active identity's home. Each row gains a remove action revealed on hover or keyboard focus (always visible where hover doesn't exist) so stray identities such as #59 can be pruned without resetting everything. Removing the active identity hands the active slot to the most recent remaining one, so the home screen never points at a missing identity. `Row` learns an `actions` slot rendered beside its button, since a button can't nest inside a button. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Summary
Two additions to the Test identities screen:
hover: none). Removing shows a toast. If the removed identity was the active one, the active slot moves to the most recent remaining identity, and removing the last one leaves no active identity so/reseeds the defaults on the next visit.Identities are numbered deterministically, so this is the way to prune leftovers like #46, #47, #58 and #59 from the duplicate-store period without resetting the whole simulator.
Implementation
identityStore.removeIdentity(id)filters the list and reassignsactiveIdentityIDwhen needed; exposed throughuseIdentity.Rowgets anactionsslot rendered as a sibling of its button (a button cannot nest inside a button); the divider moves to the wrapper.IDRowrenders the remove button in that slot;select-idrenders the Close button.trashicon added to the icon map.Verification
removeIdentity(inactive, active, and last identity).pnpm test: 31/31.pnpm typecheck,pnpm lint,pnpm run spellcheckclean.next dev: Close and "+" render side by side, hovering a row reveals the trash button, removing "Identity Move Infura ID to environment variable #3" drops it from the list with a toast, and Close navigates to/id/<active>.🤖 Generated with Claude Code