Skip to content

Conversation

@fairlighteth
Copy link
Contributor

@fairlighteth fairlighteth commented Nov 14, 2025

Summary

Adds persistent “Recent” tokens and inline favorites per the token-selector rollout plan. This slice introduces the localStorage-backed recent-token storage/hook, wires the selection context with a reusable TokenSelectionHandler + onTokenListItemClick, and refactors TokensContent/TokensVirtualList so favorites and recents render ahead of “All tokens” with a Clear CTA. The widget now records recent selections for both standard and bridging flows (fallback to wallet chain when the target chain isn’t set).

To Test

  1. Standard selector

    • Open the token selector, pick a few tokens, close/reopen; a “Recent” section should appear with the latest picks.
    • Click “Clear” in the Recent header; the section should disappear until new selections are made.
  2. Favorites

    • Favorite tokens render as pills at the top of the list and still respect selection + disabled state.
    • Selecting a favorite should immediately close the selector and update recents without duplicating entries.
  3. Bridging / chain switch

    • Switch to a bridging scenario (output field on another chain); recents should be scoped to that target chain.
    • Return to a normal (non-bridging) selection—the recents list should fall back to the wallet’s chain history.
  4. Search + Enter key

    • Search for a token and press Enter; the token should be selected and added to recents just like a click.

Background

Implements Step 4 of the token-selector split plan by persisting recent selections, exposing the shared selection handler, and pinning favorites/recents ahead of the full list so later PRs can build on a richer, stateful selector column.

@vercel
Copy link

vercel bot commented Nov 14, 2025

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

Project Deployment Preview Updated (UTC)
cowfi Ready Ready Preview Nov 14, 2025 9:40am
explorer-dev Ready Ready Preview Nov 14, 2025 9:40am
sdk-tools Ready Ready Preview Nov 14, 2025 9:40am
swap-dev Ready Ready Preview Nov 14, 2025 9:40am
widget-configurator Ready Ready Preview Nov 14, 2025 9:40am
1 Skipped Deployment
Project Deployment Preview Updated (UTC)
cosmos Ignored Ignored Nov 14, 2025 9:40am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 14, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/token-selector-4

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants