Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(editor): move presets menu to header

Etienne Lescot112bea0f6615
diff --git a/src/components/ai-edition/RightPanes.tsx b/src/components/ai-edition/RightPanes.tsx
index 9a7db28b6..bfa10f273 100644
--- a/src/components/ai-edition/RightPanes.tsx
+++ b/src/components/ai-edition/RightPanes.tsx
@@ -109,7 +109,6 @@ import { useCanSegmentCamera } from "../../native/hooks/useSegmentationSupport";
import { CaptionsPane } from "./CaptionsPane";
import { insertionsEnabled } from "./insertionsEnabled";
import styles from "./NewEditorShell.module.css";
-import { StylePresetsMenu } from "./StylePresetsMenu";
import { useTranscriptionLabel } from "./TranscriptionStatus";
import { transcriptionBusyLabel } from "./transcriptionBusyLabel";
@@ -2388,9 +2387,6 @@ export function VideoEffectsPane() {
// translate 13 times — both already exist in every locale and neither is a
// fragment of the other, so joining them survives translation and RTL alike.
helpText={`${ts("background.help")} ${ts("effects.help")}`}
- // A preset is the whole look this pane (and the camera and cursor panes) edits, so
- // it rides the header rather than joining any one section — as captions do.
- actions={<StylePresetsMenu />}
>
<BackgroundSection />
<div className={styles.sectionHead}>
diff --git a/src/components/ai-edition/StylePresetsMenu.tsx b/src/components/ai-edition/StylePresetsMenu.tsx
index b7205b581..cc4e8ba25 100644
--- a/src/components/ai-edition/StylePresetsMenu.tsx
+++ b/src/components/ai-edition/StylePresetsMenu.tsx
@@ -1,4 +1,4 @@
-// The Composition pane's "Presets" menu: apply, save and manage editor style presets.
+// The editor top bar's "Presets" menu: apply, save and manage editor style presets.
//
// A preset is a file on disk (see src/lib/ai-edition/stylePresets.ts), so everything but
// applying one goes through `nativeBridgeClient.presets`. Applying is a single
@@ -35,6 +35,7 @@ import {
} from "@/native";
import { getPlatform } from "@/utils/platformUtils";
import styles from "./NewEditorShell.module.css";
+import topbarStyles from "./v4/EditorShellV4.module.css";
/** Structural equality over plain JSON-shaped values. A preset read from disk carries its
* keys in file order, so a key-order-sensitive comparison would never light a row. */
@@ -397,11 +398,11 @@ export function StylePresetsMenu() {
<PopoverTrigger asChild>
<button
type="button"
- className={styles.paneHeadBtn}
+ className={topbarStyles.ghostBtn}
aria-expanded={open}
disabled={!hasDocument}
>
- <SwatchBook size={14} />
+ <SwatchBook size={15} />
{ts("stylePresets.button")}
</button>
</PopoverTrigger>
diff --git a/src/components/ai-edition/RightPanes.stylePresets.test.tsx b/src/components/ai-edition/v4/EditorTopBar.stylePresets.test.tsx
similarity index 95%
rename from src/components/ai-edition/RightPanes.stylePresets.test.tsx
rename to src/components/ai-edition/v4/EditorTopBar.stylePresets.test.tsx
index 8de6585f8..5d1106bbe 100644
--- a/src/components/ai-edition/RightPanes.stylePresets.test.tsx
+++ b/src/components/ai-edition/v4/EditorTopBar.stylePresets.test.tsx
@@ -1,5 +1,5 @@
// @vitest-environment jsdom
-// The Composition pane's Presets menu, driven through the real pane and the real English
+// The editor top bar's Presets menu, driven through the real top bar and the real English
// catalog: the bridge, the settings hook, the platform and the toaster are the only fakes.
import "@testing-library/jest-dom";
@@ -77,7 +77,7 @@ vi.mock("@/native", async (importOriginal) => {
};
});
-import { VideoEffectsPane } from "./RightPanes";
+import { EditorTopBar } from "./EditorTopBar";
const WARM: StylePreset = {
id: "Warm",
@@ -86,11 +86,32 @@ const WARM: StylePreset = {
appearance: { ...factoryStylePresetAppearance(), padding: 42, wallpaper: "#aa5500" },
};
+const noop = () => {};
+
function renderPane() {
localStorage.setItem(LOCALE_STORAGE_KEY, "en");
return render(
<I18nProvider>
- <VideoEffectsPane />
+ <EditorTopBar
+ mode="edit"
+ onModeChange={noop}
+ projectTitle="Project"
+ dirty={false}
+ canExport={false}
+ chatOpen={false}
+ actions={{
+ openProject: noop,
+ newProject: noop,
+ save: noop,
+ export: noop,
+ openSettings: noop,
+ renameProject: noop,
+ toggleChat: noop,
+ openProviderSettings: noop,
+ showAbout: noop,
+ checkForUpdates: noop,
+ }}
+ />
</I18nProvider>,
);
}
@@ -125,7 +146,7 @@ afterEach(() => {
localStorage.clear();
});
-describe("Presets menu in the Composition pane", () => {
+describe("Presets menu in the editor top bar", () => {
it("lists the built-in preset first, then the saved ones", async () => {
renderPane();
const menu = await openMenu();
diff --git a/src/components/ai-edition/v4/EditorTopBar.tsx b/src/components/ai-edition/v4/EditorTopBar.tsx
index 0fa4ce90e..92232b3b7 100644
--- a/src/components/ai-edition/v4/EditorTopBar.tsx
+++ b/src/components/ai-edition/v4/EditorTopBar.tsx
@@ -18,6 +18,7 @@ import logoMark from "@/assets/openscreen-mark.png";
import { useI18n, useScopedT } from "@/contexts/I18nContext";
import { useTheme } from "@/hooks/useTheme";
import { getAvailableLocales, getLocaleName, getLocaleShort } from "@/i18n/loader";
+import { StylePresetsMenu } from "../StylePresetsMenu";
import styles from "./EditorShellV4.module.css";
export type EditorMode = "media" | "edit" | "rec";
@@ -173,6 +174,10 @@ export function EditorTopBar({
))}
</div>
+ {/* A preset is the whole look the right panel's panes edit — Composition, camera,
+ cursor — so its entry sits in the bar, reachable from every pane and mode,
+ rather than in any one pane's header. */}
+ <StylePresetsMenu />
<button
type="button"
className={styles.iconBtn}
diff --git a/technical-documentation/testing/manual-e2e-checklist.md b/technical-documentation/testing/manual-e2e-checklist.md
index e233391e1..a786cff27 100644
--- a/technical-documentation/testing/manual-e2e-checklist.md
+++ b/technical-documentation/testing/manual-e2e-checklist.md
@@ -626,3 +626,4 @@ The mask comes from the native compositor (ONNX Runtime + the vendored selfie-se
| 2026-09-13 | `6862a380` + microphone USB-label resolver patch; rebuilt release helpers | macOS 26.6.2, Apple Silicon, Shure MV7 | Partial | Real desktop HUD: selected explicit `Shure MV7 (14ed:1012)`, microphone on, system audio/camera off; started/stopped capture and reached saved editor (16.1 s). Logs confirm the rebuilt helper path and decorated label. Raw AAC is non-silent (mean -37.4 dBFS, peak -13.3 dBFS). Separately, the resolver matched the decorated label to the real AVFoundation MV7 ID. Default input was also MV7, so audio alone does not prove non-default routing. Listening, mixed/system audio, export, non-default-input recording and other platforms were not run; this is not full acceptance. |
| 2026-09-15 | dev build (`npm run dev`), worktree `e2e-macos-pr-652-b93321` on `pr/509-hud-session-prefs`: main pass on `8fa0740a` (PR #652 head before the scope narrowing), rescope smoke on `ac36aab4` | macOS 26.5, M1 | Pass — 1 defect found, fixed on the branch before merge | **Settings-persistence slice for PR #652, driven with real OS mouse/keyboard.** Capture prefs persist across relaunches from both the HUD and the Rec stage — display source, system audio, mic toggle, cursor mode, auto-zoom — and `recording-settings.json` matched the UI after every restart (final smoke state: mic on, system audio on, `editable-overlay` cursor, autoZoom on, `screen:1:0`). A window source is restored after restart; when that window no longer exists, refocusing the HUD falls back cleanly to "Screen". Re-enumeration on HUD focus: no flicker, no permission prompt, no errors. New-project appearance defaults applied without touching existing projects (on `8fa0740a`, before the narrowing dropped them). **Defect: the HUD stop button did nothing** — select source → record → stop pill left the take recording with no log line. Root cause: in `startWhenDevicesReady`, when every device is ready on the first check the async body never reaches an `await`, so its `finally` clears `startWhenDevicesReadyInFlight` before `startWhenDevicesReadyInFlight.current = pending` runs; the ref keeps a settled promise forever and every later stop (or countdown cancel) returns it. The existing tests all make the gate wait once, so none caught it. Reported on PR #652; fixed on the branch in `e159ced0` (merged to main as `1df32fed`). **The fix was not re-verified in a dedicated run** — the post-narrowing smoke on `ac36aab4` ("drop the Settings dialog") confirmed prefs still persist and an existing project still opens, nothing more. Not covered: explicit mic/camera device restore and preview stop on reset (host has no camera, mic is default-only), the full capture-to-export flow, export, transcript/AI sections, Windows/Linux. |
+| 2026-09-15 | dev build (`npm run dev`), worktree `editor-presets` on `feat/editor-presets` (PR #675) | macOS 26.5, M1 | Pass — no defect | **Style-presets header slice, driven with real OS mouse input.** Confirmed the Presets trigger is in the editor header between the Media/Edit/Rec switcher and theme control, and is absent from the Composition pane header. Opened the menu from the new location and confirmed the built-in `OpenScreen` preset plus the empty user-preset state. Created `E2E Header Smoke`; the success toast appeared and the resulting `.openscreenpreset` file contained format/version metadata and appearance-only state. Applied the built-in preset and observed `Applied “OpenScreen”`; renamed the user preset to `E2E Header Renamed` and verified the file rename on disk; updated it from the current project and observed `Preset updated`; deleted it through the confirmation UI and verified the menu returned to `No saved presets yet` and the preset directory contained no files. Not covered: capture, media import, preview/export, transcript/AI sections, Windows/Linux, or preset portability between machines. |