This repository was archived by the owner on Sep 20, 2026. It is now read-only.
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses an intermittent empty diamond outline appearing under the replay “Continue” area by extending the replay “presentation readiness” barrier to also await socket-effect VFX asset loading, preventing pooled/transitioned controllers from crossing replay state boundaries with partially-initialized visuals.
Changes:
- Replaced the item-only readiness tracker with a generalized card presentation readiness tracker (
ReplayCardPresentationReadiness). - Added a Harmony postfix to wrap
SocketEffectController.LoadVFXAssets’s returnedTaskso replay bootstrap can await VFX initialization. - Updated replay bootstrap and presentation-ready waiting to use the new readiness tracker/task barrier.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/BazaarPlusPlus/Patches/Combat/CombatReplayItemPresentationReadinessPatch.cs | Removed the old item-only readiness patch (superseded by the new combined readiness patches). |
| src/BazaarPlusPlus/Patches/Combat/CombatReplayCardPresentationReadinessPatch.cs | Introduces readiness patches for both ItemController.Setup and SocketEffectController.LoadVFXAssets, tracking both into the new barrier. |
| src/BazaarPlusPlus/Game/CombatReplay/Bootstrap/ReplayCardPresentationReadiness.cs | Renames/generalizes the tracker and implements “wait until stable across a render boundary” for all tracked presentation tasks. |
| src/BazaarPlusPlus/Game/CombatReplay/Bootstrap/ReplayBootstrap.cs | Switches bootstrap tracking scope to ReplayCardPresentationReadiness. |
| src/BazaarPlusPlus/Game/CombatReplay/Bootstrap/AppStateHandlerInstaller.cs | Updates the “presentation ready” wait to include the new card presentation readiness tasks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+10
to
+12
| [HarmonyPatch(typeof(ItemController), nameof(ItemController.Setup), [typeof(Card)])] | ||
| internal static class CombatReplayItemPresentationReadinessPatch | ||
| { |
Member
Author
|
截图对象误判:该方案修复的是插槽 VFX,与实际的空原生 tooltip 框无关。错误改动已 revert;正确的池化 tooltip 修复移至 #232,避免污染新 PR 历史。 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Context
保存回放结束后,
Continue区域偶发出现一个没有字母内容的菱形。截图与游戏源码表明它不是回放按钮自身的 UI,而是插槽效果 VFX 在回放状态切换时未完成异步初始化所留下的空外框。现有回放 bootstrap 会等待
ItemController.Setup,但SocketEffectController.UpdateData是async void,其内部的LoadVFXAssets没有进入 readiness barrier。控制器被回收或跨状态复用时,VFX 外框与内容可能处于不同步状态。改动重点
LoadVFXAssets返回的Task,纳入现有等待屏障。协作过程
sequenceDiagram participant U as 用户 participant C as Codex participant G as 游戏源码/日志 U->>C: 报告 Continue 下方偶发空菱形 C->>G: 对照原生回放按钮与 SocketEffect 生命周期 G-->>C: 按钮控制器不创建该元素;SocketEffect VFX 异步加载未被等待 C->>C: 复用既有 Item presentation readiness 模式 C->>G: Release 构建、格式与回放测试通过方案讨论
没有按屏幕位置或对象名称硬隐藏菱形,因为那会掩盖竞态并可能误伤正常音符效果。最终选择现有的 readiness seam:与物品卡
Setup相同,包装原生Task,让 bootstrap 在播放前观察真实完成状态。SocketEffectController.UpdateData本身是async void,无法由调用方等待;LoadVFXAssets是它内部唯一可等待的Taskseam,因此补丁落在该方法上。最终方案
ReplayCardPresentationReadiness以控制器实例为键跟踪最新表现任务。保存回放注入期间,物品 Setup 和插槽效果 VFX 加载都会注册;WaitForPresentationReadyAsync在一个渲染边界后确认没有新增待处理任务,再允许回放开始。验证情况
dotnet build src/BazaarPlusPlus/BazaarPlusPlus.csproj -c Release ...:通过,0 warning / 0 error./run.sh format-check:通过(1194 files)Architecture.Tests:154 passedCombatReplayRecording.Tests:通过CombatReplayPlaybackLogging.Tests:27 passed已知局限 / 后续工作