feat(frontend): searchable Swap token picker (#481) #1018

Merged
PlasticDigits merged 1 commit from feat/481-token-search-select into main 2026-07-12 11:22:34 +00:00
PlasticDigits commented 2026-07-12 11:21:19 +00:00 (Migrated from gitlab.com)

Summary

  • Adds TokenSearchSelect + tokenSearchQuery.ts so Swap YOU PAY / YOU RECEIVE get a visible search combobox (parity with PairSearchSelect on Trade/Limits) — closes #481.
  • Keeps Mint on button-trigger TokenSelect; factory-gated client-only filter (works offline); documents invariants in docs/frontend.md and skills/AGENTS_FRONTEND_TOKEN_SEARCH.md.
  • Updates E2E helpers/specs for role=combobox (and toHaveValue for closed-state labels).

Test plan

  • Unit: npm test -- src/utils/__tests__/tokenSearchQuery.test.ts src/components/trade/__tests__/TokenSearchSelect.test.tsx
  • Mint unchanged: npm test -- src/components/ui/__tests__/TokenSelect.keyboard.test.tsx src/pages/MintPage.test.tsx
  • Manual Swap: type mid-list symbol (≤3 chars) on pay/receive → select → quote updates; excluded leg absent
  • Keyboard: arrows / Enter (first hit) / Escape; empty query still browses list
  • XSS smoke: malicious symbol/name renders as text; logos still allowlisted
  • E2E smoke Swap path (LocalTerra): helpers open combobox and select tokens
  • Docs: token search combobox + skill crosslinks

Follow-ups (out of scope)

  • Indexer GET /api/v1/tokens?q= relevance API only if factory token counts outgrow client filtering (#481 optional later).
## Summary - Adds `TokenSearchSelect` + `tokenSearchQuery.ts` so Swap **YOU PAY** / **YOU RECEIVE** get a visible search combobox (parity with `PairSearchSelect` on Trade/Limits) — closes [#481](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/481). - Keeps Mint on button-trigger `TokenSelect`; factory-gated client-only filter (works offline); documents invariants in `docs/frontend.md` and `skills/AGENTS_FRONTEND_TOKEN_SEARCH.md`. - Updates E2E helpers/specs for `role=combobox` (and `toHaveValue` for closed-state labels). ## Test plan - [ ] Unit: `npm test -- src/utils/__tests__/tokenSearchQuery.test.ts src/components/trade/__tests__/TokenSearchSelect.test.tsx` - [ ] Mint unchanged: `npm test -- src/components/ui/__tests__/TokenSelect.keyboard.test.tsx src/pages/MintPage.test.tsx` - [ ] Manual Swap: type mid-list symbol (≤3 chars) on pay/receive → select → quote updates; excluded leg absent - [ ] Keyboard: arrows / Enter (first hit) / Escape; empty query still browses list - [ ] XSS smoke: malicious symbol/name renders as text; logos still allowlisted - [ ] E2E smoke Swap path (LocalTerra): helpers open combobox and select tokens - [ ] Docs: [token search combobox](docs/frontend.md#token-search-combobox) + skill crosslinks ## Follow-ups (out of scope) - Indexer `GET /api/v1/tokens?q=` relevance API only if factory token counts outgrow client filtering (#481 optional later).
PlasticDigits commented 2026-07-12 11:21:27 +00:00 (Migrated from gitlab.com)

mentioned in issue #481

mentioned in issue #481
PlasticDigits commented 2026-07-12 11:22:34 +00:00 (Migrated from gitlab.com)

mentioned in commit b72c960123

mentioned in commit b72c96012348044ff07735d8227ad27e1e00a5be
PlasticDigits (Migrated from gitlab.com) merged commit b72c960123 into main 2026-07-12 11:22:34 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!1018
No description provided.