Skip to content

feat: show scheduled parts in eoa twap - #8119

Merged
kernelwhisperer merged 1 commit into
developfrom
feat/scheduled-twap-parts
Sep 10, 2026
Merged

kernelwhisperer merged 1 commit into
developfrom
feat/scheduled-twap-parts

Conversation

@kernelwhisperer

@kernelwhisperer kernelwhisperer commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Instead of querying only "discrete" parts, now we query candidates as well (scheduled).

Depends on cowprotocol/cow-programmatic-orders-api#7
Depends on cowprotocol/cow-sdk#1002

Part of FE-479 Show Sheduled parts for TWAPs for EOAs

image

Summary by CodeRabbit

  • Bug Fixes
    • Improved TWAP order status handling for unconfirmed part orders.
    • Candidate-only parts now transition correctly from scheduled placeholders to pending orders after refresh.
    • Cancelled or expired parent orders no longer expose candidates as scheduled.
    • Pagination now correctly respects server page size, selected pages, and final-part indicators.

@kernelwhisperer kernelwhisperer self-assigned this Sep 8, 2026
@linear-code

linear-code Bot commented Sep 8, 2026

Copy link
Copy Markdown

FE-479

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cowfi Ready Ready Preview Sep 10, 2026 10:33am UTC
explorer-dev Ready Ready Preview Sep 10, 2026 10:33am UTC
storybook Ready Ready Preview Sep 10, 2026 10:33am UTC
swap-dev Ready Ready Preview Sep 10, 2026 10:33am UTC
widget-configurator Ready Ready Preview Sep 10, 2026 10:33am UTC
2 Skipped Deployments
Project Deployment Actions Updated
cosmos Ignored Ignored Sep 10, 2026 10:33am UTC
sdk-tools Ignored Ignored Preview Sep 10, 2026 10:33am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: a9d3afea-f463-403a-8f66-d8d98dccfd7d

📥 Commits

Reviewing files that changed from the base of the PR and between a3b2136 and 4d114bc.

📒 Files selected for processing (2)
  • apps/cowswap-frontend/src/modules/twap/hooks/useEoaTwapPartOrders.test.tsx
  • apps/cowswap-frontend/src/modules/twap/hooks/useEoaTwapPartOrders.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


Walkthrough

The TWAP hook now maps unconfirmed part orders as virtual open orders. Tests cover candidate replacement, parent status handling, pagination requests, and final-part detection.

Changes

TWAP virtual part handling

Layer / File(s) Summary
Map unconfirmed parts as virtual open orders
apps/cowswap-frontend/src/modules/twap/hooks/useEoaTwapPartOrders.ts
The hook derives isVirtualPart from unconfirmed status, passes it to status mapping, and maps unconfirmed SDK statuses to open orders.
Validate candidates and pagination
apps/cowswap-frontend/src/modules/twap/hooks/useEoaTwapPartOrders.test.tsx
Tests cover candidate replacement, cancelled and expired parents, page selection, page size, and final-part detection from the API total count.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 8af8f

Scheduled EOA TWAP parts are now shown as virtual open orders until confirmed, with terminal parent states preserved. The covered behavior presents no remaining merge-blocking risk.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description explains the main change, dependencies, related issue, and includes a screenshot. It does not include the required To Test or Self-checks sections and provides no QA verification steps… Add the # To Test section with concrete verification steps and expected results. Add the # Self-checks checklist and complete each applicable item. Include the template headings for consistency.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: showing scheduled parts in EOA TWAPs.
Full details: Description check

Explanation

The description explains the main change, dependencies, related issue, and includes a screenshot. It does not include the required To Test or Self-checks sections and provides no QA verification steps.

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/scheduled-twap-parts

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

A rabbit maps the TWAP trail,
Virtual parts now wear open-mail.
Candidates hop, then rows refresh,
Cancelled parents stay in mesh.
Page two marks the final sale.

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

@kernelwhisperer
kernelwhisperer force-pushed the feat/scheduled-twap-parts branch from 8729a89 to fbd92f4 Compare September 8, 2026 15:43
@kernelwhisperer
kernelwhisperer force-pushed the feat/scheduled-twap-parts branch from fbd92f4 to 4d114bc Compare September 9, 2026 12:00
@kernelwhisperer
kernelwhisperer requested a review from a team September 9, 2026 12:10
@kernelwhisperer
kernelwhisperer marked this pull request as ready for review September 9, 2026 12:10
@kernelwhisperer

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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.

Great, thank you!

There is one nitpick: when an order/leg status is updated, the table blinks. But I will not block the PR with this issue, I'll open a task in linear to address this issue later.

@elena-zh elena-zh mentioned this pull request Sep 9, 2026
Base automatically changed from feat/fetch-twap-deltas to develop September 10, 2026 10:27
@kernelwhisperer
kernelwhisperer force-pushed the feat/scheduled-twap-parts branch from 4d114bc to 8af8f69 Compare September 10, 2026 10:30
@kernelwhisperer
kernelwhisperer enabled auto-merge (squash) September 10, 2026 10:30
@kernelwhisperer
kernelwhisperer merged commit c3c1e15 into develop Sep 10, 2026
18 checks passed
@kernelwhisperer
kernelwhisperer deleted the feat/scheduled-twap-parts branch September 10, 2026 10:37
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 10, 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.

3 participants