Skip to content

fix(explorer): hide socket links for cancelled or expired bridge orders - #7713

Merged
elena-zh merged 4 commits into
cowprotocol:developfrom
tenderdeve:fix/7483-explorer-hide-socket-buttons
Jun 26, 2026
Merged

elena-zh merged 4 commits into
cowprotocol:developfrom
tenderdeve:fix/7483-explorer-hide-socket-buttons

Conversation

@tenderdeve

@tenderdeve tenderdeve commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #7483.

The SocketScan and Socket API links on the Explorer order detail page only make sense while a swap-and-bridge order can still reach the bungee leg. If the swap part was cancelled or expired, no funds make it across, so the links either 404 or show unrelated data — just noise on the page.

Gate the bungee bridge links on `ORDER_FINAL_FAILED_STATUSES` so they're hidden once the order is `Cancelled` or `Expired`. The "New order" link is left untouched.

File

  • `apps/explorer/src/components/orders/DetailsTable/items/OrderIdItem.tsx`

Testing steps

  1. Open a cancelled or expired swap-and-bridge order on Explorer (example from the issue: https://dev.explorer.cow.fi/arb1/orders/0xc2875b31529b9d650701281717162a740c3d1409283e625ecd5c03a756adc1d89fa3c00a92ec5f96b1ad2527ab41b3932efeda586a02f053?tab=overview).
  2. The "SocketScan↗" and "Socket API↗" buttons next to the order id should no longer be rendered.
  3. Open any non-final swap-and-bridge order (pending / filled) and confirm both buttons still appear.

Summary by CodeRabbit

  • Bug Fixes
    • Bungee bridge external links are no longer displayed when an order reaches a final failed status.

The SocketScan and Socket API links only make sense while a swap-and-
bridge order can still reach the bridge side. If the swap was cancelled
or expired, no funds make it to the bungee leg, so the links 404 / show
unrelated data and are just noise on the order detail page.

Gate the bungee bridge links on `ORDER_FINAL_FAILED_STATUSES` so they're
hidden once the order is cancelled or expired. The "New order" link is
left untouched.

Closes cowprotocol#7483
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@tenderdeve is attempting to deploy a commit to the cow-dev Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 960b4a7c-0dd0-496a-aa61-db83cdd2992e

📥 Commits

Reviewing files that changed from the base of the PR and between ead6958 and be3adf7.

📒 Files selected for processing (1)
  • apps/explorer/src/components/orders/DetailsTable/items/OrderIdItem.tsx

Walkthrough

OrderIdItem.tsx imports ORDER_FINAL_FAILED_STATUSES and derives two booleans — isOrderInFinalFailedStatus and showBungeeBridgeLinks — to suppress Bungee bridge external links when the order is in a final failed state (expired or cancelled).

Changes

Bungee Bridge Link Visibility Guard

Layer / File(s) Summary
Import, derived booleans, and JSX guard
apps/explorer/src/components/orders/DetailsTable/items/OrderIdItem.tsx
Adds ORDER_FINAL_FAILED_STATUSES import; computes isOrderInFinalFailedStatus and showBungeeBridgeLinks; replaces the bridgeProviderId-only JSX condition with showBungeeBridgeLinks to hide Bungee links when the order is expired or cancelled.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 When orders expire or get cancelled away,
The Bungee bridge buttons should not come to play.
A boolean flag, a status to check —
No dangling links left out on the deck!
Hoppy little fix, tidy and bright. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: hiding socket links for cancelled or expired bridge orders, which directly corresponds to the code modifications in OrderIdItem.tsx.
Description check ✅ Passed The description follows the template with issue reference (#7483), clear problem explanation, file list, and detailed testing steps including specific examples.
Linked Issues check ✅ Passed The PR fully addresses issue #7483 by implementing the conditional rendering of socket links based on ORDER_FINAL_FAILED_STATUSES to hide them for cancelled/expired orders.
Out of Scope Changes check ✅ Passed The code changes are narrowly scoped to the specific requirement: gating socket-related links on final-failed order statuses in OrderIdItem.tsx with no extraneous modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@elena-zh elena-zh added the trigger-preview Add to a fork PR to trigger CF-pages preview. See https://github.com/cowprotocol/cowswap/pull/7615 label Jun 23, 2026
@github-actions

github-actions Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Cloudflare Pages preview mirror

Preview branch URL: https://github.com/cowprotocol/cowswap/tree/cf-preview/pr-7713
Mirror PR: #7714
Cloudflare Pages preview links will be posted on the mirror PR by the Cloudflare Pages GitHub integration once builds complete.

Source fork branch: tenderdeve/cowswap:fix/7483-explorer-hide-socket-buttons
Approval target SHA: 7c6939b92112
Last mirrored SHA: be3adf74dc90
Last comment update: @fairlighteth at 2026-06-26T16:48:01.726Z

  • Sync Cloudflare preview to approval target commit

@github-actions github-actions Bot removed the trigger-preview Add to a fork PR to trigger CF-pages preview. See https://github.com/cowprotocol/cowswap/pull/7615 label Jun 23, 2026
@vercel
vercel Bot temporarily deployed to Preview – storybook June 23, 2026 11:25 Inactive
@vercel
vercel Bot temporarily deployed to Preview – widget-configurator June 23, 2026 11:26 Inactive
@vercel
vercel Bot temporarily deployed to Preview – cowfi June 23, 2026 11:27 Inactive

@elena-zh elena-zh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tnx

@fairlighteth fairlighteth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ AI Review (Codex GPT-5, worked 4m): no new findings

Review completed. I found no new non-duplicate comments worth posting.

Checked

  • apps/explorer/src/components/orders/DetailsTable/items/OrderIdItem.tsx: Bungee bridge links are now gated by ORDER_FINAL_FAILED_STATUSES.
  • Linked issue #7483: cancelled/expired swap-and-bridge orders should not show Socket links when no bridge leg can be reached.
  • Adjacent behavior: OrderDetails already hides the Bridge tab for the same final failed statuses, and tabs.tsx documents that swap+bridge orders do not support partial fills for now.

Existing review context

  • No active review threads.
  • CodeRabbit generated no actionable comments.
  • A member approval is already present.

Generated using the pr-review skill from the CoW Protocol skills repo.

@fairlighteth

fairlighteth commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor
✅ Browser QA passed: Bungee Socket link visibility verified

How to retest

Generated using the pr-qa skill from the CoW Protocol skills repo.

@fairlighteth
fairlighteth self-requested a review June 23, 2026 12:46
@elena-zh
elena-zh enabled auto-merge (squash) June 23, 2026 15:26
@elena-zh
elena-zh merged commit ab4c9b6 into cowprotocol:develop Jun 26, 2026
12 of 18 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explorer: hide 'socket'-related buttons for expired/cancelled swap and bridge orders

3 participants