Skip to content

feat(launch): 添加禁用自动崩溃分析的设置项#3077

Merged
Chiloven945 merged 1 commit into
refactor/crashfrom
feature/disable-crash-analysis
Jun 7, 2026
Merged

feat(launch): 添加禁用自动崩溃分析的设置项#3077
Chiloven945 merged 1 commit into
refactor/crashfrom
feature/disable-crash-analysis

Conversation

@SALTWOOD

@SALTWOOD SALTWOOD commented Jun 7, 2026

Copy link
Copy Markdown
Member

Summary by Sourcery

在 Minecraft 启动期间新增一个可配置选项,用于禁用自动崩溃分析,并将其接入启动器设置界面和崩溃监视逻辑。

新功能:

  • 引入本地存储的配置标志 LaunchAdvanceDisableCrashAnalysis,用于控制是否启用自动崩溃分析。
  • 在高级启动设置页面中提供一个复选框,用于开启或关闭自动崩溃分析。
Original summary in English

Summary by Sourcery

Add a configurable option to disable automatic crash analysis during Minecraft launch and wire it into the launcher settings UI and crash watcher logic.

New Features:

  • Introduce a LaunchAdvanceDisableCrashAnalysis config flag stored locally for controlling automatic crash analysis.
  • Expose a checkbox in the advanced launch settings page to toggle automatic crash analysis on or off.

@pcl-ce-automation pcl-ce-automation Bot added 🕑 等待合并 已处理完毕,正在等待代码合并入主分支 size: S PR 大小评估:小型 labels Jun 7, 2026
@sourcery-ai

sourcery-ai Bot commented Jun 7, 2026

Copy link
Copy Markdown
审阅者指南(在小型 PR 上折叠)

审阅者指南

为启动器添加一个可配置选项,用于禁用自动崩溃分析,通过配置、UI 和崩溃处理逻辑进行串联,并对新设置标签进行本地化。

带有可选崩溃分析的崩溃处理时序图

sequenceDiagram
    participant GameProcess
    participant ModWatcher
    participant Config
    participant ModBase

    GameProcess ->> ModWatcher: Crashed
    ModWatcher ->> ModWatcher: Crashed
    ModWatcher ->> ModWatcher: WatcherLog
    ModWatcher ->> ModMain: Hint
    ModWatcher ->> Config: Launch.DisableCrashAnalysis
    alt [DisableCrashAnalysis]
        ModWatcher -->> ModBase: [skip FeedbackInfo]
    else [!DisableCrashAnalysis]
        ModWatcher ->> ModBase: FeedbackInfo
        ModWatcher ->> ModBase: RunInNewThread
        ModBase ->> ModBase: [perform crash analysis]
    end
Loading

文件级变更

变更 详情 文件
引入 LaunchAdvanceDisableCrashAnalysis 配置标志,并将其连接到启动设置的 UI 和行为。
  • 在启动高级配置组中添加本地配置源的 DisableCrashAnalysis 布尔配置项
  • 将新的 DisableCrashAnalysis 属性绑定到启动设置页面中的新复选框,并确保其参与 ReloadSetLaunchByTag 处理
  • 更新 ModWatcher.Crashed() 中的崩溃处理逻辑,当通过配置禁用崩溃分析时提前返回
  • 在中文和英文资源中添加新的崩溃分析设置标签与复选框的本地化字符串和 XAML 定义
PCL.Core/App/Config.cs
Plain Craft Launcher 2/Pages/PageSetup/PageSetupLaunch.xaml.cs
Plain Craft Launcher 2/Modules/Minecraft/ModWatcher.cs
PCL.Core/App/Localization/Languages/en-US.xaml
PCL.Core/App/Localization/Languages/zh-CN.xaml
Plain Craft Launcher 2/Pages/PageSetup/PageSetupLaunch.xaml

提示与命令

与 Sourcery 交互

  • 触发新的审查: 在拉取请求上评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审查评论。
  • 从审查评论生成 GitHub issue: 通过回复审查评论,要求 Sourcery 从该评论创建一个 issue。你也可以回复审查评论 @sourcery-ai issue 来从中创建 issue。
  • 生成拉取请求标题: 在拉取请求标题的任意位置写入 @sourcery-ai,即可随时生成标题。你也可以在拉取请求上评论 @sourcery-ai title 以(重新)生成标题。
  • 生成拉取请求摘要: 在拉取请求正文中的任意位置写入 @sourcery-ai summary,即可在你想要的位置随时生成 PR 摘要。你也可以在拉取请求上评论 @sourcery-ai summary 以(重新)生成摘要。
  • 生成审阅者指南: 在拉取请求上评论 @sourcery-ai guide,即可随时(重新)生成审阅者指南。
  • 解决所有 Sourcery 评论: 在拉取请求上评论 @sourcery-ai resolve,即可解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这会很有用。
  • 忽略所有 Sourcery 审查: 在拉取请求上评论 @sourcery-ai dismiss,即可忽略所有现有的 Sourcery 审查。如果你想从一个全新的审查开始,这特别有用 —— 别忘了再次评论 @sourcery-ai review 以触发新的审查!

自定义你的体验

访问你的 仪表盘 以:

  • 启用或禁用审查功能,例如 Sourcery 自动生成的拉取请求摘要、审阅者指南等。
  • 更改审查语言。
  • 添加、移除或编辑自定义审查指令。
  • 调整其他审查设置。

获取帮助

Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a configurable option to disable automatic crash analysis in the launcher, wires it through configuration, UI, and crash handling logic, and localizes the new setting label.

Sequence diagram for crash handling with optional crash analysis

sequenceDiagram
    participant GameProcess
    participant ModWatcher
    participant Config
    participant ModBase

    GameProcess ->> ModWatcher: Crashed
    ModWatcher ->> ModWatcher: Crashed
    ModWatcher ->> ModWatcher: WatcherLog
    ModWatcher ->> ModMain: Hint
    ModWatcher ->> Config: Launch.DisableCrashAnalysis
    alt [DisableCrashAnalysis]
        ModWatcher -->> ModBase: [skip FeedbackInfo]
    else [!DisableCrashAnalysis]
        ModWatcher ->> ModBase: FeedbackInfo
        ModWatcher ->> ModBase: RunInNewThread
        ModBase ->> ModBase: [perform crash analysis]
    end
Loading

File-Level Changes

Change Details Files
Introduce LaunchAdvanceDisableCrashAnalysis config flag and connect it to launch settings UI and behavior.
  • Add DisableCrashAnalysis boolean config item with local config source in the launch advanced config group
  • Bind the new DisableCrashAnalysis property to a new checkbox in the launch setup page and ensure it participates in Reload and SetLaunchByTag handling
  • Update crash handling in ModWatcher.Crashed() to early-return when crash analysis is disabled via config
  • Add localized strings and XAML definitions for the new crash analysis setting label and checkbox in Chinese and English resources
PCL.Core/App/Config.cs
Plain Craft Launcher 2/Pages/PageSetup/PageSetupLaunch.xaml.cs
Plain Craft Launcher 2/Modules/Minecraft/ModWatcher.cs
PCL.Core/App/Localization/Languages/en-US.xaml
PCL.Core/App/Localization/Languages/zh-CN.xaml
Plain Craft Launcher 2/Pages/PageSetup/PageSetupLaunch.xaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我在这里给出一些整体性的反馈:

  • ModWatcher.Crashed 中,当 DisableCrashAnalysis 为 true 时,前面的 return 会跳过后续所有逻辑;如果将来在 FeedbackInfo 之后再加入与崩溃分析无关的逻辑,建议只对崩溃分析相关的调用做条件判断,而不是直接退出整个方法。
  • 新增的 DisableCrashAnalysis 配置项显式使用了 ConfigSource.Local,而附近其他 launch-advanced 选项并未指定来源;请确认这是有意为之,并且与你期望这些设置的存储和覆盖方式保持一致。
面向 AI 代理的提示
Please address the comments from this code review:

## Overall Comments
- In `ModWatcher.Crashed`, the early `return` when `DisableCrashAnalysis` is true skips all subsequent logic; if future non-analysis work is added after `FeedbackInfo`, consider guarding only the crash-analysis-specific calls instead of exiting the whole method.
- The new `DisableCrashAnalysis` config item explicitly uses `ConfigSource.Local` while other nearby launch-advanced options do not specify a source; confirm this is intentional and consistent with how you expect these settings to be stored and overridden.

Sourcery 对开源项目免费——如果你喜欢我们的评审,请考虑分享给更多人 ✨
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据这些反馈改进后续的评审。
Original comment in English

Hey - I've left some high level feedback:

  • In ModWatcher.Crashed, the early return when DisableCrashAnalysis is true skips all subsequent logic; if future non-analysis work is added after FeedbackInfo, consider guarding only the crash-analysis-specific calls instead of exiting the whole method.
  • The new DisableCrashAnalysis config item explicitly uses ConfigSource.Local while other nearby launch-advanced options do not specify a source; confirm this is intentional and consistent with how you expect these settings to be stored and overridden.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `ModWatcher.Crashed`, the early `return` when `DisableCrashAnalysis` is true skips all subsequent logic; if future non-analysis work is added after `FeedbackInfo`, consider guarding only the crash-analysis-specific calls instead of exiting the whole method.
- The new `DisableCrashAnalysis` config item explicitly uses `ConfigSource.Local` while other nearby launch-advanced options do not specify a source; confirm this is intentional and consistent with how you expect these settings to be stored and overridden.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Chiloven945 Chiloven945 merged commit f0edad0 into refactor/crash Jun 7, 2026
3 checks passed
@pcl-ce-automation pcl-ce-automation Bot added 👌 完成 相关问题已修复或功能已实现,计划在下次版本更新时正式上线 and removed 🕑 等待合并 已处理完毕,正在等待代码合并入主分支 labels Jun 7, 2026
@Chiloven945 Chiloven945 deleted the feature/disable-crash-analysis branch June 7, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: S PR 大小评估:小型 👌 完成 相关问题已修复或功能已实现,计划在下次版本更新时正式上线

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants