fix(crash): 修复部分证据来源显示异常 & 略微加粗 Code 控件边框#3072
Merged
Merged
Conversation
审查者指南(在小型 PR 上折叠显示)审查者指南为通过解析日志创建的崩溃事实添加证据元数据,并略微增加崩溃代码显示控件的边框粗细。 为解析出的崩溃事实添加证据的时序图sequenceDiagram
participant JavaCrashParser
participant MinecraftCrashReportParser
participant CrashFactFactory
participant CrashFact
JavaCrashParser->>CrashFactFactory: CreateFromContext(JavaVersionDetected, javaInfo, properties, visibility, strength, scope, CrashLogKind.LauncherLog, sourceName)
CrashFactFactory->>CrashFact: new CrashFact()
CrashFactFactory->>CrashFact: set Evidence = [CrashFactEvidence]
MinecraftCrashReportParser->>CrashFactFactory: CreateFromContext(MinecraftVersionDetected, minecraftVersion, properties, visibility, strength, scope, CrashLogKind.LauncherLog, sourceName)
CrashFactFactory->>CrashFact: new CrashFact()
CrashFactFactory->>CrashFact: set Evidence = [CrashFactEvidence]
文件级变更
提示与命令与 Sourcery 交互
自定义你的体验访问你的 控制面板 以:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideAdds evidence metadata to crash facts created from parsing logs and slightly increases the border thickness of the crash code display control. Sequence diagram for adding evidence to parsed crash factssequenceDiagram
participant JavaCrashParser
participant MinecraftCrashReportParser
participant CrashFactFactory
participant CrashFact
JavaCrashParser->>CrashFactFactory: CreateFromContext(JavaVersionDetected, javaInfo, properties, visibility, strength, scope, CrashLogKind.LauncherLog, sourceName)
CrashFactFactory->>CrashFact: new CrashFact()
CrashFactFactory->>CrashFact: set Evidence = [CrashFactEvidence]
MinecraftCrashReportParser->>CrashFactFactory: CreateFromContext(MinecraftVersionDetected, minecraftVersion, properties, visibility, strength, scope, CrashLogKind.LauncherLog, sourceName)
CrashFactFactory->>CrashFact: new CrashFact()
CrashFactFactory->>CrashFact: set Evidence = [CrashFactEvidence]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - 我在这里给出了一些整体反馈:
CrashFactFactory.CreateFromContext中新增的sourceName参数目前从未被调用方设置;建议要么从现有上下文(例如日志/报告标识符)中把它正确传递进来,要么在有明确的 source name 需要传递之前先移除这个参数。- 将
CrashFact.Evidence修改为始终初始化(即使只是一个空集合)可能会影响之前依赖null与“无证据”之间差异的逻辑;如果存在这样的调用方,建议同步更新它们的预期行为,或者在文档中说明这一行为变更。
供 AI 代理使用的提示词
Please address the comments from this code review:
## Overall Comments
- The new `sourceName` parameter in `CrashFactFactory.CreateFromContext` is never set by callers; either wire it up from the available context (e.g., log/report identifier) or drop it until there’s a concrete source name to pass through.
- Changing `CrashFact.Evidence` to always be initialized (even as an empty collection) may affect any logic that previously distinguished between `null` and 'no evidence'; if such callers exist, consider aligning their expectations or documenting this behavioral change.帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English
Hey - I've left some high level feedback:
- The new
sourceNameparameter inCrashFactFactory.CreateFromContextis never set by callers; either wire it up from the available context (e.g., log/report identifier) or drop it until there’s a concrete source name to pass through. - Changing
CrashFact.Evidenceto always be initialized (even as an empty collection) may affect any logic that previously distinguished betweennulland 'no evidence'; if such callers exist, consider aligning their expectations or documenting this behavioral change.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new `sourceName` parameter in `CrashFactFactory.CreateFromContext` is never set by callers; either wire it up from the available context (e.g., log/report identifier) or drop it until there’s a concrete source name to pass through.
- Changing `CrashFact.Evidence` to always be initialized (even as an empty collection) may affect any logic that previously distinguished between `null` and 'no evidence'; if such callers exist, consider aligning their expectations or documenting this behavioral change.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Chiloven945
approved these changes
Jun 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
为崩溃事实(crash facts)添加证据元数据,并略微增加崩溃界面中代码块的可视边框厚度。
New Features:
Bug Fixes:
Enhancements:
Original summary in English
Summary by Sourcery
Annotate crash facts with evidence metadata and slightly increase the visual border thickness of code blocks in crash UI.
New Features:
Bug Fixes:
Enhancements: