Skip to content

sync main#3222

Merged
ca333 merged 3 commits intomainfrom
dev
Oct 23, 2025
Merged

sync main#3222
ca333 merged 3 commits intomainfrom
dev

Conversation

@ca333
Copy link
Copy Markdown
Contributor

@ca333 ca333 commented Oct 23, 2025

Summary by CodeRabbit

  • New Features
    • Market Maker Bot controls now fully integrated in the orders tab, featuring a real-time status indicator and start/stop buttons for bot operations.
    • Bot status indicator automatically adapts its display based on available screen width, optimizing layout across all device sizes.
    • Header component structure enhanced to support optional custom widgets and improve overall layout flexibility.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 23, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Five UI widgets were refactored across the market maker and DEX list interfaces. CopiedText simplified rendering logic and removed Key parameters. DexListHeaderMobile added optional centerWidget support and restructured filter UI. AnimatedBotStatusIndicator added conditional text display based on width threshold. MarketMakerBotOrderList received formatting updates only. MarketMakerBotTabContentWrapper integrated bot control UI with bloc state management and localization.

Changes

Cohort / File(s) Summary
CopiedText widget simplification
lib/shared/widgets/copied_text.dart
Removed Key parameter from public constructors CopiedText and CopiedTextV2. Simplified rendering branches for truncated vs. non-truncated text by replacing nested Flexible/Conditional blocks with streamlined structure. Removed unused softWrap calculations.
Dex list header centerWidget support
lib/views/dex/dex_list_filter/mobile/dex_list_header_mobile.dart
Added optional centerWidget parameter to DexListHeaderMobile constructor. Renders centerWidget in header row between filter button and cancel button. Refactored _getFilterElements with inlined string calculations and restructured _buildFilterButton layout with adjusted Row structure and icon width.
Bot status indicator width-based rendering
lib/views/market_maker_bot/animated_bot_status_indicator.dart
Added widthThreshold field (default 100) to AnimatedBotStatusIndicator. Wrapped layout in LayoutBuilder to conditionally display status text based on available width; circular status dot remains always visible. Updated constructor signature with super.key pattern.
Market maker order list formatting
lib/views/market_maker_bot/market_maker_bot_order_list.dart
Applied formatting and style improvements including trailing commas, single-line widget constructions, and parameter label wrapping. No functional or control-flow changes.
Bot controls UI integration
lib/views/market_maker_bot/market_maker_bot_tab_content_wrapper.dart
Added imports for localization, UI kit, and bloc classes. Introduced new bot controls UI composition with AnimatedBotStatusIndicator and Start/Stop button that displays conditionally when tab type is orders. BlocBuilder integration reads MarketMakerBotBloc and MarketMakerOrderListBloc states. Button actions dispatch MarketMakerBotStartRequested/StopRequested events. Refactored inline lambdas to concise formatting.

Sequence Diagram(s)

sequenceDiagram
    participant UI as DexListHeaderMobile
    participant Filter as _buildFilterButton
    participant Center as centerWidget
    participant Cancel as Cancel Button
    
    rect rgb(200, 220, 255)
    Note over UI: Header Row Rendering (when centerWidget provided)
    UI->>Filter: Render filter button
    UI->>Center: Render centerWidget (expands)
    UI->>Cancel: Render cancel button (if present)
    end
Loading
sequenceDiagram
    participant Layout as LayoutBuilder
    participant Bot as AnimatedBotStatusIndicator
    participant Dot as Status Dot
    participant Text as Status Text
    
    rect rgb(200, 220, 255)
    Note over Layout: Width-based conditional rendering
    Layout->>Dot: Always render (animated)
    alt maxWidth >= widthThreshold
        Layout->>Text: Render status text
    else
        Layout->>Text: Hide text (space constrained)
    end
    end
Loading
sequenceDiagram
    participant Tab as MarketMakerBotTabContentWrapper
    participant BotBloc as MarketMakerBotBloc
    participant OrderBloc as MarketMakerOrderListBloc
    participant Center as centerWidget
    participant Button as Start/Stop Button
    
    rect rgb(200, 220, 255)
    Note over Tab: Bot Controls Integration (tab type = orders)
    Tab->>BotBloc: Read bot state
    Tab->>OrderBloc: Read orders state
    Tab->>Center: Build AnimatedBotStatusIndicator + Button
    alt Button pressed
        Button->>BotBloc: Dispatch MarketMakerBotStartRequested
        alt or if running
        Button->>BotBloc: Dispatch MarketMakerBotStopRequested
        end
    end
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Multiple files with interconnected changes including public API modifications (CopiedText Key removal, DexListHeaderMobile centerWidget addition, AnimatedBotStatusIndicator widthThreshold), structural widget refactoring, bloc state management integration, and localization wiring. Requires careful verification of rendering logic changes, state management correctness, and UI composition with centerWidget expansion behavior.

Possibly related PRs

Suggested labels

QA

Suggested reviewers

  • CharlVS
  • smk762
  • takenagain

Poem

🐰 A rabbit hops through widgets bright,
Removing keys that weren't quite right,
New centerWidgets align the view,
Status dots know when to shine through! ✨
Blocs now dance in harmony's light!

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 57d749a and 29bb593.

📒 Files selected for processing (5)
  • lib/shared/widgets/copied_text.dart (7 hunks)
  • lib/views/dex/dex_list_filter/mobile/dex_list_header_mobile.dart (7 hunks)
  • lib/views/market_maker_bot/animated_bot_status_indicator.dart (2 hunks)
  • lib/views/market_maker_bot/market_maker_bot_order_list.dart (5 hunks)
  • lib/views/market_maker_bot/market_maker_bot_tab_content_wrapper.dart (9 hunks)

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.

@ca333 ca333 merged commit 98810a6 into main Oct 23, 2025
6 of 13 checks passed
@github-actions
Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 29bb593):

https://walletrc--pull-3222-merge-l6idgzqb.web.app

(expires Thu, 30 Oct 2025 12:51:44 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

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.

2 participants