Skip to content

Conversation

@fairlighteth
Copy link
Contributor

@fairlighteth fairlighteth commented Nov 11, 2025

Summary

Fixes #6509

Keeps cancellation-triggered orders in the progress-bar store while the confirmation modal is still referencing them, so the “Cancellation failed / oops” banner can render reliably. The updater now unions the tracked IDs from pending orders, surplus queue, confirmation hash, and cancellation flags via a dedicated selector, and all updaters short-circuit until a real orderId exists to avoid infinite render loops. Added regression coverage for both the selector and updater.

To Test

  1. Reproduce the cancel-during-execution flow

    • Place a swap order and keep the progress modal open.
    • Trigger cancellation near the third progress step (likely to fail), then wait for the trade to execute.
    • The modal should display “Cancellation failed: The order was executed before it could be cancelled.”
    • The banner should remain visible until the modal is dismissed.
  2. Regression check for solver info (from PR fix: keep displayed orders in progress state and dedupe favicon completions #6510)

    • With two pending market orders, allow the first to fill while the second stays pending.
    • Open the surplus modal for the filled order.
    • Solver rankings remain visible (no flashing/disappearing).

Background

The favicon update (#6358) introduced aggressive pruning that removed progress-bar state as soon as an order left the pending list. PR #6510 kept solver data alive by extending the tracked set; this follow-up carries the same retention logic over to cancellation attempts and hardens the progress-bar updaters so they only touch Jotai state once an order ID exists, eliminating the max-depth loops we hit while testing.

@vercel
Copy link

vercel bot commented Nov 11, 2025

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

Project Deployment Preview Updated (UTC)
cowfi Canceled Canceled Nov 12, 2025 2:24pm
explorer-dev Ready Ready Preview Nov 12, 2025 2:24pm
swap-dev Ready Ready Preview Nov 12, 2025 2:24pm
widget-configurator Ready Ready Preview Nov 12, 2025 2:24pm
2 Skipped Deployments
Project Deployment Preview Updated (UTC)
cosmos Ignored Ignored Nov 12, 2025 2:24pm
sdk-tools Ignored Ignored Preview Nov 12, 2025 2:24pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/cancellation-message

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 and usage tips.

Copy link
Contributor

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@elena-zh elena-zh requested a review from a team November 12, 2025 09:46
@elena-zh elena-zh marked this pull request as ready for review November 12, 2025 09:46
@fairlighteth fairlighteth requested a review from a team November 12, 2025 10:31
@limitofzero
Copy link
Contributor

@fairlighteth nice work, thank you!

@fairlighteth fairlighteth merged commit f1c5b22 into fix/progress-solvers Nov 12, 2025
14 of 15 checks passed
@fairlighteth fairlighteth deleted the fix/cancellation-message branch November 12, 2025 14:55
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2025
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.

4 participants