Skip to content

fix(stats): show network-only loss in performance overlay - #126

Merged
qiin2333 merged 4 commits into
masterfrom
codex/network-loss-overlay
Aug 31, 2026
Merged

fix(stats): show network-only loss in performance overlay#126
qiin2333 merged 4 commits into
masterfrom
codex/network-loss-overlay

Conversation

@qiin2333

@qiin2333 qiin2333 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

改了啥呀

  • 性能覆盖层的丢包率改为展示 common-c 网络重组层确认的帧丢失率
  • 从 native bridge 到 ArkTS 统计快照贯通 networkFrameLossPercent
  • 保留原有 packetLoss 给 ABR 和串流战报使用,才不会把杂鱼指标偷偷换口径啦
  • common-c 依赖:feat(stats): expose network frame loss rate qiin2333/moonlight-common-c#24(目标分支 mic,提交 b546795

为啥要改

原覆盖层使用客户端滑动窗口统计,可能包含解码器或渲染路径的主动丢帧,无法只代表网络质量。新指标复用 common-c 的 3 秒连接状态采样,表示 FEC 后仍不可恢复的网络视频帧丢失。

验证

  • npm run check:scripts 通过
  • common-c 协议测试 3/3 通过
  • 最新 mic 基线下完整 HarmonyOS Release HAP 构建成功
  • git diff --check 通过

Summary by CodeRabbit

  • 新功能

    • 新增更准确的视频网络丢帧率统计,性能监控中的丢包数据更加可靠。
    • “相位调谐”设置现已对所有用户开放,可直接启用或关闭。
    • 有界低延迟 PTS 呈现默认开启,带来更流畅、低延迟的画面呈现体验。
  • 问题修复

    • 修正性能叠加层读取丢帧率数据不准确的问题。
    • 优化相关设置的默认值及持久化读取行为,确保配置状态一致。

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0e4c709a-d1ea-4259-9459-ba51cfafda0a

📥 Commits

Reviewing files that changed from the base of the PR and between 3e4ed46 and 4eff4a5.

📒 Files selected for processing (7)
  • entry/src/main/ets/components/PerformanceOverlay.ets
  • entry/src/main/ets/model/StreamConfig.ets
  • entry/src/main/ets/pages/SettingsPageV2.ets
  • entry/src/main/ets/service/SettingsService.ets
  • entry/src/main/ets/service/streaming/StreamingSession.ets
  • nativelib/src/main/cpp/moonlight-common-c
  • nativelib/src/main/cpp/moonlight_bridge.cpp

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

Changes

性能数据与呈现设置

Layer / File(s) Summary
网络帧丢失率统计链路
nativelib/src/main/cpp/moonlight-common-c, nativelib/src/main/cpp/moonlight_bridge.cpp, entry/src/main/ets/service/streaming/StreamingSession.ets, entry/src/main/ets/components/PerformanceOverlay.ets
native 层新增 networkFrameLossPercent 输出。StreamingSession 保存并返回该字段。PerformanceOverlay 改用该字段显示网络帧丢失率。
主机节奏呈现默认值与设置入口
entry/src/main/ets/model/StreamConfig.ets, entry/src/main/ets/service/SettingsService.ets, entry/src/main/ets/service/streaming/StreamingSession.ets, entry/src/main/ets/pages/SettingsPageV2.ets
enableHostPacedPresentation 的默认值改为 true。设置页移除开发者模式限制,所有用户均可切换并保存该设置。

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🔵 Low · up to 4eff4

The PR changes the performance overlay to show network-only frame loss while also broadening host-paced presentation defaults. It is mergeable with explicit owner awareness that the pinned common-c revision must be confirmed compatible with the new estimator API; no higher-severity merge-blocking issue is identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (6 skipped: 6 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了主要变更:性能覆盖层改为显示仅网络导致的视频帧丢失率。标题简洁、明确,并与代码变更和 PR 目标一致。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/network-loss-overlay

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qiin2333
qiin2333 force-pushed the codex/network-loss-overlay branch from be72625 to 4a81061 Compare August 30, 2026 14:56
@qiin2333
qiin2333 marked this pull request as ready for review August 31, 2026 02:26
@qiin2333
qiin2333 merged commit 7717a43 into master Aug 31, 2026
2 checks passed
@qiin2333
qiin2333 deleted the codex/network-loss-overlay branch August 31, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant