feat: add VIEW DISPUTE button for dispute states in order details#323
Conversation
Add VIEW DISPUTE button that appears when orders are in dispute states (dispute-initiated-by-you, dispute-initiated-by-peer, admin-took-dispute). - Add viewDisputeButton localization for EN/ES/IT - Navigate to dispute details screen when pressed - Add Action.adminTookDispute to FSM with same actions as other dispute states - Ensure correct buttons appear for both seller and buyer roles Improves UX by providing direct access to dispute details from order screen.
WalkthroughAdds explicit adminTookDispute handling in order action mappings and introduces a dedicated VIEW DISPUTE button flow on the trade detail screen when a disputeId exists. Updates dispute action rendering to bypass standard actions in this state. Adds new localization key viewDisputeButton in English, Spanish, and Italian. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant T as TradeDetailScreen
participant S as OrderState
participant R as Router/Navigator
participant D as Dispute Screen
U->>T: Open trade details
T->>S: Read status/role/actions + disputeId
alt dispute active AND disputeId present
T->>U: Render VIEW DISPUTE button
U->>T: Tap VIEW DISPUTE
T->>R: Navigate to disputeId
R->>D: Show Dispute Screen
else no dispute or no disputeId
T->>U: Render standard action buttons
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🧰 Additional context used📓 Path-based instructions (7)**/*.arb📄 CodeRabbit inference engine (AGENTS.md)
Files:
lib/l10n/intl_{en,es,it}.arb📄 CodeRabbit inference engine (CLAUDE.md)
Files:
lib/l10n/*.arb📄 CodeRabbit inference engine (CLAUDE.md)
Files:
lib/features/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.dart📄 CodeRabbit inference engine (AGENTS.md)
Files:
lib/features/**/*.dart📄 CodeRabbit inference engine (AGENTS.md)
Files:
lib/**/*.dart📄 CodeRabbit inference engine (CLAUDE.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (11)
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 |
closes #322
Add VIEW DISPUTE button that appears when orders are in dispute states (dispute-initiated-by-you,
dispute-initiated-by-peer, admin-took-dispute), and improve admin-took-dispute screen
Improves UX by providing direct access to dispute details from order screen.
Now:

Also admin-took-dispute screen

Before:
Now:

Summary by CodeRabbit