Skip to content

fix(ui): keep Release on step 5 while status is still FiatSent - #100

Merged
arkanoider merged 6 commits into
mainfrom
fix/messages-timeline-release-step
Jul 27, 2026
Merged

fix(ui): keep Release on step 5 while status is still FiatSent#100
arkanoider merged 6 commits into
mainfrom
fix/messages-timeline-release-step

Conversation

@arkanoider

@arkanoider arkanoider commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Prefer Release/Released (and Rate) over stale FiatSent status in the Messages timeline so releasing sats no longer jumps back to "Wait for Fiat".

Summary by CodeRabbit

  • Bug Fixes
    • Improved order timeline step progression for both buy and sell listings.
    • Release-related actions now show the correct Release step (without incorrectly reverting to fiat-sent).
    • Completed successful orders advance correctly to the rating step, with priority rules preventing overrides for canceled/expired/dispute/admin-settled states.
  • Tests
    • Expanded regression coverage for timeline step selection, including Release/Released and stale-state scenarios.
  • Documentation
    • Updated the admin disputes diagram to confirm by pressing Enter on YES.
  • Refactor
    • Streamlined internal confirmation key handling by removing the dedicated confirm-key handler and relying on shared mode transitions.

Prefer Release/Released (and Rate) over stale FiatSent status in the
Messages timeline so releasing sats no longer jumps back to "Wait for Fiat".

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@arkanoider, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 50bcfc2b-4ad1-4239-8f6f-31fd18526683

📥 Commits

Reviewing files that changed from the base of the PR and between 97e1921 and 0f9ac43.

📒 Files selected for processing (6)
  • docs/TUI_INTERFACE.md
  • rust-toolchain.toml
  • src/ui/key_handler/confirmation.rs
  • src/ui/key_handler/mod.rs
  • src/ui/orders.rs
  • src/util/order_utils/helper.rs

Walkthrough

Buy and sell timeline-step resolution now prioritizes relevant actions while respecting terminal statuses. The legacy confirmation handler and relay task helper were removed, and Enter-key confirmation documentation and comments were updated.

Changes

Timeline flow resolution

Layer / File(s) Summary
Action-priority resolution and regression tests
src/ui/orders.rs
Buy and sell flows prioritize Rate and Release actions, centralize terminal-status deferral rules, and add regression coverage for FiatSent, Success, and terminal states.

Enter confirmation cleanup

Layer / File(s) Summary
Legacy confirmation handler removal
src/ui/key_handler/confirmation.rs, src/ui/key_handler/mod.rs
Removes handle_confirm_key, its related imports, and its public re-export.
Enter confirmation references and relay helper cleanup
src/ui/key_handler/async_tasks.rs, src/ui/key_handler/admin_handlers.rs, src/ui/key_handler/enter_handlers.rs, src/ui/key_handler/user_handlers.rs, docs/ADMIN_DISPUTES.md
Removes the relay-add task helper and updates Enter-key confirmation comments and admin instructions.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: ermeme

Poem

A rabbit hops through Rate and Release,
While old confirmation fades in peace.
Enter shines where “y” once grew,
Tests guard every timeline cue.
“Hop onward!” whispers ears anew.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main UI timeline change to keep Release on step 5 while the order is still FiatSent.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/messages-timeline-release-step

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.

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/ui/orders.rs`:
- Around line 1099-1111: The action-priority branches in the relevant buy/sell
flow step resolvers must not override canceled, expired, or disputed terminal
orders. Update the guards around the Rate/RateReceived and Release/Released
handling to recognize the complete terminal status set, including Canceled,
CanceledByAdmin, CooperativelyCanceled, Expired, and Dispute, while preserving
the existing Success/SettledByAdmin/CompletedByAdmin behavior. Add regression
tests covering these statuses and both stale action categories.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c3d1856a-3727-400f-8069-7f3a607ad289

📥 Commits

Reviewing files that changed from the base of the PR and between 13b1ba5 and ee5a623.

📒 Files selected for processing (1)
  • src/ui/orders.rs

Comment thread src/ui/orders.rs Outdated
Guard post-fiat action-priority timeline branches so canceled, expired,
dispute, and admin-settled orders fall through to status mapping, while
keeping Release+FiatSent on step 5 and Release+Success on Rate.

Co-authored-by: Cursor <cursoragent@cursor.com>

@ermeme ermeme Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Re-reviewed the complete PR on current head f5a2aec9eb64df8bc9d3441684c9c30d67bb0c88, including the follow-up commit pushed during review.

The initial head did contain a regression: stale Release/Rate actions could override canceled or disputed statuses. The follow-up fixes it cleanly. The shared guard now defers to status for canceled, admin-canceled, cooperatively canceled, expired, disputed, admin-settled, and admin-completed orders, while preserving the intended FiatSent + Release -> ReleaseSats and completed-trade Rate behavior. Regression tests cover stale Release and Rate actions across both buy/sell resolvers and the terminal status families.

Exact-head verification with Rust 1.90.0 passed:

  • focused timeline_step_tests
  • cargo fmt --all -- --check
  • cargo test --all-features
  • cargo clippy --all-targets --all-features -- -D warnings
  • 12/12 GitHub checks

No blocking regressions remain. Approved.

arkanoider and others added 4 commits July 24, 2026 15:45
Seller release ACK was falling through to FiatSent/SendFiat briefly; treat it and PurchaseCompleted like Rate and infer Success.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@arkanoider
arkanoider merged commit 749d816 into main Jul 27, 2026
6 of 9 checks passed
@arkanoider
arkanoider deleted the fix/messages-timeline-release-step branch July 27, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant