Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

Fix onboarding, reduced motion, and seek-resume review findings

webadderallcbefc51d1893
diff --git a/electron/ipc/register/sources.test.ts b/electron/ipc/register/sources.test.ts
index 08fcb4d2..aa3a2fb0 100644
--- a/electron/ipc/register/sources.test.ts
+++ b/electron/ipc/register/sources.test.ts
@@ -10,6 +10,9 @@ const mocks = vi.hoisted(() => ({
recording: false,
selected: null as SelectedSource | null,
exec: vi.fn(),
+ windows: vi.fn(),
+ writeAppSetting: vi.fn(),
+ setHudRecordingPreparationActive: vi.fn(),
}));
vi.mock("electron", () => ({
ipcMain: {
@@ -17,13 +20,15 @@ vi.mock("electron", () => ({
mocks.handlers.set(name, handler),
},
app: { getName: () => "Recordly", focus: vi.fn() },
- BrowserWindow: { getAllWindows: () => [] },
+ BrowserWindow: { getAllWindows: mocks.windows },
desktopCapturer: { getSources: mocks.sources },
}));
vi.mock("node:child_process", () => ({ execFile: mocks.exec }));
vi.mock("node:util", () => ({ promisify: () => mocks.exec }));
-vi.mock("../../appSettingsStore", () => ({ writeAppSetting: vi.fn() }));
-vi.mock("../../windows", () => ({}));
+vi.mock("../../appSettingsStore", () => ({ writeAppSetting: mocks.writeAppSetting }));
+vi.mock("../../windows", () => ({
+ setHudRecordingPreparationActive: mocks.setHudRecordingPreparationActive,
+}));
vi.mock("../constants", () => ({ ALLOW_RECORDLY_WINDOW_CAPTURE: false }));
vi.mock("../cursor/bounds", () => ({ stopWindowBoundsCapture: vi.fn() }));
vi.mock("../recording/ffmpeg", () => ({}));
@@ -58,6 +63,7 @@ beforeEach(() => {
mocks.handlers.clear();
mocks.recording = false;
mocks.selected = null;
+ mocks.windows.mockReturnValue([]);
mocks.validate.mockImplementation(async (source) => source);
mocks.exec.mockRejectedValue(new Error("wmctrl is not installed"));
Object.defineProperty(process, "platform", { value: "linux" });
@@ -80,19 +86,52 @@ function pickerFixture() {
current = win as unknown as BrowserWindow;
return current;
});
+ const createEditor = vi.fn();
const { pickSourceList } = registerSourceHandlers({
- createEditorWindow: vi.fn(),
+ createEditorWindow: createEditor,
createSourceSelectorWindow: create,
getSourceSelectorWindow: () => current,
});
return {
win,
create,
+ createEditor,
pickSourceList,
select: (source: SelectedSource) =>
mocks.handlers.get("select-source")!({ sender: win.webContents }, source),
};
}
+for (const operatingSystem of ["darwin", "win32", "linux"]) {
+ it(`opens recording onboarding from the HUD on ${operatingSystem}`, () => {
+ Object.defineProperty(process, "platform", { value: operatingSystem });
+ const picker = pickerFixture();
+ const send = vi.fn();
+ const destroyedSend = vi.fn();
+ mocks.windows.mockReturnValue([
+ { isDestroyed: () => false, webContents: { send } },
+ { isDestroyed: () => true, webContents: { send: destroyedSend } },
+ ]);
+ mocks.handlers.get("show-recording-permissions")!();
+ expect(picker.createEditor).toHaveBeenCalledOnce();
+ expect(mocks.writeAppSetting).toHaveBeenCalledWith(
+ "recordly.onboarding.permissionsRequested",
+ true,
+ );
+ expect(mocks.setHudRecordingPreparationActive).toHaveBeenCalledWith(false);
+ expect(send).toHaveBeenCalledWith("recording-permissions-requested");
+ expect(destroyedSend).not.toHaveBeenCalled();
+ });
+ it(`keeps recording onboarding closed during active capture on ${operatingSystem}`, () => {
+ Object.defineProperty(process, "platform", { value: operatingSystem });
+ const picker = pickerFixture();
+ mocks.recording = true;
+ mocks.handlers.get("show-recording-permissions")!();
+ expect(picker.createEditor).not.toHaveBeenCalled();
+ expect(mocks.writeAppSetting).not.toHaveBeenCalled();
+ expect(mocks.setHudRecordingPreparationActive).not.toHaveBeenCalled();
+ expect(mocks.windows).not.toHaveBeenCalled();
+ });
+}
it("never enumerates or previews Wayland sources before recording", async () => {
vi.stubEnv("XDG_SESSION_TYPE", "wayland");
expect(await getDesktopSources({ types: ["screen", "window"] })).toEqual([
diff --git a/electron/ipc/register/sources.ts b/electron/ipc/register/sources.ts
index 5a2f704b..ec2a2c32 100644
--- a/electron/ipc/register/sources.ts
+++ b/electron/ipc/register/sources.ts
@@ -661,7 +661,7 @@ body{background:transparent;overflow:hidden;width:100vw;height:100vh}
}
});
ipcMain.handle("show-recording-permissions", () => {
- if (process.platform !== "darwin" || isCursorCaptureActive) return;
+ if (isCursorCaptureActive) return;
writeAppSetting("recordly.onboarding.permissionsRequested", true);
setHudRecordingPreparationActive(false);
recordingNavigation.open(false);
diff --git a/services/supabase/SETUP.md b/services/supabase/SETUP.md
index 36a4b3be..c7d40b38 100644
--- a/services/supabase/SETUP.md
+++ b/services/supabase/SETUP.md
@@ -40,7 +40,7 @@ The local desktop app already referenced this Supabase project before setup. Its
1. SMTP delivery has passed an owner-authorized magic-link test. Review rate limits for launch volume; successful inbox delivery does not complete the desktop callback/recovery tests.
2. Test app-initiated email signup/sign-in and Google login end to end. The local UI uses magic links for both signup and sign-in. Verify Azure and GitHub provider configuration before enabling those sign-in options for release. Email templates are saved live; the app changes are not released.
-3. Decide the production fallback URL. The UI requires a Supabase session and offers Google, Microsoft, GitHub, and email magic links. There is no local demo or guest login.
+3. Decide the production fallback URL. The UI requires a Supabase session and currently offers Google and email magic links, matching the enabled providers. There is no local demo or guest login.
4. Verify a real desktop feedback submission. Add cleanup for interrupted uploads and old quota rows through the appropriate server-side APIs.
5. Cloud recording ownership, five-slot quotas, byte limits, cleanup, and management UI are deployed to staging. A real desktop upload/playback/delete test passed; large multipart uploads, another-account isolation, and packaged callbacks still need live verification. See `../recordly-share/worker/STAGING.md`.
6. Configure payments after these foundations and the planned frontend changes.
diff --git a/src/components/launch/MarqueeText.css b/src/components/launch/MarqueeText.css
index 434b8143..1b068c09 100644
--- a/src/components/launch/MarqueeText.css
+++ b/src/components/launch/MarqueeText.css
@@ -48,6 +48,23 @@
animation-play-state: running;
}
+@media (prefers-reduced-motion: reduce) {
+ .group:hover .source-selector-marquee[data-overflowing="true"] .source-selector-marquee-static {
+ opacity: 1;
+ }
+
+ .group:hover
+ .source-selector-marquee[data-overflowing="true"]
+ .source-selector-marquee-animated {
+ opacity: 0;
+ }
+
+ .source-selector-marquee-track {
+ animation: none;
+ will-change: auto;
+ }
+}
+
@keyframes source-selector-marquee {
from {
transform: translateX(0);
diff --git a/src/components/video-editor/VideoPlayback.tsx b/src/components/video-editor/VideoPlayback.tsx
index 744dc9a1..47a84101 100644
--- a/src/components/video-editor/VideoPlayback.tsx
+++ b/src/components/video-editor/VideoPlayback.tsx
@@ -523,6 +523,7 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
const cursorFollowCameraRef = useRef<CursorFollowCameraState>(
createCursorFollowCameraState(),
);
+ const cursorFollowCameraNeedsResetRef = useRef(false);
/** Requests one exact composition after an output-affecting edit while paused. */
const requestPausedFrameRefresh = useCallback(() => {
if (!isPlayingRef.current) {
@@ -2058,6 +2059,14 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
lastRenderedContentTimeRef.current = contentTimeMs;
const sampleFrozenFrame = motionMode === "snap" && !isPlayingRef.current;
+ if (sampleFrozenFrame) {
+ // Frozen frames use independent camera samples. Resume from that new
+ // position instead of retaining full-zoom focus from before a seek.
+ cursorFollowCameraNeedsResetRef.current = true;
+ } else if (motionMode === "spring" && cursorFollowCameraNeedsResetRef.current) {
+ cursorFollowCameraRef.current = createCursorFollowCameraState();
+ cursorFollowCameraNeedsResetRef.current = false;
+ }
const frameSample = sampleFrozenFrame
? getFrameMotionSample(contentTimeMs, clipRegionsRef.current)
: null;
diff --git a/tests/ui/hud-layout.spec.ts b/tests/ui/hud-layout.spec.ts
index df27d1e5..20a6609e 100644
--- a/tests/ui/hud-layout.spec.ts
+++ b/tests/ui/hud-layout.spec.ts
@@ -1,6 +1,41 @@
import { expect, test } from "@playwright/test";
import { installDesktopBridge } from "./bridge";
+for (const reducedMotion of ["reduce", "no-preference"] as const) {
+ test(`HUD source label respects ${reducedMotion} motion preference on hover`, async ({
+ page,
+ }) => {
+ await page.emulateMedia({ reducedMotion });
+ await installDesktopBridge(page);
+ await page.addInitScript(() => {
+ window.electronAPI.getSelectedSource = async () => ({
+ id: "window:101:0",
+ name: "A very long document title that overflows the recording source control",
+ });
+ });
+ await page.goto("/?windowType=hud-overlay");
+ const source = page.getByRole("button", { name: "Choose recording source", exact: true });
+ const label = source.locator(".source-selector-marquee");
+ await expect(label).toHaveAttribute("data-overflowing", "true");
+ await source.hover();
+ const reduce = reducedMotion === "reduce";
+ await expect(label.locator(".source-selector-marquee-static")).toHaveCSS(
+ "opacity",
+ reduce ? "1" : "0",
+ );
+ await expect(label.locator(".source-selector-marquee-animated")).toHaveCSS(
+ "opacity",
+ reduce ? "0" : "1",
+ );
+ const track = label.locator(".source-selector-marquee-track");
+ await expect(track).toHaveCSS(
+ "animation-name",
+ reduce ? "none" : "source-selector-marquee",
+ );
+ if (!reduce) await expect(track).toHaveCSS("animation-play-state", "running");
+ });
+}
+
test("HUD dividers are vertically centered", async ({ page }) => {
await installDesktopBridge(page);
await page.goto("/?windowType=hud-overlay");
diff --git a/tests/ui/paused-motion.spec.ts b/tests/ui/paused-motion.spec.ts
index 6e0608e3..ea3798f0 100644
--- a/tests/ui/paused-motion.spec.ts
+++ b/tests/ui/paused-motion.spec.ts
@@ -1,6 +1,43 @@
import { expect, test } from "@playwright/test";
import { installDesktopBridge } from "./bridge";
+test("auto-zoom resumes from a paused seek without retaining the old full-zoom focus", async ({
+ page,
+}) => {
+ const errors: string[] = [];
+ page.on("pageerror", (error) => errors.push(error.message));
+ await installDesktopBridge(page, "filmstrip.mp4");
+ await page.goto("/tests/ui/paused-motion.html?autoZoom");
+ const main = page.locator("main");
+ const video = page.locator("video").first();
+ await expect(main).toHaveAttribute("data-ready", "true");
+ await expect.poll(() => video.evaluate((v: HTMLVideoElement) => v.seeking)).toBe(false);
+ await page.getByRole("button", { name: "Play to full zoom", exact: true }).click();
+ await expect
+ .poll(() => video.evaluate((v: HTMLVideoElement) => v.currentTime), { intervals: [50] })
+ .toBeGreaterThanOrEqual(2);
+ await expect.poll(() => video.evaluate((v: HTMLVideoElement) => v.paused)).toBe(true);
+ const cameraOffset = async () => {
+ await page.getByRole("button", { name: "Read camera" }).click();
+ return Math.abs(Number(await main.getAttribute("data-camera-offset")));
+ };
+ // Full zoom followed the cursor to the right before the seek.
+ expect(await cameraOffset()).toBeGreaterThan(20);
+ await page.getByRole("button", { name: "Seek zoom-out" }).click();
+ await expect
+ .poll(() => video.evaluate((v: HTMLVideoElement) => v.currentTime))
+ .toBeCloseTo(4.2, 2);
+ await expect.poll(cameraOffset).toBeLessThan(1);
+ await page.getByRole("button", { name: "Resume through zoom-out", exact: true }).click();
+ await expect
+ .poll(() => video.evaluate((v: HTMLVideoElement) => v.currentTime), { intervals: [50] })
+ .toBeGreaterThanOrEqual(4.35);
+ await expect.poll(() => video.evaluate((v: HTMLVideoElement) => v.paused)).toBe(true);
+ expect(await video.evaluate((v: HTMLVideoElement) => v.currentTime)).toBeLessThan(4.7);
+ expect(await cameraOffset()).toBeLessThan(1);
+ expect(errors).toEqual([]);
+});
+
for (const cursor of [false, true]) {
test(`pause/resume preserves ${cursor ? "cursor" : "camera"} motion without a decoder seek`, async ({
page,
diff --git a/tests/ui/paused-motion.tsx b/tests/ui/paused-motion.tsx
index 3d158094..ec620cb6 100644
--- a/tests/ui/paused-motion.tsx
+++ b/tests/ui/paused-motion.tsx
@@ -1,9 +1,10 @@
-import { useRef, useState } from "react";
+import { useCallback, useRef, useState } from "react";
import { createRoot } from "react-dom/client";
import VideoPlayback, { type VideoPlaybackRef } from "@/components/video-editor/VideoPlayback";
import { I18nProvider } from "@/contexts/I18nContext";
import "@/index.css";
const cursor = new URLSearchParams(location.search).has("cursor");
+const autoZoom = new URLSearchParams(location.search).has("autoZoom");
const noop = () => undefined;
const onError = (error: string) => {
throw new Error(error);
@@ -16,33 +17,76 @@ const zooms = [
endMs: 4000,
depth: 2 as const,
focus: { cx: 0.5, cy: 0.5 },
- mode: "manual" as const,
+ mode: autoZoom ? ("auto" as const) : ("manual" as const),
},
];
const telemetry = [
{ timeMs: 0, cx: 0.1, cy: 0.5 },
{ timeMs: 1000, cx: 0.9, cy: 0.5 },
- { timeMs: 6000, cx: 0.9, cy: 0.5 },
+ { timeMs: 3400, cx: 0.9, cy: 0.5 },
+ { timeMs: 3500, cx: 0.5, cy: 0.5 },
+ { timeMs: 6000, cx: 0.5, cy: 0.5 },
];
function Preview() {
const playback = useRef<VideoPlaybackRef>(null);
+ const stopAt = useRef<number | null>(null);
const [playing, setPlaying] = useState(false);
const [time, setTime] = useState(0.8);
const [blur, setBlur] = useState(true);
const [ready, setReady] = useState(false);
+ const [cameraOffset, setCameraOffset] = useState<number | null>(null);
+ const onTimeUpdate = useCallback((nextTime: number) => {
+ setTime(nextTime);
+ if (stopAt.current !== null && nextTime >= stopAt.current) {
+ stopAt.current = null;
+ playback.current?.pause();
+ }
+ }, []);
return (
- <main style={{ width: 900 }} data-ready={ready}>
+ <main
+ style={{ width: autoZoom ? 400 : 900 }}
+ data-ready={ready}
+ data-camera-offset={cameraOffset}
+ >
<button onClick={() => playback.current?.play()}>Play</button>
<button onClick={() => playback.current?.pause()}>Pause</button>
<button onClick={() => setBlur((value) => !value)}>Toggle blur</button>
<button onClick={() => playback.current?.seekTimeline(3)}>Seek elsewhere</button>
<button onClick={() => playback.current?.seekTimeline(0.8)}>Seek back</button>
+ <button onClick={() => playback.current?.seekTimeline(4.2)}>Seek zoom-out</button>
+ <button
+ onClick={() => {
+ stopAt.current = 2;
+ playback.current?.play();
+ }}
+ >
+ Play to full zoom
+ </button>
+ <button
+ onClick={() => {
+ stopAt.current = 4.35;
+ playback.current?.play();
+ }}
+ >
+ Resume through zoom-out
+ </button>
+ <button
+ onClick={() => {
+ const camera = playback.current?.videoContainer?.parent?.parent;
+ const width = playback.current?.app?.screen.width;
+ if (camera && width) {
+ setCameraOffset(camera.x + (width / 2) * (camera.scale.x - 1));
+ }
+ }}
+ >
+ Read camera
+ </button>
<VideoPlayback
ref={playback}
videoPath="/tests/ui/fixtures/filmstrip.mp4"
clipRegions={clips}
currentTime={time}
- onTimeUpdate={setTime}
+ onTimeUpdate={onTimeUpdate}
onDurationChange={noop}
onPlayStateChange={setPlaying}
onError={onError}
@@ -60,7 +104,7 @@ function Preview() {
cursorStyle="dot"
cursorTelemetry={telemetry}
cursorMotionBlur={cursor && blur ? 1 : 0}
- zoomMotionBlur={!cursor && blur ? 1 : 0}
+ zoomMotionBlur={!cursor && !autoZoom && blur ? 1 : 0}
/>
</main>
);