Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
feat(export): ask for a star once, after the second export
EtienneLescotb0ccb9d62b81
diff --git a/electron/app-settings.test.ts b/electron/app-settings.test.tsindex 902d7a8a2..65859ae44 100644--- a/electron/app-settings.test.ts+++ b/electron/app-settings.test.ts@@ -69,4 +69,39 @@ describe("app settings store", () => {expect(() => missing.setRecordingPreferences({ micEnabled: true })).toThrow();expect(missing.getSnapshot().recording.micEnabled).toBe(false);});++ it("counts exports until the user answers, then stops counting for good", () => {+ const dir = temp();+ const store = new AppSettingsStore(dir);+ expect(store.getSnapshot().starPrompt).toEqual({ successfulExports: 0, dismissed: false });+ expect(store.recordSuccessfulExport().successfulExports).toBe(1);+ expect(store.recordSuccessfulExport().successfulExports).toBe(2);+ store.dismissStarPrompt();+ // Past the answer the number cannot change any decision, so it stops moving rather than+ // quietly becoming a lifetime usage count.+ expect(store.recordSuccessfulExport()).toEqual({ successfulExports: 2, dismissed: true });+ expect(store.getSnapshot().starPrompt).toEqual({ successfulExports: 2, dismissed: true });+ });++ it("survives a settings file that lies about the prompt state", () => {+ const dir = temp();+ const file = path.join(dir, "recording-settings.json");+ // A hand-edited or truncated file must never turn into "ask on every export".+ for (const bad of ['{"starPrompt":{"successfulExports":-4}}', '{"starPrompt":"nope"}']) {+ writeFileSync(file, bad, "utf8");+ expect(new AppSettingsStore(dir).getSnapshot().starPrompt).toEqual({+ successfulExports: 0,+ dismissed: false,+ });+ }+ });++ it("keeps the recording preferences untouched when the prompt state changes", () => {+ const dir = temp();+ const store = new AppSettingsStore(dir);+ store.setRecordingPreferences({ micEnabled: true, micDeviceId: "mic" });+ store.recordSuccessfulExport();+ store.dismissStarPrompt();+ expect(store.getSnapshot().recording).toMatchObject({ micEnabled: true, micDeviceId: "mic" });+ });});diff --git a/electron/app-settings.ts b/electron/app-settings.tsindex a678a6c02..1a80cb5a1 100644--- a/electron/app-settings.ts+++ b/electron/app-settings.ts@@ -32,9 +32,22 @@ export interface RecordingSourceDescriptor {displayId: string | null;}+/** How far the one-time "star the repo" ask has got on this installation. Local only: nothing+ * here is reported anywhere, it exists so the ask can happen once and then never again. */+export interface StarPromptPreferences {+ successfulExports: number;+ dismissed: boolean;+}++export const DEFAULT_STAR_PROMPT: StarPromptPreferences = {+ successfulExports: 0,+ dismissed: false,+};+export interface AppSettingsSnapshot {recording: RecordingPreferences;lastSource: RecordingSourceDescriptor | null;+ starPrompt: StarPromptPreferences;}type RawSettings = Record<string, unknown>;@@ -105,6 +118,23 @@ function parseSource(value: unknown): RecordingSourceDescriptor | null {return candidate as unknown as RecordingSourceDescriptor;}+/** A hand-edited or truncated settings file must not make the prompt reappear forever, so a+ * count that is not a finite, non-negative integer reads as 0 rather than as "keep asking".+ * `dismissed` is sticky the same way: anything unparseable leaves it false, and the single+ * offer point in `offersStarPrompt` caps the damage at one ask. */+function parseStarPrompt(value: unknown): StarPromptPreferences {+ if (!value || typeof value !== "object" || Array.isArray(value)) return DEFAULT_STAR_PROMPT;+ const candidate = value as Record<string, unknown>;+ const count = candidate.successfulExports;+ return {+ successfulExports:+ typeof count === "number" && Number.isInteger(count) && count >= 0+ ? count+ : DEFAULT_STAR_PROMPT.successfulExports,+ dismissed: bool(candidate.dismissed, DEFAULT_STAR_PROMPT.dismissed),+ };+}+function validateRecordingPatch(patch: Partial<RecordingPreferences>): void {const allowed = new Set(Object.keys(DEFAULT_RECORDING_PREFERENCES));for (const [key, value] of Object.entries(patch)) {@@ -134,6 +164,7 @@ export class AppSettingsStore {return {recording: parseRecording(raw),lastSource: parseSource(raw.lastSource),+ starPrompt: parseStarPrompt(raw.starPrompt),};}@@ -154,4 +185,27 @@ export class AppSettingsStore {atomicWrite(this.userData, { ...raw, lastSource: source });return this.getSnapshot();}++ /** Counts one finished export. Stops counting once the user has answered: past the single+ * offer point the number cannot change any decision, and a counter that keeps climbing for+ * the life of the install is a usage statistic nobody asked for. */+ recordSuccessfulExport(): StarPromptPreferences {+ const raw = readRaw(this.userData);+ const current = parseStarPrompt(raw.starPrompt);+ if (current.dismissed) return current;+ const next: StarPromptPreferences = {+ ...current,+ successfulExports: current.successfulExports + 1,+ };+ atomicWrite(this.userData, { ...raw, starPrompt: next });+ return next;+ }++ /** Both answers land here — starring and declining are the same thing to this file. */+ dismissStarPrompt(): StarPromptPreferences {+ const raw = readRaw(this.userData);+ const next: StarPromptPreferences = { ...parseStarPrompt(raw.starPrompt), dismissed: true };+ atomicWrite(this.userData, { ...raw, starPrompt: next });+ return next;+ }}diff --git a/electron/electron-env.d.ts b/electron/electron-env.d.tsindex 48ab5ba96..be65ea224 100644--- a/electron/electron-env.d.ts+++ b/electron/electron-env.d.ts@@ -269,6 +269,10 @@ interface Window {}>;onStopRecordingFromTray: (callback: () => void) => () => void;openExternalUrl: (url: string) => Promise<{ success: boolean; error?: string }>;+ openRepoPage: () => Promise<void>;+ starPromptExportFinished: () => Promise<{ offer: boolean; store: boolean }>;+ dismissStarPrompt: () => Promise<void>;+ openStoreReview: () => Promise<{ success: boolean }>;pickExportSavePath: (fileName: string,exportFolder?: string,diff --git a/electron/main.ts b/electron/main.tsindex 99a08a8f6..de3e3bbd7 100644--- a/electron/main.ts+++ b/electron/main.ts@@ -21,6 +21,7 @@ import {PRODUCT_NAME,usesNativeAboutPanel,} from "./about";+import { AppSettingsStore } from "./app-settings";import {blockedFromInstalling,checkForSelfUpdate,@@ -64,6 +65,7 @@ import {showPermissionsWindow,showPermissionsWindowIfNeeded,} from "./permissions";+import { offersStarPrompt, REPO_URL, storeReviewUrl } from "./star-prompt";import { registerSttIpc, shutdownStt } from "./stt";import { checkLatestRelease } from "./update-checker";import { loadUpdateMode, saveUpdateMode } from "./update-settings";@@ -244,6 +246,13 @@ function setupApplicationMenu() {label: mainT("common", "actions.saveDiagnostics") || "Save Diagnostics",click: runSaveDiagnostics,},+ // Permanent and unconditional, unlike the update check below: a link to the repo+ // is the one thing every channel may show, the Store included. Not in the tray,+ // which is the recording surface — nothing asks for a favour mid-take.+ {+ label: mainT("common", "actions.starOnGithub") || "Star on GitHub",+ click: runStarOnGithub,+ },// Omitted entirely — here, in the Help menu and in the tray — where a package// manager owns the update. See `canOfferUpdateCheck`....(canOfferUpdateCheck()@@ -407,6 +416,10 @@ function setupApplicationMenu() {label: mainT("common", "actions.saveDiagnostics") || "Save Diagnostics",click: runSaveDiagnostics,},+ {+ label: mainT("common", "actions.starOnGithub") || "Star on GitHub",+ click: runStarOnGithub,+ },],});}@@ -551,6 +564,13 @@ function runAboutDialog() {});}+/** Menu, tray and renderer all end up here, so the link cannot drift between them. */+function runStarOnGithub() {+ shell.openExternal(REPO_URL).catch((error) => {+ console.error("[star] could not open the repo page", error);+ });+}+/** Menu and tray entry point, for the same reason `runAboutDialog` exists. */function runUpdateCheck() {checkForUpdates().catch((error) => {@@ -1237,6 +1257,55 @@ appReady?.then(async () => {// then silently refuses.ipcMain.handle("can-check-for-updates-now", () => canOfferUpdateCheck());+ // The one-time star ask. Decided here, not in the renderer, for the same reason the update+ // check is: the take flag and the install channel live in this file, and a rule enforced in+ // two places is a rule that gets asked two different ways. The renderer learns yes or no —+ // never the counters behind it, which stay on disk and are reported nowhere.+ //+ // Its own store instance: `AppSettingsStore` is a stateless wrapper around one JSON file, so+ // this costs a path string, and the alternative is threading ipc/handlers.ts' instance out+ // through a module that has no other reason to export it.+ const starPromptSettings = new AppSettingsStore(app.getPath("userData"));++ ipcMain.handle("star-prompt:export-finished", () => {+ const { successfulExports, dismissed } = starPromptSettings.recordSuccessfulExport();+ return {+ offer: offersStarPrompt({+ successfulExports,+ dismissed,+ recording: isRecording,+ // Every handler in this file is registered inside `appReady`, which the CLI boot+ // path never reaches, so this is the second lock on a shut door — see the note on+ // `headless` in star-prompt.ts.+ headless: cliCommand !== null,+ }),+ // Drives which links the prompt shows. A Store copy must not be pointed at Releases+ // or at an .exe, so it is offered the repo root and the Store's own review page.+ store: getInstallChannel() === "store",+ };+ });++ // Opening the repo goes through main like the Store link does, so the renderer holds no URL+ // at all and every surface that offers a star opens the same one.+ ipcMain.handle("star-prompt:open-repo", () => {+ runStarOnGithub();+ });++ // Starring and declining are the same answer to this handler: the ask is over either way.+ ipcMain.handle("star-prompt:dismiss", () => {+ starPromptSettings.dismissStarPrompt();+ });++ // The deep link is built in the main process and never crosses the IPC boundary as a string.+ // `open-external-url` allows http/https/mailto only — deliberately, because handing the OS a+ // custom scheme from a renderer that runs with `webSecurity:false` is a launch primitive —+ // and one fixed URL is not a reason to widen that.+ ipcMain.handle("star-prompt:open-store-review", async () => {+ if (getInstallChannel() !== "store") return { success: false };+ await shell.openExternal(storeReviewUrl());+ return { success: true };+ });+// The editor's app menu opens the SAME About box the native menu and the tray do, rather// than rendering its own panel: the version block exists to be pasted into a bug report,// and a second React spelling of it is a second thing to keep in step with about.ts.diff --git a/electron/preload.ts b/electron/preload.tsindex 80145ea12..cba14229c 100644--- a/electron/preload.ts+++ b/electron/preload.ts@@ -281,6 +281,21 @@ contextBridge.exposeInMainWorld("electronAPI", {openExternalUrl: (url: string) => {return ipcRenderer.invoke("open-external-url", url);},+ // The star ask. The renderer reports that an export finished and is told yes or no; the+ // counters, the take flag and the install channel stay in the main process.+ openRepoPage: () => {+ return ipcRenderer.invoke("star-prompt:open-repo");+ },+ starPromptExportFinished: () => {+ return ipcRenderer.invoke("star-prompt:export-finished");+ },+ dismissStarPrompt: () => {+ return ipcRenderer.invoke("star-prompt:dismiss");+ },+ // No URL argument on purpose: main builds the `ms-windows-store:` link from a constant.+ openStoreReview: () => {+ return ipcRenderer.invoke("star-prompt:open-store-review");+ },pickExportSavePath: (fileName: string, exportFolder?: string) => {return ipcRenderer.invoke("pick-export-save-path", fileName, exportFolder);},diff --git a/electron/star-prompt.test.ts b/electron/star-prompt.test.tsnew file mode 100644index 000000000..46dd07b51--- /dev/null+++ b/electron/star-prompt.test.ts@@ -0,0 +1,54 @@+import { describe, expect, it } from "vitest";+import {+ MS_STORE_PRODUCT_ID,+ offersStarPrompt,+ STAR_PROMPT_AT_EXPORT,+ type StarPromptState,+ storeReviewUrl,+} from "./star-prompt";++const state = (patch: Partial<StarPromptState> = {}): StarPromptState => ({+ successfulExports: STAR_PROMPT_AT_EXPORT,+ dismissed: false,+ recording: false,+ headless: false,+ ...patch,+});++describe("star prompt policy", () => {+ it("offers on the second successful export and on no other", () => {+ expect(offersStarPrompt(state({ successfulExports: 1 }))).toBe(false);+ expect(offersStarPrompt(state({ successfulExports: 2 }))).toBe(true);+ expect(offersStarPrompt(state({ successfulExports: 3 }))).toBe(false);+ expect(offersStarPrompt(state({ successfulExports: 50 }))).toBe(false);+ });++ it("never asks again once the user has answered, either way", () => {+ expect(offersStarPrompt(state({ dismissed: true }))).toBe(false);+ });++ it("stays out of the way during a recording", () => {+ expect(offersStarPrompt(state({ recording: true }))).toBe(false);+ });++ it("never fires on a CLI or headless export", () => {+ expect(offersStarPrompt(state({ headless: true }))).toBe(false);+ });++ it("keeps every veto independent of the export count", () => {+ // A veto that only held at the offer count would let the prompt through the moment the+ // count moved past it, which is exactly when a regression would go unnoticed.+ for (const count of [1, 2, 3]) {+ expect(offersStarPrompt(state({ successfulExports: count, dismissed: true }))).toBe(false);+ expect(offersStarPrompt(state({ successfulExports: count, recording: true }))).toBe(false);+ expect(offersStarPrompt(state({ successfulExports: count, headless: true }))).toBe(false);+ }+ });++ it("builds the Store review deep link from the shipped product id", () => {+ // Same id as the website's Store link and the winget command; a typo here sends the user+ // to a Store page that does not exist, and nothing else in the app would notice.+ expect(MS_STORE_PRODUCT_ID).toBe("9MXQ1HQJL5G5");+ expect(storeReviewUrl()).toBe("ms-windows-store://review/?ProductId=9MXQ1HQJL5G5");+ });+});diff --git a/electron/star-prompt.ts b/electron/star-prompt.tsnew file mode 100644index 000000000..f3338cf4e--- /dev/null+++ b/electron/star-prompt.ts@@ -0,0 +1,54 @@+// Stars are the only distribution signal this project has, and most people who use it arrive+// from a search result and never see the repo. The one moment asking is not an interruption is+// straight after an export the user wanted, which is why the ask lives there and nowhere else.+//+// Everything in this file exists to make that ask happen AT MOST ONCE. Nothing here gates a+// feature, and nothing here is reported anywhere: the counters below never leave the machine.++/** The export that earns the ask. The first export is someone trying the app out; by the second+ * they have chosen to use it, and the question is worth one line of their attention. */+export const STAR_PROMPT_AT_EXPORT = 2;++export interface StarPromptState {+ /** Successful exports on this installation, including the one that just finished. */+ successfulExports: number;+ /** Set as soon as the user answers — "No thanks" is an answer, and it is permanent. */+ dismissed: boolean;+ /** A take is running. The prompt must never compete with the encoder, and the editor is not+ * the window in front of the user during a recording. */+ recording: boolean;+ /** `--export` and the rest of the CLI: there is no window, so there is nobody to ask. The+ * CLI runner drives the native exporter directly rather than through ExportDialog, so this+ * is a second lock on a door that is already shut — and the one that keeps holding if a+ * later refactor routes the CLI through the dialog. */+ headless: boolean;+}++/** Pure, so the whole matrix pins from a Linux-only CI with no export, no window and no+ * settings file — the same reason `offersUpdateCheck` and `blockedFromInstalling` are pure.+ *+ * `===`, not `>=`: the ask fires on exactly one export. A user who closes the dialog without+ * answering is never asked again, which is the point — re-asking is the failure mode this is+ * built to avoid, not a fallback to reach for when the first ask goes unanswered. */+export function offersStarPrompt(state: StarPromptState): boolean {+ if (state.dismissed || state.recording || state.headless) return false;+ return state.successfulExports === STAR_PROMPT_AT_EXPORT;+}++/** The repo root — the only page any of this points at. Never Releases and never an asset: on+ * a Store copy that is the second, parallel install `install-channel.ts` exists to prevent, and+ * on every other channel it is simply not what the ask is about. Lives here so main, the app+ * menu and the export prompt cannot drift to three different links. */+export const REPO_URL = "https://github.com/getopenscreen/openscreen";++/** The Store listing this app ships under: the same id in the website's Store link and in the+ * `winget install --source msstore` command the README recommends. */+export const MS_STORE_PRODUCT_ID = "9MXQ1HQJL5G5";++/** Built here from a constant, and never from a string the renderer sends. `open-external-url`+ * deliberately allows http/https/mailto only, because handing an arbitrary custom scheme to+ * the OS handler is a launch primitive and the renderer runs with `webSecurity:false`. A fixed+ * deep link needs no hole in that allowlist, so it does not get one. */+export function storeReviewUrl(): string {+ return `ms-windows-store://review/?ProductId=${MS_STORE_PRODUCT_ID}`;+}diff --git a/src/components/ai-edition/ExportDialog.tsx b/src/components/ai-edition/ExportDialog.tsxindex 980233995..73c747de6 100644--- a/src/components/ai-edition/ExportDialog.tsx+++ b/src/components/ai-edition/ExportDialog.tsx@@ -6,7 +6,7 @@// Format/quality/GIF options live in the dialog's local state. The// dialog uses the new shell's modal style.-import { Download, FileVideo, FolderOpen, Loader2 } from "lucide-react";+import { Download, FileVideo, FolderOpen, Loader2, Star } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";import { toast } from "sonner";import { useScopedT } from "@/contexts/I18nContext";@@ -82,6 +82,15 @@ function formatHms(totalSeconds: number): string {* and resolves `{ success: false }` when even the fallback failed. The export already* succeeded — failing to open the folder is not worth a second error toast, but it is worth* a line. */+/** The URL itself lives in electron/star-prompt.ts and is never sent from here: main opens the+ * repo root for every surface that offers a star, so the app menu and this prompt cannot drift+ * to different links — and a Store copy cannot be walked towards Releases or an .exe. */+function openRepoPage(): void {+ void window.electronAPI+ ?.openRepoPage?.()+ .catch((err) => console.warn("[export] could not open the repo page:", err));+}+function revealExportedFile(filePath: string): void {void window.electronAPI?.revealInFolder?.(filePath)@@ -160,6 +169,9 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {const [progress, setProgress] = useState<ExportProgress | null>(null);const [error, setError] = useState<string | null>(null);const [savedPath, setSavedPath] = useState<string | null>(null);+ // Null until the main process says this export is the one that earns the ask, and null again+ // the moment the user answers. The renderer never sees the counters behind that decision.+ const [starPrompt, setStarPrompt] = useState<{ store: boolean } | null>(null);const activeExport = useRef<ActiveExport | null>(null);const [cancelPending, setCancelPending] = useState(false);const pickerGeneration = useRef(0);@@ -421,6 +433,15 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {if (activeExport.current !== job) return;setSavedPath(pickedPath);setPhase("done");+ // Reported after the export succeeded, so a cancelled or failed run never counts.+ // Main owns the whole decision; a failure here simply means no ask, which is the+ // safe direction for something that may only ever happen once.+ void window.electronAPI+ ?.starPromptExportFinished?.()+ .then((result) => {+ if (result?.offer) setStarPrompt({ store: result.store });+ })+ .catch((err) => console.warn("[export] star prompt check failed:", err));toast.success(t("exportDialog.exportedVideo"), {description: `${pickedPath} · ${formatHms(stats.videoDurationS)} ${t("exportDialog.exportedVideoOf")} ${formatHms(stats.wallS)}`,action: {@@ -716,6 +737,15 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {error={error}pct={pct}savedPath={savedPath}+ starPrompt={starPrompt}+ onAnswerStarPrompt={() => {+ // Starring and declining are the same answer here: the ask is over. Cleared+ // locally first so the block goes away on the click, not on the round trip.+ setStarPrompt(null);+ void window.electronAPI+ ?.dismissStarPrompt?.()+ .catch((err) => console.warn("[export] could not record the star answer:", err));+ }}/>{cpuCompositor && phase !== "done" && (@@ -831,14 +861,22 @@ function ProgressBlock({error,pct,savedPath,+ starPrompt,+ onAnswerStarPrompt,}: {phase: Phase;progress: ExportProgress | null;error: string | null;pct: number;savedPath: string | null;+ starPrompt: { store: boolean } | null;+ onAnswerStarPrompt: () => void;}) {const t = useScopedT("editor");+ // Same string as the permanent app-menu entry and the native Help menu. It lives in `common`+ // rather than in the orphaned `settings.support` block because the main process only bundles+ // `common` and `dialogs`, and one label split across two namespaces is one label that drifts.+ const tCommon = useScopedT("common");if (phase === "idle" || phase === "configuring") {return (<div@@ -887,6 +925,50 @@ function ProgressBlock({{t("exportDialog.showInFolder")}</button>) : null}+ {starPrompt ? (+ <div className={styles.starPrompt} data-testid="export-star-prompt">+ <span className={styles.starPromptText}>{t("exportDialog.starPrompt")}</span>+ <div className={styles.starPromptActions}>+ <button+ type="button"+ data-testid="export-star-prompt-star"+ className={`${styles.btn} ${styles.btnSecondary}`}+ onClick={() => {+ openRepoPage();+ onAnswerStarPrompt();+ }}+ >+ <Star size={14} />+ {tCommon("actions.starOnGithub")}+ </button>+ {starPrompt.store ? (+ // Deliberately NOT an answer: rating on the Store and starring the repo+ // are different favours, and dismissing on the first would quietly cost+ // the user the second.+ <button+ type="button"+ data-testid="export-star-prompt-store"+ className={`${styles.btn} ${styles.btnSecondary}`}+ onClick={() => {+ void window.electronAPI+ ?.openStoreReview?.()+ .catch((err) => console.warn("[export] could not open the Store:", err));+ }}+ >+ {t("exportDialog.rateOnStore")}+ </button>+ ) : null}+ <button+ type="button"+ data-testid="export-star-prompt-no"+ className={styles.starPromptDecline}+ onClick={onAnswerStarPrompt}+ >+ {t("exportDialog.starPromptNoThanks")}+ </button>+ </div>+ </div>+ ) : null}</div>);}diff --git a/src/components/ai-edition/NewEditorShell.module.css b/src/components/ai-edition/NewEditorShell.module.cssindex fcb85dc0f..49fd4bbfd 100644--- a/src/components/ai-edition/NewEditorShell.module.css+++ b/src/components/ai-edition/NewEditorShell.module.css@@ -1953,6 +1953,46 @@cursor: not-allowed;}+/* The one-time star ask, inside the export-done panel. Separated from the panel's own actions+ by a rule rather than a second box: it is an aside to a successful export, not a second+ result. Shown at most once per installation — see electron/star-prompt.ts. */+.starPrompt {+ display: flex;+ flex-direction: column;+ gap: 10px;+ width: 100%;+ margin-top: 4px;+ padding-top: 12px;+ border-top: 1px solid var(--border);+}++.starPromptText {+ color: var(--muted);+ font: 400 var(--fs-app)/1.5 var(--font-body);+}++.starPromptActions {+ display: flex;+ align-items: center;+ flex-wrap: wrap;+ gap: 8px;+}++/* Declining must be as reachable as accepting, so it is a real button with the same hit area —+ but quiet, because nothing is lost by taking it. */+.starPromptDecline {+ height: 32px;+ padding: 0 10px;+ border: 1px solid transparent;+ border-radius: var(--r-md);+ background: none;+ color: var(--muted);+ font: 500 var(--fs-app)/1 var(--font-body);+ cursor: pointer;+}++.starPromptDecline:hover { color: var(--fg); background: var(--surface-warm); }+/* ─── Edit Clip modal — draggable source-range track ────────────── */.editClipRangeDragging {box-shadow: 0 0 0 2px var(--accent-soft);diff --git a/src/components/ai-edition/v4/EditorTopBar.test.tsx b/src/components/ai-edition/v4/EditorTopBar.test.tsxindex 087c3cc38..2d9c79551 100644--- a/src/components/ai-edition/v4/EditorTopBar.test.tsx+++ b/src/components/ai-edition/v4/EditorTopBar.test.tsx@@ -195,6 +195,29 @@ describe("AppMenu", () => {expect(screen.queryByRole("menu")).not.toBeInTheDocument();});+ it("offers the repo permanently and routes it through main, on every channel", async () => {+ // The counterpart to the one-time ask after an export: this row is always there. It is+ // deliberately NOT behind the update veto — a link to the repo root is the one thing a+ // Store/Flathub/Snap copy may show, since it can walk nobody into a parallel install.+ const openRepoPage = vi.fn(() => Promise.resolve());+ (window as unknown as { electronAPI?: unknown }).electronAPI = { openRepoPage };+ try {+ renderTopBar("Demo Project");+ fireEvent.click(screen.getByRole("button", { name: /OpenScreen/ }));+ // Present next to About even though Check for Updates is absent here (no channel+ // answer in jsdom), which is the pairing that would break if the two ever shared a veto.+ expect(+ screen.queryByRole("menuitem", { name: /actions\.checkForUpdates/ }),+ ).not.toBeInTheDocument();+ fireEvent.click(screen.getByRole("menuitem", { name: /actions\.starOnGithub/ }));+ // No URL argument: the renderer holds no link, main owns the one it opens.+ expect(openRepoPage).toHaveBeenCalledWith();+ expect(screen.queryByRole("menu")).not.toBeInTheDocument();+ } finally {+ (window as unknown as { electronAPI?: unknown }).electronAPI = undefined;+ }+ });+it("closes on Escape", () => {renderTopBar("Demo Project");fireEvent.click(screen.getByRole("button", { name: /OpenScreen/ }));diff --git a/src/components/ai-edition/v4/EditorTopBar.tsx b/src/components/ai-edition/v4/EditorTopBar.tsxindex 92232b3b7..759509c54 100644--- a/src/components/ai-edition/v4/EditorTopBar.tsx+++ b/src/components/ai-edition/v4/EditorTopBar.tsx@@ -11,6 +11,7 @@ import {RefreshCw,Save,Sparkles,+ Star,Sun,} from "lucide-react";import { type KeyboardEvent as ReactKeyboardEvent, useEffect, useRef, useState } from "react";@@ -450,6 +451,24 @@ function AppMenu({ actions }: { actions: TopBarActions }) {{tCommon("actions.about")}{version ? <span className={styles.appMenuVersion}>{version}</span> : null}</button>+ {/* The permanent way to reach the repo, as opposed to the one-time ask after an+ export. Unconditional: unlike the update check above, a link to the repo root+ is safe on every channel, the Store included. Main opens the URL, so this row+ and the export prompt can never point at different pages. */}+ <button+ type="button"+ role="menuitem"+ className={styles.appMenuRow}+ data-testid="app-menu-star-on-github"+ onClick={run(() => {+ void window.electronAPI+ ?.openRepoPage?.()+ .catch((err) => console.warn("[star] could not open the repo page:", err));+ })}+ >+ <Star size={15} />+ {tCommon("actions.starOnGithub")}+ </button></div>) : null}</div>diff --git a/src/i18n/locales/ar/common.json b/src/i18n/locales/ar/common.jsonindex 62c1b7b6c..8ef90d179 100644--- a/src/i18n/locales/ar/common.json+++ b/src/i18n/locales/ar/common.json@@ -46,6 +46,7 @@"hideOthers": "إخفاء الآخرين","unhide": "إظهار الكل","saveDiagnostics": "حفظ التشخيصات",+ "starOnGithub": "ضع نجمة على GitHub","permissions": "الأذونات…"},"updates": {diff --git a/src/i18n/locales/ar/editor.json b/src/i18n/locales/ar/editor.jsonindex dcef44624..f747153a4 100644--- a/src/i18n/locales/ar/editor.json+++ b/src/i18n/locales/ar/editor.json@@ -192,6 +192,9 @@"exportedGif": "تم تصدير GIF","exportedVideo": "تم تصدير الفيديو","showInFolder": "إظهار في المجلد",+ "starPrompt": "OpenScreen مجاني ومرخّص بموجب MIT. نجمة على GitHub تساعد الآخرين على العثور عليه.",+ "starPromptNoThanks": "لا، شكرًا",+ "rateOnStore": "قيّم التطبيق في متجر Microsoft","exportFailed": "فشل التصدير","failedToWriteFile": "فشلت كتابة الملف","qualityUpscaleWarning": "تكبير الدقة",diff --git a/src/i18n/locales/cs/common.json b/src/i18n/locales/cs/common.jsonindex a3deb4c3b..8339871e7 100644--- a/src/i18n/locales/cs/common.json+++ b/src/i18n/locales/cs/common.json@@ -46,6 +46,7 @@"hideOthers": "Skrýt ostatní","unhide": "Zobrazit vše","saveDiagnostics": "Uložit diagnostiku",+ "starOnGithub": "Dát hvězdu na GitHubu","permissions": "Oprávnění…"},"updates": {diff --git a/src/i18n/locales/cs/editor.json b/src/i18n/locales/cs/editor.jsonindex 81afc8965..70528d542 100644--- a/src/i18n/locales/cs/editor.json+++ b/src/i18n/locales/cs/editor.json@@ -193,6 +193,9 @@"exportedVideo": "Video exportováno","exportedVideoOf": "z videa exportováno za","showInFolder": "Zobrazit ve složce",+ "starPrompt": "OpenScreen je zdarma a pod licencí MIT. Hvězda na GitHubu pomůže ostatním ho najít.",+ "starPromptNoThanks": "Ne, děkuji",+ "rateOnStore": "Ohodnotit v Microsoft Store","exportFailed": "Export selhal","failedToWriteFile": "Nepodařilo se zapsat soubor","qualityUpscaleWarning": "Zvýšení rozlišení",diff --git a/src/i18n/locales/de/common.json b/src/i18n/locales/de/common.jsonindex c1e4b5462..57866d69b 100644--- a/src/i18n/locales/de/common.json+++ b/src/i18n/locales/de/common.json@@ -46,6 +46,7 @@"hideOthers": "Andere ausblenden","unhide": "Alle einblenden","saveDiagnostics": "Diagnosedaten speichern",+ "starOnGithub": "Stern auf GitHub geben","permissions": "Berechtigungen …"},"updates": {diff --git a/src/i18n/locales/de/editor.json b/src/i18n/locales/de/editor.jsonindex 05b497b55..5ba9b6e2d 100644--- a/src/i18n/locales/de/editor.json+++ b/src/i18n/locales/de/editor.json@@ -193,6 +193,9 @@"exportedVideo": "Video exportiert","exportedVideoOf": "Video exportiert in","showInFolder": "Im Ordner anzeigen",+ "starPrompt": "OpenScreen ist kostenlos und MIT-lizenziert. Ein Stern auf GitHub hilft anderen, es zu finden.",+ "starPromptNoThanks": "Nein, danke",+ "rateOnStore": "Im Microsoft Store bewerten","exportFailed": "Export fehlgeschlagen","failedToWriteFile": "Datei konnte nicht geschrieben werden","qualityUpscaleWarning": "Hochskalierung",diff --git a/src/i18n/locales/en/common.json b/src/i18n/locales/en/common.jsonindex ab9a46b00..76a292a2e 100644--- a/src/i18n/locales/en/common.json+++ b/src/i18n/locales/en/common.json@@ -46,6 +46,7 @@"hideOthers": "Hide Others","unhide": "Show All","saveDiagnostics": "Save Diagnostics",+ "starOnGithub": "Star on GitHub","permissions": "Permissions…"},"updates": {diff --git a/src/i18n/locales/en/editor.json b/src/i18n/locales/en/editor.jsonindex a75b70055..4d61c4c4b 100644--- a/src/i18n/locales/en/editor.json+++ b/src/i18n/locales/en/editor.json@@ -193,6 +193,9 @@"exportedVideo": "Video exported","exportedVideoOf": "of video exported in","showInFolder": "Show in folder",+ "starPrompt": "OpenScreen is free and MIT licensed. A star on GitHub helps other people find it.",+ "starPromptNoThanks": "No thanks",+ "rateOnStore": "Rate on the Microsoft Store","exportFailed": "Export failed","failedToWriteFile": "Failed to write file","qualityUpscaleWarning": "Upscale",diff --git a/src/i18n/locales/es/common.json b/src/i18n/locales/es/common.jsonindex d067e7562..c963daed8 100644--- a/src/i18n/locales/es/common.json+++ b/src/i18n/locales/es/common.json@@ -46,6 +46,7 @@"hideOthers": "Ocultar otros","unhide": "Mostrar todo","saveDiagnostics": "Guardar diagnósticos",+ "starOnGithub": "Dar una estrella en GitHub","permissions": "Permisos…"},"updates": {diff --git a/src/i18n/locales/es/editor.json b/src/i18n/locales/es/editor.jsonindex 9487e6b70..7865275a4 100644--- a/src/i18n/locales/es/editor.json+++ b/src/i18n/locales/es/editor.json@@ -192,6 +192,9 @@"exportedGif": "GIF exportado","exportedVideo": "Vídeo exportado","showInFolder": "Mostrar en la carpeta",+ "starPrompt": "OpenScreen es gratuito y tiene licencia MIT. Una estrella en GitHub ayuda a que otras personas lo encuentren.",+ "starPromptNoThanks": "No, gracias",+ "rateOnStore": "Valorar en Microsoft Store","exportFailed": "Error al exportar","failedToWriteFile": "No se pudo escribir el archivo","qualityUpscaleWarning": "Upscaling",diff --git a/src/i18n/locales/fr/common.json b/src/i18n/locales/fr/common.jsonindex 518611716..3f3b0d1e9 100644--- a/src/i18n/locales/fr/common.json+++ b/src/i18n/locales/fr/common.json@@ -46,6 +46,7 @@"hideOthers": "Masquer les autres","unhide": "Tout afficher","saveDiagnostics": "Enregistrer les diagnostics",+ "starOnGithub": "Mettre une étoile sur GitHub","permissions": "Autorisations…"},"updates": {diff --git a/src/i18n/locales/fr/editor.json b/src/i18n/locales/fr/editor.jsonindex cf0de68ee..3d7a7c944 100644--- a/src/i18n/locales/fr/editor.json+++ b/src/i18n/locales/fr/editor.json@@ -193,6 +193,9 @@"exportedVideo": "Vidéo exportée","exportedVideoOf": "de vidéo exportée en","showInFolder": "Afficher dans le dossier",+ "starPrompt": "OpenScreen est gratuit et sous licence MIT. Une étoile sur GitHub aide d'autres personnes à le découvrir.",+ "starPromptNoThanks": "Non merci",+ "rateOnStore": "Noter sur le Microsoft Store","exportFailed": "Échec de l'export","failedToWriteFile": "Échec de l'écriture du fichier","qualityUpscaleWarning": "Upscaling",diff --git a/src/i18n/locales/it/common.json b/src/i18n/locales/it/common.jsonindex 9633a8ac1..d61fc5aa1 100644--- a/src/i18n/locales/it/common.json+++ b/src/i18n/locales/it/common.json@@ -46,6 +46,7 @@"hideOthers": "Nascondi gli altri","unhide": "Mostra tutto","saveDiagnostics": "Salva dati diagnostici",+ "starOnGithub": "Metti una stella su GitHub","permissions": "Permessi…"},"updates": {diff --git a/src/i18n/locales/it/editor.json b/src/i18n/locales/it/editor.jsonindex 9f3b35aa4..4b545d431 100644--- a/src/i18n/locales/it/editor.json+++ b/src/i18n/locales/it/editor.json@@ -192,6 +192,9 @@"exportedGif": "GIF esportata","exportedVideo": "Video esportato","showInFolder": "Mostra nella cartella",+ "starPrompt": "OpenScreen è gratuito e con licenza MIT. Una stella su GitHub aiuta altre persone a trovarlo.",+ "starPromptNoThanks": "No, grazie",+ "rateOnStore": "Valuta su Microsoft Store","exportFailed": "Esportazione non riuscita","failedToWriteFile": "Impossibile scrivere il file","qualityUpscaleWarning": "Upscaling",diff --git a/src/i18n/locales/ja-JP/common.json b/src/i18n/locales/ja-JP/common.jsonindex 55175fa26..f4b40ed08 100644--- a/src/i18n/locales/ja-JP/common.json+++ b/src/i18n/locales/ja-JP/common.json@@ -46,6 +46,7 @@"hideOthers": "ほかを隠す","unhide": "すべて表示","saveDiagnostics": "診断情報を保存",+ "starOnGithub": "GitHub でスターを付ける","permissions": "アクセス許可…"},"updates": {diff --git a/src/i18n/locales/ja-JP/editor.json b/src/i18n/locales/ja-JP/editor.jsonindex ca82e702f..16277f51d 100644--- a/src/i18n/locales/ja-JP/editor.json+++ b/src/i18n/locales/ja-JP/editor.json@@ -192,6 +192,9 @@"exportedGif": "GIFをエクスポートしました","exportedVideo": "動画をエクスポートしました","showInFolder": "フォルダーで表示",+ "starPrompt": "OpenScreen は無料で、MIT ライセンスです。GitHub でスターを付けると、他の人が見つけやすくなります。",+ "starPromptNoThanks": "今はしない",+ "rateOnStore": "Microsoft Store で評価する","exportFailed": "エクスポートに失敗しました","failedToWriteFile": "ファイルの書き込みに失敗しました","qualityUpscaleWarning": "アップスケール",diff --git a/src/i18n/locales/ko-KR/common.json b/src/i18n/locales/ko-KR/common.jsonindex c83e9c634..6ead9fe77 100644--- a/src/i18n/locales/ko-KR/common.json+++ b/src/i18n/locales/ko-KR/common.json@@ -46,6 +46,7 @@"hideOthers": "다른 항목 숨기기","unhide": "모두 보기","saveDiagnostics": "진단 정보 저장",+ "starOnGithub": "GitHub에서 별 누르기","permissions": "권한…"},"updates": {diff --git a/src/i18n/locales/ko-KR/editor.json b/src/i18n/locales/ko-KR/editor.jsonindex d65edaa60..c323b967d 100644--- a/src/i18n/locales/ko-KR/editor.json+++ b/src/i18n/locales/ko-KR/editor.json@@ -192,6 +192,9 @@"exportedGif": "GIF 내보내기 완료","exportedVideo": "동영상 내보내기 완료","showInFolder": "폴더에서 보기",+ "starPrompt": "OpenScreen은 무료이며 MIT 라이선스입니다. GitHub에서 별을 누르면 다른 사람들이 더 쉽게 찾을 수 있습니다.",+ "starPromptNoThanks": "괜찮습니다",+ "rateOnStore": "Microsoft Store에서 평가하기","exportFailed": "내보내기 실패","failedToWriteFile": "파일 쓰기에 실패했습니다","qualityUpscaleWarning": "업스케일",diff --git a/src/i18n/locales/pt-BR/common.json b/src/i18n/locales/pt-BR/common.jsonindex f0b86df0d..82bbb2dd6 100644--- a/src/i18n/locales/pt-BR/common.json+++ b/src/i18n/locales/pt-BR/common.json@@ -46,6 +46,7 @@"hideOthers": "Ocultar Outros","unhide": "Mostrar Todos","saveDiagnostics": "Salvar Diagnósticos",+ "starOnGithub": "Dar uma estrela no GitHub","permissions": "Permissões…"},"updates": {diff --git a/src/i18n/locales/pt-BR/editor.json b/src/i18n/locales/pt-BR/editor.jsonindex e913b61dc..5017b143b 100644--- a/src/i18n/locales/pt-BR/editor.json+++ b/src/i18n/locales/pt-BR/editor.json@@ -192,6 +192,9 @@"exportedGif": "GIF exportado","exportedVideo": "Vídeo exportado","showInFolder": "Mostrar na pasta",+ "starPrompt": "O OpenScreen é gratuito e licenciado sob a MIT. Uma estrela no GitHub ajuda outras pessoas a encontrá-lo.",+ "starPromptNoThanks": "Não, obrigado",+ "rateOnStore": "Avaliar na Microsoft Store","exportFailed": "Falha na exportação","failedToWriteFile": "Falha ao gravar o arquivo","qualityUpscaleWarning": "Upscaling",diff --git a/src/i18n/locales/ru/common.json b/src/i18n/locales/ru/common.jsonindex 5abfda0f3..b26482587 100644--- a/src/i18n/locales/ru/common.json+++ b/src/i18n/locales/ru/common.json@@ -46,6 +46,7 @@"hideOthers": "Скрыть остальные","unhide": "Показать все","saveDiagnostics": "Сохранить диагностику",+ "starOnGithub": "Поставить звезду на GitHub","permissions": "Разрешения…"},"updates": {diff --git a/src/i18n/locales/ru/editor.json b/src/i18n/locales/ru/editor.jsonindex d0f663c41..453322c2e 100644--- a/src/i18n/locales/ru/editor.json+++ b/src/i18n/locales/ru/editor.json@@ -192,6 +192,9 @@"exportedGif": "GIF экспортирован","exportedVideo": "Видео экспортировано","showInFolder": "Показать в папке",+ "starPrompt": "OpenScreen бесплатен и распространяется по лицензии MIT. Звезда на GitHub помогает другим его найти.",+ "starPromptNoThanks": "Нет, спасибо",+ "rateOnStore": "Оценить в Microsoft Store","exportFailed": "Ошибка экспорта","failedToWriteFile": "Не удалось записать файл","qualityUpscaleWarning": "Апскейл",diff --git a/src/i18n/locales/tr/common.json b/src/i18n/locales/tr/common.jsonindex b082906bf..b574ce098 100644--- a/src/i18n/locales/tr/common.json+++ b/src/i18n/locales/tr/common.json@@ -46,6 +46,7 @@"hideOthers": "Diğerlerini Gizle","unhide": "Tümünü Göster","saveDiagnostics": "Teşhis Verilerini Kaydet",+ "starOnGithub": "GitHub'da yıldız ver","permissions": "İzinler…"},"updates": {diff --git a/src/i18n/locales/tr/editor.json b/src/i18n/locales/tr/editor.jsonindex b30bc78d6..468a21af3 100644--- a/src/i18n/locales/tr/editor.json+++ b/src/i18n/locales/tr/editor.json@@ -192,6 +192,9 @@"exportedGif": "GIF dışa aktarıldı","exportedVideo": "Video dışa aktarıldı","showInFolder": "Klasörde göster",+ "starPrompt": "OpenScreen ücretsizdir ve MIT lisanslıdır. GitHub'da bir yıldız, başkalarının onu bulmasına yardımcı olur.",+ "starPromptNoThanks": "Hayır, teşekkürler",+ "rateOnStore": "Microsoft Store'da değerlendir","exportFailed": "Dışa aktarma başarısız oldu","failedToWriteFile": "Dosya yazılamadı","qualityUpscaleWarning": "Upscale",diff --git a/src/i18n/locales/vi/common.json b/src/i18n/locales/vi/common.jsonindex d55b90865..c90befac0 100644--- a/src/i18n/locales/vi/common.json+++ b/src/i18n/locales/vi/common.json@@ -46,6 +46,7 @@"hideOthers": "Ẩn ứng dụng khác","unhide": "Hiển thị tất cả","saveDiagnostics": "Lưu thông tin chẩn đoán",+ "starOnGithub": "Gắn sao trên GitHub","permissions": "Quyền…"},"updates": {diff --git a/src/i18n/locales/vi/editor.json b/src/i18n/locales/vi/editor.jsonindex 60db3e563..9b9478dfa 100644--- a/src/i18n/locales/vi/editor.json+++ b/src/i18n/locales/vi/editor.json@@ -192,6 +192,9 @@"exportedGif": "Đã xuất GIF","exportedVideo": "Đã xuất video","showInFolder": "Hiện trong thư mục",+ "starPrompt": "OpenScreen miễn phí và được cấp phép MIT. Một ngôi sao trên GitHub giúp người khác tìm thấy nó.",+ "starPromptNoThanks": "Không, cảm ơn",+ "rateOnStore": "Đánh giá trên Microsoft Store","exportFailed": "Xuất thất bại","failedToWriteFile": "Không thể ghi tệp","qualityUpscaleWarning": "Upscale",diff --git a/src/i18n/locales/zh-CN/common.json b/src/i18n/locales/zh-CN/common.jsonindex 1c603d9e3..0834a7e37 100644--- a/src/i18n/locales/zh-CN/common.json+++ b/src/i18n/locales/zh-CN/common.json@@ -46,6 +46,7 @@"hideOthers": "隐藏其他","unhide": "显示全部","saveDiagnostics": "保存诊断信息",+ "starOnGithub": "在 GitHub 上点星标","permissions": "权限…"},"updates": {diff --git a/src/i18n/locales/zh-CN/editor.json b/src/i18n/locales/zh-CN/editor.jsonindex 15fb5cf09..3c4ab2a7a 100644--- a/src/i18n/locales/zh-CN/editor.json+++ b/src/i18n/locales/zh-CN/editor.json@@ -192,6 +192,9 @@"exportedGif": "GIF 已导出","exportedVideo": "视频已导出","showInFolder": "在文件夹中显示",+ "starPrompt": "OpenScreen 免费且采用 MIT 许可证。在 GitHub 上点个星标,能帮助更多人发现它。",+ "starPromptNoThanks": "不用了",+ "rateOnStore": "在 Microsoft Store 评价","exportFailed": "导出失败","failedToWriteFile": "写入文件失败","qualityUpscaleWarning": "放大",diff --git a/src/i18n/locales/zh-TW/common.json b/src/i18n/locales/zh-TW/common.jsonindex f003532b1..c37d590ff 100644--- a/src/i18n/locales/zh-TW/common.json+++ b/src/i18n/locales/zh-TW/common.json@@ -46,6 +46,7 @@"hideOthers": "隱藏其他","unhide": "全部顯示","saveDiagnostics": "儲存診斷資料",+ "starOnGithub": "在 GitHub 上給星","permissions": "權限…"},"updates": {diff --git a/src/i18n/locales/zh-TW/editor.json b/src/i18n/locales/zh-TW/editor.jsonindex 62f162592..4cb305f09 100644--- a/src/i18n/locales/zh-TW/editor.json+++ b/src/i18n/locales/zh-TW/editor.json@@ -192,6 +192,9 @@"exportedGif": "GIF 已匯出","exportedVideo": "影片已匯出","showInFolder": "在資料夾中顯示",+ "starPrompt": "OpenScreen 免費且採用 MIT 授權。在 GitHub 上給顆星,能幫助更多人找到它。",+ "starPromptNoThanks": "不用了",+ "rateOnStore": "在 Microsoft Store 評分","exportFailed": "匯出失敗","failedToWriteFile": "寫入檔案失敗","qualityUpscaleWarning": "放大",