OE-2 UI: Limit Orders - Edit button on resting order produces no action (silent no-op) #294
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#294
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?
Summary
Clicking the Edit button on a resting limit order in the order book does nothing. No form pre-fill occurs, no transaction is triggered, and no feedback is shown to the user. The button does not produce any console output or log, indicating the
onClickhandler is either not wired up, not firing, or silently failing before any logic executes.Reproduction steps
/limitsand/tradeon LocalTerraExpected behavior
Clicking Edit should:
UpdateLimitOrderPricetransaction on confirmActual behavior
Verified root cause (code read and confirmed)
The prop chain and mutation usage were fully traced by reading the source files. The failure mode differs between the two affected pages.
/limitspage —LimitOrdersPage.tsxRoot cause:
useLimitOrderUpdatePriceMutationis never imported or used.orderIdis discarded. No update path exists.The prop chain IS correctly wired:
LimitOrdersPage.tsxline 479:onPrefillLimitTicket={onPrefillLimitTicketFromBook}✓OrderBookPanel.tsxline 476/490: passes it toBookSideColumn✓BookSideColumnline 322: passes it toBookRow✓BookRow.onEditClickline 110: calls it with the full draft includingorderId✓The failure is in
onPrefillLimitTicketFromBookatLimitOrdersPage.tsxlines 202–206:Three compounding failures:
draft.orderIdis silently discarded — no state field holds the "order being edited"useLimitOrderUpdatePriceMutationis not imported anywhere inLimitOrdersPage.tsx— there is no update-price transaction pathplaceMutation.mutate()unconditionally — even if the user notices the silent form pre-fill and clicks submit, it places a brand new duplicate order instead of updating the existing one/trade/:pairAddrpage —TradePage.tsx+TradeOrderTicket.tsxRoot cause: Edit mode activates silently — button is immediately disabled with no visible label change; user must change the price field to unlock submit.
The wiring is correct end-to-end, but two logic conditions combine to make the edit look like a no-op:
Condition 1 —
placeLimitCombinedOkexplicitly blocks submit wheneditContextis set:TradeOrderTicket.tsxlines 318–324:The moment the Edit click fires and
setEditContext(...)is called (line 577), the "Place limit" submit path is blocked.Condition 2 —
priceOnlyEditrequires the price to actually change before it becomes true:limitOrderPriceEdit.tsline 47:Edit pre-fills the form with the resting order's current price. Because the price hasn't changed yet,
isPriceOnlyLimitEditreturnsfalse, sopriceOnlyEdit = false.Combined effect — button dead-zone on click:
priceOnlyEditplaceLimitCombinedOk!editContext)submitUpdateLimitPrice()There is no visible feedback to user or in console when the edit is clicked
Summary table
/limits/tradeWhat the
/limitsfix requiresuseLimitOrderUpdatePriceMutationinLimitOrdersPage.tsxeditingOrderId: number | nullstate; set it fromdraft.orderIdinonPrefillLimitTicketFromBookeditingOrderIdis set, callupdatePriceMutation.mutate(...)instead ofplaceMutation.mutate(); update button label ("Update price" vs "Place limit")What the
/tradefix requirespriceOnlyEditis false (price not yet changed), show "Update price (change price above)" as a disabled button label — not "Place limit"Impact assessment
Environment
/limits,/tradesSeverity: ~"blocker:limit-orders" : edit is a core order management action. Its failure silently degrades the trading UX with no error or fallback guidance shown to the user.
Related checklist items: OE-2
cc: @PlasticDigits
mentioned in issue #291
Source-side check (browser is your layer): I think this was filed against pre-#247 code. The in-place price-edit flow landed in
0babbb6(#247), and on current main (d167c45) the /trade claims don't hold:TradeOrderTicket.tsx:6DOES importuseLimitOrderUpdatePriceMutationand uses it (:394). The!editContextterm inplaceLimitCombinedOk(:324) is by design — once the price actually changes,priceOnlyEditflips true, the button switches to theupdatePriceCombinedOkgate (:366) and the click callssubmitUpdateLimitPrice()→updatePriceMutation(:486). Before the price changes it shows "Place limit" disabled, but NOT silently — the edit hint renders at :787-800 ("Editing order #N — adjust price to update in one tx").ExecuteMsg::UpdateLimitOrderPriceexists + handler works (pair.rs:237, contract.rs:1172, actionupdate_limit_order_price).The one real residual: on /limits,
onPrefillLimitTicketFromBook(LimitOrdersPage.tsx:202-206) dropsdraft.orderIdand that page has no update path at all — its submit only ever callsplaceMutation. So Edit on /limits is genuinely missing (lower severity than "silent no-op duplicate"); Edit on /trade works. Suggest re-scoping to "/limits Edit not wired" and re-testing /trade on current main. @totdkingmentioned in issue #312
marked as related to #312
mentioned in commit
0a1810e959mentioned in merge request !791
Verification report — OE-2 UI: Limit Orders Edit button (#294)
Issue: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/294
Branch verified:
cursor/gitlab-issue-verification-0c3f@c0d8ad6Fix commits:
0babbb6(#247 —/tradeprice-only update),0a1810e(#312 —/limitsedit flow)Acceptance criteria
http://127.0.0.1:5173):/tradeshows RESTING ORDER context + prefilled form;/limitsshowslimits-page-edit-contexttext "Editing order #1 — change price and tap Update price (one tx, no maker fee)."0.95, amount9.91, BUY/BID direction after Edit on EMBER/CORAL. Unit:LimitOrdersPage.test.tsx"book Edit prefills ticket with orderId and shows editing context (GitLab #312 / #294)";TradePage.test.tsx"book Edit prefills the visible desktop limit ticket (GitLab #178)".orderIdpreserved — update path, not duplicate placeonPrefillLimitTicketFromBookcallsbuildLimitBookEditContext(draft)(LimitOrdersPage.tsx:220-228). Unit: "price-only amend on /limits submits UpdateLimitOrderPrice, not place"; "blocks silent duplicate when side changes during book edit".UpdateLimitOrderPricetx on confirm after price changeupdateLimitOrderPrice(…, orderId=7, …)on submit. Manual: after price change, submit button reads UPDATE PRICE (enabled) on both/tradeand/limits. On-chain submit not executed in this pass to avoid mutating shared dev state.useLimitOrderUpdatePriceMutationonSuccessinvalidateslimitBookPage,limitPlacements,tradeBestBookquery keys./tradeedit UX — hint + disabled-until-price-changeTradeOrderTicket.tsxrenderstrade-limit-edit-contextwith "adjust price to update in one tx" wheneditContextset and price unchanged; switches to Update price whenpriceOnlyEdittrue. Confirmed manually on/trade.Automated checks (commands)
E2E:
e2e/trade-book-edit-178.spec.ts— SKIP (Playwright Chromium system-deps install hung on this VM after ~20 min). Manual browser QA covered the same Edit-prefill path.On-chain stack:
make build-optimized+./scripts/setup-cloud-agent-localterra.sh --fresh --skip-build— deploy OK; LCD/indexer/frontend healthy for manual QA.Root-cause status vs original report
main/limitsorderIddiscarded; no update mutation0a1810e— mirrorsTradeOrderTicketedit flow/tradeOutcome
All acceptance criteria PASS on current code. No repo changes required from verification.
Closing as verified fixed (superseded by #312 implementation on
/limits;/tradewas already addressed in #247).Implementation verification — OE-2 UI: Limit Orders Edit button (#294)
Issue: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/294
Branch verified:
cursor/gitlab-issue-workflow-0802@856f024(includes fixes from0babbb6/ #247 and0a1810e/ #312)No code changes required — acceptance criteria are satisfied on current
main.Acceptance criteria
/limitsrenderslimits-page-edit-context("Editing order #N — adjust price to update in one tx.")./traderenderstrade-limit-edit-contextwith the same pattern (TradeOrderTicket.tsx:818-830).onPrefillLimitTicketFromBooksets side/price/amount/expiry (LimitOrdersPage.tsx:220-228). Unit:LimitOrdersPage.test.tsx"book Edit prefills ticket with orderId and shows editing context (GitLab #312 / #294)";TradePage.test.tsx"book Edit prefills the visible desktop limit ticket (GitLab #178)".orderIdpreserved — update path, not duplicate placebuildLimitBookEditContext(draft)storesorderIdineditContext. Submit gates onpriceOnlyEdit→submitUpdateLimitPrice()vsplaceMutation.mutate(). Unit: "price-only amend on /limits submits UpdateLimitOrderPrice, not place (GitLab #312)".UpdateLimitOrderPricetx on confirm after price changeuseLimitOrderUpdatePriceMutationcallsupdateLimitOrderPrice(…)(useLimitOrderUpdatePriceMutation.ts:23). Button label switches to Update price whenpriceOnlyEditis true (LimitOrdersPage.tsx:703-706,TradeOrderTicket.tsx:856-859).onSuccessinvalidateslimitBookPage,limitPlacements,tradeBestBookquery keys (useLimitOrderUpdatePriceMutation.ts:27-31)./tradeedit UX — hint + disabled-until-price-changeplaceLimitCombinedOkblocks place whileeditContextis set;priceOnlyEditunlocks update submit. Edit hint visible before price change (trade-limit-edit-context).Automated checks
Outcome
All acceptance criteria PASS. Issue remains closed — fixes landed in #247 (
/trade) and #312 (/limits). No MR opened.Verification of edit
The edit works as expected:
Good to go