Skip to content

fix(order-progress): match countdown to reduced solve deadlines - #7888

Merged
kernelwhisperer merged 5 commits into
cowprotocol:developfrom
tenderdeve:fix/7808-progress-bar-times
Jul 23, 2026
Merged

kernelwhisperer merged 5 commits into
cowprotocol:developfrom
tenderdeve:fix/7808-progress-bar-times

Conversation

@tenderdeve

@tenderdeve tenderdeve commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #7808

The order progress bar countdown was a flat 15s on every chain, so orders were shown with several seconds still on the clock after they had already settled under the reduced solve deadlines.

This sets the countdown to 10s on mainnet and 7s on all other chains, via a getProgressBarTimerDuration(chainId) helper. The circular countdown animation uses the same per-chain duration so its scale stays correct.

Summary by CodeRabbit

  • Enhancements
    • Updated the order progress countdown to use network-specific timing.
    • Updated the circular countdown to reflect the connected network’s duration.
    • Ensured progress steps respect a consistent minimum display time for smoother visuals.

@vercel

vercel Bot commented Jul 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 Jul 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 Plus

Run ID: 8fa65a56-e3e5-4fad-9e5c-5dd63e699160

📥 Commits

Reviewing files that changed from the base of the PR and between a27cceb and d06c5df.

📒 Files selected for processing (2)
  • apps/cowswap-frontend/src/modules/orderProgressBar/pure/RenderProgressTopSection.tsx
  • apps/cowswap-frontend/src/modules/orderProgressBar/pure/TopSections.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/cowswap-frontend/src/modules/orderProgressBar/pure/TopSections.tsx

Walkthrough

The order progress bar now uses 10 seconds on mainnet and 7 seconds on other supported chains. Chain ID is propagated through progress bar components to calculate the circular countdown duration.

Changes

Progress countdown

Layer / File(s) Summary
Duration selection and countdown initialization
apps/cowswap-frontend/src/modules/orderProgressBar/constants.ts, apps/cowswap-frontend/src/modules/orderProgressBar/hooks/useOrderProgressBarProps.ts
Adds network-specific duration selection and uses it when the backend becomes active.
Chain ID propagation
apps/cowswap-frontend/src/modules/orderProgressBar/pure/RenderProgressTopSection.tsx, apps/cowswap-frontend/src/modules/orderProgressBar/pure/ProgressTopSection/index.tsx, apps/cowswap-frontend/src/modules/orderProgressBar/pure/TopSections.tsx
Passes chainId through progress content and solving sections.
Network-aware circular countdown
apps/cowswap-frontend/src/modules/orderProgressBar/pure/steps/CircularCountdown.tsx
Uses the selected chain duration for the circular progress endpoint.

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

Sequence Diagram(s)

sequenceDiagram
  participant Backend
  participant OrderProgressBar
  participant SolvingTopSection
  participant CircularCountdown
  Backend->>OrderProgressBar: backend status becomes ACTIVE
  OrderProgressBar->>OrderProgressBar: select duration from chainId
  OrderProgressBar->>SolvingTopSection: pass countdown and chainId
  SolvingTopSection->>CircularCountdown: pass countdown and chainId
  CircularCountdown->>CircularCountdown: render network-specific progress
Loading

Possibly related PRs

Suggested reviewers: kernelwhisperer, elena-zh

Poem

A rabbit hopped through chains so bright,
Ten seconds here, seven in flight.
The countdown passed from hop to hop,
Till circles knew when time should stop.
“Nibble on!” cried Bun with glee.

🚥 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 matches the main change: updating order-progress countdowns to reduced solve deadlines.
Description check ✅ Passed The description includes the issue reference and a clear summary of the behavior change, though the test section is omitted.
Linked Issues check ✅ Passed The code changes implement #7808 by using 10s on mainnet and 7s on other chains with the same chain-specific countdown logic.
Out of Scope Changes check ✅ Passed The changes stay focused on order progress countdown timing and related prop plumbing, with no obvious unrelated scope.
✨ 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.

@vercel

vercel Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
swap-dev Ready Ready Preview Jul 23, 2026 11:21am

Request Review

@elena-zh

Copy link
Copy Markdown
Contributor

@tenderdeve , please rebase the PR to develop

Progress bar countdown is now 10s on mainnet and 7s on all other chains,
instead of a flat 15s, so orders no longer show several seconds left on
the clock when they are already settled. The circular countdown scales
to the same per-chain duration.
@kernelwhisperer
kernelwhisperer force-pushed the fix/7808-progress-bar-times branch from 240bdfc to a27cceb Compare July 23, 2026 11:16
@kernelwhisperer
kernelwhisperer changed the base branch from main to develop July 23, 2026 11:16
@kernelwhisperer
kernelwhisperer self-requested a review July 23, 2026 11:18
@azebuado

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 23, 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.

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

LGTM, thank you!


interface SolvingTopSectionProps {
countdown: number
chainId: OrderProgressBarProps['chainId']

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.

Nitpick: this could be SupportedChainId

stepName: OrderProgressBarProps['stepName']
order: OrderProgressBarProps['order']
countdown: number
chainId: OrderProgressBarProps['chainId']

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.

Nitpick: this could be SupportedChainId

@kernelwhisperer
kernelwhisperer requested a review from a team July 23, 2026 11:19

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

Hey @tenderdeve , thank you for addressing it!

@tenderdeve

Copy link
Copy Markdown
Contributor Author

@kernelwhisperer updated in d06c5df — typed chainId props as SupportedChainId in both TopSections and RenderProgressTopSection.

@kernelwhisperer
kernelwhisperer merged commit 67a775b into cowprotocol:develop Jul 23, 2026
13 of 19 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 23, 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.

Adjust progress bar times for new solve deadlines

4 participants