Skip to content

Chore/refactor large pages into subfolders - #14

Merged
buivietphi merged 8 commits into
mainfrom
chore/refactor-large-pages-into-subfolders
Jul 6, 2026
Merged

buivietphi merged 8 commits into
mainfrom
chore/refactor-large-pages-into-subfolders

Conversation

@buivietphi

@buivietphi buivietphi commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation update
  • Performance improvement
  • CI/CD or build configuration
  • Other (describe below)

Testing

  • Tested on macOS
  • Tested on Windows
  • Flutter analyze passes
  • SDK build passes (if applicable)

Screenshots (if applicable)

Summary by CodeRabbit

  • New Features

    • Added richer detail views for events, logs, network requests, storage, errors, and performance data.
    • Introduced new filter bars, toolbars, badges, chips, and reusable action buttons across the app.
    • Added screenshot capture for several detail panels and improved JSON/body viewing with tree, formatted, and code modes.
    • Added new timing, headers, diff, and empty-state views for clearer diagnostics.
  • Bug Fixes

    • Improved handling of empty or whitespace-only JSON input.
    • Enhanced copy, hover, and selection feedback throughout the interface.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fe8ffaf4-ef90-416a-a1f5-ee06b00bf2d6

📥 Commits

Reviewing files that changed from the base of the PR and between 6257785 and 54eecc1.

📒 Files selected for processing (139)
  • lib/components/viewers/json_viewer.dart
  • lib/features/all_events/presentation/buttons/header_icon_button.dart
  • lib/features/all_events/presentation/buttons/icon_btn.dart
  • lib/features/all_events/presentation/buttons/mini_icon_button.dart
  • lib/features/all_events/presentation/buttons/pressable_button.dart
  • lib/features/all_events/presentation/detail/detail_header.dart
  • lib/features/all_events/presentation/detail/diff_row.dart
  • lib/features/all_events/presentation/detail/event_detail_panel.dart
  • lib/features/all_events/presentation/detail/fallback_detail.dart
  • lib/features/all_events/presentation/detail/icon_action.dart
  • lib/features/all_events/presentation/detail/log_detail.dart
  • lib/features/all_events/presentation/detail/log_inline_json.dart
  • lib/features/all_events/presentation/detail/meta_row.dart
  • lib/features/all_events/presentation/detail/network_detail.dart
  • lib/features/all_events/presentation/detail/state_detail.dart
  • lib/features/all_events/presentation/detail/storage_detail.dart
  • lib/features/all_events/presentation/event_row/event_row.dart
  • lib/features/all_events/presentation/fab/draggable_reload_fab.dart
  • lib/features/all_events/presentation/header/filter_bar.dart
  • lib/features/all_events/presentation/header/filter_chip.dart
  • lib/features/all_events/presentation/header/header_bar.dart
  • lib/features/all_events/presentation/network/headers_view.dart
  • lib/features/all_events/presentation/network/timing_view.dart
  • lib/features/all_events/presentation/pages/all_events_page.dart
  • lib/features/all_events/presentation/shared/body_view.dart
  • lib/features/all_events/presentation/shared/code_block.dart
  • lib/features/all_events/presentation/shared/copy_button.dart
  • lib/features/all_events/presentation/shared/detail_tab_bar.dart
  • lib/features/all_events/presentation/shared/empty_value.dart
  • lib/features/all_events/presentation/shared/error_block.dart
  • lib/features/all_events/presentation/shared/format_toggle_button.dart
  • lib/features/all_events/presentation/shared/info_row.dart
  • lib/features/all_events/presentation/shared/label.dart
  • lib/features/all_events/presentation/shared/meta_cell.dart
  • lib/features/all_events/presentation/shared/op_badge.dart
  • lib/features/all_events/presentation/shared/section_label.dart
  • lib/features/all_events/presentation/shared/tag_chip.dart
  • lib/features/all_events/presentation/shared/type_badge.dart
  • lib/features/all_events/presentation/shared/type_info.dart
  • lib/features/all_events/presentation/status/reload_pill.dart
  • lib/features/all_events/presentation/status/server_status_pill.dart
  • lib/features/console/presentation/detail/detail_panel.dart
  • lib/features/console/presentation/detail/detail_tab_bar.dart
  • lib/features/console/presentation/detail/log_message_block.dart
  • lib/features/console/presentation/detail/metadata_block.dart
  • lib/features/console/presentation/detail/plain_message_block.dart
  • lib/features/console/presentation/detail/screenshot_builder.dart
  • lib/features/console/presentation/event_row/log_entry_content.dart
  • lib/features/console/presentation/header/icon_btn.dart
  • lib/features/console/presentation/header/level_filter_chip.dart
  • lib/features/console/presentation/header/toolbar.dart
  • lib/features/console/presentation/pages/console_page.dart
  • lib/features/console/presentation/shared/count_pill.dart
  • lib/features/console/presentation/shared/level_color.dart
  • lib/features/console/presentation/shared/section_label.dart
  • lib/features/console/presentation/shared/tag_badge.dart
  • lib/features/error_inspector/presentation/detail/detail_row.dart
  • lib/features/error_inspector/presentation/detail/error_detail_panel.dart
  • lib/features/error_inspector/presentation/event_row/error_list_item.dart
  • lib/features/error_inspector/presentation/header/icon_btn.dart
  • lib/features/error_inspector/presentation/header/info_bar.dart
  • lib/features/error_inspector/presentation/header/platform_filter_chip.dart
  • lib/features/error_inspector/presentation/header/toolbar.dart
  • lib/features/error_inspector/presentation/pages/error_inspector_page.dart
  • lib/features/error_inspector/presentation/shared/count_pill.dart
  • lib/features/error_inspector/presentation/shared/count_up.dart
  • lib/features/error_inspector/presentation/shared/empty_state_with_pulse.dart
  • lib/features/error_inspector/presentation/shared/error_tokens.dart
  • lib/features/error_inspector/presentation/shared/platform_badge.dart
  • lib/features/error_inspector/presentation/shared/pulsing_dot.dart
  • lib/features/error_inspector/presentation/shared/severity_badge.dart
  • lib/features/network_inspector/presentation/detail/blob_info.dart
  • lib/features/network_inspector/presentation/detail/body_tab.dart
  • lib/features/network_inspector/presentation/detail/headers_tab.dart
  • lib/features/network_inspector/presentation/detail/timing_tab.dart
  • lib/features/network_inspector/presentation/pages/network_inspector_page.dart
  • lib/features/network_inspector/presentation/request/request_card.dart
  • lib/features/network_inspector/presentation/request/request_detail_panel.dart
  • lib/features/network_inspector/presentation/shared/copy_action_chip.dart
  • lib/features/network_inspector/presentation/shared/detail_tab_bar.dart
  • lib/features/network_inspector/presentation/shared/detect_blob_payload.dart
  • lib/features/network_inspector/presentation/shared/header_icon_button.dart
  • lib/features/network_inspector/presentation/toolbar/clear_stale_btn.dart
  • lib/features/network_inspector/presentation/toolbar/icon_btn.dart
  • lib/features/network_inspector/presentation/toolbar/segment_group.dart
  • lib/features/network_inspector/presentation/toolbar/toolbar.dart
  • lib/features/performance/presentation/badges/alloc_rate_badge.dart
  • lib/features/performance/presentation/badges/jank_badge.dart
  • lib/features/performance/presentation/badges/net_stat_chip.dart
  • lib/features/performance/presentation/badges/system_chip.dart
  • lib/features/performance/presentation/charts/network_waterfall_painter.dart
  • lib/features/performance/presentation/charts/profiler_line_chart.dart
  • lib/features/performance/presentation/charts/profiler_line_painter.dart
  • lib/features/performance/presentation/header/metric_pill.dart
  • lib/features/performance/presentation/header/profiler_toolbar.dart
  • lib/features/performance/presentation/header/toolbar_button.dart
  • lib/features/performance/presentation/pages/performance_page.dart
  • lib/features/performance/presentation/panels/profiler_chart_row.dart
  • lib/features/performance/presentation/panels/profiler_network_row.dart
  • lib/features/performance/presentation/panels/system_status_row.dart
  • lib/features/performance/presentation/shared/format/memory.dart
  • lib/features/performance/presentation/shared/format/speed.dart
  • lib/features/performance/presentation/shared/status_colors.dart
  • lib/features/settings/presentation/header/card.dart
  • lib/features/settings/presentation/header/page_header.dart
  • lib/features/settings/presentation/header/section_title.dart
  • lib/features/settings/presentation/pages/settings_page.dart
  • lib/features/settings/presentation/sections/appearance_section.dart
  • lib/features/settings/presentation/sections/detail_view_section.dart
  • lib/features/settings/presentation/sections/device_history_section.dart
  • lib/features/settings/presentation/sections/devices_section.dart
  • lib/features/settings/presentation/sections/donate_section.dart
  • lib/features/settings/presentation/sections/language_dropdown.dart
  • lib/features/settings/presentation/sections/network_section.dart
  • lib/features/settings/presentation/sections/quick_start_section.dart
  • lib/features/settings/presentation/sections/server_section.dart
  • lib/features/settings/presentation/sections/tab_visibility_section.dart
  • lib/features/settings/presentation/sections/usb_tools_section.dart
  • lib/features/settings/presentation/shared/action_button.dart
  • lib/features/settings/presentation/shared/code_block.dart
  • lib/features/settings/presentation/shared/donate_button.dart
  • lib/features/settings/presentation/shared/icon_action.dart
  • lib/features/settings/presentation/shared/network_info.dart
  • lib/features/settings/presentation/shared/status_chip.dart
  • lib/features/settings/presentation/usb/adb_resolver.dart
  • lib/features/storage_viewer/presentation/detail/detail_icon_btn.dart
  • lib/features/storage_viewer/presentation/detail/detail_panel.dart
  • lib/features/storage_viewer/presentation/detail/meta_chip.dart
  • lib/features/storage_viewer/presentation/detail/meta_divider.dart
  • lib/features/storage_viewer/presentation/detail/metadata_footer.dart
  • lib/features/storage_viewer/presentation/detail/screenshot_builder.dart
  • lib/features/storage_viewer/presentation/event_row/storage_entry_tile.dart
  • lib/features/storage_viewer/presentation/header/icon_btn.dart
  • lib/features/storage_viewer/presentation/header/segment_chip.dart
  • lib/features/storage_viewer/presentation/header/segment_group.dart
  • lib/features/storage_viewer/presentation/header/toolbar.dart
  • lib/features/storage_viewer/presentation/pages/storage_viewer_page.dart
  • lib/features/storage_viewer/presentation/shared/storage_preview.dart
  • lib/features/storage_viewer/presentation/shared/storage_tokens.dart

📝 Walkthrough

Walkthrough

This PR extracts dozens of inline widgets across All Events, Console, Error Inspector, Network Inspector, and Performance features into standalone component files (buttons, badges, detail panels, toolbars, chart painters, FABs), rewires the four page files to compose them, and tweaks JSON parser whitespace handling.

Changes

All Events, Console, Error Inspector, Network Inspector, Performance UI extraction

Layer / File(s) Summary
JSON parser whitespace fix
lib/components/viewers/json_viewer.dart
AsyncJsonParser._tryResolveSync distinguishes whitespace-only strings (nulls out parsed data) from non-JSON-looking strings; no cross-platform body type impact beyond this parsing path.
All Events buttons & shared primitives
lib/features/all_events/presentation/buttons/*, lib/features/all_events/presentation/shared/*
New pressable/icon buttons and reusable badges/labels/containers (CodeBlock, MetaCell, TypeBadge, TypeInfo, etc.) — several use TextComponent for rendering, worth checking consistent usage.
All Events row, filter bar, header, status pills
.../event_row/*, .../header/*, .../status/*
EventRow, FilterBar/FilterChip, Header, ServerStatusPill, ReloadPill drive the toolbar and list rendering with type/status-driven styling.
All Events draggable reload FAB
.../fab/draggable_reload_fab.dart
FabAction/DraggableReloadFab derives platform-specific reload actions (Flutter/RN/Android/mixed) — a key cross-platform coverage area to verify.
All Events detail sub-widgets
.../detail/icon_action.dart, diff_row.dart, log_inline_json.dart, .../network/headers_view.dart, timing_view.dart, .../shared/body_view.dart
Body/JSON view toggling and header/timing rendering shared across detail panels.
All Events per-type detail panels
.../detail/detail_header.dart, fallback_detail.dart, log_detail.dart, network_detail.dart, state_detail.dart, storage_detail.dart
Type-specific detail views — storage_detail notably handles multiple payload/storage shapes (JSON-like vs raw) worth close inspection for storage type coverage.
EventDetailPanel orchestrator & screenshots
.../detail/event_detail_panel.dart
Central panel routing to type-specific views plus full/tab screenshot capture, save, and toast flow.
Console toolbar & shared widgets
lib/features/console/presentation/header/*, shared/*
Extracted IconBtn, LevelFilterChip, Toolbar, CountPill, TagBadge, level color helper.
Console detail panel & message blocks
.../detail/detail_panel.dart, log_message_block.dart, metadata_block.dart, plain_message_block.dart, screenshot_builder.dart, .../event_row/log_entry_content.dart
LogDetailPanel composes message/metadata rendering (using TextComponent/JsonViewer) plus screenshot generation.
Console page rewiring
.../pages/console_page.dart
Swaps in-file widgets for extracted ones; removes local screenshot logic (~1150 lines removed).
Error Inspector shared badges & tokens
.../header/*, shared/*, .../event_row/error_list_item.dart
InfoBar, PlatformFilterChip, severity/platform color tokens, CountUp, PulsingDot, EmptyStateWithPulse.
Error Inspector toolbar, detail panel & page
.../header/toolbar.dart, .../detail/error_detail_panel.dart, .../pages/error_inspector_page.dart
Toolbar and ErrorDetailPanel (tabs + screenshots) wired into a rewritten page (~2025 lines removed).
Network Inspector detail widgets
.../detail/blob_info.dart, body_tab.dart, headers_tab.dart, timing_tab.dart, shared/*
Blob detection, body/headers/timing tab rendering shared with request detail panel.
Network Inspector request card & detail panel
.../request/request_card.dart, request_detail_panel.dart
Request list row plus tabbed detail panel with full/tab screenshot capture and cURL generation.
Network Inspector toolbar
.../toolbar/*
Method/source filter segments, clear-stale/clear-all actions, and hover/active icon buttons.
Performance badges & format helpers
.../badges/*, shared/format/*
AllocRateBadge, JankBadge, NetStatChip, SystemChip, memory/speed formatting.
Performance chart painters
.../charts/*
NetworkWaterfallPainter and ProfilerLinePainter/ProfilerLineChart with hover tooltip and gauge visuals.
Performance toolbar, panels & page rewiring
.../header/*, .../panels/*, .../pages/performance_page.dart
ProfilerToolbar, chart/network/system-status rows composed into a rewritten page (~1537 lines removed).

Estimated code review effort: 5 (Critical) | ~150 minutes

Possibly related PRs

Poem

A rabbit hopped through panels wide,
Extracting widgets, side by side. 🐇
Storage, network, logs, and jank—
Each got its own component bank.
Cross-platform paws checked every frame,
Then thumped approval — LGTM, same!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/refactor-large-pages-into-subfolders

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.

@buivietphi
buivietphi merged commit a537d18 into main Jul 6, 2026
1 of 5 checks passed
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