OE-2 UI: Limit Orders - Edit button on resting order produces no action (silent no-op) #294

Closed
opened 2026-06-03 15:57:05 +00:00 by totdking · 10 comments
totdking commented 2026-06-03 15:57:05 +00:00 (Migrated from gitlab.com)
No description provided.
totdking commented 2026-06-03 16:00:51 +00:00 (Migrated from gitlab.com)

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 onClick handler is either not wired up, not firing, or silently failing before any logic executes.


Reproduction steps

  1. Navigate to /limits and /trade on LocalTerra
  2. Connect Keplr wallet (funded test account)
  3. Select a trading pair and place a limit order (bid or ask)
  4. Confirm the order appears in the order book / "My limits" panel
  5. Click the Edit button on the resting order
  6. Observe: nothing happens — the limit form does not pre-fill, no modal opens, no tx is initiated
  7. Open browser DevTools → Console — no log output appears on button click

Expected behavior

Clicking Edit should:

  • Pre-fill the limit order form with the resting order's current price and details
  • Allow the user to change the price
  • Submit an UpdateLimitOrderPrice transaction on confirm
  • Invalidate and refresh the order book to reflect the updated price level

Actual behavior

  • Button click produces no visible response
  • No form pre-fill
  • No console log or error output
  • No network request initiated
  • No toast or error message shown

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.


/limits page — LimitOrdersPage.tsx

Root cause: useLimitOrderUpdatePriceMutation is never imported or used. orderId is discarded. No update path exists.

The prop chain IS correctly wired:

  • LimitOrdersPage.tsx line 479: onPrefillLimitTicket={onPrefillLimitTicketFromBook} ✓
  • OrderBookPanel.tsx line 476/490: passes it to BookSideColumn ✓
  • BookSideColumn line 322: passes it to BookRow ✓
  • BookRow.onEditClick line 110: calls it with the full draft including orderId ✓

The failure is in onPrefillLimitTicketFromBook at LimitOrdersPage.tsx lines 202–206:

const onPrefillLimitTicketFromBook = (draft: LimitBookTicketDraft) => {
  setSide(draft.side)
  setPrice(draft.price)
  setLimitEscrowAmountFromDraft(draft.amountHuman)
  // draft.orderId received but never stored — no orderId state exists on this page
}

Three compounding failures:

  1. draft.orderId is silently discarded — no state field holds the "order being edited"
  2. useLimitOrderUpdatePriceMutation is not imported anywhere in LimitOrdersPage.tsx — there is no update-price transaction path
  3. The submit button at line 582–585 is hardwired to placeMutation.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
  4. No visual feedback (toast, scroll, focus) on Edit click — the form is below the order book in the DOM, so the silent state update is invisible to the user from their viewport position

/trade/:pairAddr page — TradePage.tsx + TradeOrderTicket.tsx

Root 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 — placeLimitCombinedOk explicitly blocks submit when editContext is set:

TradeOrderTicket.tsx lines 318–324:

const placeLimitCombinedOk =
  placeEscrowGate.canPlaceLimit &&
  placeNativeGasGate.canPlaceLimit &&
  placePriceGate.canPlaceLimit &&
  !crossingBlocker &&
  !expiryPastBlocker &&
  !editContext          // ← deliberately false once Edit is clicked

The moment the Edit click fires and setEditContext(...) is called (line 577), the "Place limit" submit path is blocked.

Condition 2 — priceOnlyEdit requires the price to actually change before it becomes true:

limitOrderPriceEdit.ts line 47:

if (pricesEqual(context.price, current.price)) return false

Edit pre-fills the form with the resting order's current price. Because the price hasn't changed yet, isPriceOnlyLimitEdit returns false, so priceOnlyEdit = false.

Combined effect — button dead-zone on click:

State priceOnlyEdit placeLimitCombinedOk Button label Button state
Before Edit click false true "Place limit" Enabled
Immediately after Edit click false false (blocked by !editContext) "Place limit" Disabled
After user changes price true false (still blocked) "Update price" Enabled → routes to submitUpdateLimitPrice()

There is no visible feedback to user or in console when the edit is clicked


Summary table

Page Edit button renders Form pre-fills orderId stored Update mutation exists Works end-to-end Fail mode
/limits ✓ (if isMine) ✓ (silent, off-screen) ✗ discarded ✗ not wired ✗ Fail Code bug — no update path
/trade ✓ (if isMine) ✓ (tab switches to Limit) ✓ ✓ wired ✗ Fail (UX bug) Edit mode activates but button immediately disabled; only unlocks after price changed

What the /limits fix requires

  • Import and instantiate useLimitOrderUpdatePriceMutation in LimitOrdersPage.tsx
  • Add editingOrderId: number | null state; set it from draft.orderId in onPrefillLimitTicketFromBook
  • Gate the submit button: if editingOrderId is set, call updatePriceMutation.mutate(...) instead of placeMutation.mutate(); update button label ("Update price" vs "Place limit")
  • Add scroll-into-view or toast on Edit click so the pre-fill is visible to the user

What the /trade fix requires

  • When edit context is set and priceOnlyEdit is false (price not yet changed), show "Update price (change price above)" as a disabled button label — not "Place limit"
  • Optionally: add a visible highlight or brief toast on Edit click to signal edit mode is active
  • These are UX clarity changes only — the underlying mutation path works once the user changes the price

Impact assessment

  • User-facing: Users cannot modify a resting order's price. The only workaround is to cancel the order and place a new one, which incurs a maker fee and requires re-entering all details manually.
  • OE-2 result: Fail on the edit sub-criterion. Place, display, and cancel may still pass independently.

Environment

  • Chain: localterra
  • LCD: http://localhost:1317
  • Wallet: Keplr (Terra Classic)
  • Browser: [fill in]
  • Page: /limits , /trades
  • Pairs tested: all pairs show this behaviour
  • Network throttle applied: No

Severity: ~"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

### 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 `onClick` handler is either not wired up, not firing, or silently failing before any logic executes. --- ### Reproduction steps 1. Navigate to `/limits` and `/trade` on LocalTerra 2. Connect Keplr wallet (funded test account) 3. Select a trading pair and place a limit order (bid or ask) 4. Confirm the order appears in the order book / "My limits" panel 5. Click the **Edit** button on the resting order 6. Observe: nothing happens — the limit form does not pre-fill, no modal opens, no tx is initiated 7. Open browser DevTools → Console — no log output appears on button click --- ### Expected behavior Clicking Edit should: - Pre-fill the limit order form with the resting order's current price and details - Allow the user to change the price - Submit an `UpdateLimitOrderPrice` transaction on confirm - Invalidate and refresh the order book to reflect the updated price level --- ### Actual behavior - Button click produces no visible response - No form pre-fill - No console log or error output - No network request initiated - No toast or error message shown --- ### 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. --- #### `/limits` page — `LimitOrdersPage.tsx` **Root cause: `useLimitOrderUpdatePriceMutation` is never imported or used. `orderId` is discarded. No update path exists.** The prop chain IS correctly wired: - `LimitOrdersPage.tsx` line 479: `onPrefillLimitTicket={onPrefillLimitTicketFromBook}` ✓ - `OrderBookPanel.tsx` line 476/490: passes it to `BookSideColumn` ✓ - `BookSideColumn` line 322: passes it to `BookRow` ✓ - `BookRow.onEditClick` line 110: calls it with the full draft including `orderId` ✓ The failure is in `onPrefillLimitTicketFromBook` at `LimitOrdersPage.tsx` lines 202–206: ```js const onPrefillLimitTicketFromBook = (draft: LimitBookTicketDraft) => { setSide(draft.side) setPrice(draft.price) setLimitEscrowAmountFromDraft(draft.amountHuman) // draft.orderId received but never stored — no orderId state exists on this page } ``` Three compounding failures: 1. `draft.orderId` is silently discarded — no state field holds the "order being edited" 2. `useLimitOrderUpdatePriceMutation` is not imported anywhere in `LimitOrdersPage.tsx` — there is no update-price transaction path 3. The submit button at line 582–585 is hardwired to `placeMutation.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 4. No visual feedback (toast, scroll, focus) on Edit click — the form is below the order book in the DOM, so the silent state update is invisible to the user from their viewport position --- #### `/trade/:pairAddr` page — `TradePage.tsx` + `TradeOrderTicket.tsx` **Root 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 — `placeLimitCombinedOk` explicitly blocks submit when `editContext` is set:** `TradeOrderTicket.tsx` lines 318–324: ```js const placeLimitCombinedOk = placeEscrowGate.canPlaceLimit && placeNativeGasGate.canPlaceLimit && placePriceGate.canPlaceLimit && !crossingBlocker && !expiryPastBlocker && !editContext // ← deliberately false once Edit is clicked ``` The moment the Edit click fires and `setEditContext(...)` is called (line 577), the "Place limit" submit path is blocked. **Condition 2 — `priceOnlyEdit` requires the price to actually change before it becomes true:** `limitOrderPriceEdit.ts` line 47: ```js if (pricesEqual(context.price, current.price)) return false ``` Edit pre-fills the form with the resting order's current price. Because the price hasn't changed yet, `isPriceOnlyLimitEdit` returns `false`, so `priceOnlyEdit = false`. **Combined effect — button dead-zone on click:** | State | `priceOnlyEdit` | `placeLimitCombinedOk` | Button label | Button state | |-------|-----------------|------------------------|--------------|--------------| | Before Edit click | false | true | "Place limit" | Enabled | | Immediately after Edit click | false | false (blocked by `!editContext`) | "Place limit" | **Disabled** | | After user changes price | true | false (still blocked) | "Update price" | Enabled → routes to `submitUpdateLimitPrice()` | There is no visible feedback to user or in console when the edit is clicked --- ### Summary table | Page | Edit button renders | Form pre-fills | orderId stored | Update mutation exists | Works end-to-end | Fail mode | |------|---------------------|----------------|----------------|------------------------|------------------|-----------| | `/limits` | ✓ (if isMine) | ✓ (silent, off-screen) | ✗ discarded | ✗ not wired | ✗ Fail | Code bug — no update path | | `/trade` | ✓ (if isMine) | ✓ (tab switches to Limit) | ✓ | ✓ wired | ✗ Fail (UX bug) | Edit mode activates but button immediately disabled; only unlocks after price changed | --- ### What the `/limits` fix requires - Import and instantiate `useLimitOrderUpdatePriceMutation` in `LimitOrdersPage.tsx` - Add `editingOrderId: number | null` state; set it from `draft.orderId` in `onPrefillLimitTicketFromBook` - Gate the submit button: if `editingOrderId` is set, call `updatePriceMutation.mutate(...)` instead of `placeMutation.mutate()`; update button label ("Update price" vs "Place limit") - Add scroll-into-view or toast on Edit click so the pre-fill is visible to the user ### What the `/trade` fix requires - When edit context is set and `priceOnlyEdit` is false (price not yet changed), show "Update price (change price above)" as a disabled button label — not "Place limit" - Optionally: add a visible highlight or brief toast on Edit click to signal edit mode is active - These are UX clarity changes only — the underlying mutation path works once the user changes the price --- ### Impact assessment - **User-facing:** Users cannot modify a resting order's price. The only workaround is to cancel the order and place a new one, which incurs a maker fee and requires re-entering all details manually. - **OE-2 result:** **Fail** on the edit sub-criterion. Place, display, and cancel may still pass independently. --- ### Environment - Chain: localterra - LCD: [http://localhost:1317](http://localhost:1317) - Wallet: Keplr (Terra Classic) - Browser: \[fill in\] - Page: `/limits` , `/trades` - Pairs tested: all pairs show this behaviour - Network throttle applied: No --- **Severity:** ~"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
totdking commented 2026-06-03 17:28:40 +00:00 (Migrated from gitlab.com)

mentioned in issue #291

mentioned in issue #291
Brouie commented 2026-06-04 07:08:50 +00:00 (Migrated from gitlab.com)

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:6 DOES import useLimitOrderUpdatePriceMutation and uses it (:394). The !editContext term in placeLimitCombinedOk (:324) is by design — once the price actually changes, priceOnlyEdit flips true, the button switches to the updatePriceCombinedOk gate (:366) and the click calls submitUpdateLimitPrice() → 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").
  • Contract side confirmed: ExecuteMsg::UpdateLimitOrderPrice exists + handler works (pair.rs:237, contract.rs:1172, action update_limit_order_price).

The one real residual: on /limits, onPrefillLimitTicketFromBook (LimitOrdersPage.tsx:202-206) drops draft.orderId and that page has no update path at all — its submit only ever calls placeMutation. 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. @totdking

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:6` DOES import `useLimitOrderUpdatePriceMutation` and uses it (:394). The `!editContext` term in `placeLimitCombinedOk` (:324) is by design — once the price actually changes, `priceOnlyEdit` flips true, the button switches to the `updatePriceCombinedOk` gate (:366) and the click calls `submitUpdateLimitPrice()` → `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"). - Contract side confirmed: `ExecuteMsg::UpdateLimitOrderPrice` exists + handler works (pair.rs:237, contract.rs:1172, action `update_limit_order_price`). The one real residual: on **/limits**, `onPrefillLimitTicketFromBook` (LimitOrdersPage.tsx:202-206) drops `draft.orderId` and that page has no update path at all — its submit only ever calls `placeMutation`. 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. @totdking
PlasticDigits commented 2026-06-05 04:08:28 +00:00 (Migrated from gitlab.com)

mentioned in issue #312

mentioned in issue #312
PlasticDigits commented 2026-06-05 04:08:28 +00:00 (Migrated from gitlab.com)

marked as related to #312

marked as related to #312
ghost1 commented 2026-06-05 10:09:20 +00:00 (Migrated from gitlab.com)

mentioned in commit 0a1810e959

mentioned in commit 0a1810e9591052d74565187abe5ebcb415e3e542
PlasticDigits commented 2026-06-05 10:09:31 +00:00 (Migrated from gitlab.com)

mentioned in merge request !791

mentioned in merge request !791
PlasticDigits commented 2026-06-05 12:03:18 +00:00 (Migrated from gitlab.com)

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 @ c0d8ad6
Fix commits: 0babbb6 (#247 — /trade price-only update), 0a1810e (#312 — /limits edit flow)


Acceptance criteria

# Criterion Result How verified
1 Edit click is not a silent no-op — visible feedback PASS Manual Chrome on LocalTerra (http://127.0.0.1:5173): /trade shows RESTING ORDER context + prefilled form; /limits shows limits-page-edit-context text "Editing order #1 — change price and tap Update price (one tx, no maker fee)."
2 Form pre-fills with resting order price, side, amount PASS Manual: price 0.95, amount 9.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)".
3 orderId preserved — update path, not duplicate place PASS Code: onPrefillLimitTicketFromBook calls buildLimitBookEditContext(draft) (LimitOrdersPage.tsx:220-228). Unit: "price-only amend on /limits submits UpdateLimitOrderPrice, not place"; "blocks silent duplicate when side changes during book edit".
4 UpdateLimitOrderPrice tx on confirm after price change PASS (unit + UI gate) Unit mocks updateLimitOrderPrice(…, orderId=7, …) on submit. Manual: after price change, submit button reads UPDATE PRICE (enabled) on both /trade and /limits. On-chain submit not executed in this pass to avoid mutating shared dev state.
5 Order book invalidation after update PASS (code) useLimitOrderUpdatePriceMutation onSuccess invalidates limitBookPage, limitPlacements, tradeBestBook query keys.
6 /trade edit UX — hint + disabled-until-price-change PASS TradeOrderTicket.tsx renders trade-limit-edit-context with "adjust price to update in one tx" when editContext set and price unchanged; switches to Update price when priceOnlyEdit true. Confirmed manually on /trade.

Automated checks (commands)

# Unit / component (Node 24)
cd frontend-dapp && npm test -- --run \
  src/pages/LimitOrdersPage.test.tsx \
  src/pages/TradePage.test.tsx \
  src/utils/__tests__/limitOrderPriceEdit.test.ts \
  src/components/trade/__tests__/OrderBookPanel.test.tsx
# → 30 passed

make lint-frontend   # 0 errors (5 pre-existing warnings)

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

Page Original report Current main
/limits orderId discarded; no update mutation Fixed in 0a1810e — mirrors TradeOrderTicket edit flow
/trade Silent dead-zone after Edit Fixed in #247 — edit-context hint + Update price after price change

Outcome

All acceptance criteria PASS on current code. No repo changes required from verification.

Closing as verified fixed (superseded by #312 implementation on /limits; /trade was already addressed in #247).

## 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` @ `c0d8ad6` **Fix commits:** `0babbb6` (#247 — `/trade` price-only update), `0a1810e` (#312 — `/limits` edit flow) --- ### Acceptance criteria | # | Criterion | Result | How verified | |---|-----------|--------|--------------| | 1 | **Edit click is not a silent no-op** — visible feedback | **PASS** | Manual Chrome on LocalTerra (`http://127.0.0.1:5173`): `/trade` shows RESTING ORDER context + prefilled form; `/limits` shows `limits-page-edit-context` text *"Editing order #1 — change price and tap Update price (one tx, no maker fee)."* | | 2 | **Form pre-fills** with resting order price, side, amount | **PASS** | Manual: price `0.95`, amount `9.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)"*. | | 3 | **`orderId` preserved** — update path, not duplicate place | **PASS** | Code: `onPrefillLimitTicketFromBook` calls `buildLimitBookEditContext(draft)` (`LimitOrdersPage.tsx:220-228`). Unit: *"price-only amend on /limits submits UpdateLimitOrderPrice, not place"*; *"blocks silent duplicate when side changes during book edit"*. | | 4 | **`UpdateLimitOrderPrice` tx** on confirm after price change | **PASS** (unit + UI gate) | Unit mocks `updateLimitOrderPrice(…, orderId=7, …)` on submit. Manual: after price change, submit button reads **UPDATE PRICE** (enabled) on both `/trade` and `/limits`. On-chain submit not executed in this pass to avoid mutating shared dev state. | | 5 | **Order book invalidation** after update | **PASS** (code) | `useLimitOrderUpdatePriceMutation` `onSuccess` invalidates `limitBookPage`, `limitPlacements`, `tradeBestBook` query keys. | | 6 | **`/trade` edit UX** — hint + disabled-until-price-change | **PASS** | `TradeOrderTicket.tsx` renders `trade-limit-edit-context` with *"adjust price to update in one tx"* when `editContext` set and price unchanged; switches to **Update price** when `priceOnlyEdit` true. Confirmed manually on `/trade`. | --- ### Automated checks (commands) ```bash # Unit / component (Node 24) cd frontend-dapp && npm test -- --run \ src/pages/LimitOrdersPage.test.tsx \ src/pages/TradePage.test.tsx \ src/utils/__tests__/limitOrderPriceEdit.test.ts \ src/components/trade/__tests__/OrderBookPanel.test.tsx # → 30 passed make lint-frontend # 0 errors (5 pre-existing warnings) ``` **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 | Page | Original report | Current `main` | |------|-----------------|----------------| | `/limits` | `orderId` discarded; no update mutation | **Fixed** in `0a1810e` — mirrors `TradeOrderTicket` edit flow | | `/trade` | Silent dead-zone after Edit | **Fixed** in #247 — edit-context hint + **Update price** after price change | --- ### Outcome All acceptance criteria **PASS** on current code. No repo changes required from verification. Closing as verified fixed (superseded by #312 implementation on `/limits`; `/trade` was already addressed in #247).
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-06-05 12:03:23 +00:00
PlasticDigits commented 2026-06-05 12:07:32 +00:00 (Migrated from gitlab.com)

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 from 0babbb6 / #247 and 0a1810e / #312)

No code changes required — acceptance criteria are satisfied on current main.


Acceptance criteria

# Criterion Result How verified
1 Edit click is not a silent no-op — visible feedback PASS /limits renders limits-page-edit-context ("Editing order #N — adjust price to update in one tx."). /trade renders trade-limit-edit-context with the same pattern (TradeOrderTicket.tsx:818-830).
2 Form pre-fills with resting order price, side, amount PASS onPrefillLimitTicketFromBook sets 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)".
3 orderId preserved — update path, not duplicate place PASS buildLimitBookEditContext(draft) stores orderId in editContext. Submit gates on priceOnlyEdit → submitUpdateLimitPrice() vs placeMutation.mutate(). Unit: "price-only amend on /limits submits UpdateLimitOrderPrice, not place (GitLab #312)".
4 UpdateLimitOrderPrice tx on confirm after price change PASS useLimitOrderUpdatePriceMutation calls updateLimitOrderPrice(…) (useLimitOrderUpdatePriceMutation.ts:23). Button label switches to Update price when priceOnlyEdit is true (LimitOrdersPage.tsx:703-706, TradeOrderTicket.tsx:856-859).
5 Order book invalidation after update PASS onSuccess invalidates limitBookPage, limitPlacements, tradeBestBook query keys (useLimitOrderUpdatePriceMutation.ts:27-31).
6 /trade edit UX — hint + disabled-until-price-change PASS placeLimitCombinedOk blocks place while editContext is set; priceOnlyEdit unlocks update submit. Edit hint visible before price change (trade-limit-edit-context).

Automated checks

export PATH="$HOME/.nvm/versions/node/$(cat .nvmrc)/bin:$PATH"
cd frontend-dapp && npm test -- --run \
  src/pages/LimitOrdersPage.test.tsx \
  src/pages/TradePage.test.tsx \
  src/utils/__tests__/limitOrderPriceEdit.test.ts \
  src/components/trade/__tests__/OrderBookPanel.test.tsx
# → 35 passed

make lint-frontend
# → 0 errors (5 pre-existing warnings)

Outcome

All acceptance criteria PASS. Issue remains closed — fixes landed in #247 (/trade) and #312 (/limits). No MR opened.

## 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 from `0babbb6` / #247 and `0a1810e` / #312) No code changes required — acceptance criteria are satisfied on current `main`. --- ### Acceptance criteria | # | Criterion | Result | How verified | |---|-----------|--------|--------------| | 1 | **Edit click is not a silent no-op** — visible feedback | **PASS** | `/limits` renders `limits-page-edit-context` (*"Editing order #N — adjust price to update in one tx."*). `/trade` renders `trade-limit-edit-context` with the same pattern (`TradeOrderTicket.tsx:818-830`). | | 2 | **Form pre-fills** with resting order price, side, amount | **PASS** | `onPrefillLimitTicketFromBook` sets 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)"*. | | 3 | **`orderId` preserved** — update path, not duplicate place | **PASS** | `buildLimitBookEditContext(draft)` stores `orderId` in `editContext`. Submit gates on `priceOnlyEdit` → `submitUpdateLimitPrice()` vs `placeMutation.mutate()`. Unit: *"price-only amend on /limits submits UpdateLimitOrderPrice, not place (GitLab #312)"*. | | 4 | **`UpdateLimitOrderPrice` tx** on confirm after price change | **PASS** | `useLimitOrderUpdatePriceMutation` calls `updateLimitOrderPrice(…)` (`useLimitOrderUpdatePriceMutation.ts:23`). Button label switches to **Update price** when `priceOnlyEdit` is true (`LimitOrdersPage.tsx:703-706`, `TradeOrderTicket.tsx:856-859`). | | 5 | **Order book invalidation** after update | **PASS** | `onSuccess` invalidates `limitBookPage`, `limitPlacements`, `tradeBestBook` query keys (`useLimitOrderUpdatePriceMutation.ts:27-31`). | | 6 | **`/trade` edit UX** — hint + disabled-until-price-change | **PASS** | `placeLimitCombinedOk` blocks place while `editContext` is set; `priceOnlyEdit` unlocks update submit. Edit hint visible before price change (`trade-limit-edit-context`). | --- ### Automated checks ```bash export PATH="$HOME/.nvm/versions/node/$(cat .nvmrc)/bin:$PATH" cd frontend-dapp && npm test -- --run \ src/pages/LimitOrdersPage.test.tsx \ src/pages/TradePage.test.tsx \ src/utils/__tests__/limitOrderPriceEdit.test.ts \ src/components/trade/__tests__/OrderBookPanel.test.tsx # → 35 passed make lint-frontend # → 0 errors (5 pre-existing warnings) ``` --- ### Outcome All acceptance criteria **PASS**. Issue remains **closed** — fixes landed in #247 (`/trade`) and #312 (`/limits`). No MR opened.
totdking commented 2026-06-16 10:35:09 +00:00 (Migrated from gitlab.com)

Verification of edit

The edit works as expected:

  • If same price is put into the input box, it prevents update.
  • Shows help message at the place limit box to edit the limit order

Good to go

### Verification of edit The edit works as expected: * If same price is put into the input box, it prevents update. * Shows help message at the place limit box to edit the limit order Good to go
Sign in to join this conversation.
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#294
No description provided.