This repository was archived by the owner on Sep 20, 2026. It is now read-only.
feat(replay): support PVE recording and refine replay dock UI - #209
Merged
Merged
Conversation
timelic
requested review from
cauyxy and
pengx17
and removed request for
cauyxy
August 4, 2026 10:08
pengx17
suggested changes
Aug 5, 2026
| public bool IsCombatOpeningMessage(NetMessageGameSim message) | ||
| { | ||
| var state = message.Data.CurrentState?.StateName; | ||
| return state == ERunState.Combat || state == ERunState.PVPCombat; |
Member
There was a problem hiding this comment.
把 Combat 加到这里后,CombatReplayRuntime.ObserveMessage 会像处理 PvP 一样,把 PvE 产物送入 ReplayPersistenceOrchestrator。但 PvpBattleSqliteStore.Save 遇到非 PVPCombat 的 manifest 时会直接返回、不写入;持久化队列又会把“未抛异常”当作成功。结果是 UI 显示已经持久化,实际却没有目录记录,文件还会在后续启动时被孤儿清理删除。
建议在进入持久化前显式分流:PvP 沿用现有持久化链路;当前原生 PvE 录制直接使用内存中的 manifest,并走独立的就绪状态转换。同时让 PvP store 对非法 combat kind 明确报错,并增加 PvE/PvP 两条路由的测试。
| ), | ||
| BppUiChromeSuppressionMode.ReplayRecording => UiSuppressionScope.Begin( | ||
| CollectionPanelDockButtonController.BeginScreenshotSuppression | ||
| CollectionPanelDockButtonController.BeginReplayRecordingSuppression |
Member
There was a problem hiding this comment.
这里把录制期间对“收藏”按钮的处理,从隐藏改成了只禁用交互。但录制器使用全屏 ScreenCapture,所以该按钮仍会出现在最终 MP4 中。
想确认一下这是否是预期的产品行为:如果是,请同步修改仍描述“其他 BPP 浮层会被隐藏”的注释、文档和测试;如果不是,请继续隐藏该按钮,并单独解决录制按钮的布局锚点问题。
pengx17
force-pushed
the
dev/replay-recording-ui
branch
from
August 5, 2026 14:52
9b09d38 to
038e4e3
Compare
pengx17
approved these changes
Aug 5, 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 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
本 PR 为战斗回放补充 PvE 视频录制,并调整录制入口、状态图标和 tooltip。接手 review 后重点修复了 PvE 产物错误进入 PvP 持久化链路、录制视频包含 Collection 按钮,以及高分辨率录制负载过高的问题。
改动重点
Combat回放可以录制并在完成后直接进入可打开状态。PVPCombat进入 PvP 持久化;PvE 使用当前内存 manifest,不再出现“队列报告成功但数据库未写入”。协作过程
sequenceDiagram participant A as 原作者 participant R as Reviewer participant U as 本地验收 participant C as 接手修复 A->>R: 提交 PvE 录制与 dock UI R->>C: 发现 PvE 假持久化成功与画面包含 Collection 按钮 U->>C: 验证 tooltip、录制完成延迟与实际帧率 C->>C: 分流 PvE/PvP、调整 tooltip、限制 30fps、清理 profiling C->>R: rebase 最新 master 并补充测试证据方案讨论
ADR-001:PvE 不复用 PvP 持久化完成信号
Combat与PVPCombat一起送入 PvP 持久化队列,但 store 会跳过非 PvP manifest,队列仍把“未抛异常”当作成功。ADR-002:录制期间隐藏 Collection 按钮
全屏捕获会把仍可见但不可交互的按钮写入 MP4,因此沿用截图抑制的隐藏行为。录制按钮已有独立锚点回退逻辑,不依赖隐藏后的 Collection 按钮。
最终方案
flowchart TD M[回放 manifest] --> K{Combat kind} K -->|PVPCombat| P[ReplayPersistenceOrchestrator] P --> S[PvP SQLite store] S --> R[录制就绪] K -->|Combat| N[使用当前内存 manifest] N --> R K -->|其他类型| X[不进入当前录制持久化链路]录制结束后仍由后台完成编码 drain、音频 mux 和 metadata 写入;UI 仅消费最终 completion。临时 profiling 事件和 staging Collection template-ID 工具均未包含在本 PR。
验证情况
CombatReplayRecording.Tests:通过。CombatReplayAudioVideo.Tests:通过。Architecture.Tests:153/153 通过。git diff --check:通过。已知局限 / 后续工作
原始说明
主要是微调了一下,这个录制界面的UI。重新选了面性icon,更准确地反映当前状态。
现在PVE也可以录制视频了。