Repository navigation
feat(cli): add durationSeconds to project validate and inspect - #2556
Conversation
|
@sloemo01 is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for the PR. Greptile currently has this at 4/5, and we only merge PRs once Greptile scores the current head 5/5. Please address the remaining Greptile feedback, then comment |
Working on it brother 🫡 |
503c647 to
6dc25be
Compare
|
@richiemcilroy the red Windows check is sorted: it compares against the PR's stored base commit, which had gone stale, so I rebased onto main. Greptile re-reviewed the new head at 5/5, and the re-run is queued at the approval gate. Ready for another look when you get a chance. |
Emits durationSeconds for studio recordings in project validate/inspect JSON and text output, and lists export-preview in cap guide. Part of CapSoftware#2059
The guide listed export-preview as SingleJson even though the command always writes JSON, and no test checked durationSeconds, so duration reporting could break silently. The entry now uses AlwaysJson. New CLI tests encode a one-second fixture and assert the reported durationSeconds on both validate and inspect, plus that unreadable media omits the field.
6dc25be to
cc38611
Compare
|
Rebased onto current main, head is cc38611. The only conflict was the panic fix in On the new head: Runs are parked at the approval gate again, and Greptile is re-reviewing this head. |
1 similar comment
|
@richiemcilroy rebased onto today's main, head is cc38611, Greptile 5/5 on the new head. The runs are parked at the approval gate and need a click before they run. Otherwise this one is ready. |
|
Rebased yesterday evening and Greptile is 5/5 on cc38611. The checks are still sitting at the approval gate, so nothing has run yet and they need a click from you. Nothing else outstanding on my side. |
Part of #2059.
Surfaces the project duration in the CLI and closes the two gaps from the issue:
durationSecondsin the project JSON, andexport-previewlisted incap guide.Changes:
cap project validateandcap project inspectemitdurationSecondsfor Studio recordings, computed through the existingcap_rendering::get_duration. The field is omitted when the value can't be computed, like Instant recordings or unreadable media.duration: <s>sline.cap guidelistsexport-preview.An earlier commit on this branch converted
ProjectRecordingsMeta::new's panics on unreadable single-segment media into returned errors, so thatvalidatecould not abort on a damaged project. Main has since made the same change with more specific messages ("video / ...", "camera / ..."), so the rebase drops that commit and the PR is CLI-only now. The missing-media tests still pass against main's version.Verification on the rebased head (cc38611):
cargo test -p cap --test cli project_: 12 passed, including the complete-project, missing-media, and unreadable-media cases.cargo fmt --all --checkclean.durationSeconds: 473.137167.cap guide --jsonincludesexport-preview.Not included: the
--frames-at/--out-dirframe-file mode from the issue, which can be a separate PR.

Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues were found.Summary
Adds project duration to
cap project validateandcap project inspect.export-previewwith its JSON output details.Review used source checks; no tests were run.
Reviews (5) · Last reviewed commit: "fix(cli): report export-preview as alway..." · Reviewed by Greptile