Skip to content

fix(ui): show mobile download confirmation above the player - #549

Merged
cwuom merged 1 commit into
masterfrom
intention/fix-mobile-download-dialog
Oct 20, 2026
Merged

cwuom merged 1 commit into
masterfrom
intention/fix-mobile-download-dialog

Conversation

@cwuom

@cwuom cwuom commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

描述 / Description

Mobile-data download confirmation could remain invisible while Now Playing and its more menu were open, then appear only after leaving the player. Read the pending-dialog state during composition before reporting visibility to MainActivity, so its display gate updates immediately.

Add real MainActivity regressions for Clean and Material: deliver a mobile-data confirmation request while the player menu is open, cancel through native touch input twice, and verify that the menu, player, and download task set remain intact.

类型 / Type

  • Bug 修复 / Bug Fix
  • 新功能 / New Feature
  • 文档更新 / Documentation Update
  • 其他(请描述)/ Other (please describe):

修复或解决的问题 / Issues Fixed or Closed by This PR

Fixes the delayed mobile-data download confirmation shown in the supplied Clean-theme recording.

清单 / Checklist

  • 我已阅读并遵循贡献指南 / I have read and followed the contribution guidelines
  • 我已在本地测试这些更改 / I have tested these changes locally
  • 我已更新相关文档或注释(如适用) / I have updated relevant documentation or comments (if applicable)
  • 我确认本次更改没有破坏任何原有逻辑 / I confirm this change does not break existing behavior
  • 我确认本次更改保持向下兼容(如适用) / I confirm this change remains backward compatible (if applicable)
  • 我已运行必要的构建、测试或静态检查 / I have run the required build, tests, or static checks
  • 我确认没有提交密钥、Token 或其他敏感信息 / I confirm no secrets, tokens, or other sensitive information were committed
  • 涉及 UI 变更时,我已补充截图或录屏(如适用) / I have added screenshots or recordings for UI changes (if applicable)

其他信息 / Additional Information

Validation:

  • Before the fix, both real MainActivity regressions timed out waiting for the confirmation title; the standalone dialog/sheet fixture passed and did not reproduce the application-level gate.
  • After the fix, the API 35 emulator regressions pass for Clean and Material using native touch input.
  • :app:testDebugUnitTest: 3,234 passed, 1 optional Netease online smoke test skipped, 0 failures/errors.
  • :app:assembleDebug, :app:assembleDebugAndroidTest, and verifyModuleBoundaries passed.
  • :app:lintDebug passed with --offline; the initial online lint run stalled on a Maven metadata TLS handshake. No lint rules were disabled. The report has 38 warnings and 1 hint in unchanged files; neither modified file has a lint finding.

The device regressions inject the existing confirmation event stream with synthetic Bilibili metadata; no live mobile-data download or physical-device test was performed. UI screenshots were captured locally for the task; no image files are added to the repository.

修复移动网络下载确认弹窗在播放器和更多菜单打开时不可见的问题。弹窗现在会及时显示在播放器上方,并保持菜单、播放器状态和下载任务不变。

新增 Clean 和 Material 主题的 MainActivity 回归测试。两项测试均通过。

验证结果:

  • 单元测试:3,234 项通过;1 项可选在线测试跳过。
  • Debug 构建、AndroidTest 构建、模块边界检查和离线 lint 通过。
  • 未验证真实移动网络下载或实体设备场景。

@cwuom
cwuom marked this pull request as ready for review October 20, 2026 11:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T11:38:55.378797Z 96dd5f8 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: cwuom/NeriPlayer/.coderabbit.yaml
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: e877c6f7-c3f7-4f87-95f0-c3cdd2ed5d66
📥 Commits

Reviewing files that changed from the base of the PR and between 113699b and 96dd5f8.

📒 Files selected for processing: 2
  • app/src/androidTest/java/moe/ouom/neriplayer/ui/dialog/MainActivityTrafficRiskDownloadTest.kt
  • app/src/main/java/moe/ouom/neriplayer/ui/NeriApp.kt

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

📝 Walkthrough

NeriApp 将全局弹窗可见性计算提取为 globalDialogVisible,并通过 SideEffect 通知父级。新增 Clean 和 Material 样式的仪器测试,使用真实播放器验证移动网络下载确认弹窗、取消操作、菜单状态及下载任务数量。测试还生成本地 WAV fixture,并在结束时恢复相关状态和清理临时数据。

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 96dd5

No actionable issue remains from this review. The mobile-data confirmation change is ready for normal merge checks.

Pre-merge checks: Passed 5 · Failed 1

Failed 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 9 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 标题准确概括了在播放器上方显示移动网络下载确认弹窗的主要修复。
Description 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.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@cwuom
cwuom merged commit b9b6caf into master Oct 20, 2026
8 checks passed
@cwuom
cwuom deleted the intention/fix-mobile-download-dialog branch October 23, 2026 05:11
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