Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ Ask first:
- progress updates that talk about internal skill routing instead of the concrete repo change
- long exploratory work before producing the concrete vendored files the user explicitly asked for
- unexpected browser debugger pause hooks in the default dev launch profile; browser debugging must stay explicit opt-in
- temporary worktrees or throwaway repo copies for normal repo tasks when the current workspace branch is available; work in the active workspace unless the user explicitly asks for isolation

## Preferred Skills

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ private static string BuildStartupTraceScript()

let animationFramePasses = 0;
const captureOnAnimationFrame = () => {
animationFramePasses += 1;
capture();

if (window.__learnStartupTrace.length >= maxSamples || animationFramePasses >= maxAnimationFramePasses) {
return;
}

animationFramePasses += 1;
window.requestAnimationFrame(captureOnAnimationFrame);
};

Expand Down
30 changes: 25 additions & 5 deletions tests/PrompterOne.App.UITests/Media/recording-file-harness.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,32 @@
}

async function waitForNextVideoFrame(videoElement) {
if (typeof videoElement.requestVideoFrameCallback === "function") {
await new Promise(resolve => videoElement.requestVideoFrameCallback(() => resolve()));
return;
}
await new Promise(resolve => {
let completed = false;

const finish = () => {
if (completed) {
return;
}

completed = true;
resolve();
};

await new Promise(resolve => window.setTimeout(resolve, visibleVideoPollDelayMs));
const timeoutId = window.setTimeout(finish, visibleVideoPollDelayMs);
const canAwaitVideoFrame = typeof videoElement.requestVideoFrameCallback === "function"
&& !videoElement.paused
&& !videoElement.ended;

if (!canAwaitVideoFrame) {
return;
}

videoElement.requestVideoFrameCallback(() => {
window.clearTimeout(timeoutId);
finish();
});
});
}

async function detectVisibleVideoAcrossFrames(videoElement) {
Expand Down
Loading