Skip to content

test(ui): stabilize preview theme prompt back dismissal - #543

Merged
cwuom merged 1 commit into
masterfrom
intention/fix-ci-flakiness
Oct 18, 2026
Merged

cwuom merged 1 commit into
masterfrom
intention/fix-ci-flakiness

Conversation

@cwuom

@cwuom cwuom commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

描述 / Description

The startup preview theme prompt test can select the unfocused Activity root immediately after its dialog appears, causing a ten-second Espresso timeout. Bind the Back action to the dialog root so Espresso waits for that window to become ready. Real Back input and all decline, persistence, and remount assertions are preserved.

类型 / Type

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

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

Fixes the same-commit intermittent failure in Android CI run 39099744595, first attempt: StartupPreviewThemePromptTest.declineAndBackStayAnsweredAfterThePromptIsMountedAgain failed with RootViewWithoutFocusException against a BASE_APPLICATION window. The second attempt passed without a source change.

清单 / 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 with JDK 17:

  • ./gradlew :app:assembleDebug :app:assembleDebugAndroidTest :app:lintDebug --no-daemon -Pkotlin.compiler.execution.strategy=in-process --warning-mode all --stacktrace passed
  • A fresh API 35 ARM64 emulator passed all six tests in StartupPreviewThemePromptTest
  • The previously failing method passed ten consecutive additional runs
  • Lint completed with no errors; its 45 warnings and one hint do not reference the modified file. Compilation also reported warnings in unchanged files
  • git diff --check passed

Only the test changes. Production behavior, CI retries, and test assertions are unchanged. Documentation and screenshots are not applicable. GitHub Actions uses API 35 x86_64 and must validate the new commit separately.

将预览主题提示框的 Back 操作绑定到对话框根视图,避免测试从未获得焦点的 Activity 根视图触发返回键。拒绝按钮测试路径未变;未报告测试结果。

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 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-18T08:30:55.410482Z faa13fe PR opened
ℹ️ 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 18, 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: ec2e6de6-78bb-43a3-85f8-e4dd9bde6a83
📥 Commits

Reviewing files that changed from the base of the PR and between 02611a5 and faa13fe.

📒 Files selected for processing: 1
  • app/src/androidTest/java/moe/ouom/neriplayer/ui/dialog/StartupPreviewThemePromptTest.kt

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

📝 Walkthrough

测试将返回键操作从 Espresso.pressBack() 改为 ViewActions.pressBack(),并通过对话框根视图执行。拒绝按钮路径保持不变。

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to faa13

No actionable merge-blocking risk remains; the test-only change is suitable for merge.

Pre-merge checks: Passed 4 · 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 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 标题准确概括了本次变更:稳定预览主题提示框的 Back 关闭测试。
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 30e1424 into master Oct 18, 2026
8 checks passed
@cwuom
cwuom deleted the intention/fix-ci-flakiness 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