OE-3 UI: Limit Ladder — Placed orders appear in "My Limits" but not in Order Book until hard refresh #298
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#298
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?
Found during: OE-3 checklist testing — Limit ladder placement and order book display
Summary:
After a successful ladder placement, the placed orders appear immediately in the "My Limits (Indexer) — Active on Book" panel but are absent from the Order Book depth display until the page is hard-refreshed. The order book query is not invalidated on ladder placement success, causing a stale-data split where the user sees their orders confirmed in one panel but missing from the book.
Reproduction steps
/limits, connect Keplr wallet, select a pairExpected behavior
After a successful ladder placement, both the "My Limits" panel and the Order Book should update simultaneously without requiring a page reload.
Actual behavior
Verified root cause (code read and confirmed)
LimitOrderLadderPanel.tsxonSuccesshandler (lines 164–181) only invalidates one query key:This drives the "My Limits" panel only. The Order Book depth display is driven by separate query keys that are never invalidated:
['limitPlacements', pairAddress]['limitBookPage', pairAddress]['tradeBestBook', pairAddress]Compare to
TradeOrderTicket.tsxsingle-orderonSuccess(lines 447–451) which invalidates all five keys includinglimitBookPageandtradeBestBook:The ladder
onSuccessis missinglimitBookPageandtradeBestBookinvalidation, so the order book panel displays stale data until its naturalstaleTimeexpires or the user forces a reload.Impact assessment
Environment
/limits— Limit Ladder panel + Order BookSeverity: Medium — orders are placed correctly on-chain; the display failure is a UI sync issue. However it directly undermines confidence in the placement result.
Suggested GitLab label/title prefix:
fix(ladder):Related checklist items: OE-3, OE-2
cc: @PlasticDigits
mentioned in issue #291
Confirmed — and it's a frontend cache gap, not indexer lag.
LimitOrderLadderPanel.tsx:164-181onSuccessinvalidates only['limitPlacements', pairAddress], but the visible book is driven byuseLimitBookInfinitekeyed['limitBookPage', pairAddress, side]and the best bid/ask by['tradeBestBook', pairAddress]— neither is invalidated, so the book shows stale until itsstaleTimeor a hard refresh. The single-orderTradeOrderTicket.tsxonSuccessalready invalidates all five keys (incl.limitBookPage+tradeBestBook); the ladder path just needs the same two added. I verified the indexer returns the placed ladder orders promptly (so it's the react-query cache, not the indexer). Real, medium, frontend-only. @totdkingmentioned in merge request !757
Fixed in MR !757. The place onSuccess only invalidated ['limitPlacements'] (the My Limits feed), so the Order Book didn't update until a hard refresh. Added invalidation of the order-book / best-book query keys (limitBookPage, limitBookPagePreview, tradeBestBook) in the same onSuccess. Browser check (ladder shows in the book without refresh) is yours. @PlasticDigits
mentioned in commit
6e42a5b6f6Verification complete — GitLab #298
Verified fix from MR !757 (
qa/295-298-limit-ladder-ux, merged tomainat6e42a5b).Acceptance criteria
onSuccessonly invalidatedlimitPlacements, not order-book keysLimitOrderLadderPanel.tsx:228-232now invalidateslimitPlacements,limitBookPage,limitBookPagePreview, andtradeBestBook(parity with single-order path inTradeOrderTicket.tsx:447-451)glab mr view 39— state: mergednpm test -- limitOrderLadder limitBookInsertHint useLimitLadderPlacementPlan LimitOrdersPage— 19/19 passednpm run lint— 0 errors (6 pre-existing warnings)limit-orders-tx.spec.tsladder testscripts/deploy-dex-local.sh/e2e-seed-wrap-pairs.shomit--amount 100000000ulunaoncreate_pair(pair-creation fee #276); global setup fails before specs run. Manual browser verification used instead.Browser verification details
http://127.0.0.1:5173/limits54E3936F…12E8QB(truncated in UI)Conclusion
Issue #298 is fixed on
main. Closing as verified.Follow-ups
scripts/deploy-dex-local.sh: attach100000000ulunaon everycreate_pairexecute (and wrap-pair seed scripts) so local deploy + strict Playwright global setup succeed under the pair-creation fee invariant (#276).Verification
Good to close