Repository navigation
Preview: a trailer halted before its landing finishes its request Cancelled, not as a direct-play refusal - #1372
Merged
Merged
Conversation
… Failed(PreviewNotDirect) PR #1274 made the landing of a preview nobody waits for any more (the hero page halted it while its resolve was in flight) finish the metric request as Failed(handled_failure(PreviewNotDirect)). The viewer only moved focus; no route failed, so the request is a cancellation. It now finishes RequestOutcome::Cancelled, which raises no handled-error effect and touches none of report.rs's playback.* latches, so previews still emit no PostHog playback event. A genuinely refused preview (the resolve's own PreviewNeedsDirectPlay verdict) is unchanged: it never reaches this landing branch and still reports preview_not_direct through report::tick_preview. Regression test in the hostsim app rig: a preview requested, halted while its resolve is parked, then landed through update(). It failed against main with Failed(Planning, Unsupported) and passes now. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e on unwind a_preview_halted_before_its_landing_finishes_its_request_cancelled called preview::reset_for_test() only at its start, so a panic between request_start and halt left the machine Fetching and every later test in the binary saw preview::occupies() true. Move the PreviewReset Drop guard from deeplink_route_tests.rs to the shared bridge test_support (next to ImageHeld), use it from both, and bind it right after testlock::serial() here. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the detail page halts a trailer preview while its resolve is in flight, the landing that arrives afterwards starts no engine. Since #1274 that landing finished its request metric as
Failed(PreviewNotDirect), so the app's attempt metrics recorded a direct-play refusal for a cancellation. It now finishesCancelled, the same pair the viewer's exit and shutdown use.report::tick_preview) fires only on a genuinePreviewNeedsDirectPlayrefusal, unchanged. Sentry PLX-NATIVE-23 is that genuine refusal, not this path.PreviewReset(drop guard for the process-wide preview machine) moves tobridge_test_support.rsand is shared by this test anddeeplink_route_tests.rs, so a panicking test cannot leave the machineFetchingfor the rest of the binary.Gates
a_preview_halted_before_its_landing_finishes_its_request_cancelled: red on main (left: Some(Failed(Failure { stage: Planning, cause: Unsupported })) right: Some(Cancelled)), green with the fix.make test-hostsim: 1575 passed.make test-crate C=plxnative_modules: 1375 passed (before the guard move);T=deeplink: 34 passed after it.🤖 Generated with Claude Code