fix: clean up recording stop and snapshot traversal#640
Conversation
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0285d59c5e
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export function buildRecordStopFailure( | ||
| message: string, | ||
| recording: RecordingStartedAt, | ||
| now = Date.now(), |
There was a problem hiding this comment.
Measure short recordings at stop request time
Because this defaults now to the time the error is formatted, the short-recording check can miss the exact case it is meant to explain. For example, a user can run record stop immediately, but the iOS simulator path reaches this helper only after waitForStableFile/isPlayableVideo, and the Android path waits for remote stability plus pull validation before formatAndroidStopFailure; those waits can push elapsed time past 1000ms even though the requested recording duration was under the limit, so the actionable “wait at least 1000ms” hint and too-short cleanup are skipped. Capture the stop-request timestamp before finalization/validation waits and pass it into this helper.
Useful? React with 👍 / 👎.
0285d59 to
3d89079
Compare
|
Reconciled the review feedback in
Validation rerun: focused record-trace/iOS presentation/snapshot capture unit tests ( |
|
Summary
Centralize short record-stop finalization errors for iOS simulator and Android recording paths, remove redundant invalid-output cleanup logic, and reuse snapshot descendant traversal helpers for iOS presentation rules.
Closes #635
Touched 8 files; scope stayed within recording stop/finalization and snapshot presentation traversal.
Validation
Focused unit coverage passed for record-trace, iOS presentation, and snapshot capture behavior: 65 tests passed.
Typecheck passed, oxlint passed with denied warnings, full format passed, and smoke tests passed: 6 tests passed.
pnpm check:unitwas attempted but still fails in this local sandbox on unrelated listener, mocked subprocess, adb/xcrun, and Swift typecheck cases; the touched focused suites pass.