fix(twap): stay on Signing tab after placing a TWAP order#7730
Conversation
A freshly placed TWAP order is in WaitSigning until the Safe (or other smart-account) owners sign it. Navigating to the Open tab right after `sendSafeTransactions` resolves hides the order while it is still being signed and confuses the user. Always navigate to the Signing tab on placement; once signed the order moves to Open and the user can switch tabs themselves. Fixes cowprotocol#6864
|
@tenderdeve is attempting to deploy a commit to the cow-dev Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughTWAP order placement now always navigates to the Orders Table signing tab after submission. Orders Table URL validation now resets the tab only when the parsed URL lacks a valid ChangesTWAP order placement
Orders Table URL handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Cloudflare Pages preview mirror Preview branch URL: https://github.com/cowprotocol/cowswap/tree/cf-preview/pr-7730 Source fork branch:
|
…tly empty A freshly placed TWAP order reaches the Signing list a few renders after navigation. In that gap useCurrentTab falls back to the Open tab, and useValidatePageUrlParams then rewrote the URL to open with replace:true, permanently bouncing the user off Signing. Only normalize the tab when the URL has no valid tab, so a valid explicitly-selected tab is preserved.
|
@elena-zh you're right, the first change wasn't enough. The new TWAP order only shows up in the Signing list a few renders after we navigate there (it has to go through 88cdd9c only normalizes the URL tab when there isn't a valid one in the URL, so a tab you explicitly selected that's briefly empty is left alone. With that the Signing navigation sticks. Can you re-test the steps from #6864? |
elena-zh
left a comment
There was a problem hiding this comment.
it has become better, there is no blinking between tabs after placing an order. So approving it.
fairlighteth
left a comment
There was a problem hiding this comment.
✅ AI Review (Codex GPT-5): no new findings
Review completed. I found no new non-duplicate comments worth posting.
Review scope and related context
- Rechecked
useCreateTwapOrder: the new TWAP order is created withTwapOrderStatus.WaitSigningand navigation now always targetsOrderTabId.signing. - Rechecked
useValidatePageUrlParams: a valid URLtabIdis no longer overwritten while the Signing list is transiently empty. - Existing review context: the earlier “still reproducible” review was followed by approval after
88cdd9c, confirming the tab no longer blinks after placing the order.
Generated using the pr-review skill from the CoW Protocol skills repo.
|
|
|



Closes #6864
Problem
After placing a TWAP order, the user is navigated to the Open orders tab while signing is still in progress. The order is actually in
WaitSigningstatus at that point — so the Open tab is empty/wrong and the order they just placed effectively disappears from view until signing completes.See Loom in the issue.
Cause
useCreateTwapOrderbranched the post-placement navigation onisSmartContractWallet:A TWAP order goes through
sendSafeTransactionsregardless of the wallet path and lands inTwapOrderStatus.WaitSigning. Both branches should send the user to the Signing tab, not Open.Fix
Always navigate to
OrderTabId.signing. Once owners actually sign, the order moves to Open and the user can switch tabs themselves.Testing
Summary by CodeRabbit