-
Notifications
You must be signed in to change notification settings - Fork 16
Improve UI: refined modals, added confirmations and missing action buttons #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Updated modal UI with a more elegant design. - Added confirmation modals for Release and Dispute buttons. - Added Contact, Dispute, Cancel, and Release buttons to missing screens. - Changed button text color from white to black and applied bold style for better visibility.
WalkthroughThis update introduces UI, localization, and state management refinements. It enhances button theming and layout, adds confirmation dialogs for critical actions, and improves internationalization by updating localization files and dynamic string usage. The order state logic is expanded to handle cooperative cancellation and dispute actions with greater granularity. Mock classes are regenerated to reflect new and updated interfaces. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TradeDetailScreen
participant Dialog
participant OrderState
User->>TradeDetailScreen: Tap "Cancel", "Dispute", or "Release" button
TradeDetailScreen->>Dialog: Show confirmation dialog
Dialog-->>User: Await confirmation
alt User confirms
Dialog->>TradeDetailScreen: Return confirmation
TradeDetailScreen->>OrderState: Perform action (cancel/dispute/release)
else User cancels
Dialog->>TradeDetailScreen: Cancel action, reset loading state
end
Estimated code review effort4 (~80 minutes) Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
📓 Path-based instructions (2)lib/**/*.dart📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
**/*.dart📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
🧠 Learnings (1)lib/features/trades/screens/trade_detail_screen.dart (5)Learnt from: chebizarro Learnt from: CR Learnt from: chebizarro Learnt from: chebizarro Learnt from: CR ✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used📓 Path-based instructions (2)lib/**/*.dart📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
**/*.dart📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
🧠 Learnings (1)lib/features/trades/screens/trade_detail_screen.dart (5)Learnt from: chebizarro Learnt from: CR Learnt from: chebizarro Learnt from: chebizarro Learnt from: CR ⏰ 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 (14)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
test/mocks.mocks.dart (1)
1-2180: Do not manually edit generated mock filesThis is a generated file created by Mockito. According to the coding guidelines, generated files (
*.mocks.dart) should never be manually edited. If there are issues with the mocks, regenerate them using:dart run build_runner build -d
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
lib/core/app_theme.dart(1 hunks)lib/features/order/models/order_state.dart(4 hunks)lib/features/trades/screens/trade_detail_screen.dart(7 hunks)lib/l10n/intl_en.arb(4 hunks)lib/l10n/intl_es.arb(5 hunks)lib/l10n/intl_it.arb(5 hunks)lib/shared/widgets/custom_elevated_button.dart(1 hunks)test/mocks.mocks.dart(57 hunks)
📓 Path-based instructions (8)
lib/**/*.dart
📄 CodeRabbit Inference Engine (CLAUDE.md)
lib/**/*.dart: UseS.of(context).yourKeyfor all user-facing strings
Always checkmountedbefore using context after async operations
Files:
lib/shared/widgets/custom_elevated_button.dartlib/core/app_theme.dartlib/features/order/models/order_state.dartlib/features/trades/screens/trade_detail_screen.dart
**/*.dart
📄 CodeRabbit Inference Engine (CLAUDE.md)
**/*.dart: Remove unused imports and dependencies
Useconstconstructors where possible
Files:
lib/shared/widgets/custom_elevated_button.dartlib/core/app_theme.dartlib/features/order/models/order_state.dartlib/features/trades/screens/trade_detail_screen.darttest/mocks.mocks.dart
lib/l10n/intl_{en,es,it}.arb
📄 CodeRabbit Inference Engine (CLAUDE.md)
Add new localization keys to all three ARB files (
intl_en.arb,intl_es.arb,intl_it.arb)
Files:
lib/l10n/intl_en.arblib/l10n/intl_es.arblib/l10n/intl_it.arb
lib/l10n/*.arb
📄 CodeRabbit Inference Engine (CLAUDE.md)
Use proper ARB metadata for parameterized strings
Files:
lib/l10n/intl_en.arblib/l10n/intl_es.arblib/l10n/intl_it.arb
lib/l10n/**
📄 CodeRabbit Inference Engine (CLAUDE.md)
Internationalization files are located in
lib/l10n/
Files:
lib/l10n/intl_en.arblib/l10n/intl_es.arblib/l10n/intl_it.arb
{**/*.g.dart,**/*.mocks.dart,lib/generated/**}
📄 CodeRabbit Inference Engine (CLAUDE.md)
{**/*.g.dart,**/*.mocks.dart,lib/generated/**}: NEVER manually edit generated files (*.g.dart,*.mocks.dart,lib/generated/)
NEVER add individual ignore comments (e.g.,// ignore: must_be_immutable) to generated files (*.g.dart,*.mocks.dart,lib/generated/)
If analyzer issues exist in generated files, regenerate them usingdart run build_runner build -dinstead of adding ignore comments
Files:
test/mocks.mocks.dart
test/mocks.mocks.dart
📄 CodeRabbit Inference Engine (CLAUDE.md)
test/mocks.mocks.dart: DO NOT modifytest/mocks.mocks.dart- it already has file-level ignores
Mock files (test/mocks.mocks.dart) should only have file-level// ignore_for_file: must_be_immutableand not individual ignores
Files:
test/mocks.mocks.dart
test/**/*.dart
📄 CodeRabbit Inference Engine (CLAUDE.md)
Unit tests should be placed in the
test/directory
Files:
test/mocks.mocks.dart
🧠 Learnings (7)
lib/shared/widgets/custom_elevated_button.dart (1)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: All changes should pass flutter analyze before commit
lib/l10n/intl_en.arb (2)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/l10n/intl_{en,es,it}.arb : Add new localization keys to all three ARB files (intl_en.arb, intl_es.arb, intl_it.arb)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/l10n/*.arb : Use proper ARB metadata for parameterized strings
lib/features/order/models/order_state.dart (3)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/core/mostro_fsm.dart : Order state transitions are managed by core/mostro_fsm.dart
Learnt from: chebizarro
PR: #110
File: lib/features/trades/widgets/mostro_message_detail_widget.dart:134-141
Timestamp: 2025-06-08T23:54:09.987Z
Learning: In the OrderState refactor, public keys should be accessed via tradeState.peer?.publicKey from the OrderState instance rather than through session?.peer?.publicKey, as the OrderState encapsulates peer information directly.
Learnt from: chebizarro
PR: #74
File: lib/features/trades/models/trade_state.dart:1-15
Timestamp: 2025-05-08T16:06:33.665Z
Learning: In the context of the Mostro Mobile app, the TradeState class is specifically constructed using the tradeStateProvider. While some fields are nullable (lastAction and orderPayload), they are still marked as required parameters to ensure they are explicitly considered during state construction.
lib/l10n/intl_es.arb (2)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/l10n/intl_{en,es,it}.arb : Add new localization keys to all three ARB files (intl_en.arb, intl_es.arb, intl_it.arb)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/l10n/*.arb : Use proper ARB metadata for parameterized strings
lib/l10n/intl_it.arb (2)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/l10n/intl_{en,es,it}.arb : Add new localization keys to all three ARB files (intl_en.arb, intl_es.arb, intl_it.arb)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/l10n/*.arb : Use proper ARB metadata for parameterized strings
lib/features/trades/screens/trade_detail_screen.dart (2)
Learnt from: chebizarro
PR: #74
File: lib/features/trades/models/trade_state.dart:1-15
Timestamp: 2025-05-08T16:06:33.665Z
Learning: In the context of the Mostro Mobile app, the TradeState class is specifically constructed using the tradeStateProvider. While some fields are nullable (lastAction and orderPayload), they are still marked as required parameters to ensure they are explicitly considered during state construction.
Learnt from: chebizarro
PR: #110
File: lib/features/trades/widgets/mostro_message_detail_widget.dart:134-141
Timestamp: 2025-06-08T23:54:09.987Z
Learning: In the OrderState refactor, public keys should be accessed via tradeState.peer?.publicKey from the OrderState instance rather than through session?.peer?.publicKey, as the OrderState encapsulates peer information directly.
test/mocks.mocks.dart (22)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to test/mocks.dart : Mocks are generated using Mockito in test/mocks.dart
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to test/mocks.mocks.dart : DO NOT modify test/mocks.mocks.dart - it already has file-level ignores
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to test/mocks.mocks.dart : Mock files (test/mocks.mocks.dart) should only have file-level // ignore_for_file: must_be_immutable and not individual ignores
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to {/*.g.dart,/*.mocks.dart,lib/generated/**} : NEVER manually edit generated files (*.g.dart, *.mocks.dart, lib/generated/)
Learnt from: chebizarro
PR: #110
File: test/notifiers/take_order_notifier_test.dart:72-74
Timestamp: 2025-06-04T19:35:20.209Z
Learning: MostroService methods like takeBuyOrder() and takeSellOrder() return Future and trigger side effects through other mechanisms rather than direct return values. When testing these methods, focus on verifying method calls and testing state changes through the provider system rather than mocking return values.
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/services/nostr_service.dart : Nostr protocol interactions go through services/nostr_service.dart
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to {/*.g.dart,/*.mocks.dart,lib/generated/**} : NEVER add individual ignore comments (e.g., // ignore: must_be_immutable) to generated files (*.g.dart, *.mocks.dart, lib/generated/)
Learnt from: chebizarro
PR: #74
File: lib/services/mostro_service.dart:70-76
Timestamp: 2025-05-06T15:49:26.443Z
Learning: In the Mostro Mobile codebase, Riverpod code generation is used with @Riverpod annotations. Providers like eventStorageProvider are generated in .g.dart files from annotated functions in the main provider files. These providers are accessible by importing the main provider file (e.g., mostro_service_provider.dart), not by importing a separate provider file.
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to **/*.dart : Remove unused imports and dependencies
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/data/models.dart : Models should be exported through data/models.dart
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/shared/providers/mostro_database_provider.dart : Database initialization is in shared/providers/mostro_database_provider.dart
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Use Riverpod for all state management
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/background/**/*.dart : Background services are implemented in the background/ directory
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/features//providers/**/.dart : Providers are organized by feature in features/{feature}/providers/
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/data/repositories/**/*.dart : All data access should go through repository classes in data/repositories/
Learnt from: Catrya
PR: #215
File: lib/features/order/notfiers/order_notifier.dart:0-0
Timestamp: 2025-07-20T23:33:17.689Z
Learning: In AbstractMostroNotifier, the handleEvent method is synchronous and returns void, not Future. Do not suggest adding await to super.handleEvent() calls as this would cause compilation errors.
Learnt from: Catrya
PR: #215
File: lib/features/order/notfiers/order_notifier.dart:0-0
Timestamp: 2025-07-20T23:33:17.689Z
Learning: In AbstractMostroNotifier, the handleEvent method is synchronous and returns void, not Future. Do not suggest adding await to super.handleEvent() calls as this would cause compilation errors.
Learnt from: Catrya
PR: #215
File: lib/features/order/notfiers/order_notifier.dart:0-0
Timestamp: 2025-07-20T23:33:17.689Z
Learning: In AbstractMostroNotifier, the handleEvent method is synchronous and returns void, not Future. Do not suggest adding await to super.handleEvent() calls as this would cause compilation errors.
Learnt from: chebizarro
PR: #74
File: lib/notifications/notification_service.dart:54-59
Timestamp: 2025-05-08T16:31:29.582Z
Learning: In the Nostr protocol, event.id will never be null in events returned by relay subscriptions, so null safety checks for this property are unnecessary.
Learnt from: chebizarro
PR: #74
File: lib/services/mostro_service.dart:70-76
Timestamp: 2025-05-06T15:49:26.443Z
Learning: In the Mostro Mobile codebase, eventStorageProvider is exported from package:mostro_mobile/shared/providers/mostro_service_provider.dart and not from a separate event_storage_provider.dart file.
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/core/mostro_fsm.dart : Order state transitions are managed by core/mostro_fsm.dart
Learnt from: chebizarro
PR: #74
File: lib/services/mostro_service.dart:97-103
Timestamp: 2025-05-06T15:49:55.079Z
Learning: In the Mostro protocol, an order cannot be canceled unless it has a valid orderId, so null checks on orderId during cancel operations are unnecessary.
🪛 RuboCop (1.76.1)
lib/l10n/intl_es.arb
[warning] 549-549: Duplicated key in hash literal.
(Lint/DuplicateHashKey)
lib/l10n/intl_it.arb
[warning] 564-564: Duplicated key in hash literal.
(Lint/DuplicateHashKey)
🧰 Additional context used
📓 Path-based instructions (8)
lib/**/*.dart
📄 CodeRabbit Inference Engine (CLAUDE.md)
lib/**/*.dart: UseS.of(context).yourKeyfor all user-facing strings
Always checkmountedbefore using context after async operations
Files:
lib/shared/widgets/custom_elevated_button.dartlib/core/app_theme.dartlib/features/order/models/order_state.dartlib/features/trades/screens/trade_detail_screen.dart
**/*.dart
📄 CodeRabbit Inference Engine (CLAUDE.md)
**/*.dart: Remove unused imports and dependencies
Useconstconstructors where possible
Files:
lib/shared/widgets/custom_elevated_button.dartlib/core/app_theme.dartlib/features/order/models/order_state.dartlib/features/trades/screens/trade_detail_screen.darttest/mocks.mocks.dart
lib/l10n/intl_{en,es,it}.arb
📄 CodeRabbit Inference Engine (CLAUDE.md)
Add new localization keys to all three ARB files (
intl_en.arb,intl_es.arb,intl_it.arb)
Files:
lib/l10n/intl_en.arblib/l10n/intl_es.arblib/l10n/intl_it.arb
lib/l10n/*.arb
📄 CodeRabbit Inference Engine (CLAUDE.md)
Use proper ARB metadata for parameterized strings
Files:
lib/l10n/intl_en.arblib/l10n/intl_es.arblib/l10n/intl_it.arb
lib/l10n/**
📄 CodeRabbit Inference Engine (CLAUDE.md)
Internationalization files are located in
lib/l10n/
Files:
lib/l10n/intl_en.arblib/l10n/intl_es.arblib/l10n/intl_it.arb
{**/*.g.dart,**/*.mocks.dart,lib/generated/**}
📄 CodeRabbit Inference Engine (CLAUDE.md)
{**/*.g.dart,**/*.mocks.dart,lib/generated/**}: NEVER manually edit generated files (*.g.dart,*.mocks.dart,lib/generated/)
NEVER add individual ignore comments (e.g.,// ignore: must_be_immutable) to generated files (*.g.dart,*.mocks.dart,lib/generated/)
If analyzer issues exist in generated files, regenerate them usingdart run build_runner build -dinstead of adding ignore comments
Files:
test/mocks.mocks.dart
test/mocks.mocks.dart
📄 CodeRabbit Inference Engine (CLAUDE.md)
test/mocks.mocks.dart: DO NOT modifytest/mocks.mocks.dart- it already has file-level ignores
Mock files (test/mocks.mocks.dart) should only have file-level// ignore_for_file: must_be_immutableand not individual ignores
Files:
test/mocks.mocks.dart
test/**/*.dart
📄 CodeRabbit Inference Engine (CLAUDE.md)
Unit tests should be placed in the
test/directory
Files:
test/mocks.mocks.dart
🧠 Learnings (7)
lib/shared/widgets/custom_elevated_button.dart (1)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: All changes should pass flutter analyze before commit
lib/l10n/intl_en.arb (2)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/l10n/intl_{en,es,it}.arb : Add new localization keys to all three ARB files (intl_en.arb, intl_es.arb, intl_it.arb)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/l10n/*.arb : Use proper ARB metadata for parameterized strings
lib/features/order/models/order_state.dart (3)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/core/mostro_fsm.dart : Order state transitions are managed by core/mostro_fsm.dart
Learnt from: chebizarro
PR: #110
File: lib/features/trades/widgets/mostro_message_detail_widget.dart:134-141
Timestamp: 2025-06-08T23:54:09.987Z
Learning: In the OrderState refactor, public keys should be accessed via tradeState.peer?.publicKey from the OrderState instance rather than through session?.peer?.publicKey, as the OrderState encapsulates peer information directly.
Learnt from: chebizarro
PR: #74
File: lib/features/trades/models/trade_state.dart:1-15
Timestamp: 2025-05-08T16:06:33.665Z
Learning: In the context of the Mostro Mobile app, the TradeState class is specifically constructed using the tradeStateProvider. While some fields are nullable (lastAction and orderPayload), they are still marked as required parameters to ensure they are explicitly considered during state construction.
lib/l10n/intl_es.arb (2)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/l10n/intl_{en,es,it}.arb : Add new localization keys to all three ARB files (intl_en.arb, intl_es.arb, intl_it.arb)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/l10n/*.arb : Use proper ARB metadata for parameterized strings
lib/l10n/intl_it.arb (2)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/l10n/intl_{en,es,it}.arb : Add new localization keys to all three ARB files (intl_en.arb, intl_es.arb, intl_it.arb)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/l10n/*.arb : Use proper ARB metadata for parameterized strings
lib/features/trades/screens/trade_detail_screen.dart (2)
Learnt from: chebizarro
PR: #74
File: lib/features/trades/models/trade_state.dart:1-15
Timestamp: 2025-05-08T16:06:33.665Z
Learning: In the context of the Mostro Mobile app, the TradeState class is specifically constructed using the tradeStateProvider. While some fields are nullable (lastAction and orderPayload), they are still marked as required parameters to ensure they are explicitly considered during state construction.
Learnt from: chebizarro
PR: #110
File: lib/features/trades/widgets/mostro_message_detail_widget.dart:134-141
Timestamp: 2025-06-08T23:54:09.987Z
Learning: In the OrderState refactor, public keys should be accessed via tradeState.peer?.publicKey from the OrderState instance rather than through session?.peer?.publicKey, as the OrderState encapsulates peer information directly.
test/mocks.mocks.dart (22)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to test/mocks.dart : Mocks are generated using Mockito in test/mocks.dart
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to test/mocks.mocks.dart : DO NOT modify test/mocks.mocks.dart - it already has file-level ignores
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to test/mocks.mocks.dart : Mock files (test/mocks.mocks.dart) should only have file-level // ignore_for_file: must_be_immutable and not individual ignores
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to {/*.g.dart,/*.mocks.dart,lib/generated/**} : NEVER manually edit generated files (*.g.dart, *.mocks.dart, lib/generated/)
Learnt from: chebizarro
PR: #110
File: test/notifiers/take_order_notifier_test.dart:72-74
Timestamp: 2025-06-04T19:35:20.209Z
Learning: MostroService methods like takeBuyOrder() and takeSellOrder() return Future and trigger side effects through other mechanisms rather than direct return values. When testing these methods, focus on verifying method calls and testing state changes through the provider system rather than mocking return values.
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/services/nostr_service.dart : Nostr protocol interactions go through services/nostr_service.dart
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to {/*.g.dart,/*.mocks.dart,lib/generated/**} : NEVER add individual ignore comments (e.g., // ignore: must_be_immutable) to generated files (*.g.dart, *.mocks.dart, lib/generated/)
Learnt from: chebizarro
PR: #74
File: lib/services/mostro_service.dart:70-76
Timestamp: 2025-05-06T15:49:26.443Z
Learning: In the Mostro Mobile codebase, Riverpod code generation is used with @Riverpod annotations. Providers like eventStorageProvider are generated in .g.dart files from annotated functions in the main provider files. These providers are accessible by importing the main provider file (e.g., mostro_service_provider.dart), not by importing a separate provider file.
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to **/*.dart : Remove unused imports and dependencies
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/data/models.dart : Models should be exported through data/models.dart
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/shared/providers/mostro_database_provider.dart : Database initialization is in shared/providers/mostro_database_provider.dart
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Use Riverpod for all state management
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/background/**/*.dart : Background services are implemented in the background/ directory
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/features//providers/**/.dart : Providers are organized by feature in features/{feature}/providers/
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/data/repositories/**/*.dart : All data access should go through repository classes in data/repositories/
Learnt from: Catrya
PR: #215
File: lib/features/order/notfiers/order_notifier.dart:0-0
Timestamp: 2025-07-20T23:33:17.689Z
Learning: In AbstractMostroNotifier, the handleEvent method is synchronous and returns void, not Future. Do not suggest adding await to super.handleEvent() calls as this would cause compilation errors.
Learnt from: Catrya
PR: #215
File: lib/features/order/notfiers/order_notifier.dart:0-0
Timestamp: 2025-07-20T23:33:17.689Z
Learning: In AbstractMostroNotifier, the handleEvent method is synchronous and returns void, not Future. Do not suggest adding await to super.handleEvent() calls as this would cause compilation errors.
Learnt from: Catrya
PR: #215
File: lib/features/order/notfiers/order_notifier.dart:0-0
Timestamp: 2025-07-20T23:33:17.689Z
Learning: In AbstractMostroNotifier, the handleEvent method is synchronous and returns void, not Future. Do not suggest adding await to super.handleEvent() calls as this would cause compilation errors.
Learnt from: chebizarro
PR: #74
File: lib/notifications/notification_service.dart:54-59
Timestamp: 2025-05-08T16:31:29.582Z
Learning: In the Nostr protocol, event.id will never be null in events returned by relay subscriptions, so null safety checks for this property are unnecessary.
Learnt from: chebizarro
PR: #74
File: lib/services/mostro_service.dart:70-76
Timestamp: 2025-05-06T15:49:26.443Z
Learning: In the Mostro Mobile codebase, eventStorageProvider is exported from package:mostro_mobile/shared/providers/mostro_service_provider.dart and not from a separate event_storage_provider.dart file.
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/core/mostro_fsm.dart : Order state transitions are managed by core/mostro_fsm.dart
Learnt from: chebizarro
PR: #74
File: lib/services/mostro_service.dart:97-103
Timestamp: 2025-05-06T15:49:55.079Z
Learning: In the Mostro protocol, an order cannot be canceled unless it has a valid orderId, so null checks on orderId during cancel operations are unnecessary.
🪛 RuboCop (1.76.1)
lib/l10n/intl_es.arb
[warning] 549-549: Duplicated key in hash literal.
(Lint/DuplicateHashKey)
lib/l10n/intl_it.arb
[warning] 564-564: Duplicated key in hash literal.
(Lint/DuplicateHashKey)
🔇 Additional comments (10)
lib/shared/widgets/custom_elevated_button.dart (1)
32-32: LGTM! Button styling improvements are well implemented.The changes consistently update the button appearance:
- Default foreground color changed from cream to black for better readability
- Bold font weight applied for improved visibility
- Color consistency maintained between
foregroundColorand text colorThese changes align with the PR objectives to improve UI readability.
Also applies to: 39-42
lib/core/app_theme.dart (1)
109-109: LGTM! Theme updates ensure consistent button styling.The elevated button theme changes align perfectly with the custom button widget updates:
- Black foreground color improves text visibility
- Bold font weight enhances readability
- Global theme consistency maintained
These changes support the PR's goal of improving button text visibility across the app.
Also applies to: 112-112
lib/l10n/intl_en.arb (1)
77-77: Localization keys verified across all languagesAll new dialog keys are present in intl_en.arb, intl_es.arb, and intl_it.arb:
- “disputeTradeDialogTitle” (en:238, es:564, it:579)
- “releaseTradeDialogTitle” (en:272, es:226, it:235)
- “areYouSureRelease” (en:273, es:227, it:236)
Localization updates are consistent and contextually appropriate. Approving these changes.
lib/l10n/intl_it.arb (2)
77-77: LGTM! Italian localization properly mirrors English changes.The Italian localization updates are consistent:
- Button labels appropriately translated ("RATE", "ANNULLA")
- New dialog strings added for dispute and release confirmations
- Translations are contextually appropriate
These changes maintain localization consistency across the app.
Also applies to: 471-471, 579-580, 235-237
564-564: No duplicate key found inintl_it.arb.
Static analysis oflib/l10n/intl_it.arbdid not surface any duplicate keys—theacceptCancelButtonkey appears only once (see lines 560–570). You can disregard the duplicate-key warning.Likely an incorrect or invalid review comment.
lib/features/order/models/order_state.dart (1)
287-290: LGTM! State machine extensions properly support new workflows.The order state extensions are well-implemented:
- New
cooperativelyCanceledanddisputestatus mappings added with appropriate actions- Role-based action definitions maintain consistency between seller and buyer perspectives
- Action flows are logical (e.g., allowing
disputeandsendDmin cooperative cancel states)- Existing status mappings properly extended with new cooperative cancel actions
These changes provide the necessary state machine support for the new confirmation dialogs and UI workflows introduced in the PR.
Also applies to: 297-309, 328-352, 403-406, 414-422, 441-461
lib/l10n/intl_es.arb (2)
226-228: New localization keys are present in all ARB filesBoth
releaseTradeDialogTitleandareYouSureReleasehave been added to:
- lib/l10n/intl_en.arb (lines 272–273)
- lib/l10n/intl_es.arb (lines 226–227)
- lib/l10n/intl_it.arb (lines 235–236)
No further changes needed.
564-566: All new dispute dialog localization keys are present in all ARB files
Verified that bothdisputeTradeDialogTitleanddisputeTradeDialogContenthave been added to:
- lib/l10n/intl_en.arb (lines 238–239)
- lib/l10n/intl_es.arb (lines 564–565)
- lib/l10n/intl_it.arb (lines 579–580)
No further action required.
lib/features/trades/screens/trade_detail_screen.dart (2)
83-84: Good UI improvement with consistent spacingThe change to
WrapAlignment.spaceEvenlywith consistent 8px spacing improves the button layout uniformity.
534-685: Well-structured dialog helper methodsThe
_buildCancelButtonand_buildDisputeButtonhelper methods are well-implemented with:
- Consistent dialog styling and structure
- Proper handling of user confirmation
- Clear separation of concerns
This refactoring improves code maintainability and readability.
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Tests