Skip to content

test(mobile): remove stale video preview assertions - #9165

Open
tellaho wants to merge 1 commit into
mainfrom
tho/mobile-main-native-media-test-fix
Open

tellaho wants to merge 1 commit into
mainfrom
tho/mobile-main-native-media-test-fix

Conversation

@tellaho

@tellaho tellaho commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Category: fix
User Impact: Restores the automated checks needed to validate mobile changes.

Problem: Main's Mobile (Checks) fails because #9144 added a test step that calls videoPreviewFrameLoaderProvider, which #9138 had removed. Posterless videos now display a static placeholder, so there is no preview player for that step to exercise.

Solution: Remove the obsolete preview assertions and their unused fake, imports, and binding setup. This unblocks main's Mobile (Checks) while retaining coverage for media-header renewal and renewal failures.

Original fix by Princess Donut: 962e884ba, cherry-picked from #9104 onto a branch based on main.

Changes

File changes

mobile/test/shared/hosted/native_media_headers_test.dart
Delete the obsolete posterless video preview test step and its supporting code. The remaining assertions continue to cover relay-only authentication headers, fresh assertion renewal, and fallback when renewal fails.

Reproduction Steps

  1. Check out this branch and run just mobile-install from the repository root.
  2. Run just mobile-check; formatting and flutter analyze should pass without an undefined-provider error.
  3. Run just mobile-test; the mobile suite and package checks should pass.

Validation

At clean commit 574f534afcaa39ff93cda0f89056157bbc2c7674, just mobile-install mobile-check mobile-test passed:

  • Formatting: 1,068 files checked, zero changes; flutter analyze: no issues.
  • Mobile suite: 4,514 passed, 60 skipped.
  • Unconfigured-push build checks: 4 passed; secp256k1 package: 27 passed.
  • Gateway-recipe checks and all pre-push hooks passed.

#9138 removed videoPreviewFrameLoaderProvider (posterless videos now show a static placeholder and start no native player until tapped), and #9144 then added a native_media_headers_test step that reads it, so main's mobile analyze fails. With no preview player left, the step has nothing to guard; revert it.

(cherry picked from commit 962e884)

Co-authored-by: Princess Donut <0366ccd5ee09c2779a9d6bd6683daa17c16a508a51f6a7e7314018dab8fdc49b@feedback.communities.buzz.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho
tellaho marked this pull request as ready for review November 6, 2026 01:33
@tellaho
tellaho requested a review from a team as a code owner November 6, 2026 01:33
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: fbfbf3d64f028da95368f8cd5c80ca0f77e482d0...574f534afcaa39ff93cda0f89056157bbc2c7674
  • Model: gpt-6.1-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

The PR removes an obsolete video preview test and its supporting setup. The referenced provider no longer exists, and the remaining media authentication tests retain their coverage. No concrete security, correctness, or reliability findings were identified.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • Review used read-only inspection. Builds and tests were not executed, as instructed.

Generated by Codex Security Review |
Requested by: @tellaho |
Workflow run

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Carl, an automated reviewer, commenting via Wes's GitHub account.

Verdict: correct, but superseded. No code blockers; this can be closed.

The deletion is right: videoPreviewFrameLoaderProvider no longer exists on main, and the remaining journey still covers relay-only headers, fresh-assertion renewal and renewal-failure fallback.

However, #9164 (fbfbf3d64) already landed the identical 48-line deletion on main. At head 574f534a, git diff origin/main pr-9165 -- mobile/test/shared/hosted/native_media_headers_test.dart is empty, and git merge-tree --write-tree origin/main pr-9165 yields main's exact tree (dcacaf17), so merging this PR would be a no-op.

@jedwards27 jedwards27 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 :bot: Jude’s code review agent

Verdict: APPROVE — no author-actionable defect. This PR is already superseded by #9164; a maintainer can close it rather than merge a no-op.

Reviewed: head 574f534afcaa39ff93cda0f89056157bbc2c7674 against base fbfbf3d64f028da95368f8cd5c80ca0f77e482d0. The merge-base diff removes 48 stale test lines, but the base already contains the identical deletion. git merge-tree --write-tree <base> <head> and the base tree both yield dcacaf1709d1db5bfd6006e462f02fcd4a4fd923: a merge onto this base changes no files. The PR description’s claim that this will restore main’s checks is consequently stale.

Contracts and coverage: The removed assertion targeted a first-frame preview loader that no longer exists in the mobile implementation. The message bubble now uses a poster or static fallback, and tapping opens a viewer whose authenticated HTTP download is played from a local file (mobile/lib/features/channels/message_content/video_preview.dart:3–55; mobile/lib/features/channels/media_viewer_page/video_viewer.dart:52–73,147). The remaining tests cover cached relay-scoped headers, fresh assertion renewal, and renewal-failure fallback (mobile/test/shared/hosted/native_media_headers_test.dart:57–117); voice-note player wiring and preview open/close also have separate widget coverage. These are not end-to-end proof of native authenticated video playback, but removing the obsolete test does not remove a working test of that path.

Validation: git diff --check 1a30e51689b982e8d5aa093fc849a98bcf35e63b 574f534afcaa39ff93cda0f89056157bbc2c7674 passed on the pinned objects. CI run 42143591196, associated with this head, passed Mobile Checks, all three Mobile test shards, Android, and Swift native/release jobs. The checks and first test shard actually checked out merge commit d99ee1fc94ae68316e3ea6684a1bde8c8b16be09 (parents are the reviewed base and head; its tree equals the base tree); the shard log includes both retained header tests. A reviewer’s local Flutter initialization timed out after 15 seconds, so no independent local full suite was completed. No native authenticated-playback journey was run.

Author action: none required for a defect; closure as superseded is a maintainer disposition. Verification owner: CI for automated gates; reviewer/tooling for any desired independent local or native playback verification. Approval is tied to the reviewed head and base.

This branch was previously deployed

1 inactive deployment
codex-review — 574f534a Deployed Nov 6, 2026 by tellaho via Run Codex Security Review #13336
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants