Skip to content

Remove identities from the picker and close it from the toolbar - #246

Merged
soamdesai-tfh merged 1 commit into
mainfrom
soam/identity-picker-actions
Sep 16, 2026
Merged

soamdesai-tfh merged 1 commit into
mainfrom
soam/identity-picker-actions

Conversation

@soamdesai-tfh

Copy link
Copy Markdown
Contributor

Summary

Two additions to the Test identities screen:

  • Close button. A round toolbar button at the top-left, styled like the existing "+", navigates back to the active identity's home. It is hidden when no identity is active, since there is nothing to return to.
  • Remove per identity. Hovering a row reveals a trash button; it is also reachable by keyboard focus and stays visible on touch devices (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 reassigns activeIdentityID when needed; exposed through useIdentity.
  • Row gets an actions slot rendered as a sibling of its button (a button cannot nest inside a button); the divider moves to the wrapper.
  • IDRow renders the remove button in that slot; select-id renders the Close button.
  • Nucleus trash icon added to the icon map.

Verification

  • New store test for removeIdentity (inactive, active, and last identity). pnpm test: 31/31.
  • pnpm typecheck, pnpm lint, pnpm run spellcheck clean.
  • Headless Chrome against 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

… 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>
@vercel

vercel Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
worldcoin-simulator Ready Ready Preview Sep 16, 2026 5:17pm UTC

Request Review

@soamdesai-tfh
soamdesai-tfh merged commit cfea8d0 into main Sep 16, 2026
10 checks passed
@soamdesai-tfh
soamdesai-tfh deleted the soam/identity-picker-actions branch September 16, 2026 17:48

This branch was successfully deployed

1 active deployment
Preview — 5030ae2e Deployed Sep 16, 2026 by vercel[bot]
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