Fix pair search degraded typed search + seed token names for QA relevance tier 2 (GitLab #314 follow-up) #328
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#328
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Follow-ups to GitLab #314 (pair search combobox — open, MR !792 merged). Verification report (2026-06-05) identified two remaining gaps before closing #314.
Current codebase
Pair search combobox (shipped)
PairSearchSelect(frontend-dapp/src/components/trade/PairSearchSelect.tsx) on Trade and Limit Orders pages. Debounced indexerGET /api/v1/pairs?q=&sort=relevancewhen combobox is open; factory pair set gates results.pairsQuery.isError, empty-query fallback lists up to 20 factory pairs viafilterPairsByLocalSearch(frontend-dapp/src/utils/pairSearchQuery.ts). Typed search while indexer is down returns zero options —optionsmemo builds fromfallbackAddressesonly whenisError, butshowEmptyStatefires becausedebouncedSearchis non-empty andresultstays[](verification FAIL in #314 comment).indexer/src/db/queries/pairs.rstiers 1–5; tier 2 = token name substring (a0.name ILIKE/a1.name ILIKE). Covered byindexer/tests/api_pairs.rs::list_pairs_relevance_orderingwith seededLuna Classicname.scripts/deploy-dex-local.shPhase 2 instantiates CW20 tokens withnameandsymbolin the instantiate msg (TOKEN_NAMES= Ember, Coral, …). Indexer may still showname=''if assets are not re-indexed with token metadata from chain — verification noted all QA assets had emptynamein indexer DB after deploy.Why this is needed
EMBERor a pair symbol see "No pairs match your search" despite cached factory labels containing those strings. Empty-query fallback works; typed fallback does not — inconsistent outage UX and blocks closing #314.assets.namepopulated. Automated indexer test uses synthetic seed data; deploy QA stack should mirror production metadata for agent/human QA.Constraints / guardrails
filterPairsByLocalSearch— do not fetch all pairs from chain on outage.factorySet.has(addr).pairsQuery.isError(not loading).namefield already present; ensure indexer ingests token metadata (factory/token discovery path) — do not hard-code names only in frontend.PAIR_SEARCH_MIN_CHARS(2) and debounce (300ms) unchanged.Relevant files
frontend-dapp/src/components/trade/PairSearchSelect.tsx—optionsmemo,fallbackAddresses,showEmptyStatefrontend-dapp/src/utils/pairSearchQuery.tsfrontend-dapp/src/utils/__tests__/pairSearchQuery.test.tsPairSearchSelectdegraded-mode test (mock indexer error)scripts/deploy-dex-local.sh— Phase 2 token instantiate, indexer bootstrapindexer/src/indexer/parser.rs/ token discovery — ensurenamepersistedindexer/src/db/queries/pairs.rsindexer/tests/api_pairs.rsdocs/frontend.md§ Pair search combobox invariantsRecommended direction
A. Fix degraded typed search
PairSearchSelectoptionsmemo: whenpairsQuery.isErroranddebouncedSearchis non-empty, populateresultfromfilterPairsByLocalSearch(labelsByAddress, debouncedSearch, PAIR_SEARCH_RESULT_LIMIT)filtered byfactorySet(same asfallbackAddresseslogic — ensurefallbackAddressesis used or merge paths).aria-busyoff, dim "Offline search" hint — align withAGENTS_FRONTEND_MARKET_DATA_OUTAGE.mdcopy patterns; no env URLs.getPairsrejection → typeemb→ options include Ember/Coral factory pairs.B. Seed token names on LocalTerra QA deploy
namevalues (alreadyTOKEN_NAMES).name=''post-deploy — fix asset upsert from CW20 token info query if metadata is dropped.scripts/qa/check:GET /api/v1/pairs?q=ember&sort=relevancereturns tier-2/3 hits after indexer sync.scripts/qa/README.mdmanual matrix row for token name search.Acceptance criteria
EMBERin Trade/Limits combobox returns matching factory pairs (not empty state).make deploy-local+ indexer sync,q=Ember(name substring) returns relevant pairs in live API test.Test plan — all paths
volume_24h descdefault listEMBERzzzzzterra1…addressq=Emberassets.nameTest plan — attack / abuse / hack vectors
q(>128)PAIR_LIST_Q_MAX_LENwhen downfactorySet.has(addr)toLowerCase+includes— no crash; bounded result countVerification criteria
make test-frontendgreen (new degraded-mode test)./limits→ typeEMBER→ options appear.curl '/api/v1/pairs?q=Ember&sort=relevance'on LocalTerra returns hits with populated token names.marked as related to #314
mentioned in commit
fd54fb6ce2mentioned in merge request !812
Implementation complete — MR !812
MR: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/94
Changes
resolve_assetrefreshes CW20 metadata when DBname/symbolare empty../scripts/qa/verify-issue-328.sh; docs indocs/frontend.mdandscripts/qa/README.md.Verification (agent)
pairSearchQuery.test.ts+PairSearchSelect.degraded.test.tsx(8 tests)cargo checkindexerq=EmberAPIIssue left open until MR merges and manual QA passes.
mentioned in commit
15d38d53d6mentioned in commit
9134e2843fmentioned in commit
d7d1b4c937mentioned in commit
938706dc65mentioned in commit
587f157475mentioned in commit
81784caa84mentioned in commit
995674b775mentioned in commit
995674b775mentioned in issue #481