Skip to content

⚡ Bolt: Optimize setting pages rebuilds with granular Riverpod select - #150

Open
google-labs-jules[bot] wants to merge 2 commits into
mainfrom
bolt/perf-granular-select-settings-pages-833588021004425412
Open

google-labs-jules[bot] wants to merge 2 commits into
mainfrom
bolt/perf-granular-select-settings-pages-833588021004425412

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

💡 变更内容(What):在 FocusSettingPagePlanningSettingPageNotificationSettingPageAiSettingPageSyncSettingPage 以及 StorageSettingPage 中,将原有的 ref.watch(appSettingsProvider) 替换为针对特定属性的细粒度 ref.watch(appSettingsProvider.select(...))
🎯 解决痛点(Why):之前直接监听整个 appSettingsProvider 导致任何单项设置(例如主题模式、AI配置、同步参数等)被修改时,所有底层配置子页面都会触发不必要的全页 widget 重新构建(re-render)。
📊 预期提升(Impact):避免无关配置变动导致的子页面全量重绘,将 rebuild 范围限制在受影响的具体 UI 元素上,显著提升 Settings UI 交互流畅度。
🔬 测量方法(Measurement):通过 Flutter Analyzer 静态代码分析及全套 Flutter 单元/组件测试套件(fvm flutter test)验证功能一致性。


PR created automatically by Jules for task 833588021004425412 started by @DylanBolin42

@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 479c5b9a-345b-4938-95aa-a194675b0c9e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "version"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@github-actions

Copy link
Copy Markdown

❌ Flutter CI

Check Result
Format & Analyze
Tests & Coverage
Build Android Check

View workflow run

📊 TODO Summary Report

Total TODOs found: 13

📋 Click to expand TODO Details (13)

📂 Files with TODOs:

File Path TODO Count
lib/pages/AppShell/app_shell.dart 1
lib/pages/SettingPage/subSettingPage/aiSetting/ai_setting_page.dart 1
lib/pages/SettingPage/subSettingPage/focusSetting/focus_setting_page.dart 6
lib/pages/SettingPage/subSettingPage/notificationSetting/notification_setting_page.dart 2
lib/pages/SettingPage/subSettingPage/planningSetting/planning_setting_page.dart 1
lib/pages/SettingPage/subSettingPage/storageSetting/storage_setting_page.dart 1
lib/pages/SettingPage/subSettingPage/syncSetting/sync_setting_page.dart 1

🔍 Details:

lib/pages/AppShell/app_shell.dart (1)
  • 添加功能 (line 34)
lib/pages/SettingPage/subSettingPage/aiSetting/ai_setting_page.dart (1)
  • 接入TextField持久化逻辑 (line 45)
lib/pages/SettingPage/subSettingPage/focusSetting/focus_setting_page.dart (6)
  • 创建切换和存储逻辑 (line 47)
  • 添加逻辑和存储 (line 57)
  • 添加逻辑和存储 (line 61)
  • 添加白名单页面 (line 67)
  • 添加渲染引擎描述和建议 (line 130)
  • 可以适当添加商标icon (line 131)
lib/pages/SettingPage/subSettingPage/notificationSetting/notification_setting_page.dart (2)
  • 这里需要绑定时间 (line 114)
  • 这里需要绑定时间 (line 120)
lib/pages/SettingPage/subSettingPage/planningSetting/planning_setting_page.dart (1)
  • 添加说明description的默认颜色(浅灰,与SettingTile保持一致) (line 67)
lib/pages/SettingPage/subSettingPage/storageSetting/storage_setting_page.dart (1)
  • 补充显示逻辑 (line 42)
lib/pages/SettingPage/subSettingPage/syncSetting/sync_setting_page.dart (1)
  • 将颜色设为和其他一致 (line 333)

@github-actions

Copy link
Copy Markdown

✅ Flutter CI

Check Result
Format & Analyze
Tests & Coverage
Build Android Check

View workflow run

📊 TODO Summary Report

Total TODOs found: 24

📋 Click to expand TODO Details (24)

📂 Files with TODOs:

File Path TODO Count
lib/database/app_database.dart 1
lib/pages/AppShell/app_shell.dart 2
lib/pages/InboxPage/inbox_page.dart 5
lib/pages/SettingPage/subSettingPage/aiSetting/ai_setting_page.dart 1
lib/pages/SettingPage/subSettingPage/focusSetting/focus_setting_page.dart 6
lib/pages/SettingPage/subSettingPage/notificationSetting/notification_setting_page.dart 2
lib/pages/SettingPage/subSettingPage/planningSetting/planning_setting_page.dart 1
lib/pages/SettingPage/subSettingPage/storageSetting/storage_setting_page.dart 1
lib/pages/SettingPage/subSettingPage/syncSetting/sync_setting_page.dart 1
lib/router/app_router.dart 1
lib/theme/m3e_bridge.dart 1
test/widgets/inbox_page_test.dart 2

🔍 Details:

lib/database/app_database.dart (1)
  • 给所有相关方法添加Status字段 (line 49)
lib/pages/AppShell/app_shell.dart (2)
  • 修改为WoltModalSheet以增强可读性 (line 47)
  • 顶部Row取消中心切换,将按钮组写入ModalSheet的action区域 (line 57)
lib/pages/InboxPage/inbox_page.dart (5)
  • 确认左滑手势的逻辑 (line 257)
  • 改为真实用户名 (line 358)
  • 添加背景装饰和字体,以及接入真实逻辑 (line 394)
  • 添加背景装饰和字体 (line 432)
  • 根据优先级计算选择性传参 (line 537)
lib/pages/SettingPage/subSettingPage/aiSetting/ai_setting_page.dart (1)
  • 接入TextField持久化逻辑 (line 56)
lib/pages/SettingPage/subSettingPage/focusSetting/focus_setting_page.dart (6)
  • 创建切换和存储逻辑 (line 68)
  • 添加逻辑和存储 (line 78)
  • 添加逻辑和存储 (line 82)
  • 添加白名单页面 (line 88)
  • 添加渲染引擎描述和建议 (line 151)
  • 可以适当添加商标icon (line 152)
lib/pages/SettingPage/subSettingPage/notificationSetting/notification_setting_page.dart (2)
  • 这里需要绑定时间 (line 131)
  • 这里需要绑定时间 (line 137)
lib/pages/SettingPage/subSettingPage/planningSetting/planning_setting_page.dart (1)
  • 添加说明description的默认颜色(浅灰,与SettingTile保持一致) (line 82)
lib/pages/SettingPage/subSettingPage/storageSetting/storage_setting_page.dart (1)
  • 补充显示逻辑 (line 43)
lib/pages/SettingPage/subSettingPage/syncSetting/sync_setting_page.dart (1)
  • 将颜色设为和其他一致 (line 355)
lib/router/app_router.dart (1)
  • 存在多端渲染策略问题,移动端动画正常,但是桌面端出现短暂背景渲染失败问题,需要解决或抑制 (line 96)
lib/theme/m3e_bridge.dart (1)
  • 需要被抽象进theme.dart (line 90)
test/widgets/inbox_page_test.dart (2)
  • 该调试在未知情况下失败,但真机调试正常 (line 48)
  • 存在无法解释的异常,但是真机调试通过 (line 95)

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.

0 participants