Skip to content

fix: govern contact sheet frame sampling - #1888

Open
petehunt wants to merge 4 commits into
vercel-labs:mainfrom
petehunt:petehunt/contact-sheet-ignore-fps-governor
Open

petehunt wants to merge 4 commits into
vercel-labs:mainfrom
petehunt:petehunt/contact-sheet-ignore-fps-governor

Conversation

@petehunt

Copy link
Copy Markdown
Contributor

Contact-sheet analysis received every Chrome screencast frame even when the recording requested a lower --fps, allowing analysis load to exceed the configured capture rate.

This applies the recording cadence to contact-sheet candidates and retains the newest suppressed frame at shutdown so the final visual state remains represented. The regression test covers 1 FPS sampling and final-frame preservation.

Validation:

  • cargo test
  • cargo fmt -- --check
  • cargo clippy

@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@petehunt
petehunt requested a review from ctate September 18, 2026 06:41

fn finish(self) -> Result<(), String> {
if let Some(frame) = self.pending {
send_contact_frame(&self.tx, frame)?;

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.

I can reproduce record stop failing at --fps 1 --contact-sheet after one page change followed by a pause. The final pending frame hits the 500 ms lag guard even though analysis isn't behind. Could we avoid counting that intentional wait as analyzer lag and add a quiet-page regression test?

}

fn consider(&mut self, frame: CapturedVideoFrame) -> Result<(), String> {
if self.governor.should_send(frame.elapsed) {

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.

This changes which UI states a contact sheet can see at low --fps, but the help, recording docs, core skill, and MCP descriptions only explain the pixel-change threshold. Could you update those surfaces to call out the sampling limit and final-frame behavior?

@petehunt
petehunt force-pushed the petehunt/contact-sheet-ignore-fps-governor branch from f2e12e7 to e1be4c1 Compare September 23, 2026 21:16
@petehunt
petehunt requested a review from ctate September 23, 2026 21:16
@petehunt
petehunt force-pushed the petehunt/contact-sheet-ignore-fps-governor branch from e1be4c1 to 27580ef Compare September 23, 2026 21:30
@petehunt
petehunt force-pushed the petehunt/contact-sheet-ignore-fps-governor branch from 27580ef to 00668e9 Compare September 23, 2026 21:40
@petehunt

Copy link
Copy Markdown
Contributor Author

@ctate i think this is ready to go

This branch has not been deployed

No deployments
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.

2 participants