Skip to content
This repository was archived by the owner on Sep 20, 2026. It is now read-only.
This repository was archived by the owner on Sep 20, 2026. It is now read-only.

fix(combat-replay): diagnose delayed Continue after terminal combat #305

Description

@pengx17

现象

自然战斗结束后,原生 Continue 按钮偶发明显延迟;本次体感约半分钟。该问题需要完整打完一局才能触达,无法靠现有回放入口稳定复现。

已验证事实

  • 本次录像在之后的手动回放中已经正常录制并完成,当前现象发生在自然战斗结束后,因此不能归因于视频编码或封装。
  • 同一局 Player.log 记录:
    • 12:03:25.361:combatant died
    • 12:03:25.415:combat simulation completed
    • 12:03:31.505PVPCombatState -> ReplayState
    • 12:03:35.259:玩家点击 Replay
  • 原生 FinalBlowSlowDownController.ReturnToNormalSpeed 固定执行 2.5s 延迟、1s 恢复和 2.5s 结束延迟,能解释约 6s,但现有日志没有 Continue 实际显示时刻,不能解释报告中的完整延迟。
  • 自然战斗进入 ReplayState.OnEnter 时会请求显示按钮;BoardManager.ShowReplayAndRecapButtons 在已有显示/隐藏调用运行时会直接返回,当前也没有日志确认这条 guard 是否命中。

待区分的机制

  1. 原生最后一击尾声本身耗时;
  2. CombatState -> ReplayState 切换前的等待;
  3. ShowReplayAndRecapButtons(true) 被运行中 guard 跳过;
  4. 按钮对象已激活,但输入 gate 或动画仍未就绪;
  5. 点击已发生,但 ReplayState.Exit / 后续状态处理延迟。

建议取证

增加无行为改动的结构化时序日志,只跟踪自然战斗:

  • combatant died
  • combat ended
  • ReplayState entering
  • buttons show requested(含 running guard)
  • buttons shown(含 active/interactable 和输入 gate)
  • Continue clicked
  • ReplayState.Exit requested / state exiting

同一局使用短 trace id 关联,并记录相对上一阶段与相对最后一击的耗时。日志使用单一低频事件,不采集卡牌或账号内容。

验收

  • 不改变按钮显示、点击或状态切换行为;
  • 单元测试锁定时序关联、重复/越界事件处理和结构化日志 schema;
  • 下一次自然完成对局后,仅凭 LogOutput.log 就能判断延迟落在哪个阶段;
  • 在取得一次异常样本前不提交猜测性修复。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-infoWaiting on reporter for more information

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions