fix(frontend): degraded pair search when indexer is down (#314) #811
No reviewers
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!811
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cursor/gitlab-issue-workflow-1430"
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?
Summary
Fixes the remaining blocker from verification on https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/314: when the indexer is stopped, opening the Trade/Limits pair combobox still listed factory pairs, but typing a search (e.g.
EMBER) showed "No pairs match your search" instead of filtering cached factory pairs.MR !792 delivered indexer relevance ranking and the combobox; this patch completes degraded-mode typed search.
Changes
filterFactoryPairsByLocalSearch: searches menu labels, display symbols, contract/denom ids, pair address, and two-tokenXXX YYY/XXX/YYYqueries (not label substring only).PairSearchSelect: latchindexerUnavailableafter the firstgetPairserror; use local fallback for all subsequent queries in the session; match onsearchTextwhile debouncing during outage.pairSearchQuery.test.ts+PairSearchSelect.test.tsx(mocked indexer failure).docs/frontend.md§ Pair search combobox — degraded mode invariant.Acceptance checklist (#314)
api_pairsrelevance tests (unchanged)list_pairs_relevance_ordering(unchanged)cargo test --test api_pairsPairSearchSelect.test.tsx+filterFactoryPairsByLocalSearchunit testsmake test-frontendmake lint-frontendThird-party verification
Issue stays open until manual matrix on LocalTerra (optional).
Closes #314 after merge + manual spot-check of degraded typed search.
changed the description
mentioned in issue #314
changed the description
changed the description
Security review
Commit reviewed:
9e7b280513f48ff181cb53e4743c13a488da7b8dScope: MR !811 — degraded pair search when the indexer is unavailable (
PairSearchSelect.tsx,pairSearchQuery.ts, tests,docs/frontend.md).Outcome:
FINDINGS: 0(no medium, high, or critical issues on this diff)Summary
Reviewed attacker-controlled combobox input through local fallback filtering, indexer query gating, and option rendering. Changes are client-side UX only; pair selection remains constrained to the
factoryPairsprop (factory-registered pairs). User search text is used only for substring/includesmatching and is rendered via React text nodes (labels come from on-chain pair metadata viapairInfoMenuLabel, not raw query echo). Indexerqcontinues to useURLSearchParamsencoding when the indexer path is active; after the first indexer error, further indexer calls are latched off (indexerUnavailable), which reduces retry noise rather than widening trust boundaries.The removed fallback branch that could surface
{ value: addr, label: addr }for non-factory addresses is strictly tighter than before.Inline threads: none (no findings to anchor).
Prior MR notes: no prior security-review findings to re-report.
resolved all threads
mentioned in commit
2d1415913cmentioned in commit
a1340febafmentioned in commit
e59f9800fe