From c62ed79e1072f3e184b51fdb7e86fe2ef9e2b200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:13:00 +0200 Subject: [PATCH 001/575] Start Cloudflare-first ScreenNote rebuild foundation --- rebuild/README.md | 44 +++++++ rebuild/index.html | 16 +++ rebuild/package.json | 25 ++++ rebuild/public/icon.svg | 1 + rebuild/public/manifest.webmanifest | 11 ++ rebuild/src/library.ts | 69 ++++++++++ rebuild/src/main.tsx | 141 +++++++++++++++++++++ rebuild/src/recorder.ts | 101 +++++++++++++++ rebuild/src/styles.css | 10 ++ rebuild/worker/index.ts | 117 +++++++++++++++++ rebuild/worker/migrations/0001_initial.sql | 19 +++ rebuild/worker/schema.sql | 24 ++++ 12 files changed, 578 insertions(+) create mode 100644 rebuild/README.md create mode 100644 rebuild/index.html create mode 100644 rebuild/package.json create mode 100644 rebuild/public/icon.svg create mode 100644 rebuild/public/manifest.webmanifest create mode 100644 rebuild/src/library.ts create mode 100644 rebuild/src/main.tsx create mode 100644 rebuild/src/recorder.ts create mode 100644 rebuild/src/styles.css create mode 100644 rebuild/worker/index.ts create mode 100644 rebuild/worker/migrations/0001_initial.sql create mode 100644 rebuild/worker/schema.sql diff --git a/rebuild/README.md b/rebuild/README.md new file mode 100644 index 0000000..fc33b8a --- /dev/null +++ b/rebuild/README.md @@ -0,0 +1,44 @@ +# ScreenNote rebuild + +This is the new Cloudflare-first implementation. The legacy application remains at the repository root during the migration and is not modified by this first foundation commit. + +## Product principles + +- Guest-first. No account is required to begin. +- Local-first capture and review. Cloud upload happens only after an explicit user action. +- Private by default. Publishing and viewer access are separate, explicit product steps. +- Progressive enhancement. Browser capture is feature-detected; import remains available where native capture is unavailable. +- No unlimited promises. Upload, storage, processing and delivery limits are visible and measured. + +## Current implementation slice + +- Responsive React application shell with light and dark themes. +- Screen capture using the browser's native source picker. +- Optional microphone and system audio when the browser exposes them. +- Pause, resume and finish controls. +- Local IndexedDB library and MP4/WebM/MOV import. +- Cloudflare Worker API foundation for guest sessions and private R2 uploads. +- D1 schema for guest sessions and recording metadata. + +## Cloudflare development resources + +The initial isolated development resources have been provisioned: + +- D1: `screennote-dev` +- R2: `screennote-media-dev` + +No existing Cloudflare application resources were reused or modified. + +## Important current limitations + +This is a foundation slice, not a launch-ready release. The UI currently stores recordings locally. The upload API exists as a backend foundation but is not yet wired into the UI. Shared playback, public share tokens, comments, transcription, AI summaries, camera composition, desktop recording and production billing are not implemented in this slice. + +## Next engineering gates + +1. Add Cloudflare project configuration and migration execution. +2. Run typecheck, build, unit tests and Worker-runtime tests. +3. Connect local library upload and cloud playback. +4. Implement share-link lifecycle, revocation, expiry and access controls. +5. Add camera bubble composition and recording recovery. +6. Complete accessibility, responsive and real-browser/device acceptance. +7. Deploy to a dedicated development hostname before any production cutover. \ No newline at end of file diff --git a/rebuild/index.html b/rebuild/index.html new file mode 100644 index 0000000..c5f4178 --- /dev/null +++ b/rebuild/index.html @@ -0,0 +1,16 @@ + + + + + + + + + + ScreenNote — Show what you mean + + +
+ + + \ No newline at end of file diff --git a/rebuild/package.json b/rebuild/package.json new file mode 100644 index 0000000..7c39e31 --- /dev/null +++ b/rebuild/package.json @@ -0,0 +1,25 @@ +{ + "name": "screennote-rebuild", + "private": true, + "version": "1.0.0", + "type": "module", + "scripts": { + "dev": "vite --host 0.0.0.0", + "build": "tsc -b && vite build", + "typecheck": "tsc -b --pretty false", + "test": "vitest run", + "deploy": "cf deploy" + }, + "dependencies": { + "@vitejs/plugin-react": "^5.0.0", + "lucide-react": "^0.468.0", + "react": "^19.1.0", + "react-dom": "^19.1.0" + }, + "devDependencies": { + "@cloudflare/workers-types": "^4.20261125.0", + "typescript": "^5.9.0", + "vite": "^7.1.0", + "vitest": "^3.2.0" + } +} \ No newline at end of file diff --git a/rebuild/public/icon.svg b/rebuild/public/icon.svg new file mode 100644 index 0000000..cfa08bf --- /dev/null +++ b/rebuild/public/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rebuild/public/manifest.webmanifest b/rebuild/public/manifest.webmanifest new file mode 100644 index 0000000..e5cc303 --- /dev/null +++ b/rebuild/public/manifest.webmanifest @@ -0,0 +1,11 @@ +{ + "name": "ScreenNote", + "short_name": "ScreenNote", + "description": "Clear screen recordings, thoughtful conversations.", + "start_url": "/", + "scope": "/", + "display": "standalone", + "background_color": "#f7f7f4", + "theme_color": "#f7f7f4", + "icons": [{ "src": "/icon.svg", "sizes": "any", "type": "image/svg+xml", "purpose": "any maskable" }] +} \ No newline at end of file diff --git a/rebuild/src/library.ts b/rebuild/src/library.ts new file mode 100644 index 0000000..94c3e97 --- /dev/null +++ b/rebuild/src/library.ts @@ -0,0 +1,69 @@ +export type Clip = { + id: string; + title: string; + createdAt: number; + duration: number; + size: number; + mimeType: string; + blob: Blob; +}; + +const DB_NAME = "screennote-local"; +const STORE = "clips"; +const VERSION = 1; + +function database(): Promise { + return new Promise((resolve, reject) => { + const request = indexedDB.open(DB_NAME, VERSION); + request.onupgradeneeded = () => { + const db = request.result; + if (!db.objectStoreNames.contains(STORE)) { + const store = db.createObjectStore(STORE, { keyPath: "id" }); + store.createIndex("createdAt", "createdAt"); + } + }; + request.onsuccess = () => resolve(request.result); + request.onerror = () => reject(request.error ?? new Error("Could not open local library")); + }); +} + +export async function listClips(): Promise[]> { + const db = await database(); + return new Promise((resolve, reject) => { + const request = db.transaction(STORE, "readonly").objectStore(STORE).getAll(); + request.onsuccess = () => resolve((request.result as Clip[]) + .sort((a, b) => b.createdAt - a.createdAt) + .map(({ blob: _blob, ...clip }) => clip)); + request.onerror = () => reject(request.error); + }); +} + +export async function saveClip(clip: Clip): Promise { + const db = await database(); + return new Promise((resolve, reject) => { + const tx = db.transaction(STORE, "readwrite"); + tx.objectStore(STORE).put(clip); + tx.oncomplete = () => resolve(); + tx.onerror = () => reject(tx.error ?? new Error("Could not save recording")); + tx.onabort = () => reject(tx.error ?? new Error("Saving recording was interrupted")); + }); +} + +export async function getClip(id: string): Promise { + const db = await database(); + return new Promise((resolve, reject) => { + const request = db.transaction(STORE, "readonly").objectStore(STORE).get(id); + request.onsuccess = () => resolve(request.result as Clip | undefined); + request.onerror = () => reject(request.error); + }); +} + +export async function deleteClip(id: string): Promise { + const db = await database(); + return new Promise((resolve, reject) => { + const tx = db.transaction(STORE, "readwrite"); + tx.objectStore(STORE).delete(id); + tx.oncomplete = () => resolve(); + tx.onerror = () => reject(tx.error); + }); +} \ No newline at end of file diff --git a/rebuild/src/main.tsx b/rebuild/src/main.tsx new file mode 100644 index 0000000..10634aa --- /dev/null +++ b/rebuild/src/main.tsx @@ -0,0 +1,141 @@ +import React, { useEffect, useMemo, useRef, useState } from "react"; +import { createRoot } from "react-dom/client"; +import { Activity, ArrowDownToLine, ArrowUpRight, Check, ChevronDown, CircleHelp, Clapperboard, Clock3, FileVideo2, FolderOpen, LayoutGrid, Mic, Moon, MoreHorizontal, Pause, Play, Plus, Search, Settings2, Share2, ShieldCheck, Sparkles, Sun, Trash2, Video, X } from "lucide-react"; +import { deleteClip, listClips, saveClip, type Clip } from "./library"; +import { ScreenRecorder } from "./recorder"; +import "./styles.css"; + +const recorder = new ScreenRecorder(); +const formatTime = (seconds: number) => { + const m = Math.floor(seconds / 60).toString().padStart(2, "0"); + const s = Math.floor(seconds % 60).toString().padStart(2, "0"); + return `${m}:${s}`; +}; +const formatDate = (time: number) => new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric", hour: "numeric", minute: "2-digit" }).format(time); +const formatBytes = (bytes: number) => bytes < 1024 * 1024 ? `${Math.max(1, Math.round(bytes / 1024))} KB` : `${(bytes / 1024 / 1024).toFixed(1)} MB`; + +function App() { + const [clips, setClips] = useState[]>([]); + const [recording, setRecording] = useState(false); + const [paused, setPaused] = useState(false); + const [seconds, setSeconds] = useState(0); + const [mic, setMic] = useState(true); + const [systemAudio, setSystemAudio] = useState(true); + const [busy, setBusy] = useState(false); + const [message, setMessage] = useState(""); + const [dark, setDark] = useState(false); + const [query, setQuery] = useState(""); + const [showSettings, setShowSettings] = useState(false); + const fileRef = useRef(null); + + const refresh = async () => setClips(await listClips()); + useEffect(() => { refresh().catch(() => setMessage("Your browser's local storage is unavailable.")); }, []); + useEffect(() => { document.documentElement.dataset.theme = dark ? "dark" : "light"; }, [dark]); + + const visibleClips = useMemo(() => clips.filter((clip) => clip.title.toLowerCase().includes(query.toLowerCase())), [clips, query]); + + async function start() { + setMessage(""); + setBusy(true); + try { + await recorder.start({ microphone: mic, systemAudio }, setSeconds); + setRecording(true); + setPaused(false); + } catch (error) { + setMessage(error instanceof Error ? error.message : "Could not start recording."); + } finally { setBusy(false); } + } + + async function finish() { + setBusy(true); + try { + const result = await recorder.stop(); + const clip: Clip = { + id: crypto.randomUUID(), + title: `Screen recording — ${new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric" }).format(Date.now())}`, + createdAt: Date.now(), + duration: result.duration, + size: result.blob.size, + mimeType: result.mimeType, + blob: result.blob + }; + await saveClip(clip); + await refresh(); + setMessage("Recording saved privately on this device."); + } catch (error) { + setMessage(error instanceof Error ? error.message : "Could not save this recording."); + } finally { + setRecording(false); setPaused(false); setSeconds(0); setBusy(false); + } + } + + async function importFile(file?: File) { + if (!file) return; + if (!["video/mp4", "video/webm", "video/quicktime"].includes(file.type)) { + setMessage("Choose an MP4, WebM or MOV video."); + return; + } + const clip: Clip = { id: crypto.randomUUID(), title: file.name.replace(/\.[^.]+$/, ""), createdAt: Date.now(), duration: 0, size: file.size, mimeType: file.type, blob: file }; + try { await saveClip(clip); await refresh(); setMessage("Video added to your private library."); } + catch { setMessage("Could not save this file. Check available device storage."); } + if (fileRef.current) fileRef.current.value = ""; + } + + async function download(id: string) { + const clip = await (await import("./library")).getClip(id); + if (!clip) return; + const url = URL.createObjectURL(clip.blob); + const a = document.createElement("a"); + a.href = url; a.download = `${clip.title.replace(/[^a-z0-9-_ ]/gi, "").trim() || "screennote"}.webm`; + a.click(); URL.revokeObjectURL(url); + } + + async function remove(id: string) { + if (!window.confirm("Delete this recording from this device? This cannot be undone.")) return; + await deleteClip(id); await refresh(); + } + + return
+ + +
+
Workspace / Overview
Private by default
+
+
YOUR CREATIVE WORKSPACE

Make it clear.
Show what you mean.

Capture a moment, explain an idea, and bring everyone onto the same page.

+ +
+

{recording ? "You're recording" : "Start with a recording"}

{recording ? "Take your time. Your recording is being captured in this tab." : "Record your screen or bring in a video you already have."}

+ {recording ?
{formatTime(seconds)} {paused ? "PAUSED" : "RECORDING"}
:
} +
+ + {message &&
{message}
} + +
+
YOUR LIBRARY

Recent recordings {clips.length}

+ {visibleClips.length ?
{visibleClips.map((clip) =>
{clip.duration ? formatTime(clip.duration) : "Imported"}

{clip.title}

{formatDate(clip.createdAt)} · {formatBytes(clip.size)}

)}
:

{query ? "No matching recordings" : "Your next great explanation starts here."}

{query ? "Try a different search." : "Record your screen or import a video. Your library is private and stays on this device."}

} +
+ +
A little more clarity goes a long way.

ScreenNote is being rebuilt. Local recording and your private library are the first foundation; secure sharing and AI-powered knowledge tools are coming next.

EARLY BUILD
+
© {new Date().getFullYear()} ScreenNoteMade for clear communication.Privacy
+
+
+ importFile(e.target.files?.[0])}/> +
; +} + +createRoot(document.getElementById("root")!).render(); \ No newline at end of file diff --git a/rebuild/src/recorder.ts b/rebuild/src/recorder.ts new file mode 100644 index 0000000..26abc80 --- /dev/null +++ b/rebuild/src/recorder.ts @@ -0,0 +1,101 @@ +export type CaptureOptions = { microphone: boolean; systemAudio: boolean }; +export type RecordingResult = { blob: Blob; duration: number; mimeType: string }; + +const MIME_TYPES = [ + "video/webm;codecs=vp9,opus", + "video/webm;codecs=vp8,opus", + "video/webm", + "video/mp4" +]; + +export function supportedMimeType(): string { + return MIME_TYPES.find((type) => MediaRecorder.isTypeSupported(type)) ?? ""; +} + +export class ScreenRecorder { + private recorder?: MediaRecorder; + private stream?: MediaStream; + private chunks: Blob[] = []; + private startedAt = 0; + private pausedAt = 0; + private pausedDuration = 0; + + get state(): RecordingState | "inactive" { + return this.recorder?.state ?? "inactive"; + } + + async start(options: CaptureOptions, onTick: (seconds: number) => void): Promise { + if (!navigator.mediaDevices?.getDisplayMedia) { + throw new Error("Screen recording is not supported in this browser. Try a desktop version of Chrome or Edge, or import a recording."); + } + const display = await navigator.mediaDevices.getDisplayMedia({ + video: { frameRate: { ideal: 30, max: 60 } }, + audio: options.systemAudio + }); + let microphone: MediaStream | undefined; + try { + if (options.microphone) { + microphone = await navigator.mediaDevices.getUserMedia({ audio: { echoCancellation: true, noiseSuppression: true } }); + } + const tracks = [...display.getVideoTracks(), ...display.getAudioTracks(), ...(microphone?.getAudioTracks() ?? [])]; + this.stream = new MediaStream(tracks); + const mimeType = supportedMimeType(); + this.recorder = new MediaRecorder(this.stream, mimeType ? { mimeType } : undefined); + this.chunks = []; + this.startedAt = Date.now(); + this.pausedDuration = 0; + this.recorder.ondataavailable = (event) => { + if (event.data.size) this.chunks.push(event.data); + }; + this.recorder.start(1000); + const timer = window.setInterval(() => { + if (!this.recorder || this.recorder.state === "inactive") { + window.clearInterval(timer); + return; + } + if (this.recorder.state === "recording") onTick(Math.max(0, Math.floor((Date.now() - this.startedAt - this.pausedDuration) / 1000))); + }, 500); + this.recorder.addEventListener("stop", () => window.clearInterval(timer), { once: true }); + display.getVideoTracks()[0]?.addEventListener("ended", () => { + if (this.recorder?.state !== "inactive") this.stop(); + }, { once: true }); + } catch (error) { + display.getTracks().forEach((track) => track.stop()); + microphone?.getTracks().forEach((track) => track.stop()); + throw error; + } + } + + pause(): void { + if (this.recorder?.state === "recording") { + this.recorder.pause(); + this.pausedAt = Date.now(); + } + } + + resume(): void { + if (this.recorder?.state === "paused") { + this.pausedDuration += Date.now() - this.pausedAt; + this.recorder.resume(); + } + } + + stop(): Promise { + const recorder = this.recorder; + if (!recorder) return Promise.reject(new Error("No recording is active")); + return new Promise((resolve, reject) => { + recorder.onerror = () => reject(new Error("The browser could not finish this recording.")); + recorder.onstop = () => { + const blob = new Blob(this.chunks, { type: recorder.mimeType || "video/webm" }); + const duration = Math.max(0, Math.floor((Date.now() - this.startedAt - this.pausedDuration) / 1000)); + this.stream?.getTracks().forEach((track) => track.stop()); + this.stream = undefined; + this.recorder = undefined; + this.chunks = []; + if (!blob.size) reject(new Error("The recording was empty. Please try again.")); + else resolve({ blob, duration, mimeType: blob.type }); + }; + if (recorder.state !== "inactive") recorder.stop(); + }); + } +} \ No newline at end of file diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css new file mode 100644 index 0000000..f748141 --- /dev/null +++ b/rebuild/src/styles.css @@ -0,0 +1,10 @@ +@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap'); + +:root{font-family:"DM Sans",sans-serif;color:#202823;background:#f7f7f4;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;font-optical-sizing:auto;font-weight:400;--bg:#f7f7f4;--surface:#fff;--surface-2:#f0f1ec;--ink:#202823;--muted:#788078;--line:#e5e8e1;--green:#1d5945;--green-dark:#164735;--green-soft:#e8f0e9;--accent:#d9e8d7;--shadow:0 16px 45px rgba(32,48,38,.06)} +:root[data-theme="dark"]{color-scheme:dark;--bg:#141a17;--surface:#1c2420;--surface-2:#252e29;--ink:#edf2ed;--muted:#a3afa6;--line:#303b34;--green:#a4c9ae;--green-dark:#d1e7d4;--green-soft:#283d30;--accent:#30483a;--shadow:0 16px 45px rgba(0,0,0,.18)} +*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--bg);color:var(--ink)}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:248px;padding:27px 18px 18px;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:10px;padding:0 10px;font:800 21px Manrope,sans-serif;letter-spacing:-1.1px}.brand-mark{width:31px;height:31px;border-radius:10px;background:#183d32;color:#f7f7f4;display:grid;place-items:center}.brand-light{font-weight:500;color:var(--muted)}.workspace-label{margin:49px 10px 13px;font-size:10px;letter-spacing:1.4px;font-weight:700;color:var(--muted);display:flex;align-items:center;justify-content:space-between}.local-pill{font-size:9px;letter-spacing:.7px;border:1px solid var(--line);border-radius:20px;padding:4px 7px;color:var(--muted)}.local-pill span,.recording-indicator span{display:inline-block;width:6px;height:6px;border-radius:50%;background:#4e9b70;margin-right:5px}.side-nav{display:grid;gap:5px}.nav-item{display:flex;align-items:center;gap:11px;width:100%;border:0;background:transparent;color:var(--muted);padding:11px 12px;border-radius:9px;text-align:left;font-size:13px;font-weight:500}.nav-item:hover,.nav-item.active{background:var(--surface-2);color:var(--ink)}.nav-item.active{font-weight:700}.nav-count{margin-left:auto;font-size:11px}.sidebar-bottom{margin-top:auto;display:grid;gap:5px}.privacy-card{display:flex;gap:10px;background:var(--green-soft);color:var(--green);padding:13px;border-radius:11px;margin-bottom:12px}.privacy-card svg{flex:none;margin-top:1px}.privacy-card strong{font-size:11px}.privacy-card p{font-size:10px;line-height:1.5;margin:5px 0 0;opacity:.8}.profile-row{border-top:1px solid var(--line);margin-top:12px;padding:16px 4px 0;display:flex;align-items:center;gap:10px}.profile-row>div:nth-child(2){display:grid;gap:3px;flex:1}.profile-row strong{font-size:11px}.profile-row span{font-size:10px;color:var(--muted)}.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#dfe8dc;color:#355642;font-size:12px;font-weight:700;border:0}.avatar.small{width:29px;height:29px}.main-content{margin-left:248px;min-height:100vh}.topbar{height:67px;padding:0 48px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--bg)}.breadcrumb{font-size:12px;color:var(--muted)}.breadcrumb span{margin:0 8px;color:var(--line)}.top-actions{display:flex;align-items:center;gap:17px}.secure-label{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px}.icon-button{width:34px;height:34px;display:grid;place-items:center;border:1px solid transparent;background:transparent;color:var(--muted);border-radius:8px}.icon-button:hover{background:var(--surface-2);color:var(--ink)}.page-wrap{max-width:1250px;margin:0 auto;padding:44px 48px 24px}.welcome-row{display:flex;align-items:center;justify-content:space-between;gap:35px;margin-bottom:35px}.eyebrow{font-size:9px;letter-spacing:1.65px;font-weight:700;color:var(--green);margin-bottom:12px}.welcome-row h1{font:800 clamp(34px,4vw,49px)/1.08 Manrope,sans-serif;letter-spacing:-2.5px;margin:0}.welcome-row h1 span{color:var(--green)}.intro{font-size:14px;color:var(--muted);margin:14px 0 0;line-height:1.6;max-width:470px}.welcome-art{width:240px;flex:none;position:relative;padding:13px 10px 20px}.art-window{height:133px;border-radius:13px;border:1px solid #dce4d9;background:#fff;box-shadow:0 14px 35px rgba(42,68,48,.11);overflow:hidden;transform:rotate(2deg)}.art-bar{height:19px;background:#f2f4ef;display:flex;align-items:center;gap:4px;padding:0 8px}.art-bar i{width:5px;height:5px;border-radius:50%;background:#c3cec2}.art-screen{height:114px;display:flex;position:relative}.art-sidebar{width:30px;background:#edf2eb}.art-content{padding:13px 11px;display:grid;gap:6px;flex:1;align-content:start}.art-content div{height:9px;border-radius:4px;background:#e8eee6}.art-content div:first-child{width:55%;background:#cbdcca}.art-content div:nth-child(2){width:85%}.art-content div:nth-child(3){width:69%}.art-content div:nth-child(4){width:77%}.art-cursor{position:absolute;width:17px;height:22px;background:#244c3b;clip-path:polygon(0 0,100% 70%,59% 74%,77% 100%,62% 100%,45% 76%,23% 100%);left:135px;top:47px}.art-play{position:absolute;right:30px;bottom:37px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#1e5944;color:white;box-shadow:0 6px 18px #1e594455}.art-caption{position:absolute;bottom:0;right:5px;font-size:9px;color:var(--muted);letter-spacing:.3px}.capture-panel{border:1px solid var(--line);background:var(--surface);border-radius:14px;padding:21px 23px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:var(--shadow)}.capture-copy{display:flex;align-items:center;gap:14px;min-width:0}.capture-icon{width:43px;height:43px;flex:none;border-radius:12px;display:grid;place-items:center;background:var(--green-soft);color:var(--green)}.capture-copy h2{font:700 15px Manrope,sans-serif;margin:0 0 5px}.capture-copy p{font-size:11px;color:var(--muted);margin:0;line-height:1.5}.capture-actions,.record-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.toggle-option{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px;white-space:nowrap}.toggle-option input{accent-color:var(--green)}.button{border:1px solid var(--line);border-radius:8px;min-height:38px;padding:0 13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:11px;font-weight:700;white-space:nowrap;transition:transform .15s ease,background .15s ease,border-color .15s ease}.button:active{transform:translateY(1px)}.button:disabled{opacity:.55;cursor:wait}.button.primary{background:#1d5945;color:white;border-color:#1d5945}.button.primary:hover{background:#164735}.button.secondary{background:var(--surface);color:var(--ink)}.button.secondary:hover{background:var(--surface-2)}.button.danger{background:#a3423b;color:white;border-color:#a3423b}.record-dot{width:8px;height:8px;border-radius:50%;background:#fff;box-shadow:0 0 0 3px #ffffff35}.recording-indicator{font:700 11px ui-monospace,monospace;color:#b44c43;letter-spacing:.4px}.recording-indicator span{background:#c64e45;animation:pulse 1.2s infinite}.notice{margin-top:15px;border:1px solid #c8ddcb;background:var(--green-soft);color:var(--green);padding:11px 13px;border-radius:9px;font-size:11px;display:flex;align-items:center;gap:8px}.notice button{margin-left:auto;border:0;background:transparent;color:inherit;display:grid;place-items:center}.library-section{margin-top:43px}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:17px}.section-heading .eyebrow{margin-bottom:7px}.section-heading h2{font:700 20px Manrope,sans-serif;letter-spacing:-.6px;margin:0}.count-badge{font:600 10px "DM Sans",sans-serif;color:var(--muted);background:var(--surface-2);padding:4px 7px;border-radius:20px;vertical-align:middle;margin-left:5px}.library-tools{display:flex;align-items:center;gap:9px}.search-box{width:205px;height:36px;display:flex;align-items:center;gap:7px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--muted)}.search-box input{border:0;outline:0;background:transparent;color:var(--ink);width:100%;min-width:0;font-size:11px}.search-box input::placeholder{color:var(--muted)}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.clip-card{border:1px solid var(--line);border-radius:11px;overflow:hidden;background:var(--surface);min-width:0;transition:transform .2s ease,box-shadow .2s ease}.clip-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.clip-thumb{height:145px;position:relative;display:grid;place-items:center;background:linear-gradient(140deg,#e9eee7,#dce6dc 60%,#d1dfd3);overflow:hidden}.thumb-lines{width:60%;display:grid;gap:7px}.thumb-lines span{height:9px;border-radius:4px;background:#c0d1c1}.thumb-lines span:first-child{width:60%;height:13px;background:#9db99f}.thumb-lines span:nth-child(2){width:90%}.thumb-lines span:nth-child(3){width:72%}.thumb-play{position:absolute;inset:0;margin:auto;width:39px;height:39px;border:1px solid #ffffffaa;border-radius:50%;display:grid;place-items:center;background:#fff;color:#214b37;box-shadow:0 5px 20px #203d2a25}.duration{position:absolute;right:9px;bottom:8px;padding:4px 6px;border-radius:4px;background:#18251fbb;color:white;font-size:9px}.clip-info{padding:12px;display:flex;align-items:center;justify-content:space-between;gap:7px;min-width:0}.clip-info>div{min-width:0}.clip-info h3{font-size:11px;font-weight:700;margin:0 0 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clip-info p{font-size:9px;color:var(--muted);margin:0;display:flex;align-items:center;gap:5px}.clip-info .icon-button{flex:none}.empty-state{min-height:260px;border:1px dashed #cfd8ce;border-radius:13px;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px 18px}.empty-icon{width:51px;height:51px;border-radius:15px;background:var(--green-soft);color:var(--green);display:grid;place-items:center;margin-bottom:14px}.empty-state h3{font:700 15px Manrope,sans-serif;margin:0 0 7px}.empty-state p{font-size:11px;line-height:1.6;color:var(--muted);max-width:390px;margin:0}.empty-actions{display:flex;gap:8px;margin-top:18px;flex-wrap:wrap;justify-content:center}.bottom-note{margin-top:31px;padding:15px 17px;display:flex;align-items:center;gap:12px;background:var(--surface-2);border-radius:10px}.note-icon{width:31px;height:31px;border-radius:9px;background:var(--surface);color:var(--green);display:grid;place-items:center;flex:none}.bottom-note>div:nth-child(2){min-width:0;flex:1}.bottom-note strong{font-size:11px}.bottom-note p{font-size:10px;color:var(--muted);line-height:1.5;margin:4px 0 0}.build-label{font-size:8px;letter-spacing:.8px;color:var(--muted);display:flex;align-items:center;gap:5px;white-space:nowrap}footer{display:flex;gap:18px;justify-content:flex-end;padding:24px 2px 5px;color:var(--muted);font-size:9px}footer span:first-child{margin-right:auto}.record-controls{justify-content:flex-end}.capture-panel:has(.record-controls){border-color:#e5c7c3}.local-pill{display:inline-flex;align-items:center}.local-pill span{background:#5d9c70} +@keyframes pulse{50%{box-shadow:0 0 0 5px #c64e4522;opacity:.55}} +@media(max-width:1100px){.sidebar{width:215px}.main-content{margin-left:215px}.page-wrap{padding:35px 30px 22px}.topbar{padding:0 30px}.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.capture-panel{align-items:flex-start;flex-direction:column}.capture-actions,.record-controls{width:100%;justify-content:flex-start}} +@media(max-width:760px){.sidebar{position:relative;width:auto;height:auto;inset:auto;padding:15px 18px;border-right:0;border-bottom:1px solid var(--line)}.brand{font-size:19px}.workspace-label,.side-nav,.sidebar-bottom{display:none}.main-content{margin-left:0}.topbar{height:49px;padding:0 18px}.secure-label{display:none}.page-wrap{padding:28px 18px 20px}.welcome-row{margin-bottom:25px}.welcome-art{width:160px;transform:scale(.86);transform-origin:right center;margin-left:-20px}.welcome-row h1{font-size:36px;letter-spacing:-1.8px}.intro{font-size:12px}.capture-panel{padding:17px}.capture-actions{gap:10px}.capture-actions .button{margin-left:auto}.section-heading{align-items:flex-start;flex-direction:column}.library-tools{width:100%}.search-box{flex:1;width:auto}.clip-grid{gap:10px}.clip-thumb{height:120px}.bottom-note{align-items:flex-start}.build-label{display:none}} +@media(max-width:480px){.page-wrap{padding:23px 14px 16px}.welcome-row{gap:0}.welcome-art{width:112px;margin-left:-28px;transform:scale(.76)}.welcome-row h1{font-size:31px;letter-spacing:-1.5px}.intro{max-width:245px;font-size:11px}.capture-copy{align-items:flex-start}.capture-copy p{max-width:240px}.capture-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.capture-actions .button{grid-column:1/-1;margin:2px 0 0;width:100%}.record-controls{display:grid;grid-template-columns:1fr 1fr;width:100%}.recording-indicator{grid-column:1/-1}.record-controls .button{width:100%}.clip-grid{grid-template-columns:1fr 1fr;gap:9px}.clip-thumb{height:100px}.clip-info{padding:9px}.clip-info h3{font-size:10px}.clip-info p{font-size:8px;flex-wrap:wrap}.clip-info .icon-button{width:27px;height:27px}.import-button{padding:0 10px}.bottom-note{padding:12px}.bottom-note p{font-size:9px}footer{gap:12px;font-size:8px}.top-actions{gap:8px}} +@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts new file mode 100644 index 0000000..c5d7506 --- /dev/null +++ b/rebuild/worker/index.ts @@ -0,0 +1,117 @@ +type Bindings = { DB: D1Database; MEDIA: R2Bucket; ASSETS: Fetcher }; +const SESSION_COOKIE = "sn_guest"; +const SESSION_SECONDS = 60 * 60 * 24 * 30; +const MAX_UPLOAD_BYTES = 100 * 1024 * 1024; + +const json = (data: unknown, status = 200, headers: HeadersInit = {}) => + Response.json(data, { status, headers: { "cache-control": "no-store", ...headers } }); + +function cookie(request: Request, name: string): string | null { + const raw = request.headers.get("cookie") ?? ""; + const entry = raw.split(";").map((part) => part.trim()).find((part) => part.startsWith(name + "=")); + return entry ? decodeURIComponent(entry.slice(name.length + 1)) : null; +} + +async function hash(value: string): Promise { + const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(value)); + return [...new Uint8Array(digest)].map((byte) => byte.toString(16).padStart(2, "0")).join(""); +} + +async function owner(request: Request, env: Bindings): Promise { + const token = cookie(request, SESSION_COOKIE); + if (!token || token.length > 128) return null; + const tokenHash = await hash(token); + const session = await env.DB.prepare("SELECT token_hash FROM guest_sessions WHERE token_hash = ? AND expires_at > ?") + .bind(tokenHash, Math.floor(Date.now() / 1000)).first<{ token_hash: string }>(); + return session?.token_hash ?? null; +} + +function sameOrigin(request: Request): boolean { + const origin = request.headers.get("origin"); + return !origin || origin === new URL(request.url).origin; +} + +async function handleApi(request: Request, env: Bindings): Promise { + const url = new URL(request.url); + if (!sameOrigin(request)) return json({ error: "Cross-origin request rejected" }, 403); + + if (url.pathname === "/api/health" && request.method === "GET") { + return json({ status: "ok", service: "screennote", version: "rebuild-dev" }); + } + + if (url.pathname === "/api/session" && request.method === "GET") { + const existing = await owner(request, env); + if (existing) return json({ status: "guest", expiresIn: SESSION_SECONDS }); + const token = crypto.randomUUID() + crypto.randomUUID(); + const tokenHash = await hash(token); + const now = Math.floor(Date.now() / 1000); + await env.DB.prepare("INSERT INTO guest_sessions (token_hash, created_at, expires_at) VALUES (?, ?, ?)") + .bind(tokenHash, now, now + SESSION_SECONDS).run(); + return json({ status: "guest", expiresIn: SESSION_SECONDS }, 200, { + "set-cookie": `${SESSION_COOKIE}=${encodeURIComponent(token)}; HttpOnly; Secure; SameSite=Lax; Path=/; Max-Age=${SESSION_SECONDS}` + }); + } + + const ownerHash = await owner(request, env); + if (!ownerHash) return json({ error: "A guest session is required" }, 401); + + if (url.pathname === "/api/recordings" && request.method === "GET") { + const { results } = await env.DB.prepare( + "SELECT id, title, mime_type AS mimeType, byte_size AS size, duration_seconds AS duration, status, created_at AS createdAt FROM recordings WHERE owner_token_hash = ? ORDER BY created_at DESC LIMIT 100" + ).bind(ownerHash).all(); + return json({ recordings: results }); + } + + if (url.pathname === "/api/recordings" && request.method === "POST") { + const body = await request.json<{ title?: string; mimeType?: string; size?: number }>().catch(() => null); + if (!body || typeof body.title !== "string" || !body.title.trim() || body.title.length > 120) return json({ error: "A valid recording title is required" }, 400); + if (!Number.isSafeInteger(body.size) || !body.size || body.size! < 1 || body.size! > MAX_UPLOAD_BYTES) return json({ error: "Recording exceeds the 100 MB upload limit" }, 413); + const mime = typeof body.mimeType === "string" ? body.mimeType : ""; + if (!["video/webm", "video/mp4", "video/quicktime"].includes(mime)) return json({ error: "Unsupported video format" }, 415); + const id = crypto.randomUUID(); + const key = `recordings/${ownerHash.slice(0, 16)}/${id}`; + const now = Math.floor(Date.now() / 1000); + await env.DB.prepare("INSERT INTO recordings (id, owner_token_hash, title, object_key, mime_type, byte_size, status, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, 'uploading', ?, ?)") + .bind(id, ownerHash, body.title.trim(), key, mime, body.size, now, now).run(); + return json({ id, uploadUrl: `/api/recordings/${id}/media` }, 201); + } + + const match = url.pathname.match(/^\/api\/recordings\/([a-f0-9-]{36})(?:\/(media))?$/i); + if (match && request.method === "PUT" && match[2] === "media") { + const row = await env.DB.prepare("SELECT object_key, mime_type, byte_size FROM recordings WHERE id = ? AND owner_token_hash = ? AND status = 'uploading'") + .bind(match[1], ownerHash).first<{ object_key: string; mime_type: string; byte_size: number }>(); + if (!row) return json({ error: "Recording upload not found" }, 404); + const length = Number(request.headers.get("content-length") ?? 0); + if (!request.body || !length || length !== row.byte_size || length > MAX_UPLOAD_BYTES) return json({ error: "Upload size did not match the reservation" }, 400); + const type = request.headers.get("content-type")?.split(";")[0] ?? ""; + if (type !== row.mime_type) return json({ error: "Upload content type did not match the reservation" }, 415); + await env.MEDIA.put(row.object_key, request.body, { httpMetadata: { contentType: row.mime_type } }); + await env.DB.prepare("UPDATE recordings SET status = 'ready', updated_at = ? WHERE id = ? AND owner_token_hash = ?") + .bind(Math.floor(Date.now() / 1000), match[1], ownerHash).run(); + return json({ id: match[1], status: "ready" }); + } + + if (match && request.method === "DELETE" && !match[2]) { + const row = await env.DB.prepare("SELECT object_key FROM recordings WHERE id = ? AND owner_token_hash = ?") + .bind(match[1], ownerHash).first<{ object_key: string }>(); + if (!row) return json({ error: "Recording not found" }, 404); + await env.MEDIA.delete(row.object_key); + await env.DB.prepare("DELETE FROM recordings WHERE id = ? AND owner_token_hash = ?").bind(match[1], ownerHash).run(); + return json({ deleted: true }); + } + + return json({ error: "Not found" }, 404); +} + +export default { + async fetch(request: Request, env: Bindings): Promise { + const url = new URL(request.url); + try { + if (url.pathname.startsWith("/api/")) return await handleApi(request, env); + return env.ASSETS.fetch(request); + } catch (error) { + console.error(JSON.stringify({ message: "ScreenNote request failed", path: url.pathname, error: error instanceof Error ? error.message : String(error) })); + return json({ error: "The request could not be completed" }, 500); + } + } +}; \ No newline at end of file diff --git a/rebuild/worker/migrations/0001_initial.sql b/rebuild/worker/migrations/0001_initial.sql new file mode 100644 index 0000000..c7b7a34 --- /dev/null +++ b/rebuild/worker/migrations/0001_initial.sql @@ -0,0 +1,19 @@ +CREATE TABLE IF NOT EXISTS guest_sessions ( + token_hash TEXT PRIMARY KEY, + created_at INTEGER NOT NULL, + expires_at INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS recordings ( + id TEXT PRIMARY KEY, + owner_token_hash TEXT NOT NULL REFERENCES guest_sessions(token_hash) ON DELETE CASCADE, + title TEXT NOT NULL, + object_key TEXT NOT NULL UNIQUE, + mime_type TEXT NOT NULL, + byte_size INTEGER NOT NULL DEFAULT 0, + duration_seconds INTEGER NOT NULL DEFAULT 0, + status TEXT NOT NULL CHECK (status IN ('uploading', 'ready', 'failed')), + created_at INTEGER NOT NULL, + updated_at INTEGER NOT NULL +); +CREATE INDEX IF NOT EXISTS recordings_owner_created ON recordings(owner_token_hash, created_at DESC); +CREATE INDEX IF NOT EXISTS sessions_expiry ON guest_sessions(expires_at); \ No newline at end of file diff --git a/rebuild/worker/schema.sql b/rebuild/worker/schema.sql new file mode 100644 index 0000000..57c26a4 --- /dev/null +++ b/rebuild/worker/schema.sql @@ -0,0 +1,24 @@ +CREATE TABLE IF NOT EXISTS guest_sessions ( + token_hash TEXT PRIMARY KEY, + created_at INTEGER NOT NULL, + expires_at INTEGER NOT NULL +); + +CREATE TABLE IF NOT EXISTS recordings ( + id TEXT PRIMARY KEY, + owner_token_hash TEXT NOT NULL REFERENCES guest_sessions(token_hash) ON DELETE CASCADE, + title TEXT NOT NULL, + object_key TEXT NOT NULL UNIQUE, + mime_type TEXT NOT NULL, + byte_size INTEGER NOT NULL DEFAULT 0, + duration_seconds INTEGER NOT NULL DEFAULT 0, + status TEXT NOT NULL CHECK (status IN ('uploading', 'ready', 'failed')), + created_at INTEGER NOT NULL, + updated_at INTEGER NOT NULL +); + +CREATE INDEX IF NOT EXISTS recordings_owner_created + ON recordings(owner_token_hash, created_at DESC); + +CREATE INDEX IF NOT EXISTS sessions_expiry + ON guest_sessions(expires_at); \ No newline at end of file From cad7628ea33cd528d2d43b3c5081b14e80356530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:13:56 +0200 Subject: [PATCH 002/575] Configure Cloudflare development environment and initial tests --- rebuild/.gitignore | 10 ++++++++++ rebuild/README.md | 33 +++++++++++++++++++++++++-------- rebuild/cloudflare.config.ts | 25 +++++++++++++++++++++++++ rebuild/package.json | 13 ++++++++----- rebuild/tests/README.md | 5 +++++ rebuild/tests/recorder.test.ts | 23 +++++++++++++++++++++++ rebuild/tsconfig.json | 20 ++++++++++++++++++++ rebuild/vite.config.ts | 11 +++++++++++ 8 files changed, 127 insertions(+), 13 deletions(-) create mode 100644 rebuild/.gitignore create mode 100644 rebuild/cloudflare.config.ts create mode 100644 rebuild/tests/README.md create mode 100644 rebuild/tests/recorder.test.ts create mode 100644 rebuild/tsconfig.json create mode 100644 rebuild/vite.config.ts diff --git a/rebuild/.gitignore b/rebuild/.gitignore new file mode 100644 index 0000000..7f0bd9e --- /dev/null +++ b/rebuild/.gitignore @@ -0,0 +1,10 @@ +node_modules/ +dist/ +.cloudflare/ +.dev.vars +.dev.vars.* +.env +.env.* +!.env.example +coverage/ +*.log \ No newline at end of file diff --git a/rebuild/README.md b/rebuild/README.md index fc33b8a..f07c308 100644 --- a/rebuild/README.md +++ b/rebuild/README.md @@ -1,6 +1,6 @@ # ScreenNote rebuild -This is the new Cloudflare-first implementation. The legacy application remains at the repository root during the migration and is not modified by this first foundation commit. +This is the new Cloudflare-first implementation. The legacy application remains at the repository root during the migration and is not modified by this foundation slice. ## Product principles @@ -19,23 +19,40 @@ This is the new Cloudflare-first implementation. The legacy application remains - Local IndexedDB library and MP4/WebM/MOV import. - Cloudflare Worker API foundation for guest sessions and private R2 uploads. - D1 schema for guest sessions and recording metadata. +- Typed Cloudflare project configuration, Vite integration and observability settings. -## Cloudflare development resources +## Isolated Cloudflare development resources -The initial isolated development resources have been provisioned: +- D1: `screennote-dev` (ENAM primary region) +- R2: `screennote-media-dev` (ENAM bucket location) -- D1: `screennote-dev` -- R2: `screennote-media-dev` - -No existing Cloudflare application resources were reused or modified. +These resources were created specifically for this rebuild. Existing Cloudflare projects and buckets were not reused or modified. ## Important current limitations This is a foundation slice, not a launch-ready release. The UI currently stores recordings locally. The upload API exists as a backend foundation but is not yet wired into the UI. Shared playback, public share tokens, comments, transcription, AI summaries, camera composition, desktop recording and production billing are not implemented in this slice. +## Development + +Requires Node.js 22.18+ and the Cloudflare CLI `cf`. + +```bash +npm install +npm run dev +npm run typecheck +npm test +npm run build +``` + +Deploy only to the dedicated development Worker after the D1 migration is applied: + +```bash +npm run deploy +``` + ## Next engineering gates -1. Add Cloudflare project configuration and migration execution. +1. Apply and verify the D1 migration in the development database. 2. Run typecheck, build, unit tests and Worker-runtime tests. 3. Connect local library upload and cloud playback. 4. Implement share-link lifecycle, revocation, expiry and access controls. diff --git a/rebuild/cloudflare.config.ts b/rebuild/cloudflare.config.ts new file mode 100644 index 0000000..714d571 --- /dev/null +++ b/rebuild/cloudflare.config.ts @@ -0,0 +1,25 @@ +import { bindings, defineConfig } from "cf/config"; +import * as entrypoint from "./worker/index.ts" with { type: "cf-worker" }; + +export default defineConfig({ + worker: { + name: "screennote-dev", + entrypoint, + compatibilityDate: "2026-11-25", + compatibilityFlags: ["nodejs_compat"], + assets: { + notFoundHandling: "single-page-application", + runWorkerFirst: ["/api/*"] + }, + env: { + DB: bindings.d1({ name: "screennote-dev", id: "44a5859b-6411-4513-bd17-3302fbbc0575" }), + MEDIA: bindings.r2({ name: "screennote-media-dev" }), + ASSETS: bindings.assets() + }, + observability: { + enabled: true, + logs: { enabled: true, invocationLogs: true, headSamplingRate: 1 }, + traces: { enabled: true, headSamplingRate: 0.1 } + } + } +}); \ No newline at end of file diff --git a/rebuild/package.json b/rebuild/package.json index 7c39e31..5bf2878 100644 --- a/rebuild/package.json +++ b/rebuild/package.json @@ -4,20 +4,23 @@ "version": "1.0.0", "type": "module", "scripts": { - "dev": "vite --host 0.0.0.0", - "build": "tsc -b && vite build", - "typecheck": "tsc -b --pretty false", + "dev": "cf dev", + "build": "cf build", + "typecheck": "cf workers types && tsc --noEmit", "test": "vitest run", "deploy": "cf deploy" }, "dependencies": { - "@vitejs/plugin-react": "^5.0.0", "lucide-react": "^0.468.0", "react": "^19.1.0", "react-dom": "^19.1.0" }, "devDependencies": { - "@cloudflare/workers-types": "^4.20261125.0", + "@cloudflare/vite-plugin": "^1.67.0", + "@types/react": "^19.1.0", + "@types/react-dom": "^19.1.0", + "@vitejs/plugin-react": "^5.0.0", + "cf": "^1.0.0-rc.4", "typescript": "^5.9.0", "vite": "^7.1.0", "vitest": "^3.2.0" diff --git a/rebuild/tests/README.md b/rebuild/tests/README.md new file mode 100644 index 0000000..c611f11 --- /dev/null +++ b/rebuild/tests/README.md @@ -0,0 +1,5 @@ +# ScreenNote rebuild tests + +The first unit tests validate browser recording format negotiation. They do not certify real screen-capture permissions, media encoding, storage persistence, upload recovery, Worker bindings, or cross-browser playback. + +Those behaviors require Worker-runtime integration tests and browser/device acceptance. Never mark those gates passed from unit tests alone. \ No newline at end of file diff --git a/rebuild/tests/recorder.test.ts b/rebuild/tests/recorder.test.ts new file mode 100644 index 0000000..efbba1d --- /dev/null +++ b/rebuild/tests/recorder.test.ts @@ -0,0 +1,23 @@ +import { afterEach, describe, expect, it, vi } from "vitest"; +import { supportedMimeType } from "../src/recorder"; + +describe("recording format selection", () => { + afterEach(() => vi.unstubAllGlobals()); + + it("prefers the highest quality supported WebM codec", () => { + const isTypeSupported = vi.fn((type: string) => type === "video/webm;codecs=vp9,opus"); + vi.stubGlobal("MediaRecorder", { isTypeSupported }); + expect(supportedMimeType()).toBe("video/webm;codecs=vp9,opus"); + }); + + it("falls back to VP8 when VP9 is unavailable", () => { + const isTypeSupported = vi.fn((type: string) => type === "video/webm;codecs=vp8,opus"); + vi.stubGlobal("MediaRecorder", { isTypeSupported }); + expect(supportedMimeType()).toBe("video/webm;codecs=vp8,opus"); + }); + + it("returns an empty hint when the browser chooses its default format", () => { + vi.stubGlobal("MediaRecorder", { isTypeSupported: vi.fn(() => false) }); + expect(supportedMimeType()).toBe(""); + }); +}); \ No newline at end of file diff --git a/rebuild/tsconfig.json b/rebuild/tsconfig.json new file mode 100644 index 0000000..34f9b4f --- /dev/null +++ b/rebuild/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ES2022", + "useDefineForClassFields": true, + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + "strict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "types": ["vite/client", "@cloudflare/workers-types"] + }, + "include": ["src", "worker", "cloudflare.config.ts", "vite.config.ts", ".cloudflare/types"] +} \ No newline at end of file diff --git a/rebuild/vite.config.ts b/rebuild/vite.config.ts new file mode 100644 index 0000000..670ea73 --- /dev/null +++ b/rebuild/vite.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; +import { cloudflare } from "@cloudflare/vite-plugin"; + +export default defineConfig({ + plugins: [react(), cloudflare()], + build: { + target: "es2022", + sourcemap: true + } +}); \ No newline at end of file From 2f5d735a02c95bbe59df1b4fb259f9a5faf9a034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:14:25 +0200 Subject: [PATCH 003/575] Harden recorder lifecycle and add rebuild CI checks --- .github/workflows/screennote-rebuild.yml | 44 ++++++++++++++++++++++++ rebuild/package.json | 3 +- rebuild/src/recorder.ts | 10 ++++-- 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/screennote-rebuild.yml diff --git a/.github/workflows/screennote-rebuild.yml b/.github/workflows/screennote-rebuild.yml new file mode 100644 index 0000000..dfb7223 --- /dev/null +++ b/.github/workflows/screennote-rebuild.yml @@ -0,0 +1,44 @@ +name: ScreenNote Cloudflare rebuild + +on: + push: + branches: + - rebuild/cloudflare-web-first + paths: + - "rebuild/**" + - ".github/workflows/screennote-rebuild.yml" + pull_request: + branches: + - main + paths: + - "rebuild/**" + - ".github/workflows/screennote-rebuild.yml" + +permissions: + contents: read + +jobs: + test-and-build: + name: test-and-build + runs-on: ubuntu-latest + defaults: + run: + working-directory: rebuild + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 24 + cache: npm + cache-dependency-path: rebuild/package-lock.json + - run: npm install --no-audit --no-fund + - run: npm run typecheck + - run: npm test + - run: npm run build + + build: + name: build + runs-on: ubuntu-latest + needs: test-and-build + steps: + - run: echo "ScreenNote rebuild build gate passed." diff --git a/rebuild/package.json b/rebuild/package.json index 5bf2878..8f3807e 100644 --- a/rebuild/package.json +++ b/rebuild/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "cf dev", "build": "cf build", - "typecheck": "cf workers types && tsc --noEmit", + "typecheck": "tsc --noEmit", "test": "vitest run", "deploy": "cf deploy" }, @@ -17,6 +17,7 @@ }, "devDependencies": { "@cloudflare/vite-plugin": "^1.67.0", + "@cloudflare/workers-types": "^5.20261124.1", "@types/react": "^19.1.0", "@types/react-dom": "^19.1.0", "@vitejs/plugin-react": "^5.0.0", diff --git a/rebuild/src/recorder.ts b/rebuild/src/recorder.ts index 26abc80..13d5d8a 100644 --- a/rebuild/src/recorder.ts +++ b/rebuild/src/recorder.ts @@ -57,7 +57,11 @@ export class ScreenRecorder { }, 500); this.recorder.addEventListener("stop", () => window.clearInterval(timer), { once: true }); display.getVideoTracks()[0]?.addEventListener("ended", () => { - if (this.recorder?.state !== "inactive") this.stop(); + if (this.recorder?.state !== "inactive") { + this.stop().then((result) => { + window.dispatchEvent(new CustomEvent("screennote:recording-finished", { detail: result })); + }).catch(() => undefined); + } }, { once: true }); } catch (error) { display.getTracks().forEach((track) => track.stop()); @@ -87,7 +91,8 @@ export class ScreenRecorder { recorder.onerror = () => reject(new Error("The browser could not finish this recording.")); recorder.onstop = () => { const blob = new Blob(this.chunks, { type: recorder.mimeType || "video/webm" }); - const duration = Math.max(0, Math.floor((Date.now() - this.startedAt - this.pausedDuration) / 1000)); + const activePause = recorder.state === "paused" ? Date.now() - this.pausedAt : 0; + const duration = Math.max(0, Math.floor((Date.now() - this.startedAt - this.pausedDuration - activePause) / 1000)); this.stream?.getTracks().forEach((track) => track.stop()); this.stream = undefined; this.recorder = undefined; @@ -96,6 +101,7 @@ export class ScreenRecorder { else resolve({ blob, duration, mimeType: blob.type }); }; if (recorder.state !== "inactive") recorder.stop(); + else reject(new Error("The recording has already stopped.")); }); } } \ No newline at end of file From bf0b28155613df61f45984e3aa15529564b1ef9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:15:12 +0200 Subject: [PATCH 004/575] Align Cloudflare CLI and Vite plugin release candidates --- .github/workflows/screennote-rebuild.yml | 2 -- rebuild/package.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/screennote-rebuild.yml b/.github/workflows/screennote-rebuild.yml index dfb7223..cfddf4c 100644 --- a/.github/workflows/screennote-rebuild.yml +++ b/.github/workflows/screennote-rebuild.yml @@ -29,8 +29,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 24 - cache: npm - cache-dependency-path: rebuild/package-lock.json - run: npm install --no-audit --no-fund - run: npm run typecheck - run: npm test diff --git a/rebuild/package.json b/rebuild/package.json index 8f3807e..53ba6d0 100644 --- a/rebuild/package.json +++ b/rebuild/package.json @@ -16,7 +16,7 @@ "react-dom": "^19.1.0" }, "devDependencies": { - "@cloudflare/vite-plugin": "^1.67.0", + "@cloudflare/vite-plugin": "^2.0.0-rc.0", "@cloudflare/workers-types": "^5.20261124.1", "@types/react": "^19.1.0", "@types/react-dom": "^19.1.0", From 3dacae63712aff8dc957b07496db3a63f8c60074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:16:08 +0200 Subject: [PATCH 005/575] Fix Cloudflare compatibility date and recorder stop handling --- .github/workflows/screennote-rebuild.yml | 5 +++++ rebuild/cloudflare.config.ts | 2 +- rebuild/src/main.tsx | 24 +++++++++++++++++++----- rebuild/src/recorder.ts | 4 +++- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/screennote-rebuild.yml b/.github/workflows/screennote-rebuild.yml index cfddf4c..9e48e17 100644 --- a/.github/workflows/screennote-rebuild.yml +++ b/.github/workflows/screennote-rebuild.yml @@ -33,6 +33,11 @@ jobs: - run: npm run typecheck - run: npm test - run: npm run build + - uses: actions/upload-artifact@v4 + with: + name: screennote-build-output + path: rebuild/.cloudflare/output/v1/** + if-no-files-found: error build: name: build diff --git a/rebuild/cloudflare.config.ts b/rebuild/cloudflare.config.ts index 714d571..e93ed8b 100644 --- a/rebuild/cloudflare.config.ts +++ b/rebuild/cloudflare.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ worker: { name: "screennote-dev", entrypoint, - compatibilityDate: "2026-11-25", + compatibilityDate: "2026-11-24", compatibilityFlags: ["nodejs_compat"], assets: { notFoundHandling: "single-page-application", diff --git a/rebuild/src/main.tsx b/rebuild/src/main.tsx index 10634aa..4777182 100644 --- a/rebuild/src/main.tsx +++ b/rebuild/src/main.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useMemo, useRef, useState } from "react"; import { createRoot } from "react-dom/client"; import { Activity, ArrowDownToLine, ArrowUpRight, Check, ChevronDown, CircleHelp, Clapperboard, Clock3, FileVideo2, FolderOpen, LayoutGrid, Mic, Moon, MoreHorizontal, Pause, Play, Plus, Search, Settings2, Share2, ShieldCheck, Sparkles, Sun, Trash2, Video, X } from "lucide-react"; import { deleteClip, listClips, saveClip, type Clip } from "./library"; -import { ScreenRecorder } from "./recorder"; +import { ScreenRecorder, type RecordingResult } from "./recorder"; import "./styles.css"; const recorder = new ScreenRecorder(); @@ -46,10 +46,7 @@ function App() { } finally { setBusy(false); } } - async function finish() { - setBusy(true); - try { - const result = await recorder.stop(); + async function persistResult(result: RecordingResult) { const clip: Clip = { id: crypto.randomUUID(), title: `Screen recording — ${new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric" }).format(Date.now())}`, @@ -62,6 +59,23 @@ function App() { await saveClip(clip); await refresh(); setMessage("Recording saved privately on this device."); + } + + useEffect(() => { + const handleExternalStop = (event: Event) => { + const result = (event as CustomEvent).detail; + setRecording(false); setPaused(false); setSeconds(0); + void persistResult(result).catch(() => setMessage("The recording could not be saved locally.")); + }; + window.addEventListener("screennote:recording-finished", handleExternalStop); + return () => window.removeEventListener("screennote:recording-finished", handleExternalStop); + }, []); + + async function finish() { + setBusy(true); + try { + const result = await recorder.stop(); + await persistResult(result); } catch (error) { setMessage(error instanceof Error ? error.message : "Could not save this recording."); } finally { diff --git a/rebuild/src/recorder.ts b/rebuild/src/recorder.ts index 13d5d8a..f9b0d07 100644 --- a/rebuild/src/recorder.ts +++ b/rebuild/src/recorder.ts @@ -87,11 +87,13 @@ export class ScreenRecorder { stop(): Promise { const recorder = this.recorder; if (!recorder) return Promise.reject(new Error("No recording is active")); + const wasPaused = recorder.state === "paused"; + const pausedAt = this.pausedAt; return new Promise((resolve, reject) => { recorder.onerror = () => reject(new Error("The browser could not finish this recording.")); recorder.onstop = () => { const blob = new Blob(this.chunks, { type: recorder.mimeType || "video/webm" }); - const activePause = recorder.state === "paused" ? Date.now() - this.pausedAt : 0; + const activePause = wasPaused ? Date.now() - pausedAt : 0; const duration = Math.max(0, Math.floor((Date.now() - this.startedAt - this.pausedDuration - activePause) / 1000)); this.stream?.getTracks().forEach((track) => track.stop()); this.stream = undefined; From b085620d70d30cd58a75f1bf35d2115f61affa67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:19:19 +0200 Subject: [PATCH 006/575] Add cached R2 static asset delivery for Cloudflare deployment --- rebuild/README.md | 3 ++- rebuild/cloudflare.config.ts | 1 + rebuild/worker/index.ts | 46 +++++++++++++++++++++++++++++++++--- 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/rebuild/README.md b/rebuild/README.md index f07c308..aee64f4 100644 --- a/rebuild/README.md +++ b/rebuild/README.md @@ -17,7 +17,7 @@ This is the new Cloudflare-first implementation. The legacy application remains - Optional microphone and system audio when the browser exposes them. - Pause, resume and finish controls. - Local IndexedDB library and MP4/WebM/MOV import. -- Cloudflare Worker API foundation for guest sessions and private R2 uploads. +- Cloudflare Worker API foundation for guest sessions, private media uploads and cached static asset delivery from R2 when no native Assets binding is present. - D1 schema for guest sessions and recording metadata. - Typed Cloudflare project configuration, Vite integration and observability settings. @@ -25,6 +25,7 @@ This is the new Cloudflare-first implementation. The legacy application remains - D1: `screennote-dev` (ENAM primary region) - R2: `screennote-media-dev` (ENAM bucket location) +- R2: `screennote-static-dev` (ENAM bucket location, versioned static build assets) These resources were created specifically for this rebuild. Existing Cloudflare projects and buckets were not reused or modified. diff --git a/rebuild/cloudflare.config.ts b/rebuild/cloudflare.config.ts index e93ed8b..fff963c 100644 --- a/rebuild/cloudflare.config.ts +++ b/rebuild/cloudflare.config.ts @@ -14,6 +14,7 @@ export default defineConfig({ env: { DB: bindings.d1({ name: "screennote-dev", id: "44a5859b-6411-4513-bd17-3302fbbc0575" }), MEDIA: bindings.r2({ name: "screennote-media-dev" }), + STATIC: bindings.r2({ name: "screennote-static-dev" }), ASSETS: bindings.assets() }, observability: { diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts index c5d7506..59a84c9 100644 --- a/rebuild/worker/index.ts +++ b/rebuild/worker/index.ts @@ -1,4 +1,4 @@ -type Bindings = { DB: D1Database; MEDIA: R2Bucket; ASSETS: Fetcher }; +type Bindings = { DB: D1Database; MEDIA: R2Bucket; STATIC: R2Bucket; ASSETS?: Fetcher }; const SESSION_COOKIE = "sn_guest"; const SESSION_SECONDS = 60 * 60 * 24 * 30; const MAX_UPLOAD_BYTES = 100 * 1024 * 1024; @@ -103,12 +103,52 @@ async function handleApi(request: Request, env: Bindings): Promise { return json({ error: "Not found" }, 404); } + +const CONTENT_TYPES: Record = { + ".html": "text/html; charset=utf-8", + ".js": "text/javascript; charset=utf-8", + ".css": "text/css; charset=utf-8", + ".svg": "image/svg+xml", + ".webmanifest": "application/manifest+json", + ".gz": "application/octet-stream" +}; + +async function serveStatic(request: Request, env: Bindings, ctx: ExecutionContext): Promise { + if (request.method !== "GET" && request.method !== "HEAD") return new Response("Method not allowed", { status: 405 }); + const url = new URL(request.url); + const pathname = url.pathname === "/" ? "/index.html" : url.pathname; + if (pathname.split("/").some((part) => part === "." || part === "..") || !/^\/[a-zA-Z0-9_./-]+$/.test(pathname)) { + return new Response("Bad path", { status: 400 }); + } + const cacheKey = new Request(url.toString(), { method: "GET" }); + const isImmutable = /\.[a-f0-9]{8,}\.(?:js|css)$/.test(pathname) || /\/bundle-\d{2}\.gz$/.test(pathname); + if (request.method === "GET" && isImmutable) { + const cached = await caches.default.match(cacheKey); + if (cached) return cached; + } + let object = await env.STATIC.get("site" + pathname); + if (!object && !pathname.split("/").pop()?.includes(".")) object = await env.STATIC.get("site/index.html"); + if (!object) return new Response("Not found", { status: 404 }); + const extension = pathname.slice(pathname.lastIndexOf(".")); + const headers = new Headers(); + object.writeHttpMetadata(headers); + headers.set("content-type", CONTENT_TYPES[extension] ?? "application/octet-stream"); + headers.set("etag", object.httpEtag); + headers.set("x-content-type-options", "nosniff"); + headers.set("referrer-policy", "strict-origin-when-cross-origin"); + headers.set("cache-control", isImmutable ? "public, max-age=31536000, immutable" : "no-cache"); + const response = new Response(request.method === "HEAD" ? null : object.body, { headers }); + if (request.method === "GET" && isImmutable) ctx.waitUntil(caches.default.put(cacheKey, response.clone())); + return response; +} + export default { - async fetch(request: Request, env: Bindings): Promise { + async fetch(request: Request, env: Bindings, ctx: ExecutionContext): Promise { const url = new URL(request.url); try { if (url.pathname.startsWith("/api/")) return await handleApi(request, env); - return env.ASSETS.fetch(request); + if (env.ASSETS) return env.ASSETS.fetch(request); + return await serveStatic(request, env, ctx); } catch (error) { console.error(JSON.stringify({ message: "ScreenNote request failed", path: url.pathname, error: error instanceof Error ? error.message : String(error) })); return json({ error: "The request could not be completed" }, 500); From 3cbe691624d5f9c47eb28666a29c9f5e331f13ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:19:32 +0200 Subject: [PATCH 007/575] Cache all versioned static asset paths --- rebuild/worker/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts index 59a84c9..7087108 100644 --- a/rebuild/worker/index.ts +++ b/rebuild/worker/index.ts @@ -121,7 +121,7 @@ async function serveStatic(request: Request, env: Bindings, ctx: ExecutionContex return new Response("Bad path", { status: 400 }); } const cacheKey = new Request(url.toString(), { method: "GET" }); - const isImmutable = /\.[a-f0-9]{8,}\.(?:js|css)$/.test(pathname) || /\/bundle-\d{2}\.gz$/.test(pathname); + const isImmutable = pathname.startsWith("/assets/"); if (request.method === "GET" && isImmutable) { const cached = await caches.default.match(cacheKey); if (cached) return cached; From c67cb80984f676f161687b637c0d27db3cf5a7a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:20:16 +0200 Subject: [PATCH 008/575] Type the Workers edge cache binding explicitly --- rebuild/worker/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts index 7087108..f12f695 100644 --- a/rebuild/worker/index.ts +++ b/rebuild/worker/index.ts @@ -120,10 +120,11 @@ async function serveStatic(request: Request, env: Bindings, ctx: ExecutionContex if (pathname.split("/").some((part) => part === "." || part === "..") || !/^\/[a-zA-Z0-9_./-]+$/.test(pathname)) { return new Response("Bad path", { status: 400 }); } + const edgeCache = (caches as unknown as { default: Cache }).default; const cacheKey = new Request(url.toString(), { method: "GET" }); const isImmutable = pathname.startsWith("/assets/"); if (request.method === "GET" && isImmutable) { - const cached = await caches.default.match(cacheKey); + const cached = await edgeCache.match(cacheKey); if (cached) return cached; } let object = await env.STATIC.get("site" + pathname); @@ -138,7 +139,7 @@ async function serveStatic(request: Request, env: Bindings, ctx: ExecutionContex headers.set("referrer-policy", "strict-origin-when-cross-origin"); headers.set("cache-control", isImmutable ? "public, max-age=31536000, immutable" : "no-cache"); const response = new Response(request.method === "HEAD" ? null : object.body, { headers }); - if (request.method === "GET" && isImmutable) ctx.waitUntil(caches.default.put(cacheKey, response.clone())); + if (request.method === "GET" && isImmutable) ctx.waitUntil(edgeCache.put(cacheKey, response.clone())); return response; } From 102465333bfab52c7b60031e833f4d3807f172e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:20:58 +0200 Subject: [PATCH 009/575] Persist recording chunks for crash recovery --- rebuild/package.json | 3 +- rebuild/src/library.ts | 151 +++++++++++++++++++++++++++++++--- rebuild/src/recorder.ts | 16 +++- rebuild/tests/library.test.ts | 57 +++++++++++++ 4 files changed, 213 insertions(+), 14 deletions(-) create mode 100644 rebuild/tests/library.test.ts diff --git a/rebuild/package.json b/rebuild/package.json index 53ba6d0..9d12e2d 100644 --- a/rebuild/package.json +++ b/rebuild/package.json @@ -24,6 +24,7 @@ "cf": "^1.0.0-rc.4", "typescript": "^5.9.0", "vite": "^7.1.0", - "vitest": "^3.2.0" + "vitest": "^3.2.0", + "fake-indexeddb": "^6.2.0" } } \ No newline at end of file diff --git a/rebuild/src/library.ts b/rebuild/src/library.ts index 94c3e97..bf79ca1 100644 --- a/rebuild/src/library.ts +++ b/rebuild/src/library.ts @@ -8,29 +8,51 @@ export type Clip = { blob: Blob; }; +export type RecoverySession = { + id: string; + title: string; + createdAt: number; + mimeType: string; + chunkCount: number; + totalBytes: number; + updatedAt: number; +}; + +type RecordingChunk = { id: string; sessionId: string; index: number; blob: Blob; size: number }; + const DB_NAME = "screennote-local"; -const STORE = "clips"; -const VERSION = 1; +const VERSION = 2; +const CLIPS = "clips"; +const SESSIONS = "sessions"; +const CHUNKS = "chunks"; function database(): Promise { return new Promise((resolve, reject) => { const request = indexedDB.open(DB_NAME, VERSION); request.onupgradeneeded = () => { const db = request.result; - if (!db.objectStoreNames.contains(STORE)) { - const store = db.createObjectStore(STORE, { keyPath: "id" }); + if (!db.objectStoreNames.contains(CLIPS)) { + const store = db.createObjectStore(CLIPS, { keyPath: "id" }); store.createIndex("createdAt", "createdAt"); } + if (!db.objectStoreNames.contains(SESSIONS)) { + db.createObjectStore(SESSIONS, { keyPath: "id" }); + } + if (!db.objectStoreNames.contains(CHUNKS)) { + const store = db.createObjectStore(CHUNKS, { keyPath: "id" }); + store.createIndex("sessionId", "sessionId"); + } }; request.onsuccess = () => resolve(request.result); request.onerror = () => reject(request.error ?? new Error("Could not open local library")); + request.onblocked = () => reject(new Error("Close other ScreenNote tabs to update local recording storage")); }); } export async function listClips(): Promise[]> { const db = await database(); return new Promise((resolve, reject) => { - const request = db.transaction(STORE, "readonly").objectStore(STORE).getAll(); + const request = db.transaction(CLIPS, "readonly").objectStore(CLIPS).getAll(); request.onsuccess = () => resolve((request.result as Clip[]) .sort((a, b) => b.createdAt - a.createdAt) .map(({ blob: _blob, ...clip }) => clip)); @@ -41,8 +63,8 @@ export async function listClips(): Promise[]> { export async function saveClip(clip: Clip): Promise { const db = await database(); return new Promise((resolve, reject) => { - const tx = db.transaction(STORE, "readwrite"); - tx.objectStore(STORE).put(clip); + const tx = db.transaction(CLIPS, "readwrite"); + tx.objectStore(CLIPS).put(clip); tx.oncomplete = () => resolve(); tx.onerror = () => reject(tx.error ?? new Error("Could not save recording")); tx.onabort = () => reject(tx.error ?? new Error("Saving recording was interrupted")); @@ -52,7 +74,7 @@ export async function saveClip(clip: Clip): Promise { export async function getClip(id: string): Promise { const db = await database(); return new Promise((resolve, reject) => { - const request = db.transaction(STORE, "readonly").objectStore(STORE).get(id); + const request = db.transaction(CLIPS, "readonly").objectStore(CLIPS).get(id); request.onsuccess = () => resolve(request.result as Clip | undefined); request.onerror = () => reject(request.error); }); @@ -61,9 +83,118 @@ export async function getClip(id: string): Promise { export async function deleteClip(id: string): Promise { const db = await database(); return new Promise((resolve, reject) => { - const tx = db.transaction(STORE, "readwrite"); - tx.objectStore(STORE).delete(id); + const tx = db.transaction(CLIPS, "readwrite"); + tx.objectStore(CLIPS).delete(id); tx.oncomplete = () => resolve(); tx.onerror = () => reject(tx.error); }); +} + +export async function beginRecordingSession(session: RecoverySession): Promise { + const db = await database(); + return new Promise((resolve, reject) => { + const tx = db.transaction(SESSIONS, "readwrite"); + tx.objectStore(SESSIONS).put(session); + tx.oncomplete = () => resolve(); + tx.onerror = () => reject(tx.error ?? new Error("Could not prepare recording recovery")); + }); +} + +export async function appendRecordingChunk(sessionId: string, blob: Blob, index: number): Promise { + const db = await database(); + return new Promise((resolve, reject) => { + const tx = db.transaction([SESSIONS, CHUNKS], "readwrite"); + const sessions = tx.objectStore(SESSIONS); + const request = sessions.get(sessionId); + request.onsuccess = () => { + const session = request.result as RecoverySession | undefined; + if (!session) { + tx.abort(); + return; + } + const chunk: RecordingChunk = { + id: sessionId + ":" + String(index).padStart(8, "0"), + sessionId, + index, + blob, + size: blob.size + }; + tx.objectStore(CHUNKS).put(chunk); + session.chunkCount = Math.max(session.chunkCount, index + 1); + session.totalBytes += blob.size; + session.updatedAt = Date.now(); + sessions.put(session); + }; + request.onerror = () => reject(request.error); + tx.oncomplete = () => resolve(); + tx.onerror = () => reject(tx.error ?? new Error("Could not preserve recording chunk")); + tx.onabort = () => reject(tx.error ?? new Error("Recording recovery storage is full or unavailable")); + }); +} + +export async function listRecoverableSessions(): Promise { + const db = await database(); + return new Promise((resolve, reject) => { + const request = db.transaction(SESSIONS, "readonly").objectStore(SESSIONS).getAll(); + request.onsuccess = () => resolve((request.result as RecoverySession[]).sort((a, b) => b.updatedAt - a.updatedAt)); + request.onerror = () => reject(request.error); + }); +} + +export async function deleteRecordingSession(sessionId: string): Promise { + const db = await database(); + return new Promise((resolve, reject) => { + const tx = db.transaction([SESSIONS, CHUNKS], "readwrite"); + const chunks = tx.objectStore(CHUNKS).index("sessionId").getAllKeys(sessionId); + chunks.onsuccess = () => { + for (const key of chunks.result) tx.objectStore(CHUNKS).delete(key); + tx.objectStore(SESSIONS).delete(sessionId); + }; + chunks.onerror = () => reject(chunks.error); + tx.oncomplete = () => resolve(); + tx.onerror = () => reject(tx.error); + }); +} + +export async function finalizeRecordingSession(sessionId: string, clip: Clip): Promise { + const db = await database(); + return new Promise((resolve, reject) => { + const tx = db.transaction([CLIPS, SESSIONS, CHUNKS], "readwrite"); + tx.objectStore(CLIPS).put(clip); + const chunks = tx.objectStore(CHUNKS).index("sessionId").getAllKeys(sessionId); + chunks.onsuccess = () => { + for (const key of chunks.result) tx.objectStore(CHUNKS).delete(key); + tx.objectStore(SESSIONS).delete(sessionId); + }; + chunks.onerror = () => reject(chunks.error); + tx.oncomplete = () => resolve(); + tx.onerror = () => reject(tx.error ?? new Error("Could not finalize recording")); + tx.onabort = () => reject(tx.error ?? new Error("Could not finalize recording")); + }); +} + +export async function restoreRecordingSession(sessionId: string): Promise { + const db = await database(); + const session = await new Promise((resolve, reject) => { + const request = db.transaction(SESSIONS, "readonly").objectStore(SESSIONS).get(sessionId); + request.onsuccess = () => resolve(request.result as RecoverySession | undefined); + request.onerror = () => reject(request.error); + }); + if (!session) throw new Error("This recovery session is no longer available"); + const chunks = await new Promise((resolve, reject) => { + const request = db.transaction(CHUNKS, "readonly").objectStore(CHUNKS).index("sessionId").getAll(sessionId); + request.onsuccess = () => resolve((request.result as RecordingChunk[]).sort((a, b) => a.index - b.index)); + request.onerror = () => reject(request.error); + }); + if (!chunks.length) throw new Error("No recoverable video data was found"); + const blob = new Blob(chunks.map((chunk) => chunk.blob), { type: session.mimeType }); + await finalizeRecordingSession(sessionId, { + id: session.id, + title: session.title + " (recovered)", + createdAt: session.createdAt, + duration: Math.max(0, chunks.length), + size: blob.size, + mimeType: session.mimeType, + blob + }); } \ No newline at end of file diff --git a/rebuild/src/recorder.ts b/rebuild/src/recorder.ts index f9b0d07..3b01af8 100644 --- a/rebuild/src/recorder.ts +++ b/rebuild/src/recorder.ts @@ -1,5 +1,6 @@ export type CaptureOptions = { microphone: boolean; systemAudio: boolean }; export type RecordingResult = { blob: Blob; duration: number; mimeType: string }; +export type ChunkWriter = (blob: Blob, index: number) => Promise; const MIME_TYPES = [ "video/webm;codecs=vp9,opus", @@ -16,6 +17,8 @@ export class ScreenRecorder { private recorder?: MediaRecorder; private stream?: MediaStream; private chunks: Blob[] = []; + private pendingWrites: Promise[] = []; + private chunkIndex = 0; private startedAt = 0; private pausedAt = 0; private pausedDuration = 0; @@ -24,7 +27,7 @@ export class ScreenRecorder { return this.recorder?.state ?? "inactive"; } - async start(options: CaptureOptions, onTick: (seconds: number) => void): Promise { + async start(options: CaptureOptions, onTick: (seconds: number) => void, writeChunk: ChunkWriter): Promise { if (!navigator.mediaDevices?.getDisplayMedia) { throw new Error("Screen recording is not supported in this browser. Try a desktop version of Chrome or Edge, or import a recording."); } @@ -42,10 +45,15 @@ export class ScreenRecorder { const mimeType = supportedMimeType(); this.recorder = new MediaRecorder(this.stream, mimeType ? { mimeType } : undefined); this.chunks = []; + this.pendingWrites = []; + this.chunkIndex = 0; this.startedAt = Date.now(); this.pausedDuration = 0; this.recorder.ondataavailable = (event) => { - if (event.data.size) this.chunks.push(event.data); + if (event.data.size) { + this.chunks.push(event.data); + this.pendingWrites.push(writeChunk(event.data, this.chunkIndex++)); + } }; this.recorder.start(1000); const timer = window.setInterval(() => { @@ -91,7 +99,8 @@ export class ScreenRecorder { const pausedAt = this.pausedAt; return new Promise((resolve, reject) => { recorder.onerror = () => reject(new Error("The browser could not finish this recording.")); - recorder.onstop = () => { + recorder.onstop = async () => { + await Promise.allSettled(this.pendingWrites); const blob = new Blob(this.chunks, { type: recorder.mimeType || "video/webm" }); const activePause = wasPaused ? Date.now() - pausedAt : 0; const duration = Math.max(0, Math.floor((Date.now() - this.startedAt - this.pausedDuration - activePause) / 1000)); @@ -99,6 +108,7 @@ export class ScreenRecorder { this.stream = undefined; this.recorder = undefined; this.chunks = []; + this.pendingWrites = []; if (!blob.size) reject(new Error("The recording was empty. Please try again.")); else resolve({ blob, duration, mimeType: blob.type }); }; diff --git a/rebuild/tests/library.test.ts b/rebuild/tests/library.test.ts new file mode 100644 index 0000000..ce25baf --- /dev/null +++ b/rebuild/tests/library.test.ts @@ -0,0 +1,57 @@ +import "fake-indexeddb/auto"; +import { afterEach, describe, expect, it } from "vitest"; +import { + appendRecordingChunk, + beginRecordingSession, + deleteRecordingSession, + getClip, + listRecoverableSessions, + restoreRecordingSession +} from "../src/library"; + +const reset = () => new Promise((resolve) => { + const request = indexedDB.deleteDatabase("screennote-local"); + request.onsuccess = () => resolve(); + request.onerror = () => resolve(); + request.onblocked = () => resolve(); +}); + +afterEach(async () => { await reset(); }); + +describe("local recording recovery", () => { + it("persists chunks and restores an interrupted recording", async () => { + const session = { + id: "session-1", + title: "Product walkthrough", + createdAt: 1000, + mimeType: "video/webm", + chunkCount: 0, + totalBytes: 0, + updatedAt: 1000 + }; + await beginRecordingSession(session); + await appendRecordingChunk(session.id, new Blob(["first"]), 0); + await appendRecordingChunk(session.id, new Blob(["second"]), 1); + + const pending = await listRecoverableSessions(); + expect(pending).toHaveLength(1); + expect(pending[0].chunkCount).toBe(2); + expect(pending[0].totalBytes).toBe(11); + + await restoreRecordingSession(session.id); + const clip = await getClip(session.id); + expect(clip?.title).toContain("(recovered)"); + expect(await clip?.blob.text()).toBe("firstsecond"); + expect(await listRecoverableSessions()).toHaveLength(0); + }); + + it("can discard a recovery session and its chunks", async () => { + await beginRecordingSession({ + id: "session-2", title: "Untitled", createdAt: 1000, mimeType: "video/webm", + chunkCount: 0, totalBytes: 0, updatedAt: 1000 + }); + await appendRecordingChunk("session-2", new Blob(["data"]), 0); + await deleteRecordingSession("session-2"); + expect(await listRecoverableSessions()).toHaveLength(0); + }); +}); \ No newline at end of file From 78b5e2513f2ed8296ebf951b92d9615215080c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:21:19 +0200 Subject: [PATCH 010/575] Connect crash recovery to the recording experience --- rebuild/src/main.tsx | 72 +++++++++++++++++++++++++++++++++--------- rebuild/src/styles.css | 2 ++ 2 files changed, 59 insertions(+), 15 deletions(-) diff --git a/rebuild/src/main.tsx b/rebuild/src/main.tsx index 4777182..66b1d5d 100644 --- a/rebuild/src/main.tsx +++ b/rebuild/src/main.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useMemo, useRef, useState } from "react"; import { createRoot } from "react-dom/client"; import { Activity, ArrowDownToLine, ArrowUpRight, Check, ChevronDown, CircleHelp, Clapperboard, Clock3, FileVideo2, FolderOpen, LayoutGrid, Mic, Moon, MoreHorizontal, Pause, Play, Plus, Search, Settings2, Share2, ShieldCheck, Sparkles, Sun, Trash2, Video, X } from "lucide-react"; -import { deleteClip, listClips, saveClip, type Clip } from "./library"; +import { appendRecordingChunk, beginRecordingSession, deleteClip, deleteRecordingSession, finalizeRecordingSession, listClips, listRecoverableSessions, restoreRecordingSession, saveClip, type Clip, type RecoverySession } from "./library"; import { ScreenRecorder, type RecordingResult } from "./recorder"; import "./styles.css"; @@ -16,6 +16,8 @@ const formatBytes = (bytes: number) => bytes < 1024 * 1024 ? `${Math.max(1, Math function App() { const [clips, setClips] = useState[]>([]); + const [recoverable, setRecoverable] = useState([]); + const activeSessionId = useRef(null); const [recording, setRecording] = useState(false); const [paused, setPaused] = useState(false); const [seconds, setSeconds] = useState(0); @@ -28,7 +30,11 @@ function App() { const [showSettings, setShowSettings] = useState(false); const fileRef = useRef(null); - const refresh = async () => setClips(await listClips()); + const refresh = async () => { + const [nextClips, nextRecoverable] = await Promise.all([listClips(), listRecoverableSessions()]); + setClips(nextClips); + setRecoverable(nextRecoverable); + }; useEffect(() => { refresh().catch(() => setMessage("Your browser's local storage is unavailable.")); }, []); useEffect(() => { document.documentElement.dataset.theme = dark ? "dark" : "light"; }, [dark]); @@ -37,28 +43,43 @@ function App() { async function start() { setMessage(""); setBusy(true); + const id = crypto.randomUUID(); + const createdAt = Date.now(); + const title = `Screen recording — ${new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric" }).format(createdAt)}`; try { - await recorder.start({ microphone: mic, systemAudio }, setSeconds); + await beginRecordingSession({ id, title, createdAt, mimeType: "video/webm", chunkCount: 0, totalBytes: 0, updatedAt: createdAt }); + activeSessionId.current = id; + await recorder.start( + { microphone: mic, systemAudio }, + setSeconds, + (chunk, index) => appendRecordingChunk(id, chunk, index) + ); setRecording(true); setPaused(false); } catch (error) { + await deleteRecordingSession(id).catch(() => undefined); + activeSessionId.current = null; setMessage(error instanceof Error ? error.message : "Could not start recording."); } finally { setBusy(false); } } async function persistResult(result: RecordingResult) { - const clip: Clip = { - id: crypto.randomUUID(), - title: `Screen recording — ${new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric" }).format(Date.now())}`, - createdAt: Date.now(), - duration: result.duration, - size: result.blob.size, - mimeType: result.mimeType, - blob: result.blob - }; - await saveClip(clip); - await refresh(); - setMessage("Recording saved privately on this device."); + const id = activeSessionId.current ?? crypto.randomUUID(); + const createdAt = Date.now(); + const clip: Clip = { + id, + title: `Screen recording — ${new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric" }).format(createdAt)}`, + createdAt, + duration: result.duration, + size: result.blob.size, + mimeType: result.mimeType, + blob: result.blob + }; + if (activeSessionId.current) await finalizeRecordingSession(id, clip); + else await saveClip(clip); + activeSessionId.current = null; + await refresh(); + setMessage("Recording saved privately on this device."); } useEffect(() => { @@ -83,6 +104,22 @@ function App() { } } + async function recoverSession(id: string) { + try { + await restoreRecordingSession(id); + await refresh(); + setMessage("Your interrupted recording was recovered."); + } catch (error) { + setMessage(error instanceof Error ? error.message : "Could not recover this recording."); + } + } + + async function discardSession(id: string) { + if (!window.confirm("Discard this unfinished recording and its saved chunks?")) return; + try { await deleteRecordingSession(id); await refresh(); } + catch { setMessage("Could not discard the unfinished recording."); } + } + async function importFile(file?: File) { if (!file) return; if (!["video/mp4", "video/webm", "video/quicktime"].includes(file.type)) { @@ -132,6 +169,11 @@ function App() {
YOUR CREATIVE WORKSPACE

Make it clear.
Show what you mean.

Capture a moment, explain an idea, and bring everyone onto the same page.

+ {recoverable.map((session) =>
+
An unfinished recording was found.{session.title} · {formatBytes(session.totalBytes)} saved locally
+
+
)} +

{recording ? "You're recording" : "Start with a recording"}

{recording ? "Take your time. Your recording is being captured in this tab." : "Record your screen or bring in a video you already have."}

{recording ?
{formatTime(seconds)} {paused ? "PAUSED" : "RECORDING"}
:
} diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index f748141..fd8785e 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -8,3 +8,5 @@ @media(max-width:760px){.sidebar{position:relative;width:auto;height:auto;inset:auto;padding:15px 18px;border-right:0;border-bottom:1px solid var(--line)}.brand{font-size:19px}.workspace-label,.side-nav,.sidebar-bottom{display:none}.main-content{margin-left:0}.topbar{height:49px;padding:0 18px}.secure-label{display:none}.page-wrap{padding:28px 18px 20px}.welcome-row{margin-bottom:25px}.welcome-art{width:160px;transform:scale(.86);transform-origin:right center;margin-left:-20px}.welcome-row h1{font-size:36px;letter-spacing:-1.8px}.intro{font-size:12px}.capture-panel{padding:17px}.capture-actions{gap:10px}.capture-actions .button{margin-left:auto}.section-heading{align-items:flex-start;flex-direction:column}.library-tools{width:100%}.search-box{flex:1;width:auto}.clip-grid{gap:10px}.clip-thumb{height:120px}.bottom-note{align-items:flex-start}.build-label{display:none}} @media(max-width:480px){.page-wrap{padding:23px 14px 16px}.welcome-row{gap:0}.welcome-art{width:112px;margin-left:-28px;transform:scale(.76)}.welcome-row h1{font-size:31px;letter-spacing:-1.5px}.intro{max-width:245px;font-size:11px}.capture-copy{align-items:flex-start}.capture-copy p{max-width:240px}.capture-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.capture-actions .button{grid-column:1/-1;margin:2px 0 0;width:100%}.record-controls{display:grid;grid-template-columns:1fr 1fr;width:100%}.recording-indicator{grid-column:1/-1}.record-controls .button{width:100%}.clip-grid{grid-template-columns:1fr 1fr;gap:9px}.clip-thumb{height:100px}.clip-info{padding:9px}.clip-info h3{font-size:10px}.clip-info p{font-size:8px;flex-wrap:wrap}.clip-info .icon-button{width:27px;height:27px}.import-button{padding:0 10px}.bottom-note{padding:12px}.bottom-note p{font-size:9px}footer{gap:12px;font-size:8px}.top-actions{gap:8px}} @media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} + +.recovery-notice{justify-content:space-between;gap:14px;align-items:center;margin-top:14px;flex-wrap:wrap}.recovery-copy{display:grid;gap:3px;min-width:0}.recovery-copy strong{font-size:11px}.recovery-copy span{font-size:10px;opacity:.82;overflow-wrap:anywhere}.recovery-actions{display:flex;gap:7px;flex-wrap:wrap}.recovery-actions .button{min-height:32px;padding:0 10px} From 9953b2a7f95211144d258d2eb17d7b8ec311abc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:21:41 +0200 Subject: [PATCH 011/575] Handle recovery MIME types and storage write failures --- rebuild/src/main.tsx | 4 ++-- rebuild/src/recorder.ts | 2 +- rebuild/tests/library.test.ts | 11 +---------- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/rebuild/src/main.tsx b/rebuild/src/main.tsx index 66b1d5d..acd9195 100644 --- a/rebuild/src/main.tsx +++ b/rebuild/src/main.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useMemo, useRef, useState } from "react"; import { createRoot } from "react-dom/client"; import { Activity, ArrowDownToLine, ArrowUpRight, Check, ChevronDown, CircleHelp, Clapperboard, Clock3, FileVideo2, FolderOpen, LayoutGrid, Mic, Moon, MoreHorizontal, Pause, Play, Plus, Search, Settings2, Share2, ShieldCheck, Sparkles, Sun, Trash2, Video, X } from "lucide-react"; import { appendRecordingChunk, beginRecordingSession, deleteClip, deleteRecordingSession, finalizeRecordingSession, listClips, listRecoverableSessions, restoreRecordingSession, saveClip, type Clip, type RecoverySession } from "./library"; -import { ScreenRecorder, type RecordingResult } from "./recorder"; +import { ScreenRecorder, supportedMimeType, type RecordingResult } from "./recorder"; import "./styles.css"; const recorder = new ScreenRecorder(); @@ -47,7 +47,7 @@ function App() { const createdAt = Date.now(); const title = `Screen recording — ${new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric" }).format(createdAt)}`; try { - await beginRecordingSession({ id, title, createdAt, mimeType: "video/webm", chunkCount: 0, totalBytes: 0, updatedAt: createdAt }); + await beginRecordingSession({ id, title, createdAt, mimeType: supportedMimeType() || "video/webm", chunkCount: 0, totalBytes: 0, updatedAt: createdAt }); activeSessionId.current = id; await recorder.start( { microphone: mic, systemAudio }, diff --git a/rebuild/src/recorder.ts b/rebuild/src/recorder.ts index 3b01af8..ac93b7f 100644 --- a/rebuild/src/recorder.ts +++ b/rebuild/src/recorder.ts @@ -52,7 +52,7 @@ export class ScreenRecorder { this.recorder.ondataavailable = (event) => { if (event.data.size) { this.chunks.push(event.data); - this.pendingWrites.push(writeChunk(event.data, this.chunkIndex++)); + this.pendingWrites.push(writeChunk(event.data, this.chunkIndex++).catch(() => undefined)); } }; this.recorder.start(1000); diff --git a/rebuild/tests/library.test.ts b/rebuild/tests/library.test.ts index ce25baf..91ae8d5 100644 --- a/rebuild/tests/library.test.ts +++ b/rebuild/tests/library.test.ts @@ -1,5 +1,5 @@ import "fake-indexeddb/auto"; -import { afterEach, describe, expect, it } from "vitest"; +import { describe, expect, it } from "vitest"; import { appendRecordingChunk, beginRecordingSession, @@ -9,15 +9,6 @@ import { restoreRecordingSession } from "../src/library"; -const reset = () => new Promise((resolve) => { - const request = indexedDB.deleteDatabase("screennote-local"); - request.onsuccess = () => resolve(); - request.onerror = () => resolve(); - request.onblocked = () => resolve(); -}); - -afterEach(async () => { await reset(); }); - describe("local recording recovery", () => { it("persists chunks and restores an interrupted recording", async () => { const session = { From 236f96680c3d1a89885ac2e93b1f73d49b8c5528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:22:32 +0200 Subject: [PATCH 012/575] Enable optional Cloudflare dev deployment from CI --- .github/workflows/screennote-rebuild.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/screennote-rebuild.yml b/.github/workflows/screennote-rebuild.yml index 9e48e17..58fcc04 100644 --- a/.github/workflows/screennote-rebuild.yml +++ b/.github/workflows/screennote-rebuild.yml @@ -21,6 +21,9 @@ jobs: test-and-build: name: test-and-build runs-on: ubuntu-latest + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: "90cefa028781f749f5816c5748f04cd2" defaults: run: working-directory: rebuild @@ -38,6 +41,9 @@ jobs: name: screennote-build-output path: rebuild/.cloudflare/output/v1/** if-no-files-found: error + - name: Deploy isolated Cloudflare development Worker + if: ${{ env.CLOUDFLARE_API_TOKEN != '' }} + run: npm run deploy build: name: build From e33a3fc723cd45b6d93400221170f927bd1d5523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:23:06 +0200 Subject: [PATCH 013/575] Add offline PWA shell and static asset caching --- rebuild/README.md | 2 ++ rebuild/public/sw.js | 45 ++++++++++++++++++++++++++++++++++++++++++++ rebuild/src/main.tsx | 5 +++++ 3 files changed, 52 insertions(+) create mode 100644 rebuild/public/sw.js diff --git a/rebuild/README.md b/rebuild/README.md index aee64f4..efe8da5 100644 --- a/rebuild/README.md +++ b/rebuild/README.md @@ -17,6 +17,8 @@ This is the new Cloudflare-first implementation. The legacy application remains - Optional microphone and system audio when the browser exposes them. - Pause, resume and finish controls. - Local IndexedDB library and MP4/WebM/MOV import. +- Chunk-by-chunk recording persistence with interrupted-session recovery. +- PWA service worker with offline shell and static asset caching. - Cloudflare Worker API foundation for guest sessions, private media uploads and cached static asset delivery from R2 when no native Assets binding is present. - D1 schema for guest sessions and recording metadata. - Typed Cloudflare project configuration, Vite integration and observability settings. diff --git a/rebuild/public/sw.js b/rebuild/public/sw.js new file mode 100644 index 0000000..ae4eb1c --- /dev/null +++ b/rebuild/public/sw.js @@ -0,0 +1,45 @@ +const CACHE_NAME = "screennote-shell-v1"; +const APP_SHELL = ["/", "/manifest.webmanifest", "/icon.svg"]; + +self.addEventListener("install", (event) => { + event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL)).then(() => self.skipWaiting())); +}); + +self.addEventListener("activate", (event) => { + event.waitUntil( + caches.keys() + .then((keys) => Promise.all(keys.filter((key) => key.startsWith("screennote-shell-") && key !== CACHE_NAME).map((key) => caches.delete(key)))) + .then(() => self.clients.claim()) + ); +}); + +self.addEventListener("fetch", (event) => { + const request = event.request; + const url = new URL(request.url); + if (request.method !== "GET" || url.origin !== self.location.origin || url.pathname.startsWith("/api/") || request.headers.has("range")) return; + + if (request.mode === "navigate") { + event.respondWith( + fetch(request).then((response) => { + if (response.ok) { + const copy = response.clone(); + event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.put("/", copy))); + } + return response; + }).catch(async () => (await caches.match("/")) || (await caches.match("/index.html")) || new Response("ScreenNote is offline. Reconnect and try again.", { status: 503, headers: { "content-type": "text/plain; charset=utf-8" } })) + ); + return; + } + + if (url.pathname.startsWith("/assets/") || APP_SHELL.includes(url.pathname)) { + event.respondWith( + caches.match(request).then((cached) => cached || fetch(request).then((response) => { + if (response.ok) { + const copy = response.clone(); + event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.put(request, copy))); + } + return response; + })) + ); + } +}); \ No newline at end of file diff --git a/rebuild/src/main.tsx b/rebuild/src/main.tsx index acd9195..7c8147f 100644 --- a/rebuild/src/main.tsx +++ b/rebuild/src/main.tsx @@ -37,6 +37,11 @@ function App() { }; useEffect(() => { refresh().catch(() => setMessage("Your browser's local storage is unavailable.")); }, []); useEffect(() => { document.documentElement.dataset.theme = dark ? "dark" : "light"; }, [dark]); + useEffect(() => { + if ("serviceWorker" in navigator && window.isSecureContext) { + navigator.serviceWorker.register("/sw.js", { scope: "/" }).catch(() => setMessage("Offline support could not be enabled in this browser.")); + } + }, []); const visibleClips = useMemo(() => clips.filter((clip) => clip.title.toLowerCase().includes(query.toLowerCase())), [clips, query]); From ce9746428535d3bbb49287301322b2d712cb328e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:23:21 +0200 Subject: [PATCH 014/575] Correct service worker cache lifecycle and update headers --- rebuild/public/_headers | 5 +++++ rebuild/public/sw.js | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 rebuild/public/_headers diff --git a/rebuild/public/_headers b/rebuild/public/_headers new file mode 100644 index 0000000..4b7a883 --- /dev/null +++ b/rebuild/public/_headers @@ -0,0 +1,5 @@ +/index.html + Cache-Control: no-cache + +/sw.js + Cache-Control: no-cache diff --git a/rebuild/public/sw.js b/rebuild/public/sw.js index ae4eb1c..a651b41 100644 --- a/rebuild/public/sw.js +++ b/rebuild/public/sw.js @@ -33,13 +33,13 @@ self.addEventListener("fetch", (event) => { if (url.pathname.startsWith("/assets/") || APP_SHELL.includes(url.pathname)) { event.respondWith( - caches.match(request).then((cached) => cached || fetch(request).then((response) => { - if (response.ok) { - const copy = response.clone(); - event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.put(request, copy))); - } + (async () => { + const cached = await caches.match(request); + if (cached) return cached; + const response = await fetch(request); + if (response.ok) await caches.open(CACHE_NAME).then((cache) => cache.put(request, response.clone())); return response; - })) + })() ); } }); \ No newline at end of file From 39c7684053c85665b8a09eecb5cfc1f77f234a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:23:41 +0200 Subject: [PATCH 015/575] Add local recording preview and playback modal --- rebuild/src/main.tsx | 40 +++++++++++++++++++++++++++++++++++----- rebuild/src/styles.css | 2 ++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/rebuild/src/main.tsx b/rebuild/src/main.tsx index 7c8147f..5fad323 100644 --- a/rebuild/src/main.tsx +++ b/rebuild/src/main.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useMemo, useRef, useState } from "react"; import { createRoot } from "react-dom/client"; -import { Activity, ArrowDownToLine, ArrowUpRight, Check, ChevronDown, CircleHelp, Clapperboard, Clock3, FileVideo2, FolderOpen, LayoutGrid, Mic, Moon, MoreHorizontal, Pause, Play, Plus, Search, Settings2, Share2, ShieldCheck, Sparkles, Sun, Trash2, Video, X } from "lucide-react"; -import { appendRecordingChunk, beginRecordingSession, deleteClip, deleteRecordingSession, finalizeRecordingSession, listClips, listRecoverableSessions, restoreRecordingSession, saveClip, type Clip, type RecoverySession } from "./library"; +import { Activity, ArrowDownToLine, ArrowUpRight, Check, ChevronDown, CircleHelp, Download, Clapperboard, Clock3, FileVideo2, FolderOpen, LayoutGrid, Mic, Moon, MoreHorizontal, Pause, Play, Plus, Search, Settings2, Share2, ShieldCheck, Sparkles, Sun, Trash2, Video, X } from "lucide-react"; +import { appendRecordingChunk, beginRecordingSession, deleteClip, deleteRecordingSession, finalizeRecordingSession, getClip, listClips, listRecoverableSessions, restoreRecordingSession, saveClip, type Clip, type RecoverySession } from "./library"; import { ScreenRecorder, supportedMimeType, type RecordingResult } from "./recorder"; import "./styles.css"; @@ -27,6 +27,8 @@ function App() { const [message, setMessage] = useState(""); const [dark, setDark] = useState(false); const [query, setQuery] = useState(""); + const [previewClip, setPreviewClip] = useState(null); + const [previewUrl, setPreviewUrl] = useState(null); const [showSettings, setShowSettings] = useState(false); const fileRef = useRef(null); @@ -137,13 +139,34 @@ function App() { if (fileRef.current) fileRef.current.value = ""; } + async function openPreview(id: string) { + const clip = await getClip(id); + if (!clip) { setMessage("This recording is no longer available on this device."); return; } + if (previewUrl) URL.revokeObjectURL(previewUrl); + setPreviewClip(clip); + setPreviewUrl(URL.createObjectURL(clip.blob)); + } + + function closePreview() { + if (previewUrl) URL.revokeObjectURL(previewUrl); + setPreviewUrl(null); + setPreviewClip(null); + } + + useEffect(() => { + if (!previewClip) return; + const onKeyDown = (event: KeyboardEvent) => { if (event.key === "Escape") closePreview(); }; + window.addEventListener("keydown", onKeyDown); + return () => window.removeEventListener("keydown", onKeyDown); + }, [previewClip, previewUrl]); + async function download(id: string) { const clip = await (await import("./library")).getClip(id); if (!clip) return; const url = URL.createObjectURL(clip.blob); const a = document.createElement("a"); - a.href = url; a.download = `${clip.title.replace(/[^a-z0-9-_ ]/gi, "").trim() || "screennote"}.webm`; - a.click(); URL.revokeObjectURL(url); + a.href = url; const extension = clip.mimeType === "video/mp4" ? "mp4" : clip.mimeType === "video/quicktime" ? "mov" : "webm"; a.download = `${clip.title.replace(/[^a-z0-9-_ ]/gi, "").trim() || "screennote"}.${extension}`; + a.click(); window.setTimeout(() => URL.revokeObjectURL(url), 1500); } async function remove(id: string) { @@ -188,13 +211,20 @@ function App() {
YOUR LIBRARY

Recent recordings {clips.length}

- {visibleClips.length ?
{visibleClips.map((clip) =>
{clip.duration ? formatTime(clip.duration) : "Imported"}

{clip.title}

{formatDate(clip.createdAt)} · {formatBytes(clip.size)}

)}
:

{query ? "No matching recordings" : "Your next great explanation starts here."}

{query ? "Try a different search." : "Record your screen or import a video. Your library is private and stays on this device."}

} + {visibleClips.length ?
{visibleClips.map((clip) =>
{clip.duration ? formatTime(clip.duration) : "Imported"}

{clip.title}

{formatDate(clip.createdAt)} · {formatBytes(clip.size)}

)}
:

{query ? "No matching recordings" : "Your next great explanation starts here."}

{query ? "Try a different search." : "Record your screen or import a video. Your library is private and stays on this device."}

}
A little more clarity goes a long way.

ScreenNote is being rebuilt. Local recording and your private library are the first foundation; secure sharing and AI-powered knowledge tools are coming next.

EARLY BUILD
© {new Date().getFullYear()} ScreenNoteMade for clear communication.Privacy
+ {previewClip && previewUrl &&
+
event.stopPropagation()}> +

{previewClip.title}

{formatDate(previewClip.createdAt)} · {formatBytes(previewClip.size)}

+
+
} importFile(e.target.files?.[0])}/> ; } diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index fd8785e..63a300f 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -10,3 +10,5 @@ @media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} .recovery-notice{justify-content:space-between;gap:14px;align-items:center;margin-top:14px;flex-wrap:wrap}.recovery-copy{display:grid;gap:3px;min-width:0}.recovery-copy strong{font-size:11px}.recovery-copy span{font-size:10px;opacity:.82;overflow-wrap:anywhere}.recovery-actions{display:flex;gap:7px;flex-wrap:wrap}.recovery-actions .button{min-height:32px;padding:0 10px} + +.modal-backdrop{position:fixed;inset:0;z-index:20;background:rgba(12,20,15,.68);backdrop-filter:blur(7px);display:grid;place-items:center;padding:22px}.preview-modal{width:min(920px,100%);max-height:min(90vh,820px);overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:15px;box-shadow:0 24px 80px rgba(0,0,0,.28);padding:17px}.preview-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:2px 1px 14px}.preview-header h2{font:700 15px Manrope,sans-serif;margin:0 0 5px;overflow-wrap:anywhere}.preview-header p{font-size:10px;color:var(--muted);margin:0}.preview-video{display:block;width:100%;max-height:68vh;aspect-ratio:16/9;object-fit:contain;background:#080b09;border-radius:9px}.preview-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:13px}@media(max-width:480px){.modal-backdrop{padding:10px}.preview-modal{padding:12px;border-radius:12px}.preview-video{max-height:60vh}.preview-actions .button{flex:1}} From 228d70162fa7a73f3f96283a0069f3368717181b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:24:17 +0200 Subject: [PATCH 016/575] Add Worker API ownership and upload security tests --- rebuild/tests/worker.test.ts | 133 +++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 rebuild/tests/worker.test.ts diff --git a/rebuild/tests/worker.test.ts b/rebuild/tests/worker.test.ts new file mode 100644 index 0000000..89bbda7 --- /dev/null +++ b/rebuild/tests/worker.test.ts @@ -0,0 +1,133 @@ +import { beforeEach, describe, expect, it } from "vitest"; +import worker from "../worker/index"; + +class FakeD1 { + sessions = new Set(); + recordings = new Map(); + + prepare(sql: string) { + const db = this; + return { + bind(...values: unknown[]) { + return { + async first() { + if (sql.includes("SELECT token_hash FROM guest_sessions")) { + const tokenHash = String(values[0]); + return db.sessions.has(tokenHash) ? { token_hash: tokenHash } : null; + } + if (sql.includes("SELECT object_key, mime_type, byte_size FROM recordings")) { + const row = db.recordings.get(String(values[0])); + return row && row.owner === String(values[1]) && row.status === "uploading" + ? { object_key: row.object_key, mime_type: row.mime_type, byte_size: row.byte_size } + : null; + } + if (sql.includes("SELECT object_key FROM recordings")) { + const row = db.recordings.get(String(values[0])); + return row && row.owner === String(values[1]) ? { object_key: row.object_key } : null; + } + return null; + }, + async run() { + if (sql.startsWith("INSERT INTO guest_sessions")) db.sessions.add(String(values[0])); + if (sql.startsWith("INSERT INTO recordings")) { + const [id, owner, title, object_key, mime_type, byte_size, created_at] = values as [string,string,string,string,string,number,number,number]; + db.recordings.set(id, { id, owner, title, object_key, mime_type, byte_size, status: "uploading", created_at }); + } + if (sql.startsWith("UPDATE recordings")) { + const [updatedAt, id, owner] = values as [number,string,string]; + const row = db.recordings.get(id); + if (row && row.owner === owner) row.status = "ready"; + } + if (sql.startsWith("DELETE FROM recordings")) db.recordings.delete(String(values[0])); + return { success: true }; + }, + async all() { + if (sql.includes("FROM recordings WHERE owner_token_hash")) { + return { results: [...db.recordings.values()].filter((row) => row.owner === String(values[0])) }; + } + return { results: [] }; + } + }; + } + }; + } +} + +const makeEnv = () => { + const DB = new FakeD1(); + const uploaded: { key?: string; size?: number; type?: string } = {}; + const deleted: string[] = []; + const MEDIA = { + async put(key: string, body: ReadableStream, options: { httpMetadata: { contentType: string } }) { + const bytes = await new Response(body).arrayBuffer(); + uploaded.key = key; uploaded.size = bytes.byteLength; uploaded.type = options.httpMetadata.contentType; + }, + async delete(key: string) { deleted.push(key); } + }; + return { env: { DB, MEDIA, STATIC: {} }, DB, uploaded, deleted }; +}; + +async function guestSession(env: ReturnType["env"]) { + const response = await worker.fetch(new Request("https://screennote.test/api/session"), env as never, {} as never); + const cookie = response.headers.get("set-cookie")!; + return { cookie: cookie.split(";")[0] }; +} + +describe("ScreenNote Worker API", () => { + let state: ReturnType; + beforeEach(() => { state = makeEnv(); }); + + it("serves a health response without requiring a session", async () => { + const response = await worker.fetch(new Request("https://screennote.test/api/health"), state.env as never, {} as never); + expect(response.status).toBe(200); + expect(await response.json()).toMatchObject({ status: "ok", service: "screennote" }); + }); + + it("rejects cross-origin session creation", async () => { + const response = await worker.fetch(new Request("https://screennote.test/api/session", { + headers: { origin: "https://attacker.test" } + }), state.env as never, {} as never); + expect(response.status).toBe(403); + expect(state.DB.sessions.size).toBe(0); + }); + + it("creates a guest session and requires it for recording creation", async () => { + const session = await guestSession(state.env); + expect(session.cookie).toContain("sn_guest="); + const response = await worker.fetch(new Request("https://screennote.test/api/recordings", { + method: "POST", + headers: { origin: "https://screennote.test", cookie: session.cookie, "content-type": "application/json" }, + body: JSON.stringify({ title: "Walkthrough", mimeType: "video/webm", size: 4 }) + }), state.env as never, {} as never); + expect(response.status).toBe(201); + const body = await response.json() as { id: string; uploadUrl: string }; + expect(body.id).toMatch(/^[a-f0-9-]{36}$/i); + expect(body.uploadUrl).toBe(`/api/recordings/${body.id}/media`); + }); + + it("streams an owned recording into R2 and rejects mismatched upload size", async () => { + const session = await guestSession(state.env); + const create = await worker.fetch(new Request("https://screennote.test/api/recordings", { + method: "POST", + headers: { origin: "https://screennote.test", cookie: session.cookie, "content-type": "application/json" }, + body: JSON.stringify({ title: "Clip", mimeType: "video/webm", size: 4 }) + }), state.env as never, {} as never); + const { id } = await create.json() as { id: string }; + + const mismatch = await worker.fetch(new Request(`https://screennote.test/api/recordings/${id}/media`, { + method: "PUT", + headers: { origin: "https://screennote.test", cookie: session.cookie, "content-type": "video/webm", "content-length": "3" }, + body: "abc" + }), state.env as never, {} as never); + expect(mismatch.status).toBe(400); + + const upload = await worker.fetch(new Request(`https://screennote.test/api/recordings/${id}/media`, { + method: "PUT", + headers: { origin: "https://screennote.test", cookie: session.cookie, "content-type": "video/webm", "content-length": "4" }, + body: "test" + }), state.env as never, {} as never); + expect(upload.status).toBe(200); + expect(state.uploaded.size).toBe(4); + expect(state.uploaded.type).toBe("video/webm"); + }); +}); \ No newline at end of file From 70182ef41c387b7f0c2acb87ef4a18a52c742521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:25:47 +0200 Subject: [PATCH 017/575] Add Cloudflare static preview assets and loader --- rebuild/deploy-assets/assets/style.css | 14 +++++++ rebuild/deploy-assets/icon.svg | 1 + rebuild/deploy-assets/index.html | 15 ++++++++ rebuild/deploy-assets/loader.js | 17 ++++++++ rebuild/deploy-assets/manifest.webmanifest | 11 ++++++ rebuild/deploy-assets/sw.js | 45 ++++++++++++++++++++++ 6 files changed, 103 insertions(+) create mode 100644 rebuild/deploy-assets/assets/style.css create mode 100644 rebuild/deploy-assets/icon.svg create mode 100644 rebuild/deploy-assets/index.html create mode 100644 rebuild/deploy-assets/loader.js create mode 100644 rebuild/deploy-assets/manifest.webmanifest create mode 100644 rebuild/deploy-assets/sw.js diff --git a/rebuild/deploy-assets/assets/style.css b/rebuild/deploy-assets/assets/style.css new file mode 100644 index 0000000..63a300f --- /dev/null +++ b/rebuild/deploy-assets/assets/style.css @@ -0,0 +1,14 @@ +@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap'); + +:root{font-family:"DM Sans",sans-serif;color:#202823;background:#f7f7f4;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;font-optical-sizing:auto;font-weight:400;--bg:#f7f7f4;--surface:#fff;--surface-2:#f0f1ec;--ink:#202823;--muted:#788078;--line:#e5e8e1;--green:#1d5945;--green-dark:#164735;--green-soft:#e8f0e9;--accent:#d9e8d7;--shadow:0 16px 45px rgba(32,48,38,.06)} +:root[data-theme="dark"]{color-scheme:dark;--bg:#141a17;--surface:#1c2420;--surface-2:#252e29;--ink:#edf2ed;--muted:#a3afa6;--line:#303b34;--green:#a4c9ae;--green-dark:#d1e7d4;--green-soft:#283d30;--accent:#30483a;--shadow:0 16px 45px rgba(0,0,0,.18)} +*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--bg);color:var(--ink)}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:248px;padding:27px 18px 18px;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:10px;padding:0 10px;font:800 21px Manrope,sans-serif;letter-spacing:-1.1px}.brand-mark{width:31px;height:31px;border-radius:10px;background:#183d32;color:#f7f7f4;display:grid;place-items:center}.brand-light{font-weight:500;color:var(--muted)}.workspace-label{margin:49px 10px 13px;font-size:10px;letter-spacing:1.4px;font-weight:700;color:var(--muted);display:flex;align-items:center;justify-content:space-between}.local-pill{font-size:9px;letter-spacing:.7px;border:1px solid var(--line);border-radius:20px;padding:4px 7px;color:var(--muted)}.local-pill span,.recording-indicator span{display:inline-block;width:6px;height:6px;border-radius:50%;background:#4e9b70;margin-right:5px}.side-nav{display:grid;gap:5px}.nav-item{display:flex;align-items:center;gap:11px;width:100%;border:0;background:transparent;color:var(--muted);padding:11px 12px;border-radius:9px;text-align:left;font-size:13px;font-weight:500}.nav-item:hover,.nav-item.active{background:var(--surface-2);color:var(--ink)}.nav-item.active{font-weight:700}.nav-count{margin-left:auto;font-size:11px}.sidebar-bottom{margin-top:auto;display:grid;gap:5px}.privacy-card{display:flex;gap:10px;background:var(--green-soft);color:var(--green);padding:13px;border-radius:11px;margin-bottom:12px}.privacy-card svg{flex:none;margin-top:1px}.privacy-card strong{font-size:11px}.privacy-card p{font-size:10px;line-height:1.5;margin:5px 0 0;opacity:.8}.profile-row{border-top:1px solid var(--line);margin-top:12px;padding:16px 4px 0;display:flex;align-items:center;gap:10px}.profile-row>div:nth-child(2){display:grid;gap:3px;flex:1}.profile-row strong{font-size:11px}.profile-row span{font-size:10px;color:var(--muted)}.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#dfe8dc;color:#355642;font-size:12px;font-weight:700;border:0}.avatar.small{width:29px;height:29px}.main-content{margin-left:248px;min-height:100vh}.topbar{height:67px;padding:0 48px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--bg)}.breadcrumb{font-size:12px;color:var(--muted)}.breadcrumb span{margin:0 8px;color:var(--line)}.top-actions{display:flex;align-items:center;gap:17px}.secure-label{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px}.icon-button{width:34px;height:34px;display:grid;place-items:center;border:1px solid transparent;background:transparent;color:var(--muted);border-radius:8px}.icon-button:hover{background:var(--surface-2);color:var(--ink)}.page-wrap{max-width:1250px;margin:0 auto;padding:44px 48px 24px}.welcome-row{display:flex;align-items:center;justify-content:space-between;gap:35px;margin-bottom:35px}.eyebrow{font-size:9px;letter-spacing:1.65px;font-weight:700;color:var(--green);margin-bottom:12px}.welcome-row h1{font:800 clamp(34px,4vw,49px)/1.08 Manrope,sans-serif;letter-spacing:-2.5px;margin:0}.welcome-row h1 span{color:var(--green)}.intro{font-size:14px;color:var(--muted);margin:14px 0 0;line-height:1.6;max-width:470px}.welcome-art{width:240px;flex:none;position:relative;padding:13px 10px 20px}.art-window{height:133px;border-radius:13px;border:1px solid #dce4d9;background:#fff;box-shadow:0 14px 35px rgba(42,68,48,.11);overflow:hidden;transform:rotate(2deg)}.art-bar{height:19px;background:#f2f4ef;display:flex;align-items:center;gap:4px;padding:0 8px}.art-bar i{width:5px;height:5px;border-radius:50%;background:#c3cec2}.art-screen{height:114px;display:flex;position:relative}.art-sidebar{width:30px;background:#edf2eb}.art-content{padding:13px 11px;display:grid;gap:6px;flex:1;align-content:start}.art-content div{height:9px;border-radius:4px;background:#e8eee6}.art-content div:first-child{width:55%;background:#cbdcca}.art-content div:nth-child(2){width:85%}.art-content div:nth-child(3){width:69%}.art-content div:nth-child(4){width:77%}.art-cursor{position:absolute;width:17px;height:22px;background:#244c3b;clip-path:polygon(0 0,100% 70%,59% 74%,77% 100%,62% 100%,45% 76%,23% 100%);left:135px;top:47px}.art-play{position:absolute;right:30px;bottom:37px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#1e5944;color:white;box-shadow:0 6px 18px #1e594455}.art-caption{position:absolute;bottom:0;right:5px;font-size:9px;color:var(--muted);letter-spacing:.3px}.capture-panel{border:1px solid var(--line);background:var(--surface);border-radius:14px;padding:21px 23px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:var(--shadow)}.capture-copy{display:flex;align-items:center;gap:14px;min-width:0}.capture-icon{width:43px;height:43px;flex:none;border-radius:12px;display:grid;place-items:center;background:var(--green-soft);color:var(--green)}.capture-copy h2{font:700 15px Manrope,sans-serif;margin:0 0 5px}.capture-copy p{font-size:11px;color:var(--muted);margin:0;line-height:1.5}.capture-actions,.record-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.toggle-option{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px;white-space:nowrap}.toggle-option input{accent-color:var(--green)}.button{border:1px solid var(--line);border-radius:8px;min-height:38px;padding:0 13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:11px;font-weight:700;white-space:nowrap;transition:transform .15s ease,background .15s ease,border-color .15s ease}.button:active{transform:translateY(1px)}.button:disabled{opacity:.55;cursor:wait}.button.primary{background:#1d5945;color:white;border-color:#1d5945}.button.primary:hover{background:#164735}.button.secondary{background:var(--surface);color:var(--ink)}.button.secondary:hover{background:var(--surface-2)}.button.danger{background:#a3423b;color:white;border-color:#a3423b}.record-dot{width:8px;height:8px;border-radius:50%;background:#fff;box-shadow:0 0 0 3px #ffffff35}.recording-indicator{font:700 11px ui-monospace,monospace;color:#b44c43;letter-spacing:.4px}.recording-indicator span{background:#c64e45;animation:pulse 1.2s infinite}.notice{margin-top:15px;border:1px solid #c8ddcb;background:var(--green-soft);color:var(--green);padding:11px 13px;border-radius:9px;font-size:11px;display:flex;align-items:center;gap:8px}.notice button{margin-left:auto;border:0;background:transparent;color:inherit;display:grid;place-items:center}.library-section{margin-top:43px}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:17px}.section-heading .eyebrow{margin-bottom:7px}.section-heading h2{font:700 20px Manrope,sans-serif;letter-spacing:-.6px;margin:0}.count-badge{font:600 10px "DM Sans",sans-serif;color:var(--muted);background:var(--surface-2);padding:4px 7px;border-radius:20px;vertical-align:middle;margin-left:5px}.library-tools{display:flex;align-items:center;gap:9px}.search-box{width:205px;height:36px;display:flex;align-items:center;gap:7px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--muted)}.search-box input{border:0;outline:0;background:transparent;color:var(--ink);width:100%;min-width:0;font-size:11px}.search-box input::placeholder{color:var(--muted)}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.clip-card{border:1px solid var(--line);border-radius:11px;overflow:hidden;background:var(--surface);min-width:0;transition:transform .2s ease,box-shadow .2s ease}.clip-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.clip-thumb{height:145px;position:relative;display:grid;place-items:center;background:linear-gradient(140deg,#e9eee7,#dce6dc 60%,#d1dfd3);overflow:hidden}.thumb-lines{width:60%;display:grid;gap:7px}.thumb-lines span{height:9px;border-radius:4px;background:#c0d1c1}.thumb-lines span:first-child{width:60%;height:13px;background:#9db99f}.thumb-lines span:nth-child(2){width:90%}.thumb-lines span:nth-child(3){width:72%}.thumb-play{position:absolute;inset:0;margin:auto;width:39px;height:39px;border:1px solid #ffffffaa;border-radius:50%;display:grid;place-items:center;background:#fff;color:#214b37;box-shadow:0 5px 20px #203d2a25}.duration{position:absolute;right:9px;bottom:8px;padding:4px 6px;border-radius:4px;background:#18251fbb;color:white;font-size:9px}.clip-info{padding:12px;display:flex;align-items:center;justify-content:space-between;gap:7px;min-width:0}.clip-info>div{min-width:0}.clip-info h3{font-size:11px;font-weight:700;margin:0 0 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clip-info p{font-size:9px;color:var(--muted);margin:0;display:flex;align-items:center;gap:5px}.clip-info .icon-button{flex:none}.empty-state{min-height:260px;border:1px dashed #cfd8ce;border-radius:13px;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px 18px}.empty-icon{width:51px;height:51px;border-radius:15px;background:var(--green-soft);color:var(--green);display:grid;place-items:center;margin-bottom:14px}.empty-state h3{font:700 15px Manrope,sans-serif;margin:0 0 7px}.empty-state p{font-size:11px;line-height:1.6;color:var(--muted);max-width:390px;margin:0}.empty-actions{display:flex;gap:8px;margin-top:18px;flex-wrap:wrap;justify-content:center}.bottom-note{margin-top:31px;padding:15px 17px;display:flex;align-items:center;gap:12px;background:var(--surface-2);border-radius:10px}.note-icon{width:31px;height:31px;border-radius:9px;background:var(--surface);color:var(--green);display:grid;place-items:center;flex:none}.bottom-note>div:nth-child(2){min-width:0;flex:1}.bottom-note strong{font-size:11px}.bottom-note p{font-size:10px;color:var(--muted);line-height:1.5;margin:4px 0 0}.build-label{font-size:8px;letter-spacing:.8px;color:var(--muted);display:flex;align-items:center;gap:5px;white-space:nowrap}footer{display:flex;gap:18px;justify-content:flex-end;padding:24px 2px 5px;color:var(--muted);font-size:9px}footer span:first-child{margin-right:auto}.record-controls{justify-content:flex-end}.capture-panel:has(.record-controls){border-color:#e5c7c3}.local-pill{display:inline-flex;align-items:center}.local-pill span{background:#5d9c70} +@keyframes pulse{50%{box-shadow:0 0 0 5px #c64e4522;opacity:.55}} +@media(max-width:1100px){.sidebar{width:215px}.main-content{margin-left:215px}.page-wrap{padding:35px 30px 22px}.topbar{padding:0 30px}.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.capture-panel{align-items:flex-start;flex-direction:column}.capture-actions,.record-controls{width:100%;justify-content:flex-start}} +@media(max-width:760px){.sidebar{position:relative;width:auto;height:auto;inset:auto;padding:15px 18px;border-right:0;border-bottom:1px solid var(--line)}.brand{font-size:19px}.workspace-label,.side-nav,.sidebar-bottom{display:none}.main-content{margin-left:0}.topbar{height:49px;padding:0 18px}.secure-label{display:none}.page-wrap{padding:28px 18px 20px}.welcome-row{margin-bottom:25px}.welcome-art{width:160px;transform:scale(.86);transform-origin:right center;margin-left:-20px}.welcome-row h1{font-size:36px;letter-spacing:-1.8px}.intro{font-size:12px}.capture-panel{padding:17px}.capture-actions{gap:10px}.capture-actions .button{margin-left:auto}.section-heading{align-items:flex-start;flex-direction:column}.library-tools{width:100%}.search-box{flex:1;width:auto}.clip-grid{gap:10px}.clip-thumb{height:120px}.bottom-note{align-items:flex-start}.build-label{display:none}} +@media(max-width:480px){.page-wrap{padding:23px 14px 16px}.welcome-row{gap:0}.welcome-art{width:112px;margin-left:-28px;transform:scale(.76)}.welcome-row h1{font-size:31px;letter-spacing:-1.5px}.intro{max-width:245px;font-size:11px}.capture-copy{align-items:flex-start}.capture-copy p{max-width:240px}.capture-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.capture-actions .button{grid-column:1/-1;margin:2px 0 0;width:100%}.record-controls{display:grid;grid-template-columns:1fr 1fr;width:100%}.recording-indicator{grid-column:1/-1}.record-controls .button{width:100%}.clip-grid{grid-template-columns:1fr 1fr;gap:9px}.clip-thumb{height:100px}.clip-info{padding:9px}.clip-info h3{font-size:10px}.clip-info p{font-size:8px;flex-wrap:wrap}.clip-info .icon-button{width:27px;height:27px}.import-button{padding:0 10px}.bottom-note{padding:12px}.bottom-note p{font-size:9px}footer{gap:12px;font-size:8px}.top-actions{gap:8px}} +@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} + +.recovery-notice{justify-content:space-between;gap:14px;align-items:center;margin-top:14px;flex-wrap:wrap}.recovery-copy{display:grid;gap:3px;min-width:0}.recovery-copy strong{font-size:11px}.recovery-copy span{font-size:10px;opacity:.82;overflow-wrap:anywhere}.recovery-actions{display:flex;gap:7px;flex-wrap:wrap}.recovery-actions .button{min-height:32px;padding:0 10px} + +.modal-backdrop{position:fixed;inset:0;z-index:20;background:rgba(12,20,15,.68);backdrop-filter:blur(7px);display:grid;place-items:center;padding:22px}.preview-modal{width:min(920px,100%);max-height:min(90vh,820px);overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:15px;box-shadow:0 24px 80px rgba(0,0,0,.28);padding:17px}.preview-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:2px 1px 14px}.preview-header h2{font:700 15px Manrope,sans-serif;margin:0 0 5px;overflow-wrap:anywhere}.preview-header p{font-size:10px;color:var(--muted);margin:0}.preview-video{display:block;width:100%;max-height:68vh;aspect-ratio:16/9;object-fit:contain;background:#080b09;border-radius:9px}.preview-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:13px}@media(max-width:480px){.modal-backdrop{padding:10px}.preview-modal{padding:12px;border-radius:12px}.preview-video{max-height:60vh}.preview-actions .button{flex:1}} diff --git a/rebuild/deploy-assets/icon.svg b/rebuild/deploy-assets/icon.svg new file mode 100644 index 0000000..cfa08bf --- /dev/null +++ b/rebuild/deploy-assets/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rebuild/deploy-assets/index.html b/rebuild/deploy-assets/index.html new file mode 100644 index 0000000..f08c30d --- /dev/null +++ b/rebuild/deploy-assets/index.html @@ -0,0 +1,15 @@ + + + + + + + + + + +ScreenNote — Show what you mean + + +
+ \ No newline at end of file diff --git a/rebuild/deploy-assets/loader.js b/rebuild/deploy-assets/loader.js new file mode 100644 index 0000000..920392c --- /dev/null +++ b/rebuild/deploy-assets/loader.js @@ -0,0 +1,17 @@ +(async () => { + const paths = ["/assets/bundle-00.gz", "/assets/bundle-01.gz", "/assets/bundle-02.gz", "/assets/bundle-03.gz", "/assets/bundle-04.gz", "/assets/bundle-05.gz", "/assets/bundle-06.gz", "/assets/bundle-07.gz", "/assets/bundle-08.gz", "/assets/bundle-09.gz"]; + const parts = await Promise.all(paths.map(async (path) => new Uint8Array(await (await fetch(path, { cache: "force-cache" })).arrayBuffer()))); + const total = parts.reduce((sum, part) => sum + part.length, 0); + const compressed = new Uint8Array(total); + let offset = 0; + for (const part of parts) { compressed.set(part, offset); offset += part.length; } + const stream = new Blob([compressed]).stream().pipeThrough(new DecompressionStream("gzip")); + const code = await new Response(stream).text(); + const script = document.createElement("script"); + script.text = code; + document.head.appendChild(script); +})().catch((error) => { + const root = document.getElementById("root"); + if (root) root.textContent = "ScreenNote could not load. Please refresh or try another browser."; + console.error("ScreenNote asset loader failed", error); +}); \ No newline at end of file diff --git a/rebuild/deploy-assets/manifest.webmanifest b/rebuild/deploy-assets/manifest.webmanifest new file mode 100644 index 0000000..e5cc303 --- /dev/null +++ b/rebuild/deploy-assets/manifest.webmanifest @@ -0,0 +1,11 @@ +{ + "name": "ScreenNote", + "short_name": "ScreenNote", + "description": "Clear screen recordings, thoughtful conversations.", + "start_url": "/", + "scope": "/", + "display": "standalone", + "background_color": "#f7f7f4", + "theme_color": "#f7f7f4", + "icons": [{ "src": "/icon.svg", "sizes": "any", "type": "image/svg+xml", "purpose": "any maskable" }] +} \ No newline at end of file diff --git a/rebuild/deploy-assets/sw.js b/rebuild/deploy-assets/sw.js new file mode 100644 index 0000000..a651b41 --- /dev/null +++ b/rebuild/deploy-assets/sw.js @@ -0,0 +1,45 @@ +const CACHE_NAME = "screennote-shell-v1"; +const APP_SHELL = ["/", "/manifest.webmanifest", "/icon.svg"]; + +self.addEventListener("install", (event) => { + event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL)).then(() => self.skipWaiting())); +}); + +self.addEventListener("activate", (event) => { + event.waitUntil( + caches.keys() + .then((keys) => Promise.all(keys.filter((key) => key.startsWith("screennote-shell-") && key !== CACHE_NAME).map((key) => caches.delete(key)))) + .then(() => self.clients.claim()) + ); +}); + +self.addEventListener("fetch", (event) => { + const request = event.request; + const url = new URL(request.url); + if (request.method !== "GET" || url.origin !== self.location.origin || url.pathname.startsWith("/api/") || request.headers.has("range")) return; + + if (request.mode === "navigate") { + event.respondWith( + fetch(request).then((response) => { + if (response.ok) { + const copy = response.clone(); + event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.put("/", copy))); + } + return response; + }).catch(async () => (await caches.match("/")) || (await caches.match("/index.html")) || new Response("ScreenNote is offline. Reconnect and try again.", { status: 503, headers: { "content-type": "text/plain; charset=utf-8" } })) + ); + return; + } + + if (url.pathname.startsWith("/assets/") || APP_SHELL.includes(url.pathname)) { + event.respondWith( + (async () => { + const cached = await caches.match(request); + if (cached) return cached; + const response = await fetch(request); + if (response.ok) await caches.open(CACHE_NAME).then((cache) => cache.put(request, response.clone())); + return response; + })() + ); + } +}); \ No newline at end of file From 70562683fc7ed2af84aac39b25bf1560f5c8ad38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:26:17 +0200 Subject: [PATCH 018/575] Remove temporary unconfigured static preview asset --- rebuild/deploy-assets/index.html | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 rebuild/deploy-assets/index.html diff --git a/rebuild/deploy-assets/index.html b/rebuild/deploy-assets/index.html deleted file mode 100644 index f08c30d..0000000 --- a/rebuild/deploy-assets/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - -ScreenNote — Show what you mean - - -
- \ No newline at end of file From 1f7f3a3e9d8c541f2b5f1b45d3a1cea9aefe3aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:26:19 +0200 Subject: [PATCH 019/575] Remove temporary unconfigured static preview asset --- rebuild/deploy-assets/loader.js | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 rebuild/deploy-assets/loader.js diff --git a/rebuild/deploy-assets/loader.js b/rebuild/deploy-assets/loader.js deleted file mode 100644 index 920392c..0000000 --- a/rebuild/deploy-assets/loader.js +++ /dev/null @@ -1,17 +0,0 @@ -(async () => { - const paths = ["/assets/bundle-00.gz", "/assets/bundle-01.gz", "/assets/bundle-02.gz", "/assets/bundle-03.gz", "/assets/bundle-04.gz", "/assets/bundle-05.gz", "/assets/bundle-06.gz", "/assets/bundle-07.gz", "/assets/bundle-08.gz", "/assets/bundle-09.gz"]; - const parts = await Promise.all(paths.map(async (path) => new Uint8Array(await (await fetch(path, { cache: "force-cache" })).arrayBuffer()))); - const total = parts.reduce((sum, part) => sum + part.length, 0); - const compressed = new Uint8Array(total); - let offset = 0; - for (const part of parts) { compressed.set(part, offset); offset += part.length; } - const stream = new Blob([compressed]).stream().pipeThrough(new DecompressionStream("gzip")); - const code = await new Response(stream).text(); - const script = document.createElement("script"); - script.text = code; - document.head.appendChild(script); -})().catch((error) => { - const root = document.getElementById("root"); - if (root) root.textContent = "ScreenNote could not load. Please refresh or try another browser."; - console.error("ScreenNote asset loader failed", error); -}); \ No newline at end of file From b70cd5bc3f577923301cc2c1416962f19f25855e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:26:21 +0200 Subject: [PATCH 020/575] Remove temporary unconfigured static preview asset --- rebuild/deploy-assets/assets/style.css | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 rebuild/deploy-assets/assets/style.css diff --git a/rebuild/deploy-assets/assets/style.css b/rebuild/deploy-assets/assets/style.css deleted file mode 100644 index 63a300f..0000000 --- a/rebuild/deploy-assets/assets/style.css +++ /dev/null @@ -1,14 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap'); - -:root{font-family:"DM Sans",sans-serif;color:#202823;background:#f7f7f4;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;font-optical-sizing:auto;font-weight:400;--bg:#f7f7f4;--surface:#fff;--surface-2:#f0f1ec;--ink:#202823;--muted:#788078;--line:#e5e8e1;--green:#1d5945;--green-dark:#164735;--green-soft:#e8f0e9;--accent:#d9e8d7;--shadow:0 16px 45px rgba(32,48,38,.06)} -:root[data-theme="dark"]{color-scheme:dark;--bg:#141a17;--surface:#1c2420;--surface-2:#252e29;--ink:#edf2ed;--muted:#a3afa6;--line:#303b34;--green:#a4c9ae;--green-dark:#d1e7d4;--green-soft:#283d30;--accent:#30483a;--shadow:0 16px 45px rgba(0,0,0,.18)} -*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--bg);color:var(--ink)}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:248px;padding:27px 18px 18px;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:10px;padding:0 10px;font:800 21px Manrope,sans-serif;letter-spacing:-1.1px}.brand-mark{width:31px;height:31px;border-radius:10px;background:#183d32;color:#f7f7f4;display:grid;place-items:center}.brand-light{font-weight:500;color:var(--muted)}.workspace-label{margin:49px 10px 13px;font-size:10px;letter-spacing:1.4px;font-weight:700;color:var(--muted);display:flex;align-items:center;justify-content:space-between}.local-pill{font-size:9px;letter-spacing:.7px;border:1px solid var(--line);border-radius:20px;padding:4px 7px;color:var(--muted)}.local-pill span,.recording-indicator span{display:inline-block;width:6px;height:6px;border-radius:50%;background:#4e9b70;margin-right:5px}.side-nav{display:grid;gap:5px}.nav-item{display:flex;align-items:center;gap:11px;width:100%;border:0;background:transparent;color:var(--muted);padding:11px 12px;border-radius:9px;text-align:left;font-size:13px;font-weight:500}.nav-item:hover,.nav-item.active{background:var(--surface-2);color:var(--ink)}.nav-item.active{font-weight:700}.nav-count{margin-left:auto;font-size:11px}.sidebar-bottom{margin-top:auto;display:grid;gap:5px}.privacy-card{display:flex;gap:10px;background:var(--green-soft);color:var(--green);padding:13px;border-radius:11px;margin-bottom:12px}.privacy-card svg{flex:none;margin-top:1px}.privacy-card strong{font-size:11px}.privacy-card p{font-size:10px;line-height:1.5;margin:5px 0 0;opacity:.8}.profile-row{border-top:1px solid var(--line);margin-top:12px;padding:16px 4px 0;display:flex;align-items:center;gap:10px}.profile-row>div:nth-child(2){display:grid;gap:3px;flex:1}.profile-row strong{font-size:11px}.profile-row span{font-size:10px;color:var(--muted)}.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#dfe8dc;color:#355642;font-size:12px;font-weight:700;border:0}.avatar.small{width:29px;height:29px}.main-content{margin-left:248px;min-height:100vh}.topbar{height:67px;padding:0 48px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--bg)}.breadcrumb{font-size:12px;color:var(--muted)}.breadcrumb span{margin:0 8px;color:var(--line)}.top-actions{display:flex;align-items:center;gap:17px}.secure-label{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px}.icon-button{width:34px;height:34px;display:grid;place-items:center;border:1px solid transparent;background:transparent;color:var(--muted);border-radius:8px}.icon-button:hover{background:var(--surface-2);color:var(--ink)}.page-wrap{max-width:1250px;margin:0 auto;padding:44px 48px 24px}.welcome-row{display:flex;align-items:center;justify-content:space-between;gap:35px;margin-bottom:35px}.eyebrow{font-size:9px;letter-spacing:1.65px;font-weight:700;color:var(--green);margin-bottom:12px}.welcome-row h1{font:800 clamp(34px,4vw,49px)/1.08 Manrope,sans-serif;letter-spacing:-2.5px;margin:0}.welcome-row h1 span{color:var(--green)}.intro{font-size:14px;color:var(--muted);margin:14px 0 0;line-height:1.6;max-width:470px}.welcome-art{width:240px;flex:none;position:relative;padding:13px 10px 20px}.art-window{height:133px;border-radius:13px;border:1px solid #dce4d9;background:#fff;box-shadow:0 14px 35px rgba(42,68,48,.11);overflow:hidden;transform:rotate(2deg)}.art-bar{height:19px;background:#f2f4ef;display:flex;align-items:center;gap:4px;padding:0 8px}.art-bar i{width:5px;height:5px;border-radius:50%;background:#c3cec2}.art-screen{height:114px;display:flex;position:relative}.art-sidebar{width:30px;background:#edf2eb}.art-content{padding:13px 11px;display:grid;gap:6px;flex:1;align-content:start}.art-content div{height:9px;border-radius:4px;background:#e8eee6}.art-content div:first-child{width:55%;background:#cbdcca}.art-content div:nth-child(2){width:85%}.art-content div:nth-child(3){width:69%}.art-content div:nth-child(4){width:77%}.art-cursor{position:absolute;width:17px;height:22px;background:#244c3b;clip-path:polygon(0 0,100% 70%,59% 74%,77% 100%,62% 100%,45% 76%,23% 100%);left:135px;top:47px}.art-play{position:absolute;right:30px;bottom:37px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#1e5944;color:white;box-shadow:0 6px 18px #1e594455}.art-caption{position:absolute;bottom:0;right:5px;font-size:9px;color:var(--muted);letter-spacing:.3px}.capture-panel{border:1px solid var(--line);background:var(--surface);border-radius:14px;padding:21px 23px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:var(--shadow)}.capture-copy{display:flex;align-items:center;gap:14px;min-width:0}.capture-icon{width:43px;height:43px;flex:none;border-radius:12px;display:grid;place-items:center;background:var(--green-soft);color:var(--green)}.capture-copy h2{font:700 15px Manrope,sans-serif;margin:0 0 5px}.capture-copy p{font-size:11px;color:var(--muted);margin:0;line-height:1.5}.capture-actions,.record-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.toggle-option{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px;white-space:nowrap}.toggle-option input{accent-color:var(--green)}.button{border:1px solid var(--line);border-radius:8px;min-height:38px;padding:0 13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:11px;font-weight:700;white-space:nowrap;transition:transform .15s ease,background .15s ease,border-color .15s ease}.button:active{transform:translateY(1px)}.button:disabled{opacity:.55;cursor:wait}.button.primary{background:#1d5945;color:white;border-color:#1d5945}.button.primary:hover{background:#164735}.button.secondary{background:var(--surface);color:var(--ink)}.button.secondary:hover{background:var(--surface-2)}.button.danger{background:#a3423b;color:white;border-color:#a3423b}.record-dot{width:8px;height:8px;border-radius:50%;background:#fff;box-shadow:0 0 0 3px #ffffff35}.recording-indicator{font:700 11px ui-monospace,monospace;color:#b44c43;letter-spacing:.4px}.recording-indicator span{background:#c64e45;animation:pulse 1.2s infinite}.notice{margin-top:15px;border:1px solid #c8ddcb;background:var(--green-soft);color:var(--green);padding:11px 13px;border-radius:9px;font-size:11px;display:flex;align-items:center;gap:8px}.notice button{margin-left:auto;border:0;background:transparent;color:inherit;display:grid;place-items:center}.library-section{margin-top:43px}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:17px}.section-heading .eyebrow{margin-bottom:7px}.section-heading h2{font:700 20px Manrope,sans-serif;letter-spacing:-.6px;margin:0}.count-badge{font:600 10px "DM Sans",sans-serif;color:var(--muted);background:var(--surface-2);padding:4px 7px;border-radius:20px;vertical-align:middle;margin-left:5px}.library-tools{display:flex;align-items:center;gap:9px}.search-box{width:205px;height:36px;display:flex;align-items:center;gap:7px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--muted)}.search-box input{border:0;outline:0;background:transparent;color:var(--ink);width:100%;min-width:0;font-size:11px}.search-box input::placeholder{color:var(--muted)}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.clip-card{border:1px solid var(--line);border-radius:11px;overflow:hidden;background:var(--surface);min-width:0;transition:transform .2s ease,box-shadow .2s ease}.clip-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.clip-thumb{height:145px;position:relative;display:grid;place-items:center;background:linear-gradient(140deg,#e9eee7,#dce6dc 60%,#d1dfd3);overflow:hidden}.thumb-lines{width:60%;display:grid;gap:7px}.thumb-lines span{height:9px;border-radius:4px;background:#c0d1c1}.thumb-lines span:first-child{width:60%;height:13px;background:#9db99f}.thumb-lines span:nth-child(2){width:90%}.thumb-lines span:nth-child(3){width:72%}.thumb-play{position:absolute;inset:0;margin:auto;width:39px;height:39px;border:1px solid #ffffffaa;border-radius:50%;display:grid;place-items:center;background:#fff;color:#214b37;box-shadow:0 5px 20px #203d2a25}.duration{position:absolute;right:9px;bottom:8px;padding:4px 6px;border-radius:4px;background:#18251fbb;color:white;font-size:9px}.clip-info{padding:12px;display:flex;align-items:center;justify-content:space-between;gap:7px;min-width:0}.clip-info>div{min-width:0}.clip-info h3{font-size:11px;font-weight:700;margin:0 0 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clip-info p{font-size:9px;color:var(--muted);margin:0;display:flex;align-items:center;gap:5px}.clip-info .icon-button{flex:none}.empty-state{min-height:260px;border:1px dashed #cfd8ce;border-radius:13px;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px 18px}.empty-icon{width:51px;height:51px;border-radius:15px;background:var(--green-soft);color:var(--green);display:grid;place-items:center;margin-bottom:14px}.empty-state h3{font:700 15px Manrope,sans-serif;margin:0 0 7px}.empty-state p{font-size:11px;line-height:1.6;color:var(--muted);max-width:390px;margin:0}.empty-actions{display:flex;gap:8px;margin-top:18px;flex-wrap:wrap;justify-content:center}.bottom-note{margin-top:31px;padding:15px 17px;display:flex;align-items:center;gap:12px;background:var(--surface-2);border-radius:10px}.note-icon{width:31px;height:31px;border-radius:9px;background:var(--surface);color:var(--green);display:grid;place-items:center;flex:none}.bottom-note>div:nth-child(2){min-width:0;flex:1}.bottom-note strong{font-size:11px}.bottom-note p{font-size:10px;color:var(--muted);line-height:1.5;margin:4px 0 0}.build-label{font-size:8px;letter-spacing:.8px;color:var(--muted);display:flex;align-items:center;gap:5px;white-space:nowrap}footer{display:flex;gap:18px;justify-content:flex-end;padding:24px 2px 5px;color:var(--muted);font-size:9px}footer span:first-child{margin-right:auto}.record-controls{justify-content:flex-end}.capture-panel:has(.record-controls){border-color:#e5c7c3}.local-pill{display:inline-flex;align-items:center}.local-pill span{background:#5d9c70} -@keyframes pulse{50%{box-shadow:0 0 0 5px #c64e4522;opacity:.55}} -@media(max-width:1100px){.sidebar{width:215px}.main-content{margin-left:215px}.page-wrap{padding:35px 30px 22px}.topbar{padding:0 30px}.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.capture-panel{align-items:flex-start;flex-direction:column}.capture-actions,.record-controls{width:100%;justify-content:flex-start}} -@media(max-width:760px){.sidebar{position:relative;width:auto;height:auto;inset:auto;padding:15px 18px;border-right:0;border-bottom:1px solid var(--line)}.brand{font-size:19px}.workspace-label,.side-nav,.sidebar-bottom{display:none}.main-content{margin-left:0}.topbar{height:49px;padding:0 18px}.secure-label{display:none}.page-wrap{padding:28px 18px 20px}.welcome-row{margin-bottom:25px}.welcome-art{width:160px;transform:scale(.86);transform-origin:right center;margin-left:-20px}.welcome-row h1{font-size:36px;letter-spacing:-1.8px}.intro{font-size:12px}.capture-panel{padding:17px}.capture-actions{gap:10px}.capture-actions .button{margin-left:auto}.section-heading{align-items:flex-start;flex-direction:column}.library-tools{width:100%}.search-box{flex:1;width:auto}.clip-grid{gap:10px}.clip-thumb{height:120px}.bottom-note{align-items:flex-start}.build-label{display:none}} -@media(max-width:480px){.page-wrap{padding:23px 14px 16px}.welcome-row{gap:0}.welcome-art{width:112px;margin-left:-28px;transform:scale(.76)}.welcome-row h1{font-size:31px;letter-spacing:-1.5px}.intro{max-width:245px;font-size:11px}.capture-copy{align-items:flex-start}.capture-copy p{max-width:240px}.capture-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.capture-actions .button{grid-column:1/-1;margin:2px 0 0;width:100%}.record-controls{display:grid;grid-template-columns:1fr 1fr;width:100%}.recording-indicator{grid-column:1/-1}.record-controls .button{width:100%}.clip-grid{grid-template-columns:1fr 1fr;gap:9px}.clip-thumb{height:100px}.clip-info{padding:9px}.clip-info h3{font-size:10px}.clip-info p{font-size:8px;flex-wrap:wrap}.clip-info .icon-button{width:27px;height:27px}.import-button{padding:0 10px}.bottom-note{padding:12px}.bottom-note p{font-size:9px}footer{gap:12px;font-size:8px}.top-actions{gap:8px}} -@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} - -.recovery-notice{justify-content:space-between;gap:14px;align-items:center;margin-top:14px;flex-wrap:wrap}.recovery-copy{display:grid;gap:3px;min-width:0}.recovery-copy strong{font-size:11px}.recovery-copy span{font-size:10px;opacity:.82;overflow-wrap:anywhere}.recovery-actions{display:flex;gap:7px;flex-wrap:wrap}.recovery-actions .button{min-height:32px;padding:0 10px} - -.modal-backdrop{position:fixed;inset:0;z-index:20;background:rgba(12,20,15,.68);backdrop-filter:blur(7px);display:grid;place-items:center;padding:22px}.preview-modal{width:min(920px,100%);max-height:min(90vh,820px);overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:15px;box-shadow:0 24px 80px rgba(0,0,0,.28);padding:17px}.preview-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:2px 1px 14px}.preview-header h2{font:700 15px Manrope,sans-serif;margin:0 0 5px;overflow-wrap:anywhere}.preview-header p{font-size:10px;color:var(--muted);margin:0}.preview-video{display:block;width:100%;max-height:68vh;aspect-ratio:16/9;object-fit:contain;background:#080b09;border-radius:9px}.preview-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:13px}@media(max-width:480px){.modal-backdrop{padding:10px}.preview-modal{padding:12px;border-radius:12px}.preview-video{max-height:60vh}.preview-actions .button{flex:1}} From 42ffa7c42e2bf2809184df43f475ba103ef4efdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:26:24 +0200 Subject: [PATCH 021/575] Remove temporary unconfigured static preview asset --- rebuild/deploy-assets/icon.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 rebuild/deploy-assets/icon.svg diff --git a/rebuild/deploy-assets/icon.svg b/rebuild/deploy-assets/icon.svg deleted file mode 100644 index cfa08bf..0000000 --- a/rebuild/deploy-assets/icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 13234165bd48d21d63e073d9242e110fbca3ddd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:26:26 +0200 Subject: [PATCH 022/575] Remove temporary unconfigured static preview asset --- rebuild/deploy-assets/manifest.webmanifest | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 rebuild/deploy-assets/manifest.webmanifest diff --git a/rebuild/deploy-assets/manifest.webmanifest b/rebuild/deploy-assets/manifest.webmanifest deleted file mode 100644 index e5cc303..0000000 --- a/rebuild/deploy-assets/manifest.webmanifest +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "ScreenNote", - "short_name": "ScreenNote", - "description": "Clear screen recordings, thoughtful conversations.", - "start_url": "/", - "scope": "/", - "display": "standalone", - "background_color": "#f7f7f4", - "theme_color": "#f7f7f4", - "icons": [{ "src": "/icon.svg", "sizes": "any", "type": "image/svg+xml", "purpose": "any maskable" }] -} \ No newline at end of file From cb27242071b2f1ee95f900389ec620e9a7e6d525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:26:28 +0200 Subject: [PATCH 023/575] Remove temporary unconfigured static preview asset --- rebuild/deploy-assets/sw.js | 45 ------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 rebuild/deploy-assets/sw.js diff --git a/rebuild/deploy-assets/sw.js b/rebuild/deploy-assets/sw.js deleted file mode 100644 index a651b41..0000000 --- a/rebuild/deploy-assets/sw.js +++ /dev/null @@ -1,45 +0,0 @@ -const CACHE_NAME = "screennote-shell-v1"; -const APP_SHELL = ["/", "/manifest.webmanifest", "/icon.svg"]; - -self.addEventListener("install", (event) => { - event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL)).then(() => self.skipWaiting())); -}); - -self.addEventListener("activate", (event) => { - event.waitUntil( - caches.keys() - .then((keys) => Promise.all(keys.filter((key) => key.startsWith("screennote-shell-") && key !== CACHE_NAME).map((key) => caches.delete(key)))) - .then(() => self.clients.claim()) - ); -}); - -self.addEventListener("fetch", (event) => { - const request = event.request; - const url = new URL(request.url); - if (request.method !== "GET" || url.origin !== self.location.origin || url.pathname.startsWith("/api/") || request.headers.has("range")) return; - - if (request.mode === "navigate") { - event.respondWith( - fetch(request).then((response) => { - if (response.ok) { - const copy = response.clone(); - event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.put("/", copy))); - } - return response; - }).catch(async () => (await caches.match("/")) || (await caches.match("/index.html")) || new Response("ScreenNote is offline. Reconnect and try again.", { status: 503, headers: { "content-type": "text/plain; charset=utf-8" } })) - ); - return; - } - - if (url.pathname.startsWith("/assets/") || APP_SHELL.includes(url.pathname)) { - event.respondWith( - (async () => { - const cached = await caches.match(request); - if (cached) return cached; - const response = await fetch(request); - if (response.ok) await caches.open(CACHE_NAME).then((cache) => cache.put(request, response.clone())); - return response; - })() - ); - } -}); \ No newline at end of file From 73ba09d7a8426cdf7c7a301f1102c41487089388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:27:04 +0200 Subject: [PATCH 024/575] Add optional camera bubble composition and mixed audio capture --- rebuild/README.md | 1 + rebuild/src/main.tsx | 7 +-- rebuild/src/recorder.ts | 117 +++++++++++++++++++++++++++++++++++++--- 3 files changed, 116 insertions(+), 9 deletions(-) diff --git a/rebuild/README.md b/rebuild/README.md index efe8da5..9ec3f4f 100644 --- a/rebuild/README.md +++ b/rebuild/README.md @@ -15,6 +15,7 @@ This is the new Cloudflare-first implementation. The legacy application remains - Responsive React application shell with light and dark themes. - Screen capture using the browser's native source picker. - Optional microphone and system audio when the browser exposes them. +- Optional circular camera bubble composited into the recorded screen video, with mixed microphone/system audio. - Pause, resume and finish controls. - Local IndexedDB library and MP4/WebM/MOV import. - Chunk-by-chunk recording persistence with interrupted-session recovery. diff --git a/rebuild/src/main.tsx b/rebuild/src/main.tsx index 5fad323..3f16ea6 100644 --- a/rebuild/src/main.tsx +++ b/rebuild/src/main.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useMemo, useRef, useState } from "react"; import { createRoot } from "react-dom/client"; -import { Activity, ArrowDownToLine, ArrowUpRight, Check, ChevronDown, CircleHelp, Download, Clapperboard, Clock3, FileVideo2, FolderOpen, LayoutGrid, Mic, Moon, MoreHorizontal, Pause, Play, Plus, Search, Settings2, Share2, ShieldCheck, Sparkles, Sun, Trash2, Video, X } from "lucide-react"; +import { Activity, ArrowDownToLine, ArrowUpRight, Check, ChevronDown, CircleHelp, Download, Camera, Clapperboard, Clock3, FileVideo2, FolderOpen, LayoutGrid, Mic, Moon, MoreHorizontal, Pause, Play, Plus, Search, Settings2, Share2, ShieldCheck, Sparkles, Sun, Trash2, Video, X } from "lucide-react"; import { appendRecordingChunk, beginRecordingSession, deleteClip, deleteRecordingSession, finalizeRecordingSession, getClip, listClips, listRecoverableSessions, restoreRecordingSession, saveClip, type Clip, type RecoverySession } from "./library"; import { ScreenRecorder, supportedMimeType, type RecordingResult } from "./recorder"; import "./styles.css"; @@ -22,6 +22,7 @@ function App() { const [paused, setPaused] = useState(false); const [seconds, setSeconds] = useState(0); const [mic, setMic] = useState(true); + const [camera, setCamera] = useState(false); const [systemAudio, setSystemAudio] = useState(true); const [busy, setBusy] = useState(false); const [message, setMessage] = useState(""); @@ -57,7 +58,7 @@ function App() { await beginRecordingSession({ id, title, createdAt, mimeType: supportedMimeType() || "video/webm", chunkCount: 0, totalBytes: 0, updatedAt: createdAt }); activeSessionId.current = id; await recorder.start( - { microphone: mic, systemAudio }, + { microphone: mic, systemAudio, camera }, setSeconds, (chunk, index) => appendRecordingChunk(id, chunk, index) ); @@ -204,7 +205,7 @@ function App() {

{recording ? "You're recording" : "Start with a recording"}

{recording ? "Take your time. Your recording is being captured in this tab." : "Record your screen or bring in a video you already have."}

- {recording ?
{formatTime(seconds)} {paused ? "PAUSED" : "RECORDING"}
:
} + {recording ?
{formatTime(seconds)} {paused ? "PAUSED" : "RECORDING"}
:
}
{message &&
{message}
} diff --git a/rebuild/src/recorder.ts b/rebuild/src/recorder.ts index ac93b7f..39f7276 100644 --- a/rebuild/src/recorder.ts +++ b/rebuild/src/recorder.ts @@ -1,4 +1,4 @@ -export type CaptureOptions = { microphone: boolean; systemAudio: boolean }; +export type CaptureOptions = { microphone: boolean; systemAudio: boolean; camera: boolean }; export type RecordingResult = { blob: Blob; duration: number; mimeType: string }; export type ChunkWriter = (blob: Blob, index: number) => Promise; @@ -16,6 +16,10 @@ export function supportedMimeType(): string { export class ScreenRecorder { private recorder?: MediaRecorder; private stream?: MediaStream; + private sourceStreams: MediaStream[] = []; + private audioContext?: AudioContext; + private cleanupVideo?: () => void; + private frameId = 0; private chunks: Blob[] = []; private pendingWrites: Promise[] = []; private chunkIndex = 0; @@ -36,12 +40,105 @@ export class ScreenRecorder { audio: options.systemAudio }); let microphone: MediaStream | undefined; + let camera: MediaStream | undefined; + let composite: MediaStream | undefined; + let audioContext: AudioContext | undefined; + let cleanupVideo: (() => void) | undefined; + try { if (options.microphone) { microphone = await navigator.mediaDevices.getUserMedia({ audio: { echoCancellation: true, noiseSuppression: true } }); } - const tracks = [...display.getVideoTracks(), ...display.getAudioTracks(), ...(microphone?.getAudioTracks() ?? [])]; - this.stream = new MediaStream(tracks); + if (options.camera) { + camera = await navigator.mediaDevices.getUserMedia({ video: { width: { ideal: 1280 }, height: { ideal: 720 }, facingMode: "user" }, audio: false }); + } + + const displayTrack = display.getVideoTracks()[0]; + if (!displayTrack) throw new Error("The selected screen did not provide a video track."); + let videoTrack: MediaStreamTrack = displayTrack; + + if (camera) { + const canvas = document.createElement("canvas"); + const settings = displayTrack.getSettings(); + canvas.width = Math.max(640, Math.min(3840, settings.width ?? 1280)); + canvas.height = Math.max(360, Math.min(2160, settings.height ?? 720)); + const context = canvas.getContext("2d"); + if (!context || typeof canvas.captureStream !== "function") { + throw new Error("Camera overlay recording is not supported in this browser."); + } + + const screenVideo = document.createElement("video"); + screenVideo.muted = true; + screenVideo.playsInline = true; + screenVideo.srcObject = display; + const cameraVideo = document.createElement("video"); + cameraVideo.muted = true; + cameraVideo.playsInline = true; + cameraVideo.srcObject = camera; + await Promise.all([screenVideo.play(), cameraVideo.play()]); + + const draw = () => { + if (screenVideo.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA) { + context.drawImage(screenVideo, 0, 0, canvas.width, canvas.height); + } else { + context.fillStyle = "#111"; + context.fillRect(0, 0, canvas.width, canvas.height); + } + if (cameraVideo.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && cameraVideo.videoWidth && cameraVideo.videoHeight) { + const size = Math.round(Math.min(canvas.width, canvas.height) * 0.27); + const margin = Math.round(Math.min(canvas.width, canvas.height) * 0.045); + const x = canvas.width - size - margin; + const y = canvas.height - size - margin; + const crop = Math.min(cameraVideo.videoWidth, cameraVideo.videoHeight); + const sx = (cameraVideo.videoWidth - crop) / 2; + const sy = (cameraVideo.videoHeight - crop) / 2; + context.save(); + context.shadowColor = "rgba(0,0,0,.28)"; + context.shadowBlur = size * 0.08; + context.beginPath(); + context.arc(x + size / 2, y + size / 2, size / 2, 0, Math.PI * 2); + context.clip(); + context.drawImage(cameraVideo, sx, sy, crop, crop, x, y, size, size); + context.restore(); + context.beginPath(); + context.arc(x + size / 2, y + size / 2, size / 2, 0, Math.PI * 2); + context.lineWidth = Math.max(3, canvas.width * 0.004); + context.strokeStyle = "rgba(255,255,255,.94)"; + context.stroke(); + } + this.frameId = requestAnimationFrame(draw); + }; + draw(); + composite = canvas.captureStream(30); + videoTrack = composite.getVideoTracks()[0]; + cleanupVideo = () => { + cancelAnimationFrame(this.frameId); + screenVideo.pause(); + screenVideo.srcObject = null; + cameraVideo.pause(); + cameraVideo.srcObject = null; + }; + } + + const audioTracks = [...display.getAudioTracks(), ...(microphone?.getAudioTracks() ?? [])]; + let audioTrack: MediaStreamTrack | undefined; + if (audioTracks.length === 1) { + audioTrack = audioTracks[0]; + } else if (audioTracks.length > 1) { + if (!window.AudioContext) throw new Error("Mixing microphone and system audio is not supported in this browser."); + audioContext = new AudioContext(); + await audioContext.resume(); + const destination = audioContext.createMediaStreamDestination(); + for (const track of audioTracks) { + audioContext.createMediaStreamSource(new MediaStream([track])).connect(destination); + } + audioTrack = destination.stream.getAudioTracks()[0]; + } + + this.stream = new MediaStream([videoTrack, ...(audioTrack ? [audioTrack] : [])]); + this.sourceStreams = [display, ...(microphone ? [microphone] : []), ...(camera ? [camera] : []), ...(composite ? [composite] : [])]; + this.audioContext = audioContext; + this.cleanupVideo = cleanupVideo; const mimeType = supportedMimeType(); this.recorder = new MediaRecorder(this.stream, mimeType ? { mimeType } : undefined); this.chunks = []; @@ -64,7 +161,7 @@ export class ScreenRecorder { if (this.recorder.state === "recording") onTick(Math.max(0, Math.floor((Date.now() - this.startedAt - this.pausedDuration) / 1000))); }, 500); this.recorder.addEventListener("stop", () => window.clearInterval(timer), { once: true }); - display.getVideoTracks()[0]?.addEventListener("ended", () => { + displayTrack.addEventListener("ended", () => { if (this.recorder?.state !== "inactive") { this.stop().then((result) => { window.dispatchEvent(new CustomEvent("screennote:recording-finished", { detail: result })); @@ -72,8 +169,10 @@ export class ScreenRecorder { } }, { once: true }); } catch (error) { - display.getTracks().forEach((track) => track.stop()); - microphone?.getTracks().forEach((track) => track.stop()); + cleanupVideo?.(); + this.sourceStreams = [display, ...(microphone ? [microphone] : []), ...(camera ? [camera] : []), ...(composite ? [composite] : [])]; + this.sourceStreams.forEach((source) => source.getTracks().forEach((track) => track.stop())); + await audioContext?.close().catch(() => undefined); throw error; } } @@ -105,7 +204,13 @@ export class ScreenRecorder { const activePause = wasPaused ? Date.now() - pausedAt : 0; const duration = Math.max(0, Math.floor((Date.now() - this.startedAt - this.pausedDuration - activePause) / 1000)); this.stream?.getTracks().forEach((track) => track.stop()); + this.sourceStreams.forEach((source) => source.getTracks().forEach((track) => track.stop())); + this.cleanupVideo?.(); + await this.audioContext?.close().catch(() => undefined); this.stream = undefined; + this.sourceStreams = []; + this.audioContext = undefined; + this.cleanupVideo = undefined; this.recorder = undefined; this.chunks = []; this.pendingWrites = []; From bac03821cd5ca0dffeb2286074d25d858a3f51cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:27:50 +0200 Subject: [PATCH 025/575] Add responsive browser acceptance tests and visual evidence --- .github/workflows/screennote-rebuild.yml | 7 +++ rebuild/e2e/visual.spec.ts | 61 ++++++++++++++++++++++++ rebuild/package.json | 11 +++-- rebuild/playwright.config.ts | 23 +++++++++ rebuild/tsconfig.json | 22 +++++++-- 5 files changed, 117 insertions(+), 7 deletions(-) create mode 100644 rebuild/e2e/visual.spec.ts create mode 100644 rebuild/playwright.config.ts diff --git a/.github/workflows/screennote-rebuild.yml b/.github/workflows/screennote-rebuild.yml index 58fcc04..089f7e6 100644 --- a/.github/workflows/screennote-rebuild.yml +++ b/.github/workflows/screennote-rebuild.yml @@ -33,14 +33,21 @@ jobs: with: node-version: 24 - run: npm install --no-audit --no-fund + - run: npx playwright install --with-deps chromium - run: npm run typecheck - run: npm test - run: npm run build + - run: npm run e2e - uses: actions/upload-artifact@v4 with: name: screennote-build-output path: rebuild/.cloudflare/output/v1/** if-no-files-found: error + - uses: actions/upload-artifact@v4 + with: + name: screennote-visual-evidence + path: rebuild/test-results/screenshots/** + if-no-files-found: error - name: Deploy isolated Cloudflare development Worker if: ${{ env.CLOUDFLARE_API_TOKEN != '' }} run: npm run deploy diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts new file mode 100644 index 0000000..1bbce93 --- /dev/null +++ b/rebuild/e2e/visual.spec.ts @@ -0,0 +1,61 @@ +import { expect, test } from "@playwright/test"; + +const viewports = [ + { width: 320, height: 780, name: "320-mobile" }, + { width: 375, height: 812, name: "375-mobile" }, + { width: 768, height: 1024, name: "768-tablet" }, + { width: 1120, height: 900, name: "1120-laptop" }, + { width: 1440, height: 960, name: "1440-desktop" } +]; + +async function expectContained(page: import("@playwright/test").Page, width: number) { + const metrics = await page.evaluate(() => ({ + viewport: window.innerWidth, + document: document.documentElement.scrollWidth, + body: document.body.scrollWidth + })); + expect(metrics.document, `document overflow at ${width}px: ${JSON.stringify(metrics)}`).toBeLessThanOrEqual(width + 1); + expect(metrics.body, `body overflow at ${width}px: ${JSON.stringify(metrics)}`).toBeLessThanOrEqual(width + 1); +} + +test("light and dark layouts remain contained from 320px through desktop", async ({ page }) => { + for (const viewport of viewports) { + await page.setViewportSize({ width: viewport.width, height: viewport.height }); + await page.goto("/"); + await expect(page.getByRole("heading", { level: 1 })).toBeVisible(); + await expectContained(page, viewport.width); + await page.screenshot({ path: `test-results/screenshots/${viewport.name}-light.png`, fullPage: true }); + + await page.getByRole("button", { name: "Toggle appearance" }).click(); + await expect(page.locator("html")).toHaveAttribute("data-theme", "dark"); + await expectContained(page, viewport.width); + await page.screenshot({ path: `test-results/screenshots/${viewport.name}-dark.png`, fullPage: true }); + } +}); + +test("imported videos can be previewed and dismissed with Escape", async ({ page }) => { + await page.goto("/"); + await page.locator('input[type="file"]').setInputFiles({ + name: "walkthrough.webm", + mimeType: "video/webm", + buffer: Buffer.from("screen-note-test-video") + }); + await expect(page.getByRole("heading", { name: "walkthrough" })).toBeVisible(); + await page.getByRole("button", { name: "Play walkthrough" }).click(); + await expect(page.getByRole("dialog")).toBeVisible(); + await expect(page.getByRole("heading", { name: "walkthrough" })).toBeVisible(); + await page.keyboard.press("Escape"); + await expect(page.getByRole("dialog")).toHaveCount(0); +}); + +test("recording search reports an empty result clearly", async ({ page }) => { + await page.goto("/"); + await page.locator('input[type="file"]').setInputFiles({ + name: "release-notes.webm", + mimeType: "video/webm", + buffer: Buffer.from("test-video") + }); + await expect(page.getByRole("heading", { name: "release-notes" })).toBeVisible(); + await page.getByRole("textbox", { name: "Search recordings" }).fill("nothing-matches-this"); + await expect(page.getByRole("heading", { name: "No matching recordings" })).toBeVisible(); +}); \ No newline at end of file diff --git a/rebuild/package.json b/rebuild/package.json index 9d12e2d..ccb7f82 100644 --- a/rebuild/package.json +++ b/rebuild/package.json @@ -4,11 +4,12 @@ "version": "1.0.0", "type": "module", "scripts": { - "dev": "cf dev", + "dev": "vite --host 0.0.0.0", "build": "cf build", "typecheck": "tsc --noEmit", - "test": "vitest run", - "deploy": "cf deploy" + "test": "vitest run tests/**/*.test.ts", + "deploy": "cf deploy", + "e2e": "playwright test" }, "dependencies": { "lucide-react": "^0.468.0", @@ -25,6 +26,8 @@ "typescript": "^5.9.0", "vite": "^7.1.0", "vitest": "^3.2.0", - "fake-indexeddb": "^6.2.0" + "fake-indexeddb": "^6.2.0", + "@playwright/test": "^1.56.0", + "@types/node": "^24.0.0" } } \ No newline at end of file diff --git a/rebuild/playwright.config.ts b/rebuild/playwright.config.ts new file mode 100644 index 0000000..7c54eb5 --- /dev/null +++ b/rebuild/playwright.config.ts @@ -0,0 +1,23 @@ +import { defineConfig } from "@playwright/test"; + +export default defineConfig({ + testDir: "./e2e", + fullyParallel: true, + reporter: [["list"]], + timeout: 45_000, + expect: { timeout: 8_000 }, + use: { + baseURL: "http://127.0.0.1:4173", + browserName: "chromium", + headless: true, + viewport: { width: 1440, height: 900 }, + screenshot: "only-on-failure" + }, + webServer: { + command: "npm run dev -- --port 4173", + url: "http://127.0.0.1:4173", + reuseExistingServer: !process.env.CI, + timeout: 120_000 + }, + outputDir: "test-results" +}); \ No newline at end of file diff --git a/rebuild/tsconfig.json b/rebuild/tsconfig.json index 34f9b4f..a67f4bf 100644 --- a/rebuild/tsconfig.json +++ b/rebuild/tsconfig.json @@ -2,7 +2,11 @@ "compilerOptions": { "target": "ES2022", "useDefineForClassFields": true, - "lib": ["ES2022", "DOM", "DOM.Iterable"], + "lib": [ + "ES2022", + "DOM", + "DOM.Iterable" + ], "module": "ESNext", "skipLibCheck": true, "moduleResolution": "Bundler", @@ -14,7 +18,19 @@ "strict": true, "noUnusedLocals": false, "noUnusedParameters": false, - "types": ["vite/client", "@cloudflare/workers-types"] + "types": [ + "vite/client", + "@cloudflare/workers-types" + ] }, - "include": ["src", "worker", "cloudflare.config.ts", "vite.config.ts", ".cloudflare/types"] + "include": [ + "src", + "worker", + "tests", + "e2e", + "cloudflare.config.ts", + "vite.config.ts", + "playwright.config.ts", + ".cloudflare/types" + ] } \ No newline at end of file From 034de0a8627104abaebdf11ebdb5defcfbf0a65f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:28:54 +0200 Subject: [PATCH 026/575] Scope Vitest to unit test directory --- rebuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/package.json b/rebuild/package.json index ccb7f82..7b0da15 100644 --- a/rebuild/package.json +++ b/rebuild/package.json @@ -7,7 +7,7 @@ "dev": "vite --host 0.0.0.0", "build": "cf build", "typecheck": "tsc --noEmit", - "test": "vitest run tests/**/*.test.ts", + "test": "vitest run tests", "deploy": "cf deploy", "e2e": "playwright test" }, From bb81d3660a602f9da481976eca20722eacabe734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:29:13 +0200 Subject: [PATCH 027/575] Define native desktop companion capture architecture --- rebuild/README.md | 4 ++++ rebuild/desktop/README.md | 41 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 rebuild/desktop/README.md diff --git a/rebuild/README.md b/rebuild/README.md index 9ec3f4f..cf04268 100644 --- a/rebuild/README.md +++ b/rebuild/README.md @@ -54,6 +54,10 @@ Deploy only to the dedicated development Worker after the D1 migration is applie npm run deploy ``` +## Desktop companion direction + +The desktop application will reuse the web UI through a proposed Tauri 2 shell and platform-native capture adapters. See `desktop/README.md` for the OS-specific capture architecture and release gates. The desktop client is not implemented in this web-first slice. + ## Next engineering gates 1. Apply and verify the D1 migration in the development database. diff --git a/rebuild/desktop/README.md b/rebuild/desktop/README.md new file mode 100644 index 0000000..ea73796 --- /dev/null +++ b/rebuild/desktop/README.md @@ -0,0 +1,41 @@ +# ScreenNote desktop companion — architecture + +## Product decision + +The web application ships first. A desktop companion is part of the product architecture, not a second product or a separate backend. + +The desktop client should reuse the React interface and ScreenNote API, while replacing browser capture with native capture adapters where the operating system offers capabilities the browser cannot reliably provide. + +## Proposed shell + +- Tauri 2 for a small native application shell. +- Reuse the web UI from `../src` and the same design system. +- Rust commands expose native capture, file access, OS permissions and secure local storage. +- Keep the capture engine behind a platform-neutral interface so the UI does not depend on Windows/macOS/Linux implementation details. + +## Capture adapters + +| Platform | Screen capture | System audio | +|---|---|---| +| Windows | Windows Graphics Capture | WASAPI loopback | +| macOS | ScreenCaptureKit | CoreAudio / ScreenCaptureKit audio | +| Linux | xdg-desktop-portal + PipeWire | PipeWire | + +Camera and microphone capture should use OS permission-aware native APIs or the browser media layer where reliable. The desktop client must never silently start capture. + +## Shared product services + +- Reuse the guest/session and recording metadata API. +- Reuse private R2 media storage and the same upload authorization rules. +- Keep local recordings available if the user declines cloud upload. +- Share links, playback, comments and AI processing remain server-side product capabilities, not desktop-only features. + +## Desktop release gates + +1. Web recording, local recovery and cloud upload are stable. +2. Native capture proof-of-concept passes on each target OS. +3. Permission prompts, system audio routing and device changes are tested. +4. Long recordings survive app crashes and OS sleep/resume. +5. Signed installers, auto-update and crash reporting are ready. + +Initial desktop target order: Windows, macOS, then Linux. This is a proposed implementation direction; platform prototypes must validate capture and audio quality before a release commitment. \ No newline at end of file From 489e4030472539a6ad80a429b52f1ac50e0d131b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:30:11 +0200 Subject: [PATCH 028/575] Fix preview test selector and always retain visual evidence --- .github/workflows/screennote-rebuild.yml | 3 ++- rebuild/e2e/visual.spec.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/screennote-rebuild.yml b/.github/workflows/screennote-rebuild.yml index 089f7e6..a27d038 100644 --- a/.github/workflows/screennote-rebuild.yml +++ b/.github/workflows/screennote-rebuild.yml @@ -44,10 +44,11 @@ jobs: path: rebuild/.cloudflare/output/v1/** if-no-files-found: error - uses: actions/upload-artifact@v4 + if: always() with: name: screennote-visual-evidence path: rebuild/test-results/screenshots/** - if-no-files-found: error + if-no-files-found: warn - name: Deploy isolated Cloudflare development Worker if: ${{ env.CLOUDFLARE_API_TOKEN != '' }} run: npm run deploy diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 1bbce93..865e225 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -43,7 +43,7 @@ test("imported videos can be previewed and dismissed with Escape", async ({ page await expect(page.getByRole("heading", { name: "walkthrough" })).toBeVisible(); await page.getByRole("button", { name: "Play walkthrough" }).click(); await expect(page.getByRole("dialog")).toBeVisible(); - await expect(page.getByRole("heading", { name: "walkthrough" })).toBeVisible(); + await expect(page.getByRole("dialog").getByRole("heading", { name: "walkthrough" })).toBeVisible(); await page.keyboard.press("Escape"); await expect(page.getByRole("dialog")).toHaveCount(0); }); From 69b34f5d19dfac2c5d103400d52218c6abe9f93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:30:33 +0200 Subject: [PATCH 029/575] Allow manual Cloudflare development deployment workflow runs --- .github/workflows/screennote-rebuild.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/screennote-rebuild.yml b/.github/workflows/screennote-rebuild.yml index a27d038..e850f61 100644 --- a/.github/workflows/screennote-rebuild.yml +++ b/.github/workflows/screennote-rebuild.yml @@ -1,6 +1,7 @@ name: ScreenNote Cloudflare rebuild on: + workflow_dispatch: push: branches: - rebuild/cloudflare-web-first From 9ba2613f4b2e5dbb30beb9d3fe03d717c1996b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:30:44 +0200 Subject: [PATCH 030/575] Document Cloudflare CI deployment credentials --- rebuild/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rebuild/README.md b/rebuild/README.md index cf04268..d323625 100644 --- a/rebuild/README.md +++ b/rebuild/README.md @@ -48,6 +48,8 @@ npm test npm run build ``` +For GitHub Actions deployment, add a repository Actions secret named `CLOUDFLARE_API_TOKEN` with scoped Workers Scripts, D1 and R2 edit permissions. Then run the **ScreenNote Cloudflare rebuild** workflow manually on this branch. The target development URL is `https://screennote-dev.buttercoder-dev.workers.dev` once deployment succeeds. + Deploy only to the dedicated development Worker after the D1 migration is applied: ```bash From bf15796d26300d28ec4a5c384337c31a7e9eb1a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:38:56 +0200 Subject: [PATCH 031/575] Build temporary share links, protected playback and timestamped discussions --- rebuild/tests/README.md | 4 +- rebuild/tests/worker.test.ts | 214 +++++----- rebuild/worker/index.ts | 375 ++++++++++++------ .../migrations/0002_temporary_sharing.sql | 34 ++ 4 files changed, 399 insertions(+), 228 deletions(-) create mode 100644 rebuild/worker/migrations/0002_temporary_sharing.sql diff --git a/rebuild/tests/README.md b/rebuild/tests/README.md index c611f11..f2e617b 100644 --- a/rebuild/tests/README.md +++ b/rebuild/tests/README.md @@ -1,5 +1,3 @@ # ScreenNote rebuild tests -The first unit tests validate browser recording format negotiation. They do not certify real screen-capture permissions, media encoding, storage persistence, upload recovery, Worker bindings, or cross-browser playback. - -Those behaviors require Worker-runtime integration tests and browser/device acceptance. Never mark those gates passed from unit tests alone. \ No newline at end of file +Worker API tests cover guest sessions, cross-origin rejection, owned R2 uploads, expiring links, password gates, timestamped nested discussion, creator resolution, byte-range playback and deletion. Browser acceptance covers responsive light/dark layouts and local import/playback. Real capture permissions, production bindings and physical devices remain separate acceptance gates. diff --git a/rebuild/tests/worker.test.ts b/rebuild/tests/worker.test.ts index 89bbda7..9d3a5bc 100644 --- a/rebuild/tests/worker.test.ts +++ b/rebuild/tests/worker.test.ts @@ -3,131 +3,117 @@ import worker from "../worker/index"; class FakeD1 { sessions = new Set(); - recordings = new Map(); - + recordings = new Map(); + shares = new Map(); + comments = new Map(); + access = new Set(); prepare(sql: string) { const db = this; - return { - bind(...values: unknown[]) { - return { - async first() { - if (sql.includes("SELECT token_hash FROM guest_sessions")) { - const tokenHash = String(values[0]); - return db.sessions.has(tokenHash) ? { token_hash: tokenHash } : null; - } - if (sql.includes("SELECT object_key, mime_type, byte_size FROM recordings")) { - const row = db.recordings.get(String(values[0])); - return row && row.owner === String(values[1]) && row.status === "uploading" - ? { object_key: row.object_key, mime_type: row.mime_type, byte_size: row.byte_size } - : null; - } - if (sql.includes("SELECT object_key FROM recordings")) { - const row = db.recordings.get(String(values[0])); - return row && row.owner === String(values[1]) ? { object_key: row.object_key } : null; - } - return null; - }, - async run() { - if (sql.startsWith("INSERT INTO guest_sessions")) db.sessions.add(String(values[0])); - if (sql.startsWith("INSERT INTO recordings")) { - const [id, owner, title, object_key, mime_type, byte_size, created_at] = values as [string,string,string,string,string,number,number,number]; - db.recordings.set(id, { id, owner, title, object_key, mime_type, byte_size, status: "uploading", created_at }); - } - if (sql.startsWith("UPDATE recordings")) { - const [updatedAt, id, owner] = values as [number,string,string]; - const row = db.recordings.get(id); - if (row && row.owner === owner) row.status = "ready"; - } - if (sql.startsWith("DELETE FROM recordings")) db.recordings.delete(String(values[0])); - return { success: true }; - }, - async all() { - if (sql.includes("FROM recordings WHERE owner_token_hash")) { - return { results: [...db.recordings.values()].filter((row) => row.owner === String(values[0])) }; - } - return { results: [] }; + return { bind(...v: any[]) { + return { + async first() { + if (sql.includes("FROM guest_sessions")) return db.sessions.has(v[0]) ? { token_hash: v[0] } : null; + if (sql.includes("FROM recordings") && sql.includes("JOIN shares")) { + for (const s of db.shares.values()) if (s.token_hash === v[0]) return { ...s, ...db.recordings.get(s.recording_id) }; + } + if (sql.includes("FROM shares") && sql.includes("JOIN recordings")) { + for (const s of db.shares.values()) if (s.token_hash === v[0]) return { ...s, ...db.recordings.get(s.recording_id) }; } - }; - } - }; + if (sql.includes("FROM shares") && sql.includes("recording_id = ?")) return [...db.shares.values()].find(s => s.recording_id === v[0]) ?? null; + if (sql.includes("FROM shares") && sql.includes("id = ?")) return db.shares.get(v[0]) ?? null; + if (sql.includes("FROM recordings") && sql.includes("id = ?")) { + const r = db.recordings.get(v[0]); return r && (!v[1] || r.owner_token_hash === v[1]) && (!sql.includes("status = 'ready'") || r.status === "ready") ? r : null; + } + if (sql.includes("FROM comments") && sql.includes("COUNT(*)")) return { total: db.comments.size }; + if (sql.includes("FROM comments")) return db.comments.get(v[0]) ?? null; + if (sql.includes("FROM share_access_sessions")) return db.access.has(v[0]) ? { token_hash: v[0] } : null; + return null; + }, + async run() { + if (sql.startsWith("INSERT INTO guest_sessions")) db.sessions.add(v[0]); + if (sql.startsWith("INSERT INTO recordings")) db.recordings.set(v[0], { id:v[0], owner_token_hash:v[1], title:v[2], object_key:v[3], mime_type:v[4], byte_size:v[5], duration_seconds:v[6], status:"uploading" }); + if (sql.startsWith("UPDATE recordings SET status")) { const r=db.recordings.get(v[1]); if(r)r.status="ready"; } + if (sql.startsWith("INSERT INTO shares")) db.shares.set(v[0], { id:v[0], recording_id:v[1], owner_token_hash:v[2], owner_key_hash:v[3], token_hash:v[4], expires_at:v[5], password_salt:v[6], password_hash:v[7], revoked_at:null }); + if (sql.startsWith("INSERT INTO share_access_sessions")) db.access.add(v[0]); + if (sql.startsWith("INSERT INTO comments")) db.comments.set(v[0], { id:v[0], share_id:v[1], parent_id:v[2], author_hash:v[3], viewer_label:v[4], body:v[5], time_seconds:v[6], created_at:v[7], updated_at:v[8], resolved:0, deleted_at:null }); + if (sql.startsWith("DELETE FROM shares")) db.shares.delete(v[0]); + if (sql.startsWith("DELETE FROM recordings")) db.recordings.delete(v[0]); + if (sql.startsWith("UPDATE comments")) { const c=db.comments.get(v[2]??v[3]); if(c){ if(sql.includes("body = '[deleted]'"))c.deleted_at=v[0]; else if(sql.includes("SET body = ?"))c.body=v[0]; else c.resolved=v[0]; } } + return { success:true }; + }, + async all() { + if (sql.includes("FROM comments WHERE share_id")) return { results:[...db.comments.values()].filter(c=>c.share_id===v[0]) }; + if (sql.includes("FROM recordings WHERE owner_token_hash")) return { results:[...db.recordings.values()].filter(r=>r.owner_token_hash===v[0]) }; + return { results:[] }; + } + }; + }}; } } - const makeEnv = () => { - const DB = new FakeD1(); - const uploaded: { key?: string; size?: number; type?: string } = {}; - const deleted: string[] = []; - const MEDIA = { - async put(key: string, body: ReadableStream, options: { httpMetadata: { contentType: string } }) { - const bytes = await new Response(body).arrayBuffer(); - uploaded.key = key; uploaded.size = bytes.byteLength; uploaded.type = options.httpMetadata.contentType; - }, - async delete(key: string) { deleted.push(key); } + const DB=new FakeD1(), objects=new Map(), deleted:string[]=[]; + const MEDIA={ + async put(key:string, body:ReadableStream, options:any){const bytes=new Uint8Array(await new Response(body).arrayBuffer());objects.set(key,{bytes,type:options.httpMetadata.contentType});}, + async get(key:string, options?:any){const o=objects.get(key);if(!o)return null;const bytes=options?.range?o.bytes.slice(options.range.offset,options.range.offset+options.range.length):o.bytes;return {body:new Blob([bytes]).stream(),httpEtag:'etag'};}, + async delete(key:string){objects.delete(key);deleted.push(key);} }; - return { env: { DB, MEDIA, STATIC: {} }, DB, uploaded, deleted }; + return {env:{DB,MEDIA,STATIC:{get:async()=>null}},DB,objects,deleted}; }; - -async function guestSession(env: ReturnType["env"]) { - const response = await worker.fetch(new Request("https://screennote.test/api/session"), env as never, {} as never); - const cookie = response.headers.get("set-cookie")!; - return { cookie: cookie.split(";")[0] }; +async function session(env:any) { + const res=await worker.fetch(new Request("https://screennote.test/api/session"),env,{} as any); + return {cookie:res.headers.get("set-cookie")!.split(";")[0]}; } - -describe("ScreenNote Worker API", () => { - let state: ReturnType; - beforeEach(() => { state = makeEnv(); }); - - it("serves a health response without requiring a session", async () => { - const response = await worker.fetch(new Request("https://screennote.test/api/health"), state.env as never, {} as never); - expect(response.status).toBe(200); - expect(await response.json()).toMatchObject({ status: "ok", service: "screennote" }); +async function upload(env:any,cookie:string) { + const created=await worker.fetch(new Request("https://screennote.test/api/recordings",{method:"POST",headers:{origin:"https://screennote.test",cookie,"content-type":"application/json"},body:JSON.stringify({title:"Bug walkthrough",mimeType:"video/webm",size:4,duration:12})}),env,{} as any); + const body=await created.json() as any; + const uploaded=await worker.fetch(new Request(`https://screennote.test/api/recordings/${body.id}/media`,{method:"PUT",headers:{origin:"https://screennote.test",cookie,"content-type":"video/webm","content-length":"4"},body:new Uint8Array([1,2,3,4])}),env,{} as any); + return {id:body.id,uploaded}; +} +describe("ScreenNote temporary sharing API",()=>{ + let state:ReturnType; + beforeEach(()=>{state=makeEnv();}); + it("creates guest sessions and rejects cross-origin writes",async()=>{ + const res=await worker.fetch(new Request("https://screennote.test/api/session",{headers:{origin:"https://evil.test"}}),state.env as any,{} as any); + expect(res.status).toBe(403);expect(state.DB.sessions.size).toBe(0); }); - - it("rejects cross-origin session creation", async () => { - const response = await worker.fetch(new Request("https://screennote.test/api/session", { - headers: { origin: "https://attacker.test" } - }), state.env as never, {} as never); - expect(response.status).toBe(403); - expect(state.DB.sessions.size).toBe(0); + it("streams an owned upload to R2 and publishes an expiring share",async()=>{ + const s=await session(state.env),u=await upload(state.env,s.cookie); + expect(u.uploaded.status).toBe(200); + const key="a".repeat(64); + const pub=await worker.fetch(new Request(`https://screennote.test/api/recordings/${u.id}/publish`,{method:"POST",headers:{origin:"https://screennote.test",cookie:s.cookie,"content-type":"application/json"},body:JSON.stringify({expiresInDays:1,ownerKey:key})}),state.env as any,{} as any); + expect(pub.status).toBe(201);const share=await pub.json() as any; + expect(share.url).toMatch(/^\/s\//); + const view=await worker.fetch(new Request(`https://screennote.test/api/share/${share.token}`),state.env as any,{} as any); + expect(view.status).toBe(200);expect(await view.json()).toMatchObject({title:"Bug walkthrough",passwordRequired:false}); }); - - it("creates a guest session and requires it for recording creation", async () => { - const session = await guestSession(state.env); - expect(session.cookie).toContain("sn_guest="); - const response = await worker.fetch(new Request("https://screennote.test/api/recordings", { - method: "POST", - headers: { origin: "https://screennote.test", cookie: session.cookie, "content-type": "application/json" }, - body: JSON.stringify({ title: "Walkthrough", mimeType: "video/webm", size: 4 }) - }), state.env as never, {} as never); - expect(response.status).toBe(201); - const body = await response.json() as { id: string; uploadUrl: string }; - expect(body.id).toMatch(/^[a-f0-9-]{36}$/i); - expect(body.uploadUrl).toBe(`/api/recordings/${body.id}/media`); + it("requires a password before serving protected media",async()=>{ + const s=await session(state.env),u=await upload(state.env,s.cookie),key="b".repeat(64); + const pub=await worker.fetch(new Request(`https://screennote.test/api/recordings/${u.id}/publish`,{method:"POST",headers:{origin:"https://screennote.test",cookie:s.cookie,"content-type":"application/json"},body:JSON.stringify({expiresInDays:1,password:"long-password",ownerKey:key})}),state.env as any,{} as any); + const share=await pub.json() as any; + const locked=await worker.fetch(new Request(`https://screennote.test/api/share/${share.token}`),state.env as any,{} as any); + expect(locked.status).toBe(401); + const access=await worker.fetch(new Request(`https://screennote.test/api/share/${share.token}/access`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({password:"long-password"})}),state.env as any,{} as any); + expect(access.status).toBe(200);expect(access.headers.get("set-cookie")).toContain("HttpOnly"); }); - - it("streams an owned recording into R2 and rejects mismatched upload size", async () => { - const session = await guestSession(state.env); - const create = await worker.fetch(new Request("https://screennote.test/api/recordings", { - method: "POST", - headers: { origin: "https://screennote.test", cookie: session.cookie, "content-type": "application/json" }, - body: JSON.stringify({ title: "Clip", mimeType: "video/webm", size: 4 }) - }), state.env as never, {} as never); - const { id } = await create.json() as { id: string }; - - const mismatch = await worker.fetch(new Request(`https://screennote.test/api/recordings/${id}/media`, { - method: "PUT", - headers: { origin: "https://screennote.test", cookie: session.cookie, "content-type": "video/webm", "content-length": "3" }, - body: "abc" - }), state.env as never, {} as never); - expect(mismatch.status).toBe(400); - - const upload = await worker.fetch(new Request(`https://screennote.test/api/recordings/${id}/media`, { - method: "PUT", - headers: { origin: "https://screennote.test", cookie: session.cookie, "content-type": "video/webm", "content-length": "4" }, - body: "test" - }), state.env as never, {} as never); - expect(upload.status).toBe(200); - expect(state.uploaded.size).toBe(4); - expect(state.uploaded.type).toBe("video/webm"); + it("supports timestamped nested discussion and creator thread resolution",async()=>{ + const s=await session(state.env),u=await upload(state.env,s.cookie),key="c".repeat(64); + const pub=await worker.fetch(new Request(`https://screennote.test/api/recordings/${u.id}/publish`,{method:"POST",headers:{origin:"https://screennote.test",cookie:s.cookie,"content-type":"application/json"},body:JSON.stringify({expiresInDays:3,ownerKey:key})}),state.env as any,{} as any); + const share=await pub.json() as any, url=`https://screennote.test/api/share/${share.token}/comments`; + const author="d".repeat(48); + const first=await worker.fetch(new Request(url,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({authorKey:author,text:"The menu jumps here",time:4})}),state.env as any,{} as any); + expect(first.status).toBe(201);const comment=await first.json() as any; + const reply=await worker.fetch(new Request(url,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({authorKey:"e".repeat(48),parentId:comment.id,text:"I can reproduce it",time:4})}),state.env as any,{} as any); + expect(reply.status).toBe(201); + const resolve=await worker.fetch(new Request(`https://screennote.test/api/share/${share.token}/comments/${comment.id}/resolve`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({ownerKey:key,resolved:true})}),state.env as any,{} as any); + expect(resolve.status).toBe(200); + }); + it("supports byte-range playback and stops serving media after owner deletion",async()=>{ + const s=await session(state.env),u=await upload(state.env,s.cookie),key="f".repeat(64); + const pub=await worker.fetch(new Request(`https://screennote.test/api/recordings/${u.id}/publish`,{method:"POST",headers:{origin:"https://screennote.test",cookie:s.cookie,"content-type":"application/json"},body:JSON.stringify({expiresInDays:7,ownerKey:key})}),state.env as any,{} as any); + const share=await pub.json() as any; + const media=await worker.fetch(new Request(`https://screennote.test/api/share/${share.token}/media`,{headers:{range:"bytes=1-2"}}),state.env as any,{} as any); + expect(media.status).toBe(206);expect(media.headers.get("content-range")).toBe("bytes 1-2/4"); + const del=await worker.fetch(new Request(`https://screennote.test/api/recordings/${u.id}`,{method:"DELETE",headers:{origin:"https://screennote.test",cookie:s.cookie,"content-type":"application/json"},body:JSON.stringify({ownerKey:key})}),state.env as any,{} as any); + expect(del.status).toBe(200);expect(state.objects.size).toBe(0); }); }); \ No newline at end of file diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts index f12f695..216e7fe 100644 --- a/rebuild/worker/index.ts +++ b/rebuild/worker/index.ts @@ -2,157 +2,310 @@ type Bindings = { DB: D1Database; MEDIA: R2Bucket; STATIC: R2Bucket; ASSETS?: Fe const SESSION_COOKIE = "sn_guest"; const SESSION_SECONDS = 60 * 60 * 24 * 30; const MAX_UPLOAD_BYTES = 100 * 1024 * 1024; +const MAX_DURATION_SECONDS = 10 * 60; +const MAX_COMMENTS_PER_SHARE = 200; +const encoder = new TextEncoder(); const json = (data: unknown, status = 200, headers: HeadersInit = {}) => - Response.json(data, { status, headers: { "cache-control": "no-store", ...headers } }); + Response.json(data, { status, headers: { "cache-control": "no-store", "x-content-type-options": "nosniff", ...headers } }); +const fail = (message: string, status = 400) => json({ error: message }, status); -function cookie(request: Request, name: string): string | null { +function readCookie(request: Request, name: string): string | null { const raw = request.headers.get("cookie") ?? ""; const entry = raw.split(";").map((part) => part.trim()).find((part) => part.startsWith(name + "=")); - return entry ? decodeURIComponent(entry.slice(name.length + 1)) : null; + if (!entry) return null; + try { return decodeURIComponent(entry.slice(name.length + 1)); } catch { return null; } } - -async function hash(value: string): Promise { - const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(value)); - return [...new Uint8Array(digest)].map((byte) => byte.toString(16).padStart(2, "0")).join(""); +function randomToken(bytes = 32): string { + const data = crypto.getRandomValues(new Uint8Array(bytes)); + return btoa(String.fromCharCode(...data)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, ""); } - -async function owner(request: Request, env: Bindings): Promise { - const token = cookie(request, SESSION_COOKIE); - if (!token || token.length > 128) return null; - const tokenHash = await hash(token); - const session = await env.DB.prepare("SELECT token_hash FROM guest_sessions WHERE token_hash = ? AND expires_at > ?") - .bind(tokenHash, Math.floor(Date.now() / 1000)).first<{ token_hash: string }>(); - return session?.token_hash ?? null; +async function digest(value: string): Promise { + const data = await crypto.subtle.digest("SHA-256", encoder.encode(value)); + return [...new Uint8Array(data)].map((byte) => byte.toString(16).padStart(2, "0")).join(""); +} +async function passwordDigest(password: string, salt: string): Promise { + const key = await crypto.subtle.importKey("raw", encoder.encode(password), "PBKDF2", false, ["deriveBits"]); + const bits = await crypto.subtle.deriveBits({ name: "PBKDF2", hash: "SHA-256", salt: encoder.encode(salt), iterations: 150000 }, key, 256); + return [...new Uint8Array(bits)].map((byte) => byte.toString(16).padStart(2, "0")).join(""); +} +function safeEqual(a: string, b: string): boolean { + const left = encoder.encode(a), right = encoder.encode(b); + let diff = left.length ^ right.length; + for (let i = 0; i < Math.max(left.length, right.length); i++) diff |= (left[i] ?? 0) ^ (right[i] ?? 0); + return diff === 0; } - function sameOrigin(request: Request): boolean { const origin = request.headers.get("origin"); return !origin || origin === new URL(request.url).origin; } - -async function handleApi(request: Request, env: Bindings): Promise { - const url = new URL(request.url); - if (!sameOrigin(request)) return json({ error: "Cross-origin request rejected" }, 403); - - if (url.pathname === "/api/health" && request.method === "GET") { - return json({ status: "ok", service: "screennote", version: "rebuild-dev" }); +function sessionCookie(token: string): string { + return `${SESSION_COOKIE}=${encodeURIComponent(token)}; HttpOnly; Secure; SameSite=Lax; Path=/; Max-Age=${SESSION_SECONDS}`; +} +function accessCookie(shareId: string, token: string, shareToken: string, maxAge: number): string { + return `sn_access_${shareId}=${encodeURIComponent(token)}; HttpOnly; Secure; SameSite=Lax; Path=/api/share/${shareToken}; Max-Age=${maxAge}`; +} +async function ownerHash(request: Request, env: Bindings): Promise { + const token = readCookie(request, SESSION_COOKIE); + if (!token || token.length > 128) return null; + const tokenHash = await digest(token); + const row = await env.DB.prepare("SELECT token_hash FROM guest_sessions WHERE token_hash = ? AND expires_at > ?") + .bind(tokenHash, Math.floor(Date.now() / 1000)).first<{ token_hash: string }>(); + return row?.token_hash ?? null; +} +async function ensureSession(request: Request, env: Bindings): Promise { + const existing = await ownerHash(request, env); + if (existing) return json({ status: "guest", expiresIn: SESSION_SECONDS }); + const token = randomToken(32), tokenHash = await digest(token), now = Math.floor(Date.now() / 1000); + await env.DB.prepare("INSERT INTO guest_sessions (token_hash, created_at, expires_at) VALUES (?, ?, ?)") + .bind(tokenHash, now, now + SESSION_SECONDS).run(); + return json({ status: "guest", expiresIn: SESSION_SECONDS }, 200, { "set-cookie": sessionCookie(token) }); +} +function validId(value: string): boolean { return /^[a-f0-9-]{36}$/i.test(value); } +function shareCookieName(id: string): string { return `sn_access_${id}`; } +async function shareAccess(request: Request, env: Bindings, share: { id: string; token_hash: string; password_hash: string | null }): Promise { + if (!share.password_hash) return true; + const token = readCookie(request, shareCookieName(share.id)); + if (!token || token.length > 128) return false; + const row = await env.DB.prepare("SELECT token_hash FROM share_access_sessions WHERE token_hash = ? AND share_id = ? AND expires_at > ?") + .bind(await digest(token), share.id, Math.floor(Date.now() / 1000)).first<{ token_hash: string }>(); + return !!row; +} +async function getShare(env: Bindings, token: string) { + if (!/^[A-Za-z0-9_-]{32,64}$/.test(token)) return null; + return env.DB.prepare( + "SELECT s.id, s.recording_id, s.owner_token_hash, s.token_hash, s.expires_at, s.password_salt, s.password_hash, s.revoked_at, r.title, r.object_key, r.mime_type, r.byte_size, r.duration_seconds FROM shares s JOIN recordings r ON r.id = s.recording_id WHERE s.token_hash = ?" + ).bind(await digest(token)).first<{ + id: string; recording_id: string; owner_token_hash: string; token_hash: string; expires_at: number; + password_salt: string | null; password_hash: string | null; revoked_at: number | null; + title: string; object_key: string; mime_type: string; byte_size: number; duration_seconds: number; + }>(); +} +function active(share: { expires_at: number; revoked_at: number | null }): boolean { + return !share.revoked_at && share.expires_at > Math.floor(Date.now() / 1000); +} +function publicShare(share: { title: string; mime_type: string; byte_size: number; duration_seconds: number; expires_at: number; password_hash: string | null }) { + return { title: share.title, mimeType: share.mime_type, size: share.byte_size, duration: share.duration_seconds, expiresAt: share.expires_at, passwordRequired: !!share.password_hash }; +} +async function requireShare(request: Request, env: Bindings, token: string) { + const share = await getShare(env, token); + if (!share || !active(share)) return { response: fail("This ScreenNote has ended or is no longer available.", 404) } as const; + if (!(await shareAccess(request, env, share))) return { response: fail("Enter the sharing password to continue.", 401) } as const; + return { share } as const; +} +function parseRange(header: string | null, size: number): { offset: number; length: number; contentRange: string } | null | false { + if (!header) return null; + const match = /^bytes=(\d*)-(\d*)$/.exec(header.trim()); + if (!match) return false; + let start: number, end: number; + if (!match[1]) { + const suffix = Number(match[2]); + if (!suffix) return false; + start = Math.max(0, size - suffix); end = size - 1; + } else { + start = Number(match[1]); end = match[2] ? Number(match[2]) : size - 1; } + if (!Number.isSafeInteger(start) || !Number.isSafeInteger(end) || start < 0 || end < start || start >= size) return false; + end = Math.min(end, size - 1); + return { offset: start, length: end - start + 1, contentRange: `bytes ${start}-${end}/${size}` }; +} +async function serveMedia(request: Request, env: Bindings, share: NonNullable>>) { + const range = parseRange(request.headers.get("range"), share.byte_size); + if (range === false) return new Response(null, { status: 416, headers: { "content-range": `bytes */${share.byte_size}` } }); + const object = await env.MEDIA.get(share.object_key, range ? { range: { offset: range.offset, length: range.length } } : undefined); + if (!object) return fail("This shared recording is no longer available.", 404); + const headers = new Headers({ + "content-type": share.mime_type, "content-length": String(range ? range.length : share.byte_size), + "accept-ranges": "bytes", "cache-control": "private, no-store", "x-content-type-options": "nosniff", + "content-disposition": "inline" + }); + if (range) headers.set("content-range", range.contentRange); + return new Response(request.method === "HEAD" ? null : object.body, { status: range ? 206 : 200, headers }); +} +async function handleApi(request: Request, env: Bindings): Promise { + const url = new URL(request.url), path = url.pathname; + if (path !== "/api/health" && !sameOrigin(request)) return fail("Cross-origin request rejected.", 403); + if (path === "/api/health" && request.method === "GET") return json({ status: "ok", service: "screennote", version: "1.0.0" }); + if (path === "/api/session" && request.method === "GET") return ensureSession(request, env); - if (url.pathname === "/api/session" && request.method === "GET") { - const existing = await owner(request, env); - if (existing) return json({ status: "guest", expiresIn: SESSION_SECONDS }); - const token = crypto.randomUUID() + crypto.randomUUID(); - const tokenHash = await hash(token); - const now = Math.floor(Date.now() / 1000); - await env.DB.prepare("INSERT INTO guest_sessions (token_hash, created_at, expires_at) VALUES (?, ?, ?)") - .bind(tokenHash, now, now + SESSION_SECONDS).run(); - return json({ status: "guest", expiresIn: SESSION_SECONDS }, 200, { - "set-cookie": `${SESSION_COOKIE}=${encodeURIComponent(token)}; HttpOnly; Secure; SameSite=Lax; Path=/; Max-Age=${SESSION_SECONDS}` - }); + const shareMatch = path.match(/^\/api\/share\/([A-Za-z0-9_-]{32,64})(?:\/(media|access|comments|comments\/([a-f0-9-]{36})(?:\/(resolve))?))?$/i); + if (shareMatch) { + const token = shareMatch[1], action = shareMatch[2] ?? ""; + const share = await getShare(env, token); + if (!share || !active(share)) return fail("This ScreenNote has ended or is no longer available.", 404); + if (action === "access" && request.method === "POST") { + if (!share.password_hash) return json({ access: true }); + const body = await request.json<{ password?: string }>().catch(() => null); + if (!body || typeof body.password !== "string" || body.password.length > 128) return fail("Enter the sharing password.", 400); + const actual = await passwordDigest(body.password, share.password_salt!); + if (!safeEqual(actual, share.password_hash)) return fail("That password isn't correct.", 401); + const tokenValue = randomToken(32), now = Math.floor(Date.now() / 1000); + await env.DB.prepare("INSERT INTO share_access_sessions (token_hash, share_id, expires_at) VALUES (?, ?, ?)") + .bind(await digest(tokenValue), share.id, Math.min(share.expires_at, now + 60 * 60 * 12)).run(); + return json({ access: true }, 200, { "set-cookie": accessCookie(share.id, tokenValue, token, Math.min(share.expires_at - now, 43200)) }); + } + if (!(await shareAccess(request, env, share))) return fail("Enter the sharing password to continue.", 401); + if (action === "media" && (request.method === "GET" || request.method === "HEAD")) return serveMedia(request, env, share); + if (action === "" && request.method === "GET") return json(publicShare(share)); + if (action === "comments" && request.method === "GET") { + const { results } = await env.DB.prepare( + "SELECT id, parent_id AS parentId, viewer_label AS viewerLabel, body, time_seconds AS time, created_at AS createdAt, updated_at AS updatedAt, resolved, deleted_at AS deletedAt FROM comments WHERE share_id = ? ORDER BY created_at ASC LIMIT 200" + ).bind(share.id).all(); + return json({ comments: results }); + } + if (action === "comments" && request.method === "POST") { + const body = await request.json<{ authorKey?: string; text?: string; time?: number; parentId?: string | null; viewerLabel?: string }>().catch(() => null); + if (!body || typeof body.authorKey !== "string" || !/^[A-Za-z0-9_-]{32,64}$/.test(body.authorKey)) return fail("A valid comment identity is required.", 400); + if (typeof body.text !== "string' || !body.text.trim() || body.text.length > 2000) return fail("Comments must be between 1 and 2,000 characters.", 400); + if (!Number.isFinite(body.time) || body.time! < 0 || body.time! > share.duration_seconds) return fail("Choose a timestamp within this video.", 400); + const count = await env.DB.prepare("SELECT COUNT(*) AS total FROM comments WHERE share_id = ? AND deleted_at IS NULL").bind(share.id).first<{ total: number }>(); + if ((count?.total ?? 0) >= MAX_COMMENTS_PER_SHARE) return fail("This discussion has reached its comment limit.", 429); + if (body.parentId) { + const parent = await env.DB.prepare("SELECT id FROM comments WHERE id = ? AND share_id = ? AND deleted_at IS NULL").bind(body.parentId, share.id).first(); + if (!parent) return fail("The comment you're replying to is no longer available.", 404); + } + const id = crypto.randomUUID(), now = Math.floor(Date.now() / 1000); + await env.DB.prepare("INSERT INTO comments (id, share_id, parent_id, author_hash, viewer_label, body, time_seconds, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)") + .bind(id, share.id, body.parentId ?? null, await digest(body.authorKey), typeof body.viewerLabel === "string" ? body.viewerLabel.slice(0, 40) : "Guest", body.text.trim(), Math.floor(body.time!), now, now).run(); + return json({ id, createdAt: now }, 201); + } + const commentId = shareMatch[3]; + if (commentId && action.includes("comments/")) { + if (action.endsWith("/resolve") && request.method === "PATCH") { + const body = await request.json<{ ownerKey?: string; resolved?: boolean }>().catch(() => null); + if (typeof body?.ownerKey !== "string" || !/^[a-f0-9]{64}$/.test(body.ownerKey)) return fail("The private share key is required.", 403); + const keyHash = await digest(body.ownerKey); + const allowed = await env.DB.prepare("SELECT id FROM shares WHERE id = ? AND owner_key_hash = ?").bind(share.id, keyHash).first(); + if (!allowed) return fail("This browser cannot manage the discussion.", 403); + await env.DB.prepare("UPDATE comments SET resolved = ?, updated_at = ? WHERE id = ? AND share_id = ? AND parent_id IS NULL") + .bind(body.resolved ? 1 : 0, Math.floor(Date.now() / 1000), commentId, share.id).run(); + return json({ resolved: !!body.resolved }); + } + if (request.method === "PATCH" || request.method === "DELETE") { + const body = await request.json<{ authorKey?: string; text?: string }>().catch(() => null); + if (typeof body?.authorKey !== "string") return fail("The comment's private edit key is required.", 403); + const authorHash = await digest(body.authorKey), now = Math.floor(Date.now() / 1000); + const comment = await env.DB.prepare("SELECT id FROM comments WHERE id = ? AND share_id = ? AND author_hash = ? AND deleted_at IS NULL") + .bind(commentId, share.id, authorHash).first(); + if (!comment) return fail("This comment cannot be edited from this browser.", 403); + if (request.method === "DELETE") { + await env.DB.prepare("UPDATE comments SET deleted_at = ?, body = '[deleted]', updated_at = ? WHERE id = ? AND share_id = ?") + .bind(now, now, commentId, share.id).run(); + return json({ deleted: true }); + } + if (typeof body.text !== "string" || !body.text.trim() || body.text.length > 2000) return fail("Comments must be between 1 and 2,000 characters.", 400); + await env.DB.prepare("UPDATE comments SET body = ?, updated_at = ? WHERE id = ? AND share_id = ?") + .bind(body.text.trim(), now, commentId, share.id).run(); + return json({ updated: true }); + } + } } - const ownerHash = await owner(request, env); - if (!ownerHash) return json({ error: "A guest session is required" }, 401); - - if (url.pathname === "/api/recordings" && request.method === "GET") { - const { results } = await env.DB.prepare( - "SELECT id, title, mime_type AS mimeType, byte_size AS size, duration_seconds AS duration, status, created_at AS createdAt FROM recordings WHERE owner_token_hash = ? ORDER BY created_at DESC LIMIT 100" - ).bind(ownerHash).all(); + const owner = await ownerHash(request, env); + if (!owner) return fail("A guest session is required.", 401); + if (path === "/api/recordings" && request.method === "GET") { + const { results } = await env.DB.prepare("SELECT id, title, mime_type AS mimeType, byte_size AS size, duration_seconds AS duration, status, created_at AS createdAt FROM recordings WHERE owner_token_hash = ? ORDER BY created_at DESC LIMIT 100") + .bind(owner).all(); return json({ recordings: results }); } - - if (url.pathname === "/api/recordings" && request.method === "POST") { - const body = await request.json<{ title?: string; mimeType?: string; size?: number }>().catch(() => null); - if (!body || typeof body.title !== "string" || !body.title.trim() || body.title.length > 120) return json({ error: "A valid recording title is required" }, 400); - if (!Number.isSafeInteger(body.size) || !body.size || body.size! < 1 || body.size! > MAX_UPLOAD_BYTES) return json({ error: "Recording exceeds the 100 MB upload limit" }, 413); - const mime = typeof body.mimeType === "string" ? body.mimeType : ""; - if (!["video/webm", "video/mp4", "video/quicktime"].includes(mime)) return json({ error: "Unsupported video format" }, 415); - const id = crypto.randomUUID(); - const key = `recordings/${ownerHash.slice(0, 16)}/${id}`; - const now = Math.floor(Date.now() / 1000); - await env.DB.prepare("INSERT INTO recordings (id, owner_token_hash, title, object_key, mime_type, byte_size, status, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, 'uploading', ?, ?)") - .bind(id, ownerHash, body.title.trim(), key, mime, body.size, now, now).run(); + if (path === "/api/recordings" && request.method === "POST") { + const body = await request.json<{ title?: string; mimeType?: string; size?: number; duration?: number }>().catch(() => null); + if (!body || typeof body.title !== "string' || !body.title.trim() || body.title.length > 120) return fail("A valid recording title is required.", 400); + if (!Number.isSafeInteger(body.size) || !body.size || body.size! < 1 || body.size! > MAX_UPLOAD_BYTES) return fail("This clip exceeds the 100 MB sharing limit.", 413); + if (!Number.isFinite(body.duration) || body.duration! < 0 || body.duration! > MAX_DURATION_SECONDS) return fail("ScreenNote clips must be 10 minutes or shorter.", 413); + const mime = body.mimeType?.split(";")[0] ?? ""; + if (!["video/webm", "video/mp4", "video/quicktime"].includes(mime)) return fail("Choose an MP4, WebM or MOV video.", 415); + const id = crypto.randomUUID(), now = Math.floor(Date.now() / 1000), key = `shared/${id}`; + await env.DB.prepare("INSERT INTO recordings (id, owner_token_hash, title, object_key, mime_type, byte_size, duration_seconds, status, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, 'uploading', ?, ?)") + .bind(id, owner, body.title.trim(), key, mime, body.size, Math.ceil(body.duration!), now, now).run(); return json({ id, uploadUrl: `/api/recordings/${id}/media` }, 201); } - - const match = url.pathname.match(/^\/api\/recordings\/([a-f0-9-]{36})(?:\/(media))?$/i); - if (match && request.method === "PUT" && match[2] === "media") { + const recordingMatch = path.match(/^\/api\/recordings\/([a-f0-9-]{36})(?:\/(media|publish))?$/i); + if (recordingMatch && recordingMatch[2] === "media" && request.method === "PUT") { const row = await env.DB.prepare("SELECT object_key, mime_type, byte_size FROM recordings WHERE id = ? AND owner_token_hash = ? AND status = 'uploading'") - .bind(match[1], ownerHash).first<{ object_key: string; mime_type: string; byte_size: number }>(); - if (!row) return json({ error: "Recording upload not found" }, 404); - const length = Number(request.headers.get("content-length") ?? 0); - if (!request.body || !length || length !== row.byte_size || length > MAX_UPLOAD_BYTES) return json({ error: "Upload size did not match the reservation" }, 400); - const type = request.headers.get("content-type")?.split(";")[0] ?? ""; - if (type !== row.mime_type) return json({ error: "Upload content type did not match the reservation" }, 415); + .bind(recordingMatch[1], owner).first<{ object_key: string; mime_type: string; byte_size: number }>(); + if (!row) return fail("This upload reservation is no longer available.", 404); + const length = Number(request.headers.get("content-length") ?? 0), type = request.headers.get("content-type")?.split(";")[0] ?? ""; + if (!request.body || length !== row.byte_size || length > MAX_UPLOAD_BYTES) return fail("The uploaded file size did not match the reservation.", 400); + if (type !== row.mime_type) return fail("The uploaded file type did not match the reservation.", 415); await env.MEDIA.put(row.object_key, request.body, { httpMetadata: { contentType: row.mime_type } }); await env.DB.prepare("UPDATE recordings SET status = 'ready', updated_at = ? WHERE id = ? AND owner_token_hash = ?") - .bind(Math.floor(Date.now() / 1000), match[1], ownerHash).run(); - return json({ id: match[1], status: "ready" }); + .bind(Math.floor(Date.now() / 1000), recordingMatch[1], owner).run(); + return json({ id: recordingMatch[1], status: "ready" }); } - - if (match && request.method === "DELETE" && !match[2]) { - const row = await env.DB.prepare("SELECT object_key FROM recordings WHERE id = ? AND owner_token_hash = ?") - .bind(match[1], ownerHash).first<{ object_key: string }>(); - if (!row) return json({ error: "Recording not found" }, 404); + if (recordingMatch && recordingMatch[2] === "publish" && request.method === "POST") { + const body = await request.json<{ expiresInDays?: number; password?: string; ownerKey?: string }>().catch(() => null); + if (!body || ![1, 3, 7].includes(body.expiresInDays ?? 0)) return fail("Choose an expiry of 1, 3 or 7 days.", 400); + if (typeof body.ownerKey !== "string" || !/^[a-f0-9]{64}$/.test(body.ownerKey)) return fail("A private recovery key is required.", 400); + if (body.password && (body.password.length < 8 || body.password.length > 128)) return fail("Sharing passwords must be 8–128 characters.", 400); + const recording = await env.DB.prepare("SELECT id, title, object_key, mime_type, byte_size, duration_seconds FROM recordings WHERE id = ? AND owner_token_hash = ? AND status = 'ready'") + .bind(recordingMatch[1], owner).first<{ id: string; title: string; object_key: string; mime_type: string; byte_size: number; duration_seconds: number }>(); + if (!recording) return fail("Upload the complete recording before publishing.", 409); + const old = await env.DB.prepare("SELECT id FROM shares WHERE recording_id = ?").bind(recording.id).first<{ id: string }>(); + if (old) { + const existing = await env.DB.prepare("SELECT owner_key_hash FROM shares WHERE id = ?").bind(old.id).first<{ owner_key_hash: string }>(); + if (!existing || !safeEqual(existing.owner_key_hash, await digest(body.ownerKey))) return fail("This recording already has a share. Use its original private key to replace it.", 403); + await env.MEDIA.delete(recording.object_key); + await env.DB.prepare("DELETE FROM shares WHERE id = ?").bind(old.id).run(); + } + const token = randomToken(32), shareId = crypto.randomUUID(), now = Math.floor(Date.now() / 1000); + const salt = body.password ? randomToken(16) : null; + const passwordHash = body.password ? await passwordDigest(body.password, salt!) : null; + await env.DB.prepare("INSERT INTO shares (id, recording_id, owner_token_hash, owner_key_hash, token_hash, expires_at, password_salt, password_hash, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)") + .bind(shareId, recording.id, owner, await digest(body.ownerKey), await digest(token), now + body.expiresInDays! * 86400, salt, passwordHash, now).run(); + return json({ id: shareId, token, url: `/s/${token}`, expiresAt: now + body.expiresInDays! * 86400, passwordProtected: !!passwordHash }, 201); + } + if (recordingMatch && !recordingMatch[2] && request.method === "DELETE") { + const body = await request.json<{ ownerKey?: string }>().catch(() => null); + if (typeof body?.ownerKey !== "string") return fail("The private recovery key is required.", 403); + const row = await env.DB.prepare("SELECT id, object_key FROM recordings WHERE id = ? AND owner_token_hash = ?") + .bind(recordingMatch[1], owner).first<{ id: string; object_key: string }>(); + if (!row) return fail("Recording not found.", 404); + const share = await env.DB.prepare("SELECT id, owner_key_hash FROM shares WHERE recording_id = ?").bind(row.id).first<{ id: string; owner_key_hash: string }>(); + if (share && !safeEqual(share.owner_key_hash, await digest(body.ownerKey))) return fail("This browser cannot stop sharing this recording.", 403); await env.MEDIA.delete(row.object_key); - await env.DB.prepare("DELETE FROM recordings WHERE id = ? AND owner_token_hash = ?").bind(match[1], ownerHash).run(); + await env.DB.prepare("DELETE FROM recordings WHERE id = ? AND owner_token_hash = ?").bind(row.id, owner).run(); return json({ deleted: true }); } - - return json({ error: "Not found" }, 404); + return fail("Not found.", 404); } - -const CONTENT_TYPES: Record = { - ".html": "text/html; charset=utf-8", - ".js": "text/javascript; charset=utf-8", - ".css": "text/css; charset=utf-8", - ".svg": "image/svg+xml", - ".webmanifest": "application/manifest+json", - ".gz": "application/octet-stream" -}; - async function serveStatic(request: Request, env: Bindings, ctx: ExecutionContext): Promise { if (request.method !== "GET" && request.method !== "HEAD") return new Response("Method not allowed", { status: 405 }); - const url = new URL(request.url); - const pathname = url.pathname === "/" ? "/index.html" : url.pathname; - if (pathname.split("/").some((part) => part === "." || part === "..") || !/^\/[a-zA-Z0-9_./-]+$/.test(pathname)) { - return new Response("Bad path", { status: 400 }); - } - const edgeCache = (caches as unknown as { default: Cache }).default; - const cacheKey = new Request(url.toString(), { method: "GET" }); - const isImmutable = pathname.startsWith("/assets/"); - if (request.method === "GET" && isImmutable) { - const cached = await edgeCache.match(cacheKey); - if (cached) return cached; - } - let object = await env.STATIC.get("site" + pathname); - if (!object && !pathname.split("/").pop()?.includes(".")) object = await env.STATIC.get("site/index.html"); + const url = new URL(request.url), pathname = url.pathname === "/" || /^\/s\/[A-Za-z0-9_-]{32,64}\/?$/.test(url.pathname) ? "/index.html" : url.pathname; + if (pathname.split("/").some((part) => part === "." || part === "..") || !/^\/[a-zA-Z0-9_./-]+$/.test(pathname)) return new Response("Bad path", { status: 400 }); + if (env.ASSETS) return env.ASSETS.fetch(new Request(new URL(pathname, url), request)); + const object = await env.STATIC.get("site" + pathname); if (!object) return new Response("Not found", { status: 404 }); - const extension = pathname.slice(pathname.lastIndexOf(".")); - const headers = new Headers(); - object.writeHttpMetadata(headers); - headers.set("content-type", CONTENT_TYPES[extension] ?? "application/octet-stream"); - headers.set("etag", object.httpEtag); - headers.set("x-content-type-options", "nosniff"); - headers.set("referrer-policy", "strict-origin-when-cross-origin"); - headers.set("cache-control", isImmutable ? "public, max-age=31536000, immutable" : "no-cache"); - const response = new Response(request.method === "HEAD" ? null : object.body, { headers }); - if (request.method === "GET" && isImmutable) ctx.waitUntil(edgeCache.put(cacheKey, response.clone())); - return response; + const types: Record = { ".html": "text/html; charset=utf-8", ".js": "text/javascript; charset=utf-8", ".css": "text/css; charset=utf-8", ".svg": "image/svg+xml", ".webmanifest": "application/manifest+json" }; + const ext = pathname.slice(pathname.lastIndexOf(".")); + const headers = new Headers({ "content-type": types[ext] ?? "application/octet-stream", "cache-control": pathname.startsWith("/assets/") ? "public, max-age=31536000, immutable" : "no-cache", "x-content-type-options": "nosniff", "referrer-policy": "strict-origin-when-cross-origin" }); + if (object.httpEtag) headers.set("etag", object.httpEtag); + return new Response(request.method === "HEAD" ? null : object.body, { headers }); } export default { async fetch(request: Request, env: Bindings, ctx: ExecutionContext): Promise { - const url = new URL(request.url); try { + const url = new URL(request.url); if (url.pathname.startsWith("/api/")) return await handleApi(request, env); - if (env.ASSETS) return env.ASSETS.fetch(request); return await serveStatic(request, env, ctx); } catch (error) { - console.error(JSON.stringify({ message: "ScreenNote request failed", path: url.pathname, error: error instanceof Error ? error.message : String(error) })); - return json({ error: "The request could not be completed" }, 500); + console.error(JSON.stringify({ service: "screennote", path: new URL(request.url).pathname, error: error instanceof Error ? error.message : String(error) })); + return fail("ScreenNote couldn't complete that request. Your local recording remains safe.", 500); } + }, + async scheduled(_controller: ScheduledController, env: Bindings, ctx: ExecutionContext) { + ctx.waitUntil((async () => { + const now = Math.floor(Date.now() / 1000); + const { results } = await env.DB.prepare("SELECT r.id, r.object_key FROM recordings r JOIN shares s ON s.recording_id = r.id WHERE s.expires_at <= ? OR s.revoked_at IS NOT NULL LIMIT 100") + .bind(now).all<{ id: string; object_key: string }>(); + for (const row of results) { + await env.MEDIA.delete(row.object_key); + await env.DB.prepare("DELETE FROM recordings WHERE id = ?").bind(row.id).run(); + } + await env.DB.prepare("DELETE FROM guest_sessions WHERE expires_at <= ?").bind(now).run(); + await env.DB.prepare("DELETE FROM share_access_sessions WHERE expires_at <= ?").bind(now).run(); + })()); } }; \ No newline at end of file diff --git a/rebuild/worker/migrations/0002_temporary_sharing.sql b/rebuild/worker/migrations/0002_temporary_sharing.sql new file mode 100644 index 0000000..dfce221 --- /dev/null +++ b/rebuild/worker/migrations/0002_temporary_sharing.sql @@ -0,0 +1,34 @@ +ALTER TABLE recordings ADD COLUMN duration_seconds INTEGER NOT NULL DEFAULT 0; +CREATE TABLE IF NOT EXISTS shares ( + id TEXT PRIMARY KEY, + recording_id TEXT NOT NULL UNIQUE REFERENCES recordings(id) ON DELETE CASCADE, + owner_token_hash TEXT NOT NULL REFERENCES guest_sessions(token_hash) ON DELETE CASCADE, + owner_key_hash TEXT NOT NULL, + token_hash TEXT NOT NULL UNIQUE, + expires_at INTEGER NOT NULL, + password_salt TEXT, + password_hash TEXT, + revoked_at INTEGER, + created_at INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS share_access_sessions ( + token_hash TEXT PRIMARY KEY, + share_id TEXT NOT NULL REFERENCES shares(id) ON DELETE CASCADE, + expires_at INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS comments ( + id TEXT PRIMARY KEY, + share_id TEXT NOT NULL REFERENCES shares(id) ON DELETE CASCADE, + parent_id TEXT REFERENCES comments(id) ON DELETE CASCADE, + author_hash TEXT NOT NULL, + viewer_label TEXT NOT NULL DEFAULT 'Guest', + body TEXT NOT NULL, + time_seconds INTEGER NOT NULL, + created_at INTEGER NOT NULL, + updated_at INTEGER NOT NULL, + resolved INTEGER NOT NULL DEFAULT 0, + deleted_at INTEGER +); +CREATE INDEX IF NOT EXISTS shares_expiry ON shares(expires_at); +CREATE INDEX IF NOT EXISTS comments_share_created ON comments(share_id, created_at); +CREATE INDEX IF NOT EXISTS comments_parent ON comments(parent_id); \ No newline at end of file From bbcf11c5782431956f177c2e11bdcaa5bb96ecaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:39:33 +0200 Subject: [PATCH 032/575] Fix Worker validation syntax and align migration with existing schema --- rebuild/worker/index.ts | 4 ++-- rebuild/worker/migrations/0002_temporary_sharing.sql | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts index 216e7fe..bc6c4be 100644 --- a/rebuild/worker/index.ts +++ b/rebuild/worker/index.ts @@ -156,7 +156,7 @@ async function handleApi(request: Request, env: Bindings): Promise { if (action === "comments" && request.method === "POST") { const body = await request.json<{ authorKey?: string; text?: string; time?: number; parentId?: string | null; viewerLabel?: string }>().catch(() => null); if (!body || typeof body.authorKey !== "string" || !/^[A-Za-z0-9_-]{32,64}$/.test(body.authorKey)) return fail("A valid comment identity is required.", 400); - if (typeof body.text !== "string' || !body.text.trim() || body.text.length > 2000) return fail("Comments must be between 1 and 2,000 characters.", 400); + if (typeof body.text !== "string" || !body.text.trim() || body.text.length > 2000) return fail("Comments must be between 1 and 2,000 characters.", 400); if (!Number.isFinite(body.time) || body.time! < 0 || body.time! > share.duration_seconds) return fail("Choose a timestamp within this video.", 400); const count = await env.DB.prepare("SELECT COUNT(*) AS total FROM comments WHERE share_id = ? AND deleted_at IS NULL").bind(share.id).first<{ total: number }>(); if ((count?.total ?? 0) >= MAX_COMMENTS_PER_SHARE) return fail("This discussion has reached its comment limit.", 429); @@ -210,7 +210,7 @@ async function handleApi(request: Request, env: Bindings): Promise { } if (path === "/api/recordings" && request.method === "POST") { const body = await request.json<{ title?: string; mimeType?: string; size?: number; duration?: number }>().catch(() => null); - if (!body || typeof body.title !== "string' || !body.title.trim() || body.title.length > 120) return fail("A valid recording title is required.", 400); + if (!body || typeof body.title !== "string" || !body.title.trim() || body.title.length > 120) return fail("A valid recording title is required.", 400); if (!Number.isSafeInteger(body.size) || !body.size || body.size! < 1 || body.size! > MAX_UPLOAD_BYTES) return fail("This clip exceeds the 100 MB sharing limit.", 413); if (!Number.isFinite(body.duration) || body.duration! < 0 || body.duration! > MAX_DURATION_SECONDS) return fail("ScreenNote clips must be 10 minutes or shorter.", 413); const mime = body.mimeType?.split(";")[0] ?? ""; diff --git a/rebuild/worker/migrations/0002_temporary_sharing.sql b/rebuild/worker/migrations/0002_temporary_sharing.sql index dfce221..7b7648f 100644 --- a/rebuild/worker/migrations/0002_temporary_sharing.sql +++ b/rebuild/worker/migrations/0002_temporary_sharing.sql @@ -1,4 +1,3 @@ -ALTER TABLE recordings ADD COLUMN duration_seconds INTEGER NOT NULL DEFAULT 0; CREATE TABLE IF NOT EXISTS shares ( id TEXT PRIMARY KEY, recording_id TEXT NOT NULL UNIQUE REFERENCES recordings(id) ON DELETE CASCADE, From e93f7f1600819a1f244541097d27592f97df7bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:41:38 +0200 Subject: [PATCH 033/575] Add local share recovery metadata and publishing client --- rebuild/src/library.ts | 11 ++++++++++- rebuild/src/sharing.ts | 31 +++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 rebuild/src/sharing.ts diff --git a/rebuild/src/library.ts b/rebuild/src/library.ts index bf79ca1..5146d0c 100644 --- a/rebuild/src/library.ts +++ b/rebuild/src/library.ts @@ -6,6 +6,7 @@ export type Clip = { size: number; mimeType: string; blob: Blob; + share?: { token: string; url: string; ownerKey: string; expiresAt: number }; }; export type RecoverySession = { @@ -197,4 +198,12 @@ export async function restoreRecordingSession(sessionId: string): Promise mimeType: session.mimeType, blob }); -} \ No newline at end of file +} +export async function findShareByToken(token: string): Promise { + const db = await database(); + return new Promise((resolve, reject) => { + const request = db.transaction(CLIPS, "readonly").objectStore(CLIPS).getAll(); + request.onsuccess = () => resolve((request.result as Clip[]).find((clip) => clip.share?.token === token)); + request.onerror = () => reject(request.error); + }); +} diff --git a/rebuild/src/sharing.ts b/rebuild/src/sharing.ts new file mode 100644 index 0000000..f9bd390 --- /dev/null +++ b/rebuild/src/sharing.ts @@ -0,0 +1,31 @@ + +export type PublishResult = { id: string; token: string; url: string; expiresAt: number; passwordProtected: boolean }; +export async function ensureGuestSession(): Promise { + const response = await fetch("/api/session", { credentials: "same-origin" }); + if (!response.ok) throw new Error("ScreenNote couldn't start a private guest session. Refresh and try again."); +} +export function newOwnerKey(): string { + return [...crypto.getRandomValues(new Uint8Array(32))].map((byte) => byte.toString(16).padStart(2, "0")).join(""); +} +export async function publishRecording(clip: { title: string; mimeType: string; size: number; duration: number; blob: Blob }, days: number, password: string, ownerKey: string): Promise { + await ensureGuestSession(); + const create = await fetch("/api/recordings", { method: "POST", credentials: "same-origin", headers: { "content-type": "application/json" }, body: JSON.stringify({ title: clip.title, mimeType: clip.mimeType.split(";")[0], size: clip.size, duration: clip.duration }) }); + const reservation = await create.json().catch(() => ({})) as { id?: string; uploadUrl?: string; error?: string }; + if (!create.ok || !reservation.id || !reservation.uploadUrl) throw new Error(reservation.error || "Couldn't prepare this video for sharing."); + const upload = await fetch(reservation.uploadUrl, { method: "PUT", credentials: "same-origin", headers: { "content-type": clip.mimeType.split(";")[0] }, body: clip.blob }); + const uploaded = await upload.json().catch(() => ({})) as { error?: string }; + if (!upload.ok) { + await fetch("/api/recordings/" + reservation.id, { method: "DELETE", credentials: "same-origin", headers: { "content-type": "application/json" }, body: JSON.stringify({ ownerKey }) }).catch(() => undefined); + throw new Error(uploaded.error || "The upload didn't finish. Your local video is still safe."); + } + const publish = await fetch("/api/recordings/" + reservation.id + "/publish", { method: "POST", credentials: "same-origin", headers: { "content-type": "application/json" }, body: JSON.stringify({ expiresInDays: days, password: password || undefined, ownerKey }) }); + const result = await publish.json().catch(() => ({})) as PublishResult & { error?: string }; + if (!publish.ok) throw new Error(result.error || "Couldn't publish this link. Your local video is still safe."); + return result; +} +export async function shareRequest(token: string, path = "", init: RequestInit = {}): Promise { + const response = await fetch("/api/share/" + token + path, { ...init, credentials: "same-origin", headers: { ...(init.body ? { "content-type": "application/json" } : {}), ...init.headers } }); + const result = await response.json().catch(() => ({})) as T & { error?: string }; + if (!response.ok) throw Object.assign(new Error(result.error || "This ScreenNote is no longer available."), { status: response.status }); + return result; +} From c2f830b0b074410aa0fc1933a1619e8770214db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 00:42:09 +0200 Subject: [PATCH 034/575] Build temporary public viewer with timestamped threaded discussion --- rebuild/src/ShareViewer.tsx | 79 +++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 rebuild/src/ShareViewer.tsx diff --git a/rebuild/src/ShareViewer.tsx b/rebuild/src/ShareViewer.tsx new file mode 100644 index 0000000..15f4ad5 --- /dev/null +++ b/rebuild/src/ShareViewer.tsx @@ -0,0 +1,79 @@ +import React, { useEffect, useMemo, useRef, useState } from "react"; +import { createRoot } from "react-dom/client"; +import { Check, Clock3, LockKeyhole, MessageCircle, Send, ShieldCheck, Video } from "lucide-react"; +import { findShareByToken } from "./library"; +import { shareRequest } from "./sharing"; +import "./styles.css"; + +type Comment = { id:string; parentId:string|null; viewerLabel:string; body:string; time:number; createdAt:number; resolved:number; deletedAt:number|null }; +type Share = { title:string; mimeType:string; size:number; duration:number; expiresAt:number; passwordRequired:boolean }; +function identity(token:string) { + const key = "screennote-author-" + token; + let value = localStorage.getItem(key); + if (!value) { const bytes=crypto.getRandomValues(new Uint8Array(32)); value=btoa(String.fromCharCode(...bytes)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,""); localStorage.setItem(key,value); } + return value; +} +const timeLabel=(n:number)=>{const m=Math.floor(n/60),s=Math.floor(n%60);return m+":"+String(s).padStart(2,"0");}; +const dateLabel=(n:number)=>new Intl.DateTimeFormat(undefined,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(n*1000); +function ShareViewer({token}:{token:string}) { + const [share,setShare]=useState(null),[comments,setComments]=useState([]),[password,setPassword]=useState(""),[locked,setLocked]=useState(false),[error,setError]=useState(""),[loading,setLoading]=useState(true); + const [text,setText]=useState(""),[replyTo,setReplyTo]=useState(null),[time,setTime]=useState(0),[ownerKey,setOwnerKey]=useState(null); + const video=useRef(null); + const authorKey=useMemo(()=>identity(token),[token]); + async function load() { + setLoading(true);setError(""); + try { + const data=await shareRequest(token);setShare(data);setLocked(false); + const discussion=await shareRequest<{comments:Comment[]}>(token,"/comments");setComments(discussion.comments); + const local=await findShareByToken(token);setOwnerKey(local?.share?.ownerKey??null); + } catch(e) { + if ((e as {status?:number}).status===401) setLocked(true); + else setError(e instanceof Error?e.message:"This ScreenNote is unavailable."); + } finally {setLoading(false);} + } + useEffect(()=>{void load();},[token]); + async function unlock(event:React.FormEvent) { + event.preventDefault();setError(""); + try {await shareRequest(token,"/access",{method:"POST",body:JSON.stringify({password})});await load();} + catch(e){setError(e instanceof Error?e.message:"That password didn't work.");} + } + function seek(seconds:number) { if(video.current){video.current.currentTime=seconds;void video.current.play();setTime(seconds);} } + async function send(event:React.FormEvent) { + event.preventDefault();if(!text.trim())return; + try { + await shareRequest(token,"/comments",{method:"POST",body:JSON.stringify({authorKey,text:text.trim(),time:Math.floor(video.current?.currentTime??time),parentId:replyTo,viewerLabel:"Guest"})}); + setText("");setReplyTo(null);const next=await shareRequest<{comments:Comment[]}>(token,"/comments");setComments(next.comments); + } catch(e){setError(e instanceof Error?e.message:"Couldn't post your comment.");} + } + async function resolve(id:string,value:boolean) { + if(!ownerKey)return; + try {await shareRequest(token,"/comments/"+id+"/resolve",{method:"PATCH",body:JSON.stringify({ownerKey,resolved:value})});setComments(old=>old.map(c=>c.id===id?{...c,resolved:value?1:0}:c));} + catch(e){setError(e instanceof Error?e.message:"Couldn't update this thread.");} + } + function thread(items:Comment[],parent:string|null=null,depth=0):React.ReactNode { + return items.filter(c=>c.parentId===parent).map(c=>
+
{c.viewerLabel||"Guest"}{dateLabel(c.createdAt)}
+

{c.deletedAt?"This comment was removed.":c.body}

+ {!c.deletedAt&&} + {depth===0&&ownerKey&&!c.deletedAt&&} + {c.resolved===1&& Resolved} + {thread(items,c.id,depth+1)} +
); + } + const activeBubbles=comments.filter(c=>!c.parentId&&!c.deletedAt&&!c.resolved&&Math.abs(c.time-time)<4); + if(loading)return
Opening your ScreenNote…
; + if(locked)return
screennote

This ScreenNote is private.

Enter the password shared with you to watch and join the conversation.

{error&&

{error}

}
; + if(error&&!share)return

This moment has ended.

{error}

ScreenNote links are temporary by design.
; + if(!share)return null; + return
+
screennote
Temporary share
+
A MOMENT, SHARED

{share.title}

Watch the clip. Leave a note at the exact moment that matters.

+
+
{timeLabel(share.duration)} · {Math.ceil(share.size/1024/1024)} MBAvailable until {new Date(share.expiresAt*1000).toLocaleString()}
+
{replyTo?"Reply to this moment":"Add a timestamped note"} at {timeLabel(Math.floor(video.current?.currentTime??time))}

`,'Recovery');$('#recovery-file').onchange=e=>run(async()=>{const file=e.target.files[0];if(!file)return;if(file.size>524288)throw Error('Choose a recovery file smaller than 512 KB.');$('#recovery-json').value=await file.text()})} +async function restoreKeys(){const keys=recoveryKeys($('#recovery-json').value,location.origin);busy=true;const button=$('[data-action=restore-keys]');button.disabled=true;let restored=0,failed=0,videoFailed=0;try{for(const key of keys){$('#recovery-progress').textContent=`Checking key ${restored+failed+1} of ${keys.length}…`;try{const state=await api('manage',key),current=clips.find(c=>c.id===key.id);if(current&¤t.owner!==key.owner)throw Error('This recording belongs to another key.');const record={...current,...state,...key,shared:state.status==='published',revoked:['revoked','expired','deleted'].includes(state.status),uploadAttempted:true,cloudDeleted:state.cleanupComplete,managementOnly:!current?.blob};await db.put(record);clips=await db.all();if($('#restore-videos').checked&&state.status==='published'&&state.expiresAt>Date.now()&&!record.blob){try{const response=await fetch(await api('restore-media',key).then(v=>v.mediaUrl));if(!response.ok)throw Error('Video download failed.');const file=new File([await response.blob()],record.title+'.'+(record.type==='video/mp4'?'mp4':'webm'),{type:record.type});const media=await importMedia(file),info=await metadata(media.blob);record.blob=media.blob;Object.assign(record,info,{managementOnly:false})}catch{videoFailed++}}await db.put(record);clips=await db.all();restored++}catch{failed++}}$('#recovery-json').value='';$('#recovery-file').value='';$('#recovery-progress').textContent=`Restored ${restored} recording${restored===1?'':'s'}.${failed?' '+failed+' key(s) could not be verified. Keep your file and retry when sharing is available.':''} ${videoFailed?' '+videoFailed+' video download(s) could not finish; management keys were restored. Keep the recovery file to retry.':''} Open My recordings to manage them.`}finally{busy=false;button.disabled=false}} +function dialog(title,body,save,label='Save'){ + const opener=document.activeElement;modal.onclose=()=>{const target=opener?.isConnected?opener:$('#main');target?.focus({preventScroll:true})}; + let saving=false; + modal.innerHTML=`

${title}

${body}
`; + modal.oncancel=e=>{if(saving)e.preventDefault()}; + $('#cancel-dialog').onclick=()=>{if(!saving)modal.close()}; + $('#dialog-form').onsubmit=async e=>{ + e.preventDefault();if(saving)return;$('#dialog-error').textContent=''; + const data=new FormData(e.target),controls=[...e.target.querySelectorAll('button,input,textarea')].map(node=>({node,disabled:node.disabled})); + saving=true;busy=true;for(const {node} of controls)node.disabled=true; + try{await save(data);modal.close()}catch(err){$('#dialog-error').textContent=err.message} + finally{saving=false;busy=false;for(const {node,disabled} of controls)node.disabled=disabled} + };modal.showModal(); +} +async function run(fn){try{if($('#error'))$('#error').textContent='';await fn()}catch(e){error(e)}} +function encodeProgress(meterEl,statusEl,label){ + const started=performance.now();let lastDecile=-1; + return frac=>{ + const pct=Math.round(Math.min(1,Math.max(0,frac))*100); + if(meterEl){meterEl.hidden=false;meterEl.value=pct} + const decile=Math.floor(pct/10); + if(decile!==lastDecile){ + lastDecile=decile; + const elapsed=(performance.now()-started)/1000; + const eta=pct>=5&&pct<100?` · about ${formatTime(Math.max(0,elapsed/Math.max(frac,0.01)-elapsed))} left`:''; + if(statusEl)statusEl.textContent=`${label} · ${pct}%${eta} · original stays in your library.`; + } + }; +} +function showEncodeCancel(show=true){for(const id of ['cancel-trim','cancel-marked']){const b=document.getElementById(id);if(b)b.hidden=!show}} +const actions={'bug-report':()=>{const panel=$('.extra-panel');panel.open=true;panel.scrollIntoView({block:'nearest',behavior:'smooth'});$('#report-actual').focus()},'cancel-trim':()=>{encodeController?.abort()},'cancel-upload':()=>uploadController?.abort(Object.assign(Error('Upload paused. Your local copy is safe. Publish again to resume saved parts.'),{name:'AbortError'})),'new-recording':()=>{const setup=$('#record-setup');setup.open=true;setup.scrollIntoView({block:'nearest',behavior:'smooth'});(setup.querySelector('[data-action=record]:not(:disabled)')||$('#import-video')).focus()},'clear-filters':()=>{libraryFilters={query:'',status:'all',sort:'newest'};home()}, +'check-replies':()=>{checkFeedback()},help,'check-sharing':checkSharing,'list-mics':listMicrophones,'begin-recording':beginRecording,'cancel-capture':cancelCapture,recovery,'acknowledge-recovery':()=>{emergencyBlob=null;if(emergencyURL)URL.revokeObjectURL(emergencyURL);emergencyURL=null;home()},'refresh-share':async()=>{const c=selected;busy=true;try{const state=await api('manage',{id:c.id,owner:c.owner});Object.assign(c,state,{shared:state.status==='published',revoked:['revoked','expired','deleted'].includes(state.status),cloudDeleted:state.cleanupComplete});await db.put(c);clips=await db.all();busy=false;editor(c);notify('Shared status refreshed.')}catch(e){if(e.status!==404)throw e;c.shared=false;c.revoked=true;c.cloudMissing=true;await db.put(c);clips=await db.all();busy=false;editor(c);notify(c.blob?'The previous upload is unavailable. Your local video is safe; publish a replacement link.':'The previous upload is unavailable. Import the original video to publish a replacement link.')}finally{busy=false}},'backup-keys':()=>{const raw=recoveryDocument(clips,location.origin);if(!JSON.parse(raw).keys.length)throw Error('No uploaded recordings need recovery keys yet.');saveFile(new Blob([raw],{type:'application/json'}),'screennote-recovery.json');notify('Recovery keys downloaded. Keep this file private; download videos separately.')},'restore-keys':restoreKeys,'delete-cloud':()=>dialog('Delete the uploaded video?',`

This permanently deletes the uploaded video and stops its shared link. ${selected.blob?'Your local file remains saved on this device.':'There is no local video file on this device.'}

`,async()=>{await api('delete',{id:selected.id,owner:selected.owner});selected.shared=false;selected.revoked=true;selected.cloudDeleted=true;await db.put(selected);clips=await db.all();editor(selected)},'Delete uploaded video'),home:()=>{if(location.pathname.startsWith('/v/'))location.assign('/');else home()},privacy,record:startRecording,stop:()=>{capture.stop();$('#record-time').textContent='Saving…';$('#pause-button').disabled=true;$('[data-action=stop]').disabled=true;},pause:()=>{paused=!paused;paused?capture.pause():capture.resume();$('#pause-button').innerHTML=icon(paused?'play':'pause')+(paused?'Resume':'Pause');$('#recording-status').textContent=paused?'PAUSED · NOT CAPTURING':'RECORDING IN PROGRESS';$('.recording')?.classList.toggle('is-paused',paused)},theme:()=>{const theme=document.documentElement.dataset.theme==='dark'?'light':'dark';document.documentElement.dataset.theme=theme;try{localStorage.setItem('screennote-theme',theme)}catch{}},compress:async()=>{const c=selected;if(!c?.blob||c.duration>MAX_SECONDS)throw Error('Trim a clip up to 10 minutes first.');busy=true;const b=$('[data-action=compress]');b.disabled=true;try{notify('Making a smaller copy at playback speed. Keep this tab visible.');encodeController=new AbortController();showEncodeCancel(true);const blob=await fixed(await trimVideo(c.blob,0,c.duration,encodeProgress($('#upload-meter'),$('#upload-progress'),'Making smaller copy'),[],'saver',{signal:encodeController.signal}),c.duration),info=await metadata(blob,c.duration);if(blob.size>=c.blob.size)throw Error('This copy would not be smaller. Try trimming a shorter section instead.');const copy={...c,id:randomId(),owner:secret(),title:c.title.slice(0,80)+' · smaller',blob,...info,shared:false,revoked:false,uploadAttempted:false,passwordProtected:false,cloudDeleted:false,cloudMissing:false,createdAt:Date.now()};await db.put(copy);clips=await db.all();busy=false;editor(copy);notify(sharingProblem(copy)||'Smaller copy saved. Your original stays in your library.')}catch(e){if(e.name==='AbortError'){notify('Smaller copy stopped. Your original is unchanged.');return}throw e}finally{encodeController=null;showEncodeCancel(false);busy=false;b.disabled=false}},sample:async()=>{const r=await fetch('/sample.webm');if(!r.ok)throw Error('Sample clip is unavailable. Import your own video.');await importVideo(new File([await r.blob()],'A little context goes a long way.webm',{type:'video/webm'}),{sample:true,title:'A clearer checkout · sample walkthrough'});Object.assign(selected,{captions:[{start:0,end:4,text:'Show the detail that needs attention.'},{start:4,end:9,text:'Add a timestamp so feedback points to the right moment.'},{start:9,end:15,text:'Reply, resolve and keep the work moving.'}],chapters:[{time:0,title:'Show the detail'},{time:5,title:'Pin the feedback'},{time:10,title:'Resolve the conversation'}]});await db.put(selected);editor(selected)},download,publish,'copy-link':async()=>{const link=location.origin+'/v/'+selected.id;try{await navigator.clipboard.writeText(link);notify('Link copied.')}catch{dialog('Your share link',`
`,async()=>{},'Done')}},'save-title':async()=>{const c=selected,title=validTitle($('#recording-title-input').value);busy=true;try{if((c.shared||c.uploadAttempted)&&!c.cloudDeleted&&!c.cloudMissing){try{await api('title',{id:c.id,owner:c.owner,title})}catch(e){if(e.status!==404||c.shared)throw e}}const saved={...c,title};await db.put(saved);selected=saved;clips=await db.all();$('#title-status').textContent='Title saved.'}finally{busy=false}},rename:()=>dialog('Give it a clear title',`
`,async f=>{const title=f.get('title').trim();if(!title)throw Error('Add a title.');selected.title=title;await db.put(selected);clips=await db.all();editor(selected)}),'remove-local':()=>dialog(selected.blob?'Remove this local copy?':'Remove recovery access?',`

${selected.blob?'This removes the video from this browser.':'This removes the saved management keys from this browser.'} ${(selected.shared||selected.revoked||selected.uploadAttempted)&&!selected.cloudDeleted?'This also removes this browser’s ability to manage the uploaded video. Delete the uploaded video first if you want to remove it from the web.':selected.blob?'Download it first if you want to keep it.':'Keep an exported recovery file if you need this access later.'}

`,async()=>{clearSeen(selected.id);await db.remove(selected.id);clips=await db.all();busy=false;home()},selected.blob?'Remove local copy':'Remove recovery access'),revoke:()=>dialog('Stop sharing this video?',`

New viewers will no longer be able to open it. Playback URLs already issued may work for up to five minutes. ${selected.blob?'Your local video stays here.':'Your recovered management keys stay here.'}

`,async()=>{await api('revoke',{id:selected.id,owner:selected.owner});selected.shared=false;selected.revoked=true;await db.put(selected);clips=await db.all();editor(selected)},'Stop sharing'),trim:async()=>{const c=selected,start=Number($('#trim-start').value),end=Number($('#trim-end').value);if(!Number.isFinite(start)||!Number.isFinite(end)||start<0||end>c.duration+.05||end-start<.25)throw Error('Choose a valid range of at least 0.25 seconds.');busy=true;$('[data-action=trim]').disabled=true;encodeController=new AbortController();showEncodeCancel(true);try{let blob=await trimVideo(c.blob,start,end,encodeProgress($('#trim-meter'),$('#trim-progress'),'Trimming locally'),[],'balanced',{signal:encodeController.signal});blob=await fixed(blob,end-start);const info=await metadata(blob,end-start),copy={id:randomId(),owner:secret(),title:c.title.slice(0,85)+' · trimmed',...trimExtras(c,start,end),blob,type:blob.type.split(';')[0],createdAt:Date.now(),...info};await db.put(copy);clips=await db.all();busy=false;editor(copy);notify('Trimmed copy saved. The original is still in your library.')}catch(e){if(e.name==='AbortError'){const s=$('#trim-progress');if(s)s.textContent='Trim stopped. Your original is unchanged.';const m=$('#trim-meter');if(m)m.hidden=true;showEncodeCancel(false);encodeController=null;busy=false;const bb=$('[data-action=trim]');if(bb)bb.disabled=false;return}throw e}finally{encodeController=null;showEncodeCancel(false);busy=false;const b=$('[data-action=trim]');if(b)b.disabled=false}}}; +app.addEventListener('click',async e=>{const b=e.target.closest('[data-action],[data-open],[data-rename]');if(!b||b.disabled||busy&&!['cancel-capture','cancel-upload','cancel-trim'].includes(b.dataset.action))return;if((b.dataset.open||['home','help','privacy','recovery','refresh-share'].includes(b.dataset.action))&&!(await confirmEditorLeave()))return;if(b.dataset.rename){const c=clips.find(c=>c.id===b.dataset.rename);dialog('Rename recording',`
`,async f=>{const title=validTitle(f.get('title'));if((c.shared||c.uploadAttempted)&&!c.cloudDeleted&&!c.cloudMissing)await api('title',{id:c.id,owner:c.owner,title});c.title=title;await db.put(c);clips=await db.all();renderLibrary()});return}if(b.dataset.open){editor(clips.find(c=>c.id===b.dataset.open));return}run(()=>actions[b.dataset.action]?.())}); +window.addEventListener('beforeunload',e=>{if(recording||busy||emergencyBlob||unsavedChanges().length){e.preventDefault();e.returnValue=''}}); +async function viewerPage(id){try{await db.open();const local=await db.get(id);viewerOwner=local?.owner||''}catch{viewerOwner=''}try{vote=localStorage.getItem('screennote-vote-'+id)||''}catch{}app.innerHTML=`
${brand()}Make your own video ${icon('arrow')}

Opening your message…

`;try{viewData=await api('view',viewerPassword?{id,accessPassword:viewerPassword}:null,id);renderViewer()}catch(e){if(e.status===401){$('#main').innerHTML=`

A password keeps this video private.

${viewerPassword?'Password not accepted. ':''}Ask the sender for the sharing password.

`;$('#unlock-form').onsubmit=e=>{e.preventDefault();viewerPassword=$('#viewer-password').value;run(()=>viewerPage(id))};return}$('#main').innerHTML=`

This message is unavailable.

The link may have expired, stopped sharing, or the hosting service may be unavailable.

Open ScreenNote`}} +function renderViewer(){ + discussionUI?.destroy();const c=viewData;writeSeen(c.id,c.discussionRevision||0); + $('#main').innerHTML=`
A LITTLE CONTEXT FOR YOU

${esc(isGeneratedTitle(c.title)?'Untitled recording':c.title)}

${reviewLabel(c.reviewStatus)}

${document.pictureInPictureEnabled?'':''}
${[['like','👍','Helpful'],['thanks','🙌','Thanks'],['idea','💡','Good idea']].map(([key,emoji,label])=>``).join('')}

${formatTime(c.end-c.start)} · Link expires ${new Date(c.expiresAt).toLocaleDateString()}
Anyone with this link can see replies. Guest names are not verified.

${viewerContext(c)}
`; + const p=$('#viewer-player');fitPlayer(p);mountViewerContext(c,p,saveFile); + $('#playback-speed').onchange=e=>p.playbackRate=Number(e.target.value); + if($('#picture-in-picture'))$('#picture-in-picture').onclick=()=>run(async()=>{if(document.pictureInPictureElement)await document.exitPictureInPicture();else await p.requestPictureInPicture()}); + p.onloadedmetadata=()=>p.currentTime=c.start; + p.onplay=()=>{if(p.currentTime>=c.end-.05)p.currentTime=c.start}; + p.ontimeupdate=()=>{if(p.currentTime>c.end){p.pause();p.currentTime=c.end}}; + p.onerror=()=>error(Error('This video could not play here. Refresh the conversation to renew playback access, or try desktop Chrome or Safari.')); + discussionUI=mountDiscussion({clip:c,player:p,panel:$('.reply-panel'),api,owner:viewerOwner,viewer,accessPassword:viewerPassword,update:next=>viewData=next,notify,error}); + $('#refresh-replies').onclick=()=>run(async()=>{ + const button=$('#refresh-replies');button.disabled=true;try{ + const next=await api('view',viewerPassword?{id:c.id,accessPassword:viewerPassword}:null,c.id);viewData=next;$('#viewer-review').textContent=reviewLabel(next.reviewStatus);$('#viewer-review').dataset.review=next.reviewStatus||'needs-feedback'; + $('#main h1').textContent=isGeneratedTitle(next.title)?'Untitled recording':next.title; + const time=p.currentTime,playing=!p.paused;p.onloadedmetadata=()=>{p.currentTime=Math.max(c.start,Math.min(c.end,time));if(playing)p.play().catch(()=>{})};p.src=next.mediaUrl; + discussionUI.update(next);for(const b of document.querySelectorAll('[data-reaction]'))b.querySelector('span').textContent=next.reactions[b.dataset.reaction];notify('Conversation and playback access refreshed. Your draft is kept.') + }finally{button.disabled=false} + }); + $('.reactions').onclick=e=>run(async()=>{const b=e.target.closest('[data-reaction]');if(!b||document.querySelector('.reactions button:disabled'))return;const buttons=[...document.querySelectorAll('[data-reaction]')];for(const button of buttons)button.disabled=true;const next=vote===b.dataset.reaction?'':b.dataset.reaction;try{const updated=await api('reaction',{id:c.id,accessPassword:viewerPassword,viewer,reaction:next});vote=next;try{localStorage.setItem('screennote-vote-'+c.id,vote)}catch{}viewData={...viewData,...updated};discussionUI.update(viewData);for(const button of buttons){button.setAttribute('aria-pressed',String(button.dataset.reaction===vote));button.querySelector('span').textContent=updated.reactions[button.dataset.reaction]}}finally{for(const button of buttons)button.disabled=false}}) +} +async function listMicrophones(){if(!navigator.mediaDevices?.enumerateDevices)throw Error('This browser chooses the microphone in its permission prompt.');const devices=await navigator.mediaDevices.enumerateDevices(),mics=devices.filter(d=>d.kind==='audioinput'&&d.deviceId);const select=$('#mic-source');select.innerHTML=''+mics.map((d,i)=>``).join('');notify(mics.length?'Choose your microphone source. Labels may appear only after permission is granted.':'No named inputs are available yet. Browser default will use its permission chooser.')} +function markupEditor(){return `
Annotate or hide sensitive areas

Create a new video with marks burned into every frame. Your original stays unchanged and must not be shared if it contains secrets. Pause the preview, then draw fixed masks or marks. Check the new copy before publishing.

${markupTools()}

`} +function mountMarkupEditor(c){const video=$('#markup-video');video.src=objectURL;fitCaptureFrame(video);const items=[];editorMarks=items;mountTools(items);$('#markup-toggle').onclick=()=>video.paused?video.play().catch(error):video.pause();$('#choose-thumbnail').onclick=()=>run(async()=>{if(video.readyState<2)throw Error('Wait for the video preview to load.');const canvas=document.createElement('canvas');canvas.width=480;canvas.height=Math.round(480*video.videoHeight/video.videoWidth);canvas.getContext('2d').drawImage(video,0,0,canvas.width,canvas.height);c.thumbnail=canvas.toDataURL('image/jpeg',.7);await db.put(c);clips=await db.all();notify('Library thumbnail updated on this device.')});$('#save-marked').onclick=()=>run(async()=>{if(!items.length)throw Error('Draw at least one mark on the preview.');busy=true;$('#save-marked').disabled=true;encodeController=new AbortController();showEncodeCancel(true);try{const blob=await fixed(await trimVideo(c.blob,0,c.duration,encodeProgress($('#marked-meter'),$('#marked-progress'),`Saving marked copy · ${items.length} marks`),structuredClone(items),'balanced',{signal:encodeController.signal}),c.duration),info=await metadata(blob,c.duration),copy={id:randomId(),owner:secret(),title:c.title.slice(0,80)+' · marked',...trimExtras(c,0,c.duration),blob,type:blob.type.split(';')[0],createdAt:Date.now(),...info};await db.put(copy);clips=await db.all();busy=false;editor(copy);notify('Marked copy saved. Review it before publishing. The original is still in your library.')}catch(e){if(e.name==='AbortError'){const s=$('#marked-progress');if(s)s.textContent='Marked copy stopped. Your original is unchanged.';return}throw e}finally{encodeController=null;showEncodeCancel(false);busy=false;const b=$('#save-marked');if(b)b.disabled=false}})} +function help(){if(recording||busy)return;shell(`
A CLEAR FIRST MESSAGE

Show the problem.
Share the moment.

Record or import a short video, review your local copy, then publish when ready. Viewers need no account. ScreenNote is a limited free beta; no payment or subscription is enabled.

Record with confidence

  1. Use a desktop browser with screen capture, or import a device recording on mobile.
  2. Choose microphone, camera and screen audio, then choose the source in your browser.
  3. Add fixed masks and marks in setup. Begin starts a three-second countdown.
  4. Stop and review the whole video, especially any sensitive areas. Download a backup.
  5. Add optional captions, chapters or a bug report. Publish explicitly.

ScreenNote cannot silently capture a screen. Permission is required each session. If your source or audio is unavailable, choose another source or import a video.

Keyboard & playback

While recording: Alt+Shift+P pauses/resumes; Alt+Shift+S stops. In a video view: K plays/pauses, J/L seek five seconds, M toggles mute. Shortcuts do not run while typing in a field.

Native video controls provide fullscreen and captions. The viewer also has playback speed and picture in picture when the browser supports it.

Private by choice

Anyone with an unlisted link can view it unless you set a sharing password. Send that password separately. Playback links already issued can work for up to five minutes after revocation. Export management keys and download videos separately.

Recording & sharing limits

Local recording and import: up to 30 minutes / 250 MB. Shared video: up to 10 minutes / 50 MB. Shared storage has a 1 GB budget across the app; smaller videos leave room for more recordings. Links expire after 1, 3 or 7 days. Capacity or hosting quotas can pause sharing; local tools remain available.

Captions are supplied by you in SRT/WebVTT format. No paid transcription service, AI analysis or advertising tracker runs here. Browser storage can be lost; keep downloads.

Help validate this beta

Try a short, non-sensitive recording. Check playback, audio, captions and feedback with your recipient. Download a local test report to share through your own channel. No personal information is required, and feedback is not sent automatically.

Real Android, iOS, Safari, tablet and native permission testing remains a release gate. This app does not promise universal browser support.

`,'Help')} +actions['beta-feedback']=()=>dialog('Report your test',`

Save this report locally. Nothing is sent automatically.

`,async f=>saveFile(new Blob([JSON.stringify({version:APP_VERSION,device:f.get('device'),task:f.get('task'),result:f.get('result')},null,2)],{type:'application/json'}),'screennote-beta-test.json'),'Download test report'); +document.addEventListener('keydown',e=>{if(e.target.closest('input,textarea,select,[contenteditable=true]')||modal.open)return;if(busy)return;if(e.altKey&&e.shiftKey){if(capture?.begun&&recording&&e.code==='KeyP'){e.preventDefault();actions.pause()}if(capture?.begun&&recording&&e.code==='KeyS'){e.preventDefault();actions.stop()}return}if(e.ctrlKey||e.metaKey||e.altKey)return;const p=$('#viewer-player')||$('#player');if(!p)return;if(e.code==='KeyK'){e.preventDefault();p.paused?p.play().catch(()=>{}):p.pause()}else if(e.code==='KeyJ'||e.code==='KeyL'){e.preventDefault();p.currentTime=Math.min(p.duration||0,Math.max(0,p.currentTime+(e.code==='KeyJ'?-5:5)))}else if(e.code==='KeyM'){e.preventDefault();p.muted=!p.muted}}); + +async function boot(){const match=location.pathname.match(/^\/v\/([a-f0-9-]{36})$/);if(match||location.pathname.startsWith('/v/')){await viewerPage(match?.[1]||location.pathname.slice(3));return}try{await db.open();libraryReady=true;clips=await db.all();home();checkSharing();const drafts=await db.all('drafts');if(drafts.some(d=>d.chunks.length)){dialog('A recording was interrupted',`

ScreenNote found saved recording chunks on this device. Recover the most recent partial recording? Some browsers may not be able to play an interrupted file.

`,async()=>{const d=drafts.filter(d=>d.chunks.length).sort((a,b)=>b.createdAt-a.createdAt)[0],blob=await fixed(new Blob(d.chunks,{type:d.chunks[0].type}),d.seconds);const info=await metadata(blob,d.seconds),c={id:randomId(),owner:secret(),title:'Recovered recording',blob,type:blob.type.split(';')[0],createdAt:Date.now(),...info};await db.finish(c,d.id);clips=await db.all();editor(c)},'Recover recording')}}catch(e){app.innerHTML=`

We couldn’t open your local library.

${esc(e.message)}

Use a regular browser with device storage enabled. Do not clear site data if you have recordings saved here.

`}} +boot().then(async()=>{if(!globalThis.AppHost)return;const id=new URLSearchParams(location.search).get('nativeRecording');if(!/^[a-f0-9-]{36}$/.test(id||''))return;try{const response=await fetch('/__native_recordings/'+id);if(!response.ok)throw Error('This native recording is unavailable. Open Recordings to choose it again.');const blob=await response.blob();await importVideo(new File([blob],'Screen recording.mp4',{type:'video/mp4'}));history.replaceState(null,'','/')}catch(e){error(e)}}); + +if(globalThis.AppHost)window.handleAndroidBack=()=>{if(busy||recording)return true;if(modal.open){modal.close();return true}if(selected){confirmEditorLeave().then(ok=>{if(ok)home()});return true}return false}; + +if(globalThis.AppHost)window.requestAndroidHome=()=>{if(!busy&&!recording)confirmEditorLeave().then(ok=>{if(ok)home()});return true}; + +if(globalThis.AppHost)window.confirmAndroidRecordingImport=()=>{if(busy||recording||emergencyBlob){notify("Finish the current operation and save any recovered video before importing a recording.");return false}confirmEditorLeave().then(ok=>{if(ok)home()});return true}; + diff --git a/rebuild/legacy/public/capture.js b/rebuild/legacy/public/capture.js new file mode 100644 index 0000000..23bcb38 --- /dev/null +++ b/rebuild/legacy/public/capture.js @@ -0,0 +1,35 @@ +import {profileFor,recordingStats} from '../lib/recording-policy.js'; +import {LOCAL_MAX_BYTES,LOCAL_MAX_SECONDS} from '../lib/rules.js'; +import {paintMarkup} from './markup.js'; +export function chooseMime(Recorder=globalThis.MediaRecorder){return['video/webm;codecs=vp8,opus','video/webm','video/mp4'].find(t=>Recorder?.isTypeSupported(t))||''} +export function release(streams){for(const s of streams)for(const t of s?.getTracks()||[])t.stop()} +export class Capture{ + constructor({chunk,finished,status,setupEnded,metrics=()=>{},permissionTimeoutMs=60000}){this.metrics=metrics;this.bytes=0;this.stopReason='user';this.permissionTimeoutMs=permissionTimeoutMs;this.permissionAbort=new AbortController();this.onSetupEnded=setupEnded;this.onchunk=chunk;this.finished=finished;this.status=status;this.streams=[];this.chunks=[];this.started=0;this.elapsed=0;this.stopping=false} + async start({camera=false,mic=true,system=false,micId='',defer=false,markup=null,quality='balanced',bubble={x:.8,y:.76,size:.18}}){try{this.quality=quality;this.profile=profileFor(quality);this.bubble=bubble;if(!navigator.mediaDevices?.getDisplayMedia||!globalThis.MediaRecorder)throw Error('Screen recording is not supported here. Use desktop Chrome or Edge, or import a video recorded on your device.');const Audio=globalThis.AudioContext||globalThis.webkitAudioContext;if((mic||system)&&Audio){this.audio=new Audio();this.audio.resume().catch(()=>{})}const screen=await this.requestMedia(()=>navigator.mediaDevices.getDisplayMedia({video:{frameRate:this.profile.fps,width:{ideal:this.profile.width},height:{ideal:Math.round(this.profile.width*9/16)}},audio:system}));this.streams.push(screen);this.checkCancelled();let devices;if(camera||mic){devices=await this.requestMedia(()=>navigator.mediaDevices.getUserMedia({video:camera?{width:320,height:240}:false,audio:mic?(micId?{deviceId:{exact:micId}}:true):false}));this.streams.push(devices);this.checkCancelled()}let track=screen.getVideoTracks()[0];if(!track||track.readyState==='ended')throw Error('Screen sharing ended before recording started. Choose your screen again.');if(camera||markup||track.getSettings?.().width>this.profile.width){const screenVideo=document.createElement('video'),cameraVideo=document.createElement('video');for(const[v,s]of[[screenVideo,screen],...(camera?[[cameraVideo,devices]]:[])]){v.muted=true;v.playsInline=true;v.srcObject=s;await v.play();this.checkCancelled()}const settings=track.getSettings(),canvas=document.createElement('canvas');canvas.width=Math.min(settings.width||this.profile.width,this.profile.width);canvas.height=Math.round(canvas.width*(settings.height||720)/(settings.width||1280));const ctx=canvas.getContext('2d');this.ticker=new Worker('./ticker.js');this.ticker.onmessage=()=>{ctx.drawImage(screenVideo,0,0,canvas.width,canvas.height);if(camera){const size=Math.round(Math.min(canvas.width,canvas.height)*this.bubble.size),x=Math.max(0,Math.min(canvas.width-size,canvas.width*this.bubble.x)),y=Math.max(0,Math.min(canvas.height-size,canvas.height*this.bubble.y));ctx.save();ctx.beginPath();ctx.arc(x+size/2,y+size/2,size/2,0,Math.PI*2);ctx.clip();const side=Math.min(cameraVideo.videoWidth,cameraVideo.videoHeight);if(side)ctx.drawImage(cameraVideo,(cameraVideo.videoWidth-side)/2,(cameraVideo.videoHeight-side)/2,side,side,x,y,size,size);ctx.restore()}if(markup)paintMarkup(ctx,canvas.width,canvas.height,markup)};this.ticker.onmessage();const composed=canvas.captureStream(this.profile.fps);this.streams.push(composed);track=composed.getVideoTracks()[0]} + const audio=this.streams.slice(0,2).flatMap(s=>s.getAudioTracks());let audioTracks=[];if(audio.length){this.audio=this.audio||new Audio();await this.audio.resume();this.checkCancelled();const dest=this.audio.createMediaStreamDestination();for(const t of audio)this.audio.createMediaStreamSource(new MediaStream([t])).connect(dest);audioTracks=dest.stream.getAudioTracks();this.streams.push(dest.stream)}if(mic&&devices?.getAudioTracks().length&&this.audio?.createAnalyser){this.analyser=this.audio.createAnalyser();this.analyser.fftSize=256;this.audio.createMediaStreamSource(new MediaStream(devices.getAudioTracks())).connect(this.analyser);this.levels=new Uint8Array(this.analyser.fftSize)}const output=new MediaStream([track,...audioTracks]);const mimeType=chooseMime();this.recorder=new MediaRecorder(output,{...(mimeType?{mimeType}:{}),videoBitsPerSecond:this.profile.video,audioBitsPerSecond:this.profile.audio});this.recorder.ondataavailable=e=>{if(e.data.size){this.chunks.push(e.data);this.bytes+=e.data.size;this.onchunk(e.data,this.seconds());this.report();if(this.bytes>=LOCAL_MAX_BYTES-1024*1024)this.stop('size')}};this.recorder.onerror=e=>{this.error=e.error||Error('Recording stopped unexpectedly.');this.stop('error')};this.recorder.onstop=async()=>{this.elapsed=this.seconds();this.started=0;this.cleanup();const blob=new Blob(this.chunks,{type:this.recorder.mimeType});await this.finished(blob,this.elapsed,this.error,{reason:this.stopReason,bytes:blob.size,requestedVideoBitrate:this.profile.video,actualVideoBitrate:this.recorder.videoBitsPerSecond||null,quality:this.quality})};this.screenTrack=screen.getVideoTracks()[0];this.screenTrack.onended=()=>{if(this.begun)this.stop('source');else{this.cleanup();this.onSetupEnded?.()}};if(!defer)this.begin();return output}catch(e){this.cleanup();throw e}} + begin(){this.checkCancelled();if(this.begun)return;if(this.screenTrack?.readyState==='ended')throw Error('Screen sharing ended. Choose your screen again.');this.begun=true;this.started=performance.now();this.recorder.start(1000);this.timer=setInterval(()=>{this.status(this.seconds());this.report();if(this.seconds()>=LOCAL_MAX_SECONDS)this.stop('duration')},250);this.status(0)} + checkCancelled(){if(this.cancelled)throw Object.assign(Error('Recording setup cancelled.'),{name:'AbortError'})} + // Invoke the native request synchronously to preserve the click's user activation. + // Browsers cannot dismiss every native picker programmatically. Reject our setup + // immediately on cancellation, and release any stream granted after it ends. + requestMedia(request){ + this.checkCancelled(); + return new Promise((resolve,reject)=>{ + const signal=this.permissionAbort.signal;let settled=false; + const finish=(callback,value)=>{if(settled)return;settled=true;clearTimeout(timer);signal.removeEventListener('abort',abort);callback(value)}; + const abort=()=>finish(reject,signal.reason); + const timer=setTimeout(()=>this.cancel(Object.assign(Error('Recording permission timed out. Dismiss any open browser prompt, then retry or import a video. Nothing was recorded.'),{name:'TimeoutError'})),this.permissionTimeoutMs); + signal.addEventListener('abort',abort,{once:true}); + try{Promise.resolve(request()).then(stream=>{if(settled){release([stream]);return}finish(resolve,stream)},error=>finish(reject,error))}catch(error){finish(reject,error)} + }); + } + cancel(reason=Object.assign(Error('Recording setup cancelled.'),{name:'AbortError'})){this.cancelled=true;this.permissionAbort.abort(reason);this.cleanup()} + seconds(){return this.elapsed+(this.started?(performance.now()-this.started)/1000:0)} + pause(){if(this.recorder?.state!=='recording')return;this.elapsed=this.seconds();this.started=0;this.recorder.pause()} + resume(){if(this.recorder?.state!=='paused')return;this.started=performance.now();this.recorder.resume()} + report(){let level=0;if(this.analyser&&this.levels&&this.recorder?.state!=='paused'){this.analyser.getByteTimeDomainData(this.levels);level=Math.min(1,Math.sqrt(this.levels.reduce((sum,n)=>sum+((n-128)/128)**2,0)/this.levels.length)*4)}this.metrics({...recordingStats(this.bytes,this.seconds(),this.quality),level,paused:this.recorder?.state==='paused'})} + stop(reason='user'){if(this.stopping)return;this.stopReason=reason;this.stopping=true;if(this.recorder&&this.recorder.state!=='inactive')this.recorder.stop();else this.cleanup()} + cleanup(){clearInterval(this.timer);this.ticker?.terminate();release(this.streams);this.audio?.close().catch(()=>{})} +} +export function cancelledError(){return Object.assign(Error('Trim stopped. Your original is unchanged.'),{name:'AbortError'})} +export async function trimVideo(blob,start,end,onProgress,markup=[],quality='balanced',options={}){const signal=options?.signal||null;const check=()=>{if(signal?.aborted)throw cancelledError()};const profile=profileFor(quality);const video=document.createElement('video'),url=URL.createObjectURL(blob);video.src=url;video.playsInline=true;video.muted=false;video.volume=1;let context,timer,watchdog,recorder,outputStreams=[];try{const Audio=globalThis.AudioContext||globalThis.webkitAudioContext;if(!Audio||!globalThis.MediaRecorder)throw Error('Local video processing is unavailable in this browser. Download the original or use a browser with MediaRecorder and Web Audio support.');context=new Audio();context.resume().catch(()=>{});await new Promise((resolve,reject)=>{const timeout=setTimeout(()=>reject(Error('Timed out reading the video. Try importing it again.')),10000);video.onloadedmetadata=()=>{clearTimeout(timeout);resolve()};video.onerror=()=>{clearTimeout(timeout);reject(Error('This browser cannot decode the video.'))}});if(start>0){video.currentTime=start;await new Promise((resolve,reject)=>{const timeout=setTimeout(()=>reject(Error('Could not seek to the trim start. Try another video.')),10000);video.onseeked=()=>{clearTimeout(timeout);resolve()}})}check();const canvas=document.createElement('canvas');canvas.width=Math.min(video.videoWidth,profile.width);canvas.height=Math.round(video.videoHeight*canvas.width/video.videoWidth);const ctx=canvas.getContext('2d'),stream=canvas.captureStream(profile.fps);outputStreams=[stream];await new Promise((resolve,reject)=>{const timeout=setTimeout(()=>reject(Error('Audio processing could not start. Tap Save again with this tab visible. Your original is safe.')),10000);context.resume().then(()=>{clearTimeout(timeout);resolve()},e=>{clearTimeout(timeout);reject(e)})});const source=context.createMediaElementSource(video),dest=context.createMediaStreamDestination();source.connect(dest);outputStreams=[stream,dest.stream];const tracks=[...stream.getVideoTracks(),...dest.stream.getAudioTracks()],mimeType=chooseMime();recorder=new MediaRecorder(new MediaStream(tracks),{...(mimeType?{mimeType}:{}),videoBitsPerSecond:profile.video,audioBitsPerSecond:profile.audio});const chunks=[];return await new Promise((resolve,reject)=>{let done=false;let cancelled=false;const onAbort=()=>{cancelled=true;video.pause();if(recorder&&recorder.state!=='inactive')recorder.stop();reject(cancelledError())};if(signal?.aborted){onAbort();return}signal?.addEventListener('abort',onAbort,{once:true});let lastTime=start,lastProgress=performance.now();watchdog=setInterval(()=>{if(video.currentTime>lastTime+.01){lastTime=video.currentTime;lastProgress=performance.now()}if(performance.now()-lastProgress>15000){done=true;reject(Error('Trimming stalled. Your original is safe; keep this tab visible and try again.'))}},1000);const finish=()=>{if(done)return;done=true;video.pause();recorder.stop()};recorder.ondataavailable=e=>{if(e.data.size)chunks.push(e.data)};recorder.onstop=()=>{signal?.removeEventListener?.('abort',onAbort);release([stream,dest.stream]);if(!cancelled)resolve(new Blob(chunks,{type:recorder.mimeType}))};recorder.onerror=()=>reject(Error('Could not trim this video. Your original remains unchanged.'));video.onended=finish;timer=setInterval(()=>{ctx.drawImage(video,0,0,canvas.width,canvas.height);paintMarkup(ctx,canvas.width,canvas.height,markup);onProgress(Math.min(1,(video.currentTime-start)/(end-start)));if(video.currentTime>=end)finish()},40);recorder.start(250);video.play().catch(reject)})}finally{signal?.removeEventListener?.('abort',()=>{});clearInterval(timer);clearInterval(watchdog);video.pause();if(recorder&&recorder.state!=='inactive')recorder.stop();release(outputStreams);context?.close().catch(()=>{});URL.revokeObjectURL(url)}} diff --git a/rebuild/legacy/public/db.js b/rebuild/legacy/public/db.js new file mode 100644 index 0000000..ad0b06f --- /dev/null +++ b/rebuild/legacy/public/db.js @@ -0,0 +1,10 @@ +let db; +export async function open(){db=await new Promise((resolve,reject)=>{const r=indexedDB.open('screennote',1);r.onupgradeneeded=()=>{r.result.createObjectStore('clips',{keyPath:'id'});r.result.createObjectStore('drafts',{keyPath:'id'})};r.onsuccess=()=>resolve(r.result);r.onerror=()=>reject(Error('Device storage is unavailable. Use a normal browser window.'))});return db} +export function transact(names,fn){return new Promise((resolve,reject)=>{const t=db.transaction(names,'readwrite');try{fn(t)}catch(e){t.abort();reject(e)}t.oncomplete=resolve;t.onerror=()=>reject(Error('Device storage is full or unavailable. Download your recording before closing.'));t.onabort=()=>reject(Error('Could not save to this device. Download your recording before closing.'))})} +export function all(name='clips'){return new Promise((resolve,reject)=>{const r=db.transaction(name).objectStore(name).getAll();r.onsuccess=()=>resolve(r.result);r.onerror=()=>reject(r.error)})} +export const put=c=>transact(['clips'],t=>t.objectStore('clips').put(c)); +export const saveDraft=d=>transact(['drafts'],t=>t.objectStore('drafts').put(d)); +export const finish=(clip,draftId)=>transact(['clips','drafts'],t=>{t.objectStore('clips').put(clip);t.objectStore('drafts').delete(draftId)}); +export const remove=id=>transact(['clips'],t=>t.objectStore('clips').delete(id)); + +export function get(id){return new Promise((resolve,reject)=>{const r=db.transaction('clips').objectStore('clips').get(id);r.onsuccess=()=>resolve(r.result);r.onerror=()=>reject(r.error)})} diff --git a/rebuild/legacy/public/discussion-ui.js b/rebuild/legacy/public/discussion-ui.js new file mode 100644 index 0000000..13ba38f --- /dev/null +++ b/rebuild/legacy/public/discussion-ui.js @@ -0,0 +1,81 @@ +import {randomId,formatTime} from '../lib/rules.js'; +import {discussionThreads,bubbleThreads,timelineGroups,mergeDiscussion} from '../lib/discussion.js'; +const esc=s=>String(s??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); +const short=(s,n=90)=>String(s||'').slice(0,n)+(String(s||'').length>n?'…':''); +export function discussionMarkup(){return `
THE CONVERSATION

Talk about this moment.

0

Reply to anyone. Every thread stays with its moment in the video.

The timestamp follows the playhead until you type. Typing pins it. You can keep watching while you write.

0 / 500

`} +export function mountDiscussion({clip,player,panel,api,owner='',viewer,accessPassword='',update,notify,error}){ + let c=clip,target=null,editing=null,savedDraft=null,posting=false,attempt=null,stamp=c.start,stampLocked=false,expanded=new Set(),focused=null,bubbleIndex=0,bubbleSet='',dismissed='',destroyed=false; + const $=s=>panel.querySelector(s),form=$('#reply-form'),input=$('#reply-text'),context=$('#reply-context'),status=$('#discussion-status'); + const storageKey='screennote-comments-'+c.id,draftKey='screennote-comment-draft-'+c.id; + let identity={key:randomId().replaceAll('-','')+randomId().replaceAll('-',''),ids:[]}; + try{const v=JSON.parse(localStorage.getItem(storageKey));if(/^[a-f0-9]{64}$/.test(v?.key)&&Array.isArray(v.ids))identity=v}catch{} + const persistIdentity=()=>{try{localStorage.setItem(storageKey,JSON.stringify(identity))}catch{status.textContent='Comment controls will remain available for this tab only.'}};persistIdentity(); + let bubbles=true;try{bubbles=localStorage.getItem('screennote-comment-bubbles')!=='off'}catch{} + const stage=player.closest('.video-panel');stage.classList.add('conversation-stage'); + const overlay=document.createElement('div');overlay.className='comment-overlay';stage.append(overlay); + const rail=document.createElement('div');rail.className='comment-timeline';rail.setAttribute('aria-label','Conversation moments');stage.after(rail); + const controls=document.createElement('div');controls.className='conversation-controls';controls.innerHTML=``;rail.after(controls); + const mine=x=>identity.ids.includes(x.id),relative=t=>formatTime(t-c.start),find=id=>c.comments.find(x=>x.id===id); + function saveDraft(){if(editing)return;try{sessionStorage.setItem(draftKey,JSON.stringify({text:input.value,name:$('#reply-name').value,parentId:target?.id||null,time:stamp}))}catch{}} + let draftRestored=false;try{const d=JSON.parse(sessionStorage.getItem(draftKey));if(d){draftRestored=!!d.text;input.value=String(d.text||'').slice(0,500);$('#reply-name').value=String(d.name||'').slice(0,40);target=find(d.parentId)||null;stamp=Math.min(c.end,Math.max(c.start,Number(d.time)||c.start));stampLocked=!!input.value}}catch{} + function composer(){ + context.hidden=!target&&!editing;$('#cancel-reply').hidden=!target&&!editing + const item=editing||target; + context.innerHTML=item?`${editing?'Editing your comment':'Replying to '+esc(item.name)}${esc(short(item.text,140))}`:''; + $('#reply-label').innerHTML=`${editing?'Edit comment':target?'Reply in thread at':'Comment at'} ${relative(target?.time??stamp)}`; + $('#post-comment').textContent=editing?'Save changes':target?'Post reply':'Post comment';$('#reply-count').textContent=`${input.value.length} / 500`; + const chip=$('#timestamp-chip');if(chip){const t=relative(target?.time??stamp);chip.textContent=editing?'editing · timestamp unchanged':target?`⏱ replying in thread · ${t}`:stampLocked?`⏱ pinned · ${t}`:`⏱ follows playhead · ${t}`;chip.setAttribute('aria-pressed',String(!stampLocked&&!target&&!editing));chip.disabled=!!editing} + const dn=$('#draft-notice');if(dn)dn.hidden=!draftRestored; + } + function chooseReply(id){if(posting)return;const item=find(id);if(!item||item.deleted)return;player.pause();if(editing){input.value=savedDraft?.text||'';editing=null;savedDraft=null}target=item;stampLocked=true;stamp=item.time;attempt=null;composer();saveDraft();form.scrollIntoView({block:'nearest',behavior:'auto'});input.focus({preventScroll:true})} + function reveal(id,seek=true){const item=find(id);if(!item)return;const thread=discussionThreads(c.comments).find(t=>t.items.some(x=>x.id===id));if(thread)expanded.add(thread.root.id);$('#thread-filter').value='all';focused=id;render();if(seek){player.pause();player.currentTime=item.time;syncBubble()}const article=$('#comment-'+id);article?.scrollIntoView({block:'nearest',behavior:'auto'});article?.focus({preventScroll:true});history.replaceState(null,'','#comment='+id)} + function card(item,root){const parent=find(item.parentId);return `
${esc(item.name)} ${item.creator&&!item.deleted?'Creator':''}${mine(item)&&!item.deleted?' · You':''}
${parent&&item.id!==root.id?``:''}

${item.deleted?'This comment was removed. Replies are kept below.':esc(item.text)}

${item.editedAt&&!item.deleted?'Edited':''}
${!item.deleted?``:''}${mine(item)&&!item.deleted?``:''}${(mine(item)||owner)&&!item.deleted?``:''}
`} + function render(){ + const threads=discussionThreads(c.comments),filter=$('#thread-filter').value;let visible=threads.filter(t=>filter==='all'||!!t.root.resolved===(filter==='resolved')); + if($('#thread-sort').value==='new')visible.sort((a,b)=>b.root.createdAt-a.root.createdAt); + $('#discussion-count').textContent=String(c.comments.filter(x=>!x.deleted).length); + $('#comments').innerHTML=visible.length?visible.map(({root,items})=>{const replies=items.filter(x=>x.id!==root.id),shown=expanded.has(root.id)?replies:replies.slice(0,2);return `
${root.resolved?'
✓ Resolved
':''}${card(root,root)}${shown.map(x=>card(x,root)).join('')}${replies.length>2?``:''}${mine(root)||owner?``:''}
`}).join(''):`

${filter==='all'?'Start the conversation at a moment that matters.':'No '+filter+' threads.'}

`; + rail.innerHTML=timelineGroups(c.comments,c.start,c.end,Math.max(1,Math.floor(rail.clientWidth/44))).map(g=>``).join(''); + rail.hidden=!threads.some(t=>!t.root.deleted);syncBubble(); + } + function syncBubble(){ + if(destroyed)return;if(overlay.contains(document.activeElement))return;const active=bubbleThreads(c.comments,player.currentTime),key=active.map(t=>t.root.id).join(',');if(key!==bubbleSet){bubbleSet=key;bubbleIndex=0} + const t=active[bubbleIndex%Math.max(1,active.length)];overlay.hidden=!bubbles||!t||dismissed===key||!!document.pictureInPictureElement; + if(overlay.hidden)return; + const note=[...t.items].reverse().find(x=>!x.deleted)||t.root,replyCount=t.items.filter(x=>x.id!==t.root.id&&!x.deleted).length; + const html=`
${active.length>1?``:''}
`; + if(overlay.innerHTML!==html)overlay.innerHTML=html; + } + function timeUpdate(){if(!stampLocked&&!target&&!editing){stamp=player.currentTime;$('#reply-time').textContent=relative(stamp)}syncBubble()} + player.addEventListener('timeupdate',timeUpdate);player.addEventListener('seeked',syncBubble);player.addEventListener('enterpictureinpicture',syncBubble);player.addEventListener('leavepictureinpicture',syncBubble); + controls.querySelector('#bubble-toggle').onclick=e=>{bubbles=!bubbles;e.currentTarget.setAttribute('aria-pressed',String(bubbles));e.currentTarget.textContent='Comment bubbles '+(bubbles?'on':'off');try{localStorage.setItem('screennote-comment-bubbles',bubbles?'on':'off')}catch{}syncBubble()}; + controls.querySelector('#add-moment').onclick=()=>{if(posting)return;player.pause();if(editing)return;target=null;stamp=player.currentTime;stampLocked=true;composer();saveDraft();form.scrollIntoView({block:'nearest'});input.focus({preventScroll:true})}; + overlay.onclick=e=>{const b=e.target.closest('[data-bubble]');if(b)reveal(b.dataset.bubble);else if(e.target.closest('.bubble-next')){bubbleIndex++;syncBubble()}else if(e.target.closest('.bubble-dismiss')){dismissed=bubbleSet;overlay.hidden=true}}; + rail.onclick=e=>{const b=e.target.closest('[data-moment]');if(b)reveal(b.dataset.moment)}; + input.oninput=()=>{attempt=null;if(!stampLocked&&!target&&!editing&&input.value.length){stamp=player.currentTime;stampLocked=true;status.textContent=`Timestamp pinned at ${relative(stamp)}.`}composer();saveDraft()};$('#reply-name').oninput=()=>{attempt=null;saveDraft()}; + const chip=$('#timestamp-chip');if(chip)chip.onclick=()=>{if(editing)return;if(stampLocked){stampLocked=false;stamp=player.currentTime;status.textContent='Timestamp now follows the playhead.'}else{stamp=player.currentTime;stampLocked=true;status.textContent=`Timestamp pinned at ${relative(stamp)}.`}composer();saveDraft()}; + $('#cancel-reply').onclick=()=>{if(editing){input.value=savedDraft?.text||'';target=savedDraft?.target||null;stamp=savedDraft?.stamp??player.currentTime;savedDraft=null}else target=null;editing=null;attempt=null;composer();saveDraft();input.focus()}; + const request=(op,body)=>api(op,{id:c.id,viewer,accessPassword,authorKey:identity.key,...(owner?{owner}:{}),...body}); + function accept(next){c=mergeDiscussion(c,next);update(c);render()} + form.onsubmit=async e=>{ + e.preventDefault();if(posting)return;posting=true;for(const node of form.querySelectorAll('input,textarea,button'))node.disabled=true;status.textContent='Saving…'; + try{ + if(editing){const next=await request('edit-comment',{commentId:editing.id,text:input.value,expectedVersion:editing.editedAt||editing.createdAt});editing=null;input.value=savedDraft?.text||'';target=savedDraft?.target||null;stamp=savedDraft?.stamp??player.currentTime;savedDraft=null;accept(next);status.textContent='Changes saved.'} + else{if(!attempt)attempt={eventId:randomId(),text:input.value,name:$('#reply-name').value||'Guest',time:target?.time??stamp,parentId:target?.id||null};const next=await request('comment',attempt);identity.ids.push(attempt.eventId);persistIdentity();const id=attempt.eventId;attempt=null;input.value='';target=null;stampLocked=false;draftRestored=false;accept(next);const thread=discussionThreads(c.comments).find(t=>t.items.some(x=>x.id===id));if(thread)expanded.add(thread.root.id);render();status.textContent='Comment posted.'} + composer();saveDraft(); + }catch(e){status.textContent='Not saved. Your text is still here.';error(e)}finally{posting=false;for(const node of form.querySelectorAll('input,textarea,button'))node.disabled=false} + }; + $('#thread-filter').onchange=render;$('#thread-sort').onchange=render; + $('#comments').onclick=async e=>{const b=e.target.closest('button');if(!b||b.disabled||posting)return;try{ + if(b.dataset.time!==undefined){player.currentTime=Number(b.dataset.time);player.play().catch(()=>{});return} + if(b.dataset.reply){chooseReply(b.dataset.reply);return} + if(b.dataset.show){reveal(b.dataset.show,false);return} + if(b.dataset.expand){expanded.has(b.dataset.expand)?expanded.delete(b.dataset.expand):expanded.add(b.dataset.expand);render();return} + if(b.dataset.link){const url=new URL(location.href);url.hash='comment='+b.dataset.link;try{await navigator.clipboard.writeText(url.href);notify('Link to comment copied.')}catch{const box=document.createElement('input');box.readOnly=true;box.value=url.href;box.className='comment-link';b.after(box);box.focus();box.select();status.textContent='Select and copy the comment link.'}return} + if(b.dataset.edit){if(!editing)savedDraft={text:input.value,target,stamp};editing=find(b.dataset.edit);input.value=editing.text;target=null;composer();input.focus();form.scrollIntoView({block:'nearest'});return} + if(b.dataset.remove){const item=find(b.dataset.remove);b.disabled=true;status.innerHTML=`Remove this comment? Replies will stay. `;$('#cancel-remove').onclick=()=>{status.textContent='';b.disabled=false};$('#confirm-remove').onclick=async()=>{try{accept(await request('delete-comment',{commentId:item.id}));status.textContent='Comment removed.'}catch(e){error(e);status.textContent='Could not remove comment.'}finally{b.disabled=false}};return} + if(b.dataset.resolve){b.disabled=true;const root=find(b.dataset.resolve);accept(await request('resolve-thread',{commentId:root.id,resolved:!root.resolved}));status.textContent=root.resolved?'Thread reopened.':'Thread resolved.'} + }catch(e){error(e)}finally{b.disabled=false}}; + composer();render();const resizeObserver=typeof ResizeObserver==='function'?new ResizeObserver(()=>render()):null;resizeObserver?.observe(stage);const match=location.hash.match(/^#comment=([a-f0-9-]{36})$/);if(match&&find(match[1])){reveal(match[1],false);player.addEventListener('loadedmetadata',()=>{player.currentTime=find(match[1])?.time??c.start},{once:true})} + return {update(next){if(destroyed)return;accept(next)},destroy(){destroyed=true;resizeObserver?.disconnect();saveDraft();player.removeEventListener('timeupdate',timeUpdate);player.removeEventListener('seeked',syncBubble);player.removeEventListener('enterpictureinpicture',syncBubble);player.removeEventListener('leavepictureinpicture',syncBubble);overlay.remove();rail.remove();controls.remove()}}; +} diff --git a/rebuild/legacy/public/extras-ui.js b/rebuild/legacy/public/extras-ui.js new file mode 100644 index 0000000..62c591f --- /dev/null +++ b/rebuild/legacy/public/extras-ui.js @@ -0,0 +1,8 @@ +import {parseCaptions,parseChapters,validateExtras,captionsVTT,reportMarkdown} from '../lib/enrichment.js'; +import {formatTime} from '../lib/rules.js'; +const esc=s=>String(s??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); +export function extrasPanel(c){const r=c.report||{};return`
Captions, chapters & bug report

Optional context, supplied by you. Saving shared context makes it visible to everyone with the video link. Check URLs and text for secrets.

Owner-supplied captions; automatic transcription is not enabled.

Bug report

${[['steps','Reproduction steps',2000],['expected','Expected result',1000],['actual','Actual result',1000]].map(([key,label,max])=>`
`).join('')}

No logs, cookies, browsing history or page contents are collected.

`} +export function mountExtras(c,{save,download,error}){const form=document.querySelector('#extras-form');if(!form)return;const $=s=>form.querySelector(s);$('#caption-file').onchange=async e=>{try{const f=e.target.files[0];if(!f)return;if(f.size>20000)throw Error('Use captions smaller than 20 KB.');const raw=await f.text();parseCaptions(raw,c.duration);$('#captions-text').value=raw;$('#extras-status').textContent='Captions loaded. Save video context to apply them.'}catch(e){error(e)}finally{e.target.value=''}};form.onsubmit=async e=>{e.preventDefault();const button=e.submitter;button.disabled=true;try{const raw=$('#captions-text').value;const report=Object.fromEntries(['url','steps','expected','actual','environment'].map(k=>[k,$('#report-'+k).value]));if($('#include-environment').checked)report.environment=navigator.userAgent.slice(0,300);const extras=validateExtras({captions:raw.trim()?parseCaptions(raw,c.duration):[],chapters:parseChapters($('#chapters-text').value,c.duration),report},c.duration);await save(extras);$('#report-environment').value=extras.report?.environment||'';$('#include-environment').checked=false;$('#export-captions').disabled=!extras.captions.length;$('#extras-status').textContent='Video context saved.';attachCaptions(document.querySelector('#player'),extras.captions)}catch(e){error(e)}finally{button.disabled=false}};$('#export-report').onclick=()=>download(new Blob([reportMarkdown(c,location.origin)],{type:'text/markdown'}),'screennote-bug-report.md');$('#export-captions').onclick=()=>download(new Blob([captionsVTT(c.captions||[])],{type:'text/vtt'}),'screennote-captions.vtt');attachCaptions(document.querySelector('#player'),c.captions||[])} +export function attachCaptions(video,cues){if(!video)return;let track=video._screennoteTrack;if(!track){track=video.addTextTrack('captions','Owner captions','en');video._screennoteTrack=track}for(const cue of [...(track.cues||[])])track.removeCue(cue);for(const c of cues)track.addCue(new VTTCue(c.start,c.end,c.text.replace(/&/g,'&').replace(//g,'>')));track.mode=cues.length?'showing':'disabled'} +export function viewerContext(c){return`${c.chapters?.length?`

Chapters

${c.chapters.map(x=>``).join('')}
`:''}${c.captions?.length?'

Transcript

':''}${c.report?`

Bug report

${[['url','Page'],['steps','Reproduction steps'],['expected','Expected'],['actual','Actual'],['environment','Environment (owner supplied)']].map(([k,label])=>c.report[k]?`

${label}

${esc(c.report[k])}

`:'').join('')}
`:''}`} +export function mountViewerContext(c,video,download){attachCaptions(video,c.captions||[]);const results=document.querySelector('#transcript-results'),search=document.querySelector('#transcript-search');if(search){const render=()=>{const q=search.value.toLocaleLowerCase(),matches=c.captions.filter(x=>x.text.toLocaleLowerCase().includes(q));results.innerHTML=matches.length?matches.map(x=>``).join(''):'

No matching captions.

'};search.oninput=render;render()}document.querySelectorAll('[data-seek]').forEach(b=>b.onclick=()=>{video.currentTime=Number(b.dataset.seek);video.play().catch(()=>{})});if(results)results.onclick=e=>{const b=e.target.closest('[data-seek]');if(b){video.currentTime=Number(b.dataset.seek);video.play().catch(()=>{})}};const exportButton=document.querySelector('#viewer-export-report');if(exportButton)exportButton.onclick=()=>download(new Blob([reportMarkdown({...c,shared:true},location.origin)],{type:'text/markdown'}),'screennote-bug-report.md')} diff --git a/rebuild/legacy/public/icon.svg b/rebuild/legacy/public/icon.svg new file mode 100644 index 0000000..436a24f --- /dev/null +++ b/rebuild/legacy/public/icon.svg @@ -0,0 +1 @@ + diff --git a/rebuild/legacy/public/index.html b/rebuild/legacy/public/index.html new file mode 100644 index 0000000..151d34f --- /dev/null +++ b/rebuild/legacy/public/index.html @@ -0,0 +1 @@ +ScreenNote · Show what you mean.

Opening ScreenNote…

diff --git a/rebuild/legacy/public/markup.js b/rebuild/legacy/public/markup.js new file mode 100644 index 0000000..abc5a39 --- /dev/null +++ b/rebuild/legacy/public/markup.js @@ -0,0 +1,3 @@ +// Annotations are normalized to the captured frame, then burned into its pixels. +export function paintMarkup(ctx,width,height,items){for(const m of items){const x=m.x*width,y=m.y*height,w=m.w*width,h=m.h*height;ctx.save();ctx.lineWidth=Math.max(3,width/250);ctx.strokeStyle='#ff6b35';ctx.fillStyle='rgba(255,210,40,.32)';if(m.kind==='redact'){ctx.fillStyle='#161a17';ctx.fillRect(x,y,w,h)}else if(m.kind==='blur'){const pad=Math.max(16,width*.025);ctx.save();ctx.beginPath();ctx.rect(x,y,w,h);ctx.clip();ctx.filter=`blur(${pad}px)`;ctx.drawImage(ctx.canvas,0,0);ctx.restore();ctx.fillStyle='rgba(20,25,20,.25)';ctx.fillRect(x,y,w,h)}else if(m.kind==='highlight'){ctx.fillRect(x,y,w,h)}else if(m.kind==='arrow'){ctx.beginPath();ctx.moveTo(x,y);ctx.lineTo(x+w,y+h);const a=Math.atan2(h,w),s=Math.max(14,width*.02);ctx.moveTo(x+w-s*Math.cos(a-.5),y+h-s*Math.sin(a-.5));ctx.lineTo(x+w,y+h);ctx.lineTo(x+w-s*Math.cos(a+.5),y+h-s*Math.sin(a+.5));ctx.stroke()}else ctx.strokeRect(x,y,w,h);ctx.restore()}} +export function bindMarkup(canvas,items,onChange=()=>{},source=null){let kind='rectangle',down=null;const point=e=>{const r=canvas.getBoundingClientRect();return{x:Math.max(0,Math.min(1,(e.clientX-r.left)/r.width)),y:Math.max(0,Math.min(1,(e.clientY-r.top)/r.height))}};function render(preview){if(!canvas.clientWidth||!canvas.clientHeight)return;const ctx=canvas.getContext('2d');canvas.width=Math.round(canvas.clientWidth*devicePixelRatio)||960;canvas.height=Math.round(canvas.clientHeight*devicePixelRatio)||540;ctx.clearRect(0,0,canvas.width,canvas.height);if(source?.readyState>=2)ctx.drawImage(source,0,0,canvas.width,canvas.height);paintMarkup(ctx,canvas.width,canvas.height,[...items,...(preview?[preview]:[])])}function shape(p){return kind==='arrow'?{kind,x:down.x,y:down.y,w:p.x-down.x,h:p.y-down.y}:{kind,x:Math.min(down.x,p.x),y:Math.min(down.y,p.y),w:Math.abs(p.x-down.x),h:Math.abs(p.y-down.y)}}canvas.onpointerdown=e=>{if(e.button!==0)return;down=point(e);canvas.setPointerCapture(e.pointerId)};canvas.onpointermove=e=>{if(down)render(shape(point(e)))};canvas.onpointerup=e=>{if(!down)return;const m=shape(point(e));down=null;if((Math.abs(m.w)>.005||Math.abs(m.h)>.005)&&items.length<40)items.push(m);render();onChange(items.length)};canvas.onpointercancel=()=>{down=null;render()};const observer=new ResizeObserver(()=>render());observer.observe(canvas);const timer=source?setInterval(()=>{if(!down)render()},100):null;render();return{setKind:k=>{kind=k},undo:()=>{items.pop();render();onChange(items.length)},clear:()=>{items.length=0;render();onChange(0)},destroy:()=>{observer.disconnect();clearInterval(timer)}}} diff --git a/rebuild/legacy/public/privacy.html b/rebuild/legacy/public/privacy.html new file mode 100644 index 0000000..73587b6 --- /dev/null +++ b/rebuild/legacy/public/privacy.html @@ -0,0 +1,52 @@ + + + + + +Privacy policy | ScreenNote + + + +
+ +

Privacy policy

+

ScreenNote — record, review and optionally share short screen videos with timestamped discussion. Android package za.co.buttercode.screennote.

+

Effective 26 October 2026.

+ +

1. Recording

+

Screen video is captured only after you approve Android's screen-capture consent dialog, and recording does not restart without fresh consent. If you switch the microphone on, your voice is recorded with the video. The app declares RECORD_AUDIO, POST_NOTIFICATIONS, FOREGROUND_SERVICE, FOREGROUND_SERVICE_MEDIA_PROJECTION and FOREGROUND_SERVICE_MICROPHONE so that a recording can continue behind a visible notification you can stop from. System audio and camera overlays are not captured in this version.

+ +

2. What stays on your device

+

Recordings, drafts and your recording library stay in the app's private storage until you choose to publish. Android cloud backup is switched off for this app (allowBackup="false").

+ +

3. What is uploaded, and only when you publish

+

When you explicitly publish a link, the video file and the details needed to serve it are uploaded: title, duration, size, expiry, and any password you set. Viewers can watch, react, and leave comments or replies, which are stored with the clip. A clip is limited to 10 minutes and 50 MB, and the service runs on a shared 1 GB storage budget.

+ +

4. Names and access are not verified

+

Display names and reviewer identities used in discussions are not verified. Creator and author controls rely on private capability links held by whoever created the content, not on a verified account. A displayed name is not proof of identity.

+ +

5. Retention and deletion

+

Published clips expire after the window the creator chooses — 1, 3 or 7 days (7 days by default). When a creator stops sharing or deletes a published clip, media links already handed out may keep working for up to about ten minutes, because links are signed to be valid for that long. Deleting the local recording does not delete a published copy; stop sharing or delete the published clip to do that. Expired, deleted and unclaimed uploads are reclaimed by the service's retention process. The app runs on third-party hosting, which keeps ordinary request logs such as IP address and browser information for its own default retention period; the app does not add analytics of its own.

+ +

6. What you record, and content responsibility

+

You are responsible for what you record and publish, and for having the right to record and share it, including anything visible on your screen. Reviewers' comments are stored with the clip. This build has no in-app report button for a viewer; if content shows you and you want it removed, contact the person who shared the link, or raise it through the contact route in section 10.

+ +

7. Security

+

Uploaded content is stored in private cloud storage and served through time-limited signed links. Password protection for a shared link is optional and chosen by the creator.

+ +

8. Children

+

ScreenNote is a work and product-feedback tool and is not directed at children.

+ +

9. Your control

+

You can delete local recordings at any time, and stop sharing or delete a published clip to remove it from the server. Requests to remove content that shows you: see section 10.

+ +

10. Contact

+

Privacy questions or removal requests: open an issue at github.com/buttercode101/ScreenNote/issues, or use the developer contact address shown on the app's Google Play listing.

+ +

11. Changes

+

If these practices change, this page is updated and carries a new effective date.

+ +
ScreenNote · This is the privacy policy referenced by the Google Play listing.
+

Publisher and support

Published by TheRealButter. For app support, privacy questions or data requests, email buttercode101@gmail.com.

+ + diff --git a/rebuild/legacy/public/style.css b/rebuild/legacy/public/style.css new file mode 100644 index 0000000..baba897 --- /dev/null +++ b/rebuild/legacy/public/style.css @@ -0,0 +1,77 @@ +:root{--bg:#f7f6f2;--panel:#fff;--soft:#eeede7;--text:#292c29;--muted:#62685f;--line:#dedfd7;--accent:#b43b1f;--tint:#f7e7df;--dark:#242d28;--light:#f3f4ea;color:var(--text);background:var(--bg);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none;color-scheme:light}*{box-sizing:border-box}:root[data-theme=dark]{--bg:#141b18;--panel:#1b2520;--soft:#25332b;--text:#eef1e9;--muted:#adbaad;--line:#3b4b3e;--accent:#ffb29a;--tint:#3f2d26;--dark:#0c120f;--light:#eef4e9;color-scheme:dark}body{margin:0}button,input,textarea{font:inherit}button,a,input,textarea{touch-action:manipulation}button,a{cursor:pointer}button{color:inherit}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #dd8155;outline-offset:3px}button{min-height:44px}button svg{width:18px;height:18px}svg{width:21px;height:21px;flex:none}a{color:var(--accent)}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(32px,4vw,50px);font-weight:550;letter-spacing:-1.9px;line-height:1.08;margin-bottom:17px}h2{font-size:21px;letter-spacing:-.6px;font-weight:550}h3{font-size:15px;font-weight:600}p{line-height:1.65}.muted{color:var(--muted)}.small{font-size:12px}.eyebrow{font-size:10px;letter-spacing:1.6px;font-weight:650;text-transform:uppercase;color:var(--accent);margin-bottom:15px}.shell{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:100dvh}.sidebar{width:220px;position:fixed;inset:0 auto 0 0;padding:28px 18px;border-right:1px solid var(--line);background:var(--panel);display:flex;flex-direction:column;overflow-y:auto}.brand{background:none;border:0;display:flex;align-items:center;gap:9px;font-weight:650;font-size:21px;letter-spacing:-.8px;text-align:left;padding:0}.brand img{width:32px;height:32px}.nav-label{margin:50px 12px 12px;font-size:10px;font-weight:650;color:var(--muted);letter-spacing:1.3px}.nav{display:grid;gap:8px}.nav button{border:0;text-align:left;padding:13px 14px;border-radius:8px;background:none;display:flex;gap:10px;align-items:center;font-size:13px}.nav .active{background:var(--tint);color:var(--accent);font-weight:650}.side-note{margin-top:auto;padding:22px 12px 0;font-size:12px;line-height:1.7;color:var(--muted);border-top:1px solid var(--line)}.side-note strong{display:block;color:var(--text);margin-bottom:8px}.workspace{grid-column:2;min-width:0}.topbar{height:78px;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:0 42px;border-bottom:1px solid var(--line)}.topbar .brand{display:none}.tag{font-size:10px;letter-spacing:1px;text-transform:uppercase;color:var(--muted)}.top-actions{display:flex;gap:12px;align-items:center}.icon-button{min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:8px;background:var(--panel);display:inline-grid;place-items:center}.content{max-width:1400px;padding:42px;margin:auto}.heading{display:flex;gap:24px;justify-content:space-between;align-items:center;margin-bottom:27px}.heading p{font-size:14px;color:var(--muted);max-width:480px;margin-bottom:0}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border:1px solid var(--line);border-radius:7px;padding:11px 16px;font-size:13px;font-weight:600;color:var(--text);background:var(--panel);text-decoration:none;white-space:nowrap}.btn:hover,.icon-button:hover{filter:brightness(.96)}.btn.primary{background:var(--accent);color:var(--panel);border-color:var(--accent)}:root[data-theme=dark] .btn.primary{color:#2f211b}.btn.dark{background:var(--text);color:var(--bg);border-color:var(--text)}.btn.danger{color:var(--accent)}.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.record-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(250px,1fr);gap:24px}.stage{border-radius:13px;min-height:340px;background:var(--dark);position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;color:var(--light)}.stage:before{content:'';position:absolute;inset:0;background-image:radial-gradient(#8b9e8b32 .75px,transparent .75px);background-size:16px 16px;pointer-events:none}.stage-inner{position:relative;text-align:center;padding:32px}.screen-symbol{width:155px;height:102px;border:1px solid #a9b8a26b;border-radius:9px;margin:0 auto 30px;display:grid;place-items:center;position:relative;background:#354038}.screen-symbol:after{content:'';position:absolute;width:52px;height:4px;background:#859580;bottom:-14px;border-radius:2px}.play-disc{width:48px;height:48px;display:grid;place-items:center;background:#f2efdd;border-radius:50%;color:#344236}.stage h2{font-size:24px;letter-spacing:-.7px;margin-bottom:8px}.stage p{font-size:12px;color:#b6c3b1;margin:0}.stage video{width:100%;max-height:440px;display:block;position:relative}.stage-top{position:absolute;top:18px;left:20px;font-size:10px;letter-spacing:1px;border:1px solid #64755e;border-radius:20px;padding:6px 10px;z-index:1}.stage .live-dot{display:inline-block;background:#ef7759;border-radius:50%;width:7px;height:7px;margin-right:6px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:25px;min-width:0}.panel h2{margin-bottom:8px}.panel p{font-size:12px;color:var(--muted)}.option{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 0;border-bottom:1px solid var(--line)}.option>div{display:flex;gap:12px;align-items:center}.option strong{display:block;font-size:13px;font-weight:550}.option small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.option input{width:36px;height:21px;accent-color:var(--accent);flex:none}.record-options .btn.primary{width:100%;margin-top:24px}.record-options .import-label{display:flex;justify-content:center;cursor:pointer;padding:12px 0;font-size:12px;color:var(--muted);font-weight:600}.file-input{width:100%;font-size:12px;margin-top:8px;color:var(--muted)}.meta-strip{display:flex;justify-content:space-between;gap:18px;font-size:11px;color:var(--muted);padding:15px 0 0;line-height:1.6}.section-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:42px 0 20px}.section-head h2{margin:0}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.clip-card{border:1px solid var(--line);background:var(--panel);border-radius:10px;overflow:hidden;min-width:0}.clip-art{aspect-ratio:16/9;background:var(--soft);display:grid;place-items:center;position:relative}.clip-art img{width:100%;height:100%;object-fit:cover}.clip-art .duration{position:absolute;right:12px;bottom:12px;font-size:10px;border-radius:4px;padding:4px 6px;background:#17231edf;color:#fff}.clip-body{padding:17px}.clip-body h3{overflow-wrap:anywhere;margin-bottom:7px}.clip-body .btn{margin-top:14px;width:100%;font-size:12px}.clip-status{font-size:10px;color:var(--muted)}.empty{grid-column:1/-1;text-align:center;padding:37px;border:1px dashed var(--line);border-radius:12px;background:var(--soft)}.empty p{font-size:12px;color:var(--muted)}.empty h3{margin-bottom:7px}.empty .btn{margin-top:5px}.footer{display:flex;justify-content:space-between;gap:16px;font-size:11px;color:var(--muted);margin-top:40px;padding-top:22px;border-top:1px solid var(--line);line-height:1.7}.error-box{border:1px solid #d78c71;background:var(--tint);padding:14px 18px;border-radius:8px;margin-bottom:20px;font-size:13px;line-height:1.6;overflow-wrap:anywhere}.error-box:empty{display:none}.editor-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px}.video-panel{background:var(--dark);border-radius:12px;overflow:hidden}.video-panel video{display:block;width:100%;aspect-ratio:16/9;max-height:65vh}.field{display:flex;flex-direction:column;gap:8px;margin-bottom:18px;min-width:0}.field label{font-size:12px;font-weight:600}.field input,.field textarea{width:100%;min-height:45px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--text);padding:11px 12px;font-size:14px}.field textarea{resize:vertical;min-height:90px}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.small-label{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--muted);margin:0 0 10px}.editor-actions{padding:18px 0;display:flex;gap:10px;flex-wrap:wrap}.notice{background:var(--soft);border-radius:8px;padding:14px 17px;font-size:12px;line-height:1.7;color:var(--muted);margin:18px 0}.share-link{word-break:break-all;display:block;padding:11px 12px;background:var(--soft);font-size:12px;border:1px solid var(--line);border-radius:6px;margin-bottom:12px;color:var(--accent)}.full{width:100%}.progress{height:5px;background:var(--soft);border-radius:3px;overflow:hidden;margin-top:16px}.progress>div{height:100%;background:var(--accent);transition:width .2s}.live-controls{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:20px}.timer{font-size:30px;font-variant-numeric:tabular-nums;font-weight:500;min-width:100px}.recording .stage{border:2px solid #da6847}.reactions{display:flex;gap:10px;margin:20px 0;flex-wrap:wrap}.reactions button[aria-pressed=true]{border-color:var(--accent);background:var(--tint)}.comment{padding:17px 0;border-bottom:1px solid var(--line);font-size:13px}.comment-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}.comment-head strong{font-size:12px}.timestamp{color:var(--accent);background:var(--tint);border:0;min-height:30px;font-size:11px;padding:4px 8px;border-radius:4px}.comment p{overflow-wrap:anywhere;margin-bottom:0;white-space:pre-wrap}.viewer-top{max-width:1200px;margin:auto;padding:23px 32px;display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line)}.viewer{max-width:1200px;margin:auto;padding:36px 32px}.viewer h1{font-size:34px;line-height:1.25;overflow-wrap:anywhere}.viewer-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(270px,1fr);gap:26px}.reply-panel{max-height:800px;overflow:auto}.viewer .video-panel video{min-height:220px}.privacy{max-width:760px}.privacy h2{margin-top:30px}#notice{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:calc(100% - 30px);background:var(--text);color:var(--bg);font-size:13px;line-height:1.6;padding:13px 20px;border-radius:8px;z-index:50;display:none}.skip{position:fixed;left:10px;top:-80px;background:var(--panel);padding:12px;z-index:99}.skip:focus{top:10px}.loading{padding:40px}dialog{max-width:560px;width:calc(100% - 32px);max-height:calc(100dvh - 32px);border:1px solid var(--line);padding:25px;border-radius:12px;background:var(--panel);color:var(--text)}dialog::backdrop{background:#0e1a1377}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)} +@media(min-width:1600px){.content{padding-top:58px}}@media(max-width:1150px){.record-grid{grid-template-columns:minmax(0,1.3fr) minmax(240px,1fr)}.content{padding:30px}.topbar{padding:0 30px}.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-grid{grid-template-columns:minmax(0,1fr)}.editor-grid>aside{display:grid;grid-template-columns:1fr 1fr;gap:20px}.viewer-grid{grid-template-columns:minmax(0,1fr)}}@media(max-width:1024px){.shell{grid-template-columns:180px minmax(0,1fr)}.sidebar{width:180px;padding:25px 14px}.sidebar .brand{font-size:18px}.sidebar .brand img{width:28px;height:28px}.content{padding:28px 24px}.topbar{padding:0 24px}.record-grid{grid-template-columns:minmax(0,1fr)}.record-options .option{padding:13px 0}.record-options .btn.primary{margin-top:19px}.stage{min-height:310px}}@media(max-width:767px){.shell{display:block}.sidebar{display:none}.workspace{display:block}.topbar{height:70px;padding:0 20px}.topbar .brand{display:flex;font-size:19px}.breadcrumb{display:none}.tag{font-size:9px}.top-actions{gap:9px}.content{padding:28px 20px}.heading{align-items:start;gap:16px}.heading h1{font-size:36px}.heading p{font-size:13px}.heading .actions .btn{padding:10px 12px}.record-grid{gap:16px}.stage{min-height:280px}.stage h2{font-size:23px}.panel{padding:21px}.meta-strip{flex-wrap:wrap;gap:4px;font-size:11px}.section-head{margin-top:32px}.clip-grid{gap:14px}.clip-body{padding:14px}.clip-body h3{font-size:14px}.empty{padding:28px 20px}.footer{display:block}.footer span{display:block;margin-bottom:7px}.editor-grid>aside{display:block}.editor-grid>aside>.panel{margin-bottom:17px}.viewer-top{padding:18px 20px}.viewer-top .brand{font-size:18px}.viewer{padding:28px 20px}.viewer h1{font-size:27px;letter-spacing:-1px}.field input,.field textarea{font-size:16px}.viewer .video-panel video{min-height:0}.viewer-grid{gap:20px}.reply-panel{max-height:none}.editor-actions{gap:8px}.editor-actions .btn{font-size:12px}.timer{font-size:27px}}@media(max-width:480px){.clip-grid{grid-template-columns:minmax(0,1fr)}.topbar .tag{display:none}.heading{flex-wrap:wrap}.heading h1{font-size:35px}.screen-symbol{width:130px;height:90px}.record-grid .stage{min-height:265px}.content{padding:26px 17px}.field-row{gap:10px}.viewer-top>.btn{font-size:11px;padding:9px 11px}.stage-inner{padding:24px}.live-controls{flex-wrap:wrap}.reactions .btn{font-size:12px;padding:9px 11px}.clip-art{aspect-ratio:2/1}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}} + +.record-options .btn{white-space:normal}.file-input::file-selector-button{border:1px solid var(--line);border-radius:5px;background:var(--soft);color:var(--text);padding:8px 10px;margin-right:10px;font:inherit;cursor:pointer}button:disabled{cursor:not-allowed} + +/* Stable narrow layouts and readable interactive text. */ +.record-grid>*,.editor-grid>*,.viewer-grid>*{min-width:0}.option strong{font-size:14px}.option small{font-size:12px}.file-input{width:100%;min-width:0}.error-box:empty{display:none}.error-box{overflow-wrap:anywhere}.clip-status{line-height:1.6}.timestamp{min-height:44px;min-width:44px}.viewer-top{align-items:center}.viewer-top>.btn{white-space:normal;text-align:center}.reactions .btn{white-space:normal}.notice[role=status]{overflow-wrap:anywhere}@media(max-width:360px){.viewer-top{gap:12px;padding:16px}.viewer-top .brand{font-size:17px}.topbar{gap:8px;padding:0 16px}.top-actions{gap:6px}} + +/* Text must wrap inside components, including overflow toward the left. */ +h1,h2,h3,.panel p,.notice,.comment-head strong{overflow-wrap:anywhere} +.heading>div,.comment-head strong,.option>div,.footer>span{min-width:0} +.btn{max-width:100%;white-space:normal;text-align:center;overflow-wrap:anywhere} +.dialog-actions{flex-wrap:wrap}.dialog-actions .btn{flex:0 1 auto} +.comment-head{align-items:flex-start}.comment-head strong{flex:1}.comment-head .timestamp{flex:none} +.recording-title{font-size:clamp(27px,3vw,34px);line-height:1.2} + +[hidden]{display:none!important} +.panel p,.empty p,.stage p{font-size:14px}.notice,.small{font-size:13px}.clip-status,.footer,.meta-strip{font-size:12px} + +#notice{pointer-events:none;overflow-wrap:anywhere} + +/* Recording tools and portable context. */ +.extra-panel{margin-top:24px}.extra-panel summary{font-size:17px;font-weight:650;cursor:pointer;padding:8px 0;min-height:44px}.extra-panel[open] summary{margin-bottom:16px}.extra-panel textarea{width:100%;resize:vertical}.extra-panel input:not([type=checkbox]),.context-panel input{width:100%;max-width:100%;box-sizing:border-box}.consent{display:flex;gap:12px;align-items:flex-start;line-height:1.6}.consent input{flex:none;width:20px;height:20px}.context-panel{margin-top:24px}.pre-wrap{white-space:pre-wrap;overflow-wrap:anywhere}.chapter-list,.tool-controls{display:flex;gap:8px;flex-wrap:wrap}.transcript-cue{display:flex;gap:12px;width:100%;text-align:left;background:none;border:0;border-bottom:1px solid var(--line);padding:12px 0;min-height:44px;cursor:pointer;color:inherit;font:inherit}.transcript-cue span:first-child{flex:none;color:var(--accent)}.transcript-cue span:last-child{min-width:0;overflow-wrap:anywhere}.capture-frame{position:relative;line-height:0;background:#17251c;border-radius:12px;overflow:hidden}.capture-frame video{width:100%;height:auto;max-height:65vh;display:block;object-fit:contain}.capture-frame canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair}.tool-controls{align-items:center;margin:16px 0}.tool-controls label{display:flex;gap:8px;align-items:center}.tool-controls select{max-width:100%;min-height:44px}.setup-note{margin:16px 0;line-height:1.7}.countdown{font-size:24px;font-weight:700;min-height:36px}.player-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}.player-tools label{display:flex;align-items:center;gap:8px}.player-tools select{min-height:44px}.record-options select{width:100%;margin:8px 0 16px}.help-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:24px}.beta-note{padding:14px 18px;border:1px solid var(--line);border-radius:10px;font-size:13px;line-height:1.6;margin-bottom:24px}.field select{width:100%;min-height:44px}.canvas-editor{margin-top:24px}.canvas-editor .capture-frame video{max-height:none}.context-panel h3{margin-top:18px}.context-panel input{margin:12px 0}.extra-panel .field small{display:block;margin-top:8px}.tool-controls>*{min-width:0}@media(max-width:480px){.player-tools,.tool-controls{gap:8px}.capture-frame video{max-height:none}.extra-panel{padding:18px}} +progress{width:100%;height:12px;margin-top:16px;accent-color:var(--accent)}select{font:inherit;color:var(--text);background:var(--panel);border:1px solid var(--line);border-radius:7px;padding:9px;min-width:0}select:focus-visible,summary:focus-visible{outline:3px solid #dd8155;outline-offset:3px} +.context-panel input{min-height:44px;padding:11px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--text);font:inherit}.canvas-editor summary{font-size:17px;font-weight:650;cursor:pointer;min-height:44px;padding:8px 0}.canvas-editor[open] summary{margin-bottom:16px} + +/* In stacked layouts, put the recording task before decorative artwork. */ + + +.import-only .option,.import-only .field,.import-only [data-action=record]{display:none} + +#main:focus{outline:none} + +/* Keep pointer coordinates aligned with captured pixels, including portrait sources. */ +.capture-frame{width:min(100%,calc(65vh * var(--capture-ratio,1.7777778)));aspect-ratio:var(--capture-ratio,1.7777778);margin-inline:auto} +.capture-frame video,.canvas-editor .capture-frame video{width:100%;height:auto;max-height:none} + +/* Review follows the task: title, preview, share, optional tools. */ +.heading h1.recording-title{font-size:clamp(24px,3vw,30px);line-height:1.2;letter-spacing:-.8px} +.editor-heading{margin-bottom:20px}.title-field{max-width:900px;margin-bottom:22px} +.title-controls{display:flex;gap:10px;align-items:stretch}.title-controls input{min-width:0;flex:1} +.title-controls .btn{flex:none}.title-field #title-status:empty{display:none} +.source-filename{font-size:12px;color:var(--muted)}.source-filename span{display:block;padding-top:8px;overflow-wrap:anywhere} +.source-filename summary,.local-options summary,.password-options summary{cursor:pointer;min-height:44px;display:flex;align-items:center} +.editor-preview{min-width:0}.editor-tools{grid-column:1/-1;display:grid;gap:12px;align-content:start} +.editor-tools .panel{margin:0;padding:16px 20px}.editor-tools summary{font-size:15px;font-weight:600;cursor:pointer;min-height:44px;padding:8px 0} +.editor-tools details[open] summary{margin-bottom:12px}.editor-tools details p{font-size:13px} +.video-panel{width:min(100%,calc(65dvh * var(--media-ratio,1.7777778)));margin-inline:auto} +.video-panel video{width:100%;height:auto;aspect-ratio:auto;max-height:none;object-fit:contain} +.viewer .video-panel video{min-height:0}.editor-actions{padding:12px 0;justify-content:space-between} +.local-options{position:relative;font-size:13px}.local-options[open] .btn{display:block;margin-top:8px} +.password-options{margin-bottom:14px;font-size:13px}.password-options .field{margin-top:8px} +.editor-grid>aside>.panel{padding:20px}.editor-grid>aside .eyebrow{margin-bottom:8px} +.editor-grid>aside .notice{font-size:12px;margin:12px 0;padding:12px} +.reply-panel{align-self:start}.viewer-grid{align-items:start} +@media(max-width:1150px){.editor-grid>aside{display:block}.editor-grid{gap:16px}} +@media(max-width:767px){.editor-heading p{font-size:13px}.title-field{margin-bottom:16px}.editor-tools .panel{padding:12px 16px}.viewer{padding-top:20px}.viewer h1{font-size:24px;line-height:1.25}.viewer .eyebrow{margin-bottom:10px}.reactions{margin:12px 0}.viewer-grid{gap:16px}.panel.reply-panel{padding:18px}.reply-panel h2{font-size:20px}} +@media(max-width:480px){.content{padding:20px 16px}.editor-heading{gap:12px;margin-bottom:16px}.heading h1.recording-title{font-size:26px}.editor-heading>div{flex:1 1 160px}.title-controls{gap:8px}.title-controls .btn{padding:10px 12px}.editor-grid>aside>.panel{padding:18px}.viewer{padding-inline:16px}.viewer h1{font-size:24px}.player-tools{font-size:13px}} +@media(max-width:767px){.editor-heading{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}.editor-heading>.btn{order:-1;justify-self:start;min-height:36px;padding:6px 10px;font-size:12px}.editor-heading>div{width:100%}.editor-heading h1{margin-bottom:8px}.local-options .source-filename{max-width:260px}.local-options .source-filename summary{min-height:36px}} + +/* Conversation threads keep one readable reply level, regardless of ancestry. */ +.discussion-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.discussion-heading h2{font-size:23px;line-height:1.15}.discussion-heading .eyebrow{margin-bottom:8px}.count-pill{background:var(--soft);border:1px solid var(--line);border-radius:24px;min-width:36px;padding:8px;text-align:center;font-size:13px}.reply-panel{max-height:none;overflow:visible}.reply-panel #reply-form{padding:16px 0 20px}.reply-panel .field{margin-bottom:12px}.reply-panel .field textarea{min-height:100px}.compose-meta{display:flex;align-items:center;justify-content:space-between;gap:8px}.text-button{background:none;border:0;color:var(--accent);padding:8px 6px;min-height:44px;font-size:12px;font-weight:600;text-align:left;overflow-wrap:anywhere}.text-button:hover{text-decoration:underline}.reply-context{border-left:3px solid var(--accent);background:var(--tint);padding:10px 12px;margin:0 0 14px;font-size:12px;overflow-wrap:anywhere}.reply-context strong,.reply-context span{display:block}.reply-context span{margin-top:5px;line-height:1.5}.discussion-toolbar{display:flex;gap:8px;flex-wrap:wrap;border-top:1px solid var(--line);padding:16px 0}.discussion-toolbar select{font-size:12px;min-height:44px;flex:1}.discussion-thread{border:1px solid var(--line);border-radius:10px;margin:0 0 14px;padding:0 14px;background:var(--panel)}.discussion-thread .comment{padding:14px 0}.discussion-thread .thread-reply{margin-left:12px;padding-left:12px;border-left:2px solid var(--line);border-bottom:0}.discussion-thread .comment-head{align-items:center;gap:8px;margin-bottom:6px}.comment-avatar{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:var(--soft);font-size:12px;font-weight:650}.comment-head strong{font-size:12px;line-height:1.5}.comment-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:5px}.comment-actions .text-button{padding-inline:2px}.creator-badge{font-size:10px;color:var(--accent);border:1px solid var(--line);padding:2px 4px;border-radius:4px;display:inline-block}.parent-reference{display:block;font-size:11px;color:var(--muted);max-width:100%;line-height:1.5;padding:4px 0;min-height:32px}.resolve-thread{width:100%;border-top:1px solid var(--line);color:var(--muted)}.is-resolved{background:var(--soft)}.resolved-label{padding-top:12px;font-size:11px;color:var(--muted);font-weight:650}.comment-selected{background:var(--tint);outline:2px solid var(--accent);outline-offset:4px;border-radius:4px}.discussion-empty{font-size:14px;padding:20px 0}.comment-link{width:100%;padding:10px;min-width:0}.conversation-stage{position:relative}.comment-overlay{position:absolute;z-index:2;top:12px;left:12px;right:12px;pointer-events:none;display:flex;justify-content:flex-start}.moment-bubble{display:flex;align-items:flex-start;max-width:min(370px,90%);border:1px solid #ffffff55;border-radius:12px 12px 12px 3px;background:#18221def;color:#fff;box-shadow:0 4px 18px #0003;pointer-events:auto;overflow:hidden;backdrop-filter:blur(8px)}.bubble-main{display:flex;flex-direction:column;gap:5px;align-items:flex-start;background:none;color:inherit;border:0;text-align:left;padding:12px;min-width:0;min-height:44px;flex:1}.bubble-byline{font-size:11px;font-weight:650;overflow-wrap:anywhere;line-height:1.4}.bubble-byline>span{font-weight:400;color:#d1dace}.bubble-text{font-size:13px;line-height:1.45;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.bubble-hint{font-size:10px;color:#d1dace}.bubble-side{display:flex;flex-direction:column;flex:none}.bubble-side button{border:0;background:none;color:#fff;min-width:44px;min-height:44px;font-size:13px}.bubble-dismiss{font-size:24px!important}.conversation-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}.conversation-controls .btn{font-size:12px}.conversation-controls [aria-pressed=true]{background:var(--tint);border-color:var(--accent)}.comment-timeline{position:relative;height:44px;border-bottom:2px solid var(--line);margin-top:2px}.comment-timeline:before{content:'';position:absolute;left:0;right:0;top:21px;border-top:2px solid var(--line)}.moment-marker{position:absolute;left:var(--moment);transform:translateX(-50%);min-width:44px;width:44px;min-height:44px;height:44px;padding:0;background:none;border:0;color:var(--accent);display:grid;place-items:center;z-index:1}.moment-marker>span{font-size:12px;border-radius:50%;width:20px;height:20px;display:grid;place-items:center;background:var(--tint);border:1px solid var(--accent)}.moment-marker:hover>span{background:var(--accent);color:var(--panel)}.viewer-media{min-width:0}.viewer-top .icon-button{flex:none} +@media(min-width:1151px){.viewer-grid{grid-template-columns:minmax(0,1.55fr) minmax(330px,1fr)}.viewer-media{position:sticky;top:20px}} +@media(max-width:480px){.moment-bubble{max-width:100%}.bubble-main{padding:9px 10px;gap:3px}.comment-overlay{top:8px;left:8px;right:8px}.bubble-text{font-size:12px}.bubble-byline{font-size:10px}.bubble-hint{display:none}.discussion-thread{padding-inline:10px}.discussion-thread .thread-reply{margin-left:5px;padding-left:9px}.discussion-heading h2{font-size:21px}.panel.reply-panel{padding:16px}.discussion-toolbar select{font-size:12px}.conversation-controls .btn{flex:1;padding:8px}.comment-head .timestamp{padding:4px}.comment-avatar{width:24px;height:24px}} + +/* A focused workspace, with motion that communicates state. */ +.library-heading h1{font-size:clamp(30px,3.6vw,44px);letter-spacing:-1.5px}.library-heading{align-items:center;margin-bottom:18px}.workspace-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;color:var(--muted);padding-bottom:24px}.workspace-summary .text-button{margin-left:auto}.status-dot{width:7px;height:7px;background:#518366;border-radius:50%}.library-section{margin-bottom:28px}.library-section .section-head{margin-top:18px}.library-filters{display:grid;grid-template-columns:minmax(0,1fr) 170px 150px;gap:12px}.library-filters .field{margin-bottom:0}.library-filters input,.library-filters select{min-height:44px;width:100%}.library-filters select,.record-defaults select,.advanced-recording select,.review-status-panel select{padding:10px 12px;border:1px solid var(--line);border-radius:7px;color:var(--text);background:var(--panel);font:inherit;min-width:0;max-width:100%}.library-filters+.small{margin:10px 0 16px}.record-setup{margin:20px 0 32px}.record-setup>summary{cursor:pointer;font-size:14px;font-weight:600;padding:16px 0;min-height:48px;border-top:1px solid var(--line)}.compact-recorder{grid-template-columns:minmax(0,1.25fr) minmax(240px,1fr);gap:24px}.recorder-intro{display:flex;justify-content:space-between;gap:15px;align-items:center}.recorder-intro>.svg,.recorder-intro>svg{width:32px;height:32px;color:var(--accent)}.recorder-intro .eyebrow{font-size:9px;margin-bottom:10px}.record-options .btn.primary{margin-top:8px;min-height:48px}.record-defaults{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;margin-top:12px;align-items:center}.record-defaults .option{border:0}.record-defaults .field{margin:0}.record-defaults select{font-size:13px}.advanced-recording{border-top:1px solid var(--line);margin-top:14px}.advanced-recording>summary{min-height:48px;display:list-item;padding:16px 0;cursor:pointer;font-size:12px;color:var(--muted)}.advanced-recording .field{margin-top:14px}.record-limits{font-size:11px!important;margin:12px 0 0}.record-guide{border:1px solid var(--line);border-radius:12px;background:var(--soft);padding:28px}.guide-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:var(--dark);color:var(--light);margin-bottom:20px}.record-guide h2{font-size:25px}.record-guide ol{padding-left:20px;display:grid;gap:16px;color:var(--muted);font-size:13px;line-height:1.65;margin:20px 0}.record-guide li strong{color:var(--text)}.record-guide .btn{white-space:normal;width:100%}.clip-art{width:100%;padding:0;border:0;color:var(--text)}.card-play{position:absolute;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#fffdf2ed;color:#253c2d;opacity:0;transform:scale(.9);transition:opacity .18s,transform .18s}.clip-art:hover .card-play,.clip-art:focus-visible .card-play{opacity:1;transform:scale(1)}.card-badges{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.clip-badge,.review-badge{font-size:10px;border-radius:5px;padding:4px 7px;background:var(--soft);color:var(--muted)}.clip-badge.shared{background:var(--tint);color:var(--accent)}.review-badge[data-review=approved]{background:#e2eee4;color:#285538}.review-badge[data-review=changes-requested]{background:#f4e5d4;color:#794619}.card-actions{display:flex;gap:8px;align-items:center;margin-top:14px}.card-actions>.btn{margin-top:0;flex:1;width:auto}.card-actions>.icon-button{flex:none}.review-status-panel{margin-top:14px}.review-status-panel label{display:block;font-size:12px;font-weight:600;margin-bottom:10px}.review-status-panel select{width:100%;font-size:13px}.review-status-panel p{margin-bottom:0}.recovery-note summary{cursor:pointer;font-weight:600}.recovery-note p{margin-bottom:0}.capture-metrics{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;background:var(--soft);padding:16px;border-radius:10px;margin:16px 0}.capture-metrics strong{font-variant-numeric:tabular-nums;margin-right:12px}.capture-metrics span{font-size:12px;color:var(--muted)}.capture-metrics p{grid-column:1/-1;font-size:12px;margin:0}.capture-metrics p:empty{display:none}.mic-meter-label{font-size:12px;display:flex;align-items:center;gap:10px}.mic-meter-label meter{width:100px}.recording .capture-frame{max-height:58vh}.recording .capture-frame video{max-height:58vh;object-fit:contain}.live-controls{position:sticky;bottom:12px;z-index:8;background:var(--panel);padding:12px 20px;border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 30px #14231c16;width:fit-content;margin:12px auto}.is-live #recording-status:before{content:'';display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--accent);margin-right:8px;animation:record-pulse 1.6s ease-in-out infinite}.is-paused #recording-status:before{animation:none;background:var(--muted)}.is-paused .timer{color:var(--muted)}.countdown:not(:empty){padding:16px;border-radius:10px;text-align:center;background:var(--tint);color:var(--accent);font-size:26px;font-weight:650;animation:count-in .3s ease-out}.camera-handle{position:absolute;z-index:6;background:#15231b22;border:2px dashed #fff;border-radius:50%;color:white;font-size:10px;min-height:0;touch-action:none;cursor:move;display:grid;place-items:center;text-shadow:0 1px 4px black}.camera-handle:hover,.camera-handle:focus-visible{background:#15231b88}.bubble-settings{display:flex;gap:20px;align-items:center;flex-wrap:wrap;font-size:12px;margin:12px 0}.bubble-settings label{display:flex;gap:12px;align-items:center}.sample-feedback blockquote{margin-left:18px;padding-left:14px;border-left:2px solid var(--line);font-size:13px}.sample-feedback p{font-size:13px}.share-problem .btn{margin-top:12px;width:100%;white-space:normal}.btn,.icon-button{transition:background-color .18s,border-color .18s,transform .18s,box-shadow .18s}.btn:active,.icon-button:active{transform:scale(.98)}.clip-card{transition:border-color .18s,box-shadow .18s;animation:surface-in .22s ease-out}.clip-card:hover{border-color:var(--muted);box-shadow:0 4px 14px #16241b0d}dialog[open]{animation:surface-in .18s ease-out}.moment-bubble{animation:bubble-in .2s ease-out}#notice{animation:toast-in .18s ease-out}progress{accent-color:var(--accent)} +@keyframes record-pulse{0%,100%{opacity:1;box-shadow:0 0 0 0 #c4472633}50%{opacity:.55;box-shadow:0 0 0 5px #c4472600}}@keyframes count-in{from{opacity:.3;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes surface-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@keyframes bubble-in{from{opacity:0;transform:translateY(6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes toast-in{from{opacity:0;margin-bottom:-5px}to{opacity:1;margin-bottom:0}} +@media(max-width:1024px){.compact-recorder{grid-template-columns:minmax(0,1fr)}.record-guide{display:none}.library-filters{grid-template-columns:minmax(0,1fr) 145px 135px}} +@media(max-width:767px){.library-heading{align-items:start}.library-heading .actions{width:100%}.library-heading .actions>.btn{flex:1}.library-heading h1{font-size:32px}.workspace-summary{font-size:11px;gap:7px;padding-bottom:8px}.workspace-summary .text-button{margin-left:0}.library-filters{grid-template-columns:1fr 1fr;gap:10px}.library-filters .field:first-child{grid-column:1/-1}.record-defaults{grid-template-columns:1fr;gap:0}.record-defaults .option{padding:14px 0}.record-defaults .field{margin-bottom:8px}.capture-metrics{grid-template-columns:1fr}.capture-metrics strong{display:block;margin-bottom:5px}.live-controls{bottom:8px;width:100%;padding:10px;gap:8px}.live-controls .btn{padding:10px}.live-controls .timer{font-size:24px;min-width:65px}.recording .capture-frame,.recording .capture-frame video{max-height:44vh}.card-play{opacity:1;transform:none;width:32px;height:32px}.review-status-panel{padding:18px}.record-setup{margin-top:12px}} +@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}} + +@media(max-width:360px){.library-filters{grid-template-columns:1fr}.library-filters .field:first-child{grid-column:auto}.library-heading .actions{flex-direction:column;align-items:stretch}.library-heading .actions>.btn{width:100%;min-height:44px}} +/* The import target stays accessible to its label without widening narrow pages. */ +.file-input.visually-hidden{position:fixed;width:1px;height:1px;left:0;top:0;padding:0;margin:0;clip-path:inset(50%);overflow:hidden} +.viewer-review{display:inline-block;margin:0 0 20px;font-size:12px} + From 8a73a45f08d1dcecbb8ec66dc72406c511644256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:31:39 +0200 Subject: [PATCH 105/575] Restore original ScreenNote feature modules (2/4) --- rebuild/legacy/lib/access.js | 5 +++ rebuild/legacy/lib/capacity.js | 35 +++++++++++++++++ rebuild/legacy/lib/comment-actions.js | 42 ++++++++++++++++++++ rebuild/legacy/lib/discussion.js | 20 ++++++++++ rebuild/legacy/lib/draft-writer.js | 14 +++++++ rebuild/legacy/lib/enrichment.js | 10 +++++ rebuild/legacy/lib/feedback.js | 56 +++++++++++++++++++++++++++ rebuild/legacy/lib/import-media.js | 11 ++++++ rebuild/legacy/lib/library.js | 7 ++++ rebuild/legacy/public/ticker.js | 1 + 10 files changed, 201 insertions(+) create mode 100644 rebuild/legacy/lib/access.js create mode 100644 rebuild/legacy/lib/capacity.js create mode 100644 rebuild/legacy/lib/comment-actions.js create mode 100644 rebuild/legacy/lib/discussion.js create mode 100644 rebuild/legacy/lib/draft-writer.js create mode 100644 rebuild/legacy/lib/enrichment.js create mode 100644 rebuild/legacy/lib/feedback.js create mode 100644 rebuild/legacy/lib/import-media.js create mode 100644 rebuild/legacy/lib/library.js create mode 100644 rebuild/legacy/public/ticker.js diff --git a/rebuild/legacy/lib/access.js b/rebuild/legacy/lib/access.js new file mode 100644 index 0000000..bbc989d --- /dev/null +++ b/rebuild/legacy/lib/access.js @@ -0,0 +1,5 @@ +import {scrypt,randomBytes,timingSafeEqual} from 'node:crypto'; +import {promisify} from 'node:util'; +const derive=promisify(scrypt); +export async function passwordRecord(password){if(password===undefined||password==='')return{};if(typeof password!=='string'||password.length<8||password.length>128)throw Error('Use a sharing password of 8–128 characters.');const passwordSalt=randomBytes(16).toString('hex'),passwordHash=(await derive(password,passwordSalt,32)).toString('hex');return{passwordSalt,passwordHash}} +export async function checkPassword(c,password){if(!c.passwordHash)return true;if(typeof password!=='string'||password.length>128)return false;const computed=await derive(password,c.passwordSalt,32);return timingSafeEqual(computed,Buffer.from(c.passwordHash,'hex'))} diff --git a/rebuild/legacy/lib/capacity.js b/rebuild/legacy/lib/capacity.js new file mode 100644 index 0000000..f0ff7ad --- /dev/null +++ b/rebuild/legacy/lib/capacity.js @@ -0,0 +1,35 @@ +import {MAX_BYTES, MAX_SHARED, STORAGE_BUDGET_BYTES} from './rules.js'; +import {RETENTION_GRACE} from './retention.js'; + +// Two copies may coexist while chunks are assembled. Release that extra +// allocation only after part cleanup succeeds. All updates use the same CAS. +export const defaultCapacityLimits = {maxBytes: STORAGE_BUDGET_BYTES, maxClips: MAX_SHARED}; +export function capacityBytes(capacity) { + return (capacity?.ids || []).reduce((sum,id) => sum + (capacity.allocations?.[id] ?? 2 * MAX_BYTES), 0); +} +export function hasCapacity(capacity, bytes, limits = defaultCapacityLimits) { + return (capacity?.ids?.length || 0) < limits.maxClips && capacityBytes(capacity) + bytes <= limits.maxBytes; +} +export function reserveCapacity(capacity, id, size, limits = defaultCapacityLimits) { + if (capacity.ids.includes(id)) throw Object.assign(Error('This reservation is being prepared. Try publishing again.'), {status:409}); + if (!hasCapacity(capacity, 2 * size, limits)) throw Object.assign(Error('Shared storage is full. Download locally, delete an upload you own, or try again after expired uploads are reclaimed.'), {status:429}); + capacity.ids.push(id); + (capacity.allocations ||= {})[id] = 2 * size; + (capacity.deadlines ||= {})[id] = Date.now() + 600000 + RETENTION_GRACE; +} +export function releaseCapacity(capacity, id) { + capacity.ids = capacity.ids.filter(value => value !== id); + if (capacity.allocations) delete capacity.allocations[id]; + if (capacity.deadlines) delete capacity.deadlines[id]; + if (capacity.orphanSince) delete capacity.orphanSince[id]; +} +export function finalizeCapacity(capacity, id, size, expiresAt) { + if (capacity.ids.includes(id)) { + (capacity.allocations ||= {})[id] = size; + (capacity.deadlines ||= {})[id] = expiresAt + RETENTION_GRACE; + } +} +export function capacitySummary(capacity, limits = defaultCapacityLimits) { + const reservedBytes=capacityBytes(capacity); + return {maxStorageBytes:limits.maxBytes,reservedBytes,availableBytes:Math.max(0,limits.maxBytes-reservedBytes),reservedRecordings:capacity?.ids?.length||0}; +} diff --git a/rebuild/legacy/lib/comment-actions.js b/rebuild/legacy/lib/comment-actions.js new file mode 100644 index 0000000..11394dc --- /dev/null +++ b/rebuild/legacy/lib/comment-actions.js @@ -0,0 +1,42 @@ +import {createHash,timingSafeEqual} from 'node:crypto'; +import {validId,commentInput,text,publicClip} from './rules.js'; +const fail=(message,status=400)=>Object.assign(Error(message),{status}); +const digest=v=>createHash('sha256').update(v).digest('hex'); +function matches(value,expected){if(typeof value!=='string'||value.length<40||value.length>100||typeof expected!=='string')return false;const a=Buffer.from(digest(value)),b=Buffer.from(expected);return a.length===b.length&&timingSafeEqual(a,b)} +function rootOf(comments,c){const seen=new Set();while(c.parentId){if(seen.has(c.id))throw fail('This thread is unavailable.',409);seen.add(c.id);const p=comments.find(x=>x.id===c.parentId);if(!p)break;c=p}return c} +export const commentOperations=['comment','edit-comment','delete-comment','resolve-thread']; +// Called inside the recording's compare-and-swap transaction. No author capability is public. +export function applyCommentAction(d,op,body,now=Date.now()){ + if(d.status!=='published'||d.expiresAtx.id===eventId))return publicClip(d); + if(d.comments.length>=100)throw fail('This clip has reached 100 comments and replies.'); + if(comment.parentId){const parent=d.comments.find(x=>x.id===comment.parentId);if(!parent||parent.deleted)throw fail('This reply is no longer available. Refresh the conversation.',409);comment.time=parent.time;rootOf(d.comments,parent).resolved=false} + d.comments.push({...comment,id:eventId,createdAt:now,creator,...(body.authorKey?{authorHash:digest(body.authorKey)}:{})}); + }else{ + if(!validId(body.commentId))throw fail('Choose an existing comment.'); + const c=d.comments.find(x=>x.id===body.commentId);if(!c)throw fail('Comment not found.',404); + const author=matches(body.authorKey,c.authorHash); + if(op==='resolve-thread'){ + const root=rootOf(d.comments,c); + if(!creator&&!matches(body.authorKey,root.authorHash))throw fail('Only the thread author or video creator can resolve this thread.',403); + if(typeof body.resolved!=='boolean')throw fail('Choose whether this thread is resolved.'); + root.resolved=body.resolved; + }else{ + if(!author&&!(creator&&op==='delete-comment'))throw fail('This browser cannot change this comment.',403); + if(op==='delete-comment'){c.deleted=true;c.text='';c.name='Deleted comment';c.editedAt=now} + else if(op==='edit-comment'){ + if(c.deleted)throw fail('This comment was deleted.',409); + if(body.expectedVersion!==(c.editedAt||c.createdAt))throw fail('This comment changed. Refresh before editing again.',409); + c.text=text(body.text,500,true);c.editedAt=Math.max(now,(c.editedAt||c.createdAt)+1); + } + } + } + d.discussionRevision=(d.discussionRevision||0)+1; + return publicClip(d); +} diff --git a/rebuild/legacy/lib/discussion.js b/rebuild/legacy/lib/discussion.js new file mode 100644 index 0000000..cc7a02f --- /dev/null +++ b/rebuild/legacy/lib/discussion.js @@ -0,0 +1,20 @@ +// Shared presentation rules: legacy flat comments remain independent threads. +export function discussionThreads(comments=[]){ + const byId=new Map(comments.map(c=>[c.id,c])),groups=new Map(); + for(const comment of comments){ + let root=comment;const seen=new Set([root.id]); + while(root.parentId&&byId.has(root.parentId)&&!seen.has(root.parentId)){root=byId.get(root.parentId);seen.add(root.id)} + if(!groups.has(root.id))groups.set(root.id,{root,items:[]}); + groups.get(root.id).items.push(comment); + } + return [...groups.values()].map(t=>({...t,items:t.items.sort((a,b)=>a.createdAt-b.createdAt)})).sort((a,b)=>(a.root.time-b.root.time)||(a.root.createdAt-b.root.createdAt)); +} +export function bubbleThreads(comments,time,window=5){return discussionThreads(comments).filter(t=>!t.root.deleted&&!t.root.resolved&&time>=t.root.time&&time!t.root.deleted)){ + const ratio=Math.max(0,Math.min(1,(t.root.time-start)/Math.max(.25,end-start))),bin=Math.min(bins-1,Math.floor(ratio*bins)); + if(!groups.has(bin))groups.set(bin,{ratio:(bin+.5)/bins,threads:[]});groups.get(bin).threads.push(t); + }return [...groups.values()]; +} +// A slower reaction/refresh response must not overwrite a newer conversation. +export function mergeDiscussion(current,next){return {...current,...next,...((next.discussionRevision||0)<(current.discussionRevision||0)?{comments:current.comments,discussionRevision:current.discussionRevision}:{})}} diff --git a/rebuild/legacy/lib/draft-writer.js b/rebuild/legacy/lib/draft-writer.js new file mode 100644 index 0000000..ba945ce --- /dev/null +++ b/rebuild/legacy/lib/draft-writer.js @@ -0,0 +1,14 @@ +// Recovery is best effort; losing it must never take away in-memory recording controls. +export function createDraftWriter(save, warn) { + let chain=Promise.resolve(), failed=false; + return { + save(snapshot) { + if(failed)return chain; + chain=chain.then(()=>{if(!failed)return save(snapshot)}).catch(()=>{ + if(!failed){failed=true;warn()} + }); + return chain; + }, + flush(){return chain} + }; +} diff --git a/rebuild/legacy/lib/enrichment.js b/rebuild/legacy/lib/enrichment.js new file mode 100644 index 0000000..780297b --- /dev/null +++ b/rebuild/legacy/lib/enrichment.js @@ -0,0 +1,10 @@ +// Bounded, portable metadata. Caption text is always treated as plain text. +const clean=(v,max)=>{if(typeof v!=='string'||v.length>max)throw Error('Text is too long or has an invalid format.');return v.trim()}; +export function timestamp(v){const p=String(v).trim().replace(',','.').split(':');if(p.length<2||p.length>3||p.some(n=>!/^\d+(\.\d+)?$/.test(n)))throw Error('Use a timestamp such as 0:30 or 00:00:30.000.');if(Number(p.at(-1))>=60||p.length===3&&Number(p[1])>=60)throw Error('Invalid timestamp.');return p.reduce((n,s)=>n*60+Number(s),0)} +export function parseCaptions(raw,duration){if(typeof raw!=='string'||raw.length>20000)throw Error('Use captions smaller than 20 KB.');const blocks=raw.replace(/^\uFEFF/,'').replace(/\r/g,'').trim().split(/\n\s*\n/),cues=[];for(const block of blocks){if(/^WEBVTT(?:\s|$)/.test(block)||/^NOTE(?:\s|$)/.test(block))continue;const lines=block.split('\n'),i=lines.findIndex(l=>l.includes('-->'));if(i<0)throw Error('Use an SRT or WebVTT caption file.');const parts=lines[i].split('-->');const start=timestamp(parts[0]),end=timestamp(parts[1].trim().split(/\s/)[0]);const text=lines.slice(i+1).join('\n').replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&');cues.push({start,end,text})}return validateExtras({captions:cues},duration).captions} +export function parseChapters(raw,duration){if(!raw.trim())return[];return validateExtras({chapters:raw.trim().split('\n').map(line=>{const m=line.match(/^(\S+)\s+(.+)$/);if(!m)throw Error('Use one chapter per line: 0:30 Chapter title');return{time:timestamp(m[1]),title:m[2]}})},duration).chapters} +export function validateExtras(v={},duration){const captions=v.captions??[],chapters=v.chapters??[];if(!Array.isArray(captions)||captions.length>100||!Array.isArray(chapters)||chapters.length>20)throw Error('Use at most 100 captions and 20 chapters.');let last=-1,total=0;const cues=captions.map(c=>{if(!c||!Number.isFinite(c.start)||!Number.isFinite(c.end)||c.start<0||c.startduration+.05||c.end<=c.start)throw Error('Caption times must be ordered and inside the video.');last=c.start;const text=clean(c.text,500);total+=text.length;if(!text||total>12000)throw Error('Keep captions within 12,000 characters.');return{start:c.start,end:c.end,text}});last=-1;const marks=chapters.map(c=>{if(!c||!Number.isFinite(c.time)||c.time<0||c.time<=last||c.time>=duration)throw Error('Chapter times must increase and stay inside the video.');last=c.time;const title=clean(c.title,80);if(!title)throw Error('Add a chapter title.');return{time:c.time,title}});let report=null;if(v.report){const r=v.report;if(typeof r!=='object'||Array.isArray(r))throw Error('Invalid bug report.');report={url:clean(r.url||'',500),steps:clean(r.steps||'',2000),expected:clean(r.expected||'',1000),actual:clean(r.actual||'',1000),environment:clean(r.environment||'',300)};if(report.url&&!/^https?:\/\//i.test(report.url))throw Error('Use a full http or https page URL.');if(report.url){const u=new URL(report.url);if(u.username||u.password)throw Error('Remove credentials from the page URL.')}if(!Object.values(report).some(Boolean))report=null}return{captions:cues,chapters:marks,report}} +const stamp=n=>{const ms=Math.round(n*1000),h=Math.floor(ms/3600000),m=Math.floor(ms/60000)%60,s=Math.floor(ms/1000)%60;return`${String(h).padStart(2,'0')}:${String(m).padStart(2,'0')}:${String(s).padStart(2,'0')}.${String(ms%1000).padStart(3,'0')}`}; +export const captionsVTT=cues=>'WEBVTT\n\n'+cues.map(c=>`${stamp(c.start)} --> ${stamp(c.end)}\n${c.text.replace(/&/g,'&').replace(//g,'>')}\n`).join('\n'); +export function trimExtras(v,start,end){return{report:v.report||null,captions:(v.captions||[]).filter(c=>c.end>start&&c.start({...c,start:Math.max(0,c.start-start),end:Math.min(end,c.end)-start})),chapters:(v.chapters||[]).filter(c=>c.time>=start&&c.time({...c,time:c.time-start}))}} +export function reportMarkdown(c,origin){const r=c.report||{};return`# ${c.title}\n\n${c.shared?`Video: ${origin}/v/${c.id}\n\n`:''}Page: ${r.url||'Not supplied'}\n\n## Reproduction steps\n${r.steps||'Not supplied'}\n\n## Expected\n${r.expected||'Not supplied'}\n\n## Actual\n${r.actual||'Not supplied'}\n\n## Environment (owner supplied)\n${r.environment||'Not supplied'}\n\n## Chapters\n${(c.chapters||[]).map(x=>`${stamp(x.time)} ${x.title}`).join('\n')||'None'}\n`} diff --git a/rebuild/legacy/lib/feedback.js b/rebuild/legacy/lib/feedback.js new file mode 100644 index 0000000..3eb238c --- /dev/null +++ b/rebuild/legacy/lib/feedback.js @@ -0,0 +1,56 @@ +// Feedback-at-a-glance derivation from an owner-gated manage/view payload. +// Pure and testable; no network, no polling. Mirrors DESIGN_SYSTEM §6.3. +import {discussionThreads} from './discussion.js'; + +export function formatAgo(ts, now = Date.now()) { + if (!ts || !Number.isFinite(ts)) return ''; + const s = Math.max(0, Math.floor((now - ts) / 1000)); + if (s < 60) return 'just now'; + if (s < 3600) return `${Math.floor(s / 60)} min ago`; + if (s < 86400) return `${Math.floor(s / 3600)} h ago`; + return `${Math.floor(s / 86400)} d ago`; +} + +export function feedbackSummary(clip = {}, {now = Date.now(), seenAt = 0} = {}) { + const comments = Array.isArray(clip.comments) ? clip.comments : []; + const threads = discussionThreads(comments); + const liveThreads = threads.filter(t => !t.root.deleted); + const openThreads = liveThreads.filter(t => !t.root.resolved).length; + const liveComments = comments.filter(c => !c.deleted); + const lastReplyAt = liveComments.length ? Math.max(...liveComments.map(c => c.createdAt || 0)) || 0 : 0; + const reactions = clip.reactions || {}; + const reactionTotal = Object.values(reactions).reduce((n, v) => n + (Number(v) || 0), 0); + const newReplies = seenAt ? liveComments.filter(c => (c.createdAt || 0) > seenAt).length : 0; + return { + openThreads, + totalThreads: liveThreads.length, + hasDiscussion: liveComments.length > 0, + allResolved: liveThreads.length > 0 && openThreads === 0, + lastReplyAt, + lastReplyAgo: lastReplyAt ? formatAgo(lastReplyAt, now) : '', + reactions, + reactionTotal, + newReplies, + discussionRevision: clip.discussionRevision || 0, + }; +} + +export function feedbackLine(summary) { + if (!summary || !summary.hasDiscussion) return ''; + if (summary.newReplies > 0) return `● ${summary.newReplies} new ${summary.newReplies === 1 ? 'reply' : 'replies'}`; + if (summary.openThreads > 0) { + const base = `● ${summary.openThreads} open ${summary.openThreads === 1 ? 'thread' : 'threads'}`; + return summary.lastReplyAgo ? `${base} · last reply ${summary.lastReplyAgo}` : base; + } + if (summary.allResolved) return '✓ All threads resolved'; + return ''; +} + +export function seenKey(clipId) { return `screennote-seen-${clipId}`; } +export function readSeen(clipId) { + try { const v = JSON.parse(localStorage.getItem(seenKey(clipId))); return v && Number.isFinite(v.seenAt) ? v : {seenAt: 0, discussionRevision: 0}; } catch { return {seenAt: 0, discussionRevision: 0}; } +} +export function writeSeen(clipId, revision) { + try { localStorage.setItem(seenKey(clipId), JSON.stringify({seenAt: Date.now(), discussionRevision: revision || 0})); } catch {} +} +export function clearSeen(clipId) { try { localStorage.removeItem(seenKey(clipId)); } catch {} } diff --git a/rebuild/legacy/lib/import-media.js b/rebuild/legacy/lib/import-media.js new file mode 100644 index 0000000..fe51bad --- /dev/null +++ b/rebuild/legacy/lib/import-media.js @@ -0,0 +1,11 @@ +import {LOCAL_MAX_BYTES,isVideo} from './rules.js'; +// Some device file providers omit MIME or use application/octet-stream. +// Infer only supported extensions, verify their container header, then let the browser decode. +export async function importMedia(file){ + if(file.size>LOCAL_MAX_BYTES)throw Error('Choose a video up to 250 MB for local editing. Your file has not been uploaded.'); + const declared=String(file.type||'').split(';')[0].toLowerCase(); + const type=['video/mp4','video/webm'].includes(declared)?declared:(!declared||declared==='application/octet-stream')?(/\.mp4$/i.test(file.name)?'video/mp4':/\.webm$/i.test(file.name)?'video/webm':''):''; + if(!type)throw Error('Choose an MP4 or WebM video.'); + if(!isVideo(new Uint8Array(await file.slice(0,16).arrayBuffer()),type))throw Error('This file is not a valid MP4 or WebM video. Nothing was uploaded.'); + return{blob:new Blob([file],{type}),type}; +} diff --git a/rebuild/legacy/lib/library.js b/rebuild/legacy/lib/library.js new file mode 100644 index 0000000..9ba367c --- /dev/null +++ b/rebuild/legacy/lib/library.js @@ -0,0 +1,7 @@ +export const REVIEW_STATES=['needs-feedback','changes-requested','approved']; +export const reviewLabel=s=>({'needs-feedback':'Needs feedback','changes-requested':'Changes requested',approved:'Approved'}[s]||'Needs feedback'); +export function filterRecordings(clips,{query='',status='all',sort='newest',feedbackById={}}={}){ + const q=query.trim().toLocaleLowerCase(); + const result=clips.filter(c=>(!q||String(c.title).toLocaleLowerCase().includes(q))&&(status==='all'||status==='shared'&&c.shared&&!c.revoked&&!c.cloudDeleted&&c.expiresAt>Date.now()||status==='local'&&!!c.blob&&(!c.shared||c.revoked||c.cloudDeleted||c.expiresAt<=Date.now())||status==='open-threads'&&(feedbackById[c.id]?.openThreads||0)>0||status!=='open-threads'&&status===(c.reviewStatus||'needs-feedback'))); + return result.sort((a,b)=>sort==='title'?String(a.title).localeCompare(String(b.title)):sort==='oldest'?a.createdAt-b.createdAt:b.createdAt-a.createdAt); +} diff --git a/rebuild/legacy/public/ticker.js b/rebuild/legacy/public/ticker.js new file mode 100644 index 0000000..1b9fd8e --- /dev/null +++ b/rebuild/legacy/public/ticker.js @@ -0,0 +1 @@ +setInterval(()=>postMessage('frame'),1000/24); From 6aa0e16cd5967304feb3e66cc368d4562c9bde0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:31:51 +0200 Subject: [PATCH 106/575] Restore original ScreenNote storage and validation modules (3/4) --- rebuild/legacy/lib/media-validation.js | 61 ++++++++++++++++++++++++++ rebuild/legacy/lib/metadata-store.js | 8 ++++ rebuild/legacy/lib/recording-policy.js | 20 +++++++++ rebuild/legacy/lib/recovery.js | 17 +++++++ rebuild/legacy/lib/retention.js | 8 ++++ rebuild/legacy/lib/rules.js | 15 +++++++ rebuild/legacy/lib/share-options.js | 7 +++ rebuild/legacy/lib/store.js | 11 +++++ rebuild/legacy/lib/supabase-store.js | 25 +++++++++++ rebuild/legacy/lib/titles.js | 15 +++++++ 10 files changed, 187 insertions(+) create mode 100644 rebuild/legacy/lib/media-validation.js create mode 100644 rebuild/legacy/lib/metadata-store.js create mode 100644 rebuild/legacy/lib/recording-policy.js create mode 100644 rebuild/legacy/lib/recovery.js create mode 100644 rebuild/legacy/lib/retention.js create mode 100644 rebuild/legacy/lib/rules.js create mode 100644 rebuild/legacy/lib/share-options.js create mode 100644 rebuild/legacy/lib/store.js create mode 100644 rebuild/legacy/lib/supabase-store.js create mode 100644 rebuild/legacy/lib/titles.js diff --git a/rebuild/legacy/lib/media-validation.js b/rebuild/legacy/lib/media-validation.js new file mode 100644 index 0000000..2aa9333 --- /dev/null +++ b/rebuild/legacy/lib/media-validation.js @@ -0,0 +1,61 @@ +import {Input, BufferSource, MP4, WEBM, EncodedPacketSink} from 'mediabunny'; +import {MAX_BYTES, MAX_SECONDS} from './rules.js'; + +const invalid = () => Object.assign(Error('This upload does not contain a valid video. Re-export it as MP4 or WebM and try again. Your local copy is safe.'), {status: 400}); + +// Read complete packet payloads, not just the filename, MIME or magic bytes. +// This is bounded container/track validation, not a universal codec decoder. +export async function inspectMedia(bytes, expected) { + if (!bytes.length || bytes.length > MAX_BYTES || bytes.length !== expected.size) throw invalid(); + const input = new Input({source: new BufferSource(bytes), formats: [expected.type === 'video/mp4' ? MP4 : WEBM]}); + try { + const tracks = await input.getTracks(); + if (!tracks.length || tracks.length > 8) throw invalid(); + const video = await input.getPrimaryVideoTrack(); + if (!video || !video.codec || !video.displayWidth || !video.displayHeight + || video.displayWidth > 16384 || video.displayHeight > 16384) throw invalid(); + let videoPackets = 0, packets = 0, duration = 0; + const deadline = Date.now() + 8000; + for (const track of tracks) { + for await (const packet of new EncodedPacketSink(track).packets()) { + if (++packets > 100000 || Date.now() > deadline || !packet.data.length + || !Number.isFinite(packet.timestamp) || !Number.isFinite(packet.duration)) throw invalid(); + if (track === video) videoPackets++; + duration = Math.max(duration, packet.timestamp + packet.duration); + if (duration > MAX_SECONDS + 1) throw invalid(); + } + } + if (!videoPackets || duration <= 0 || Math.abs(duration - expected.duration) > 1) throw invalid(); + return {width: video.displayWidth, height: video.displayHeight, duration}; + } catch (error) { + if (error.status) throw error; + throw invalid(); + } finally { + input.dispose(); + } +} + +export async function validatePublishedMedia(url, expected, fetcher = fetch) { + let response;try{response=await fetcher(url,{signal:AbortSignal.timeout(20000)})}catch{throw Object.assign(Error('Could not verify this upload. Keep your local copy and retry.'),{status:503})} + if (!response.ok || !response.body) throw Object.assign(Error('Could not verify this upload. Keep your local copy and retry.'), {status: 503}); + const reader = response.body.getReader(), chunks = []; + let size = 0; + try { + for (;;) { + const {done, value} = await reader.read(); + if (done) break; + size += value.length; + if (size > expected.size || size > MAX_BYTES) throw invalid(); + chunks.push(value); + } + } catch (error) { + if (error.status) throw error; + throw Object.assign(Error('Could not verify this upload. Keep your local copy and retry.'), {status: 503}); + } finally { + await reader.cancel().catch(() => {}); + } + const bytes = new Uint8Array(size); + let offset = 0; + for (const chunk of chunks) { bytes.set(chunk, offset); offset += chunk.length; } + return inspectMedia(bytes, expected); +} diff --git a/rebuild/legacy/lib/metadata-store.js b/rebuild/legacy/lib/metadata-store.js new file mode 100644 index 0000000..c66dad9 --- /dev/null +++ b/rebuild/legacy/lib/metadata-store.js @@ -0,0 +1,8 @@ +// Metadata must use a strong storage revision, not a compressed response's weak ETag. +const contention=()=>Object.assign(Error('Recording metadata changed. Please try again.'),{status:409}); +export function createMetadataStore({get,head,put,isConflict,delay=ms=>new Promise(r=>setTimeout(r,ms))}){ + async function read(path){for(let attempt=0;attempt<3;attempt++){const r=await get(path,{access:'private',useCache:false,headers:{'Accept-Encoding':'identity'}});if(!r)return null;const data=await new Response(r.stream).json();let etag=r.blob.etag;if(etag?.startsWith('W/')&&head){const canonical=await head(path);if(canonical.etag&&!canonical.etag.startsWith('W/')&&etag.slice(2)===canonical.etag)etag=canonical.etag;else{if(attempt<2)await delay(100*2**attempt);continue}}if(!etag||etag.startsWith('W/'))throw contention();return{data,etag}}throw contention()} + async function write(path,data,etag){if(etag?.startsWith('W/'))throw contention();return put(path,JSON.stringify(data),{access:'private',addRandomSuffix:false,allowOverwrite:!!etag,contentType:'application/json',...(etag?{ifMatch:etag}:{}),cacheControlMaxAge:0})} + async function mutate(path,change,initial){for(let attempt=0;attempt<5;attempt++){const r=await read(path),data=r?structuredClone(r.data):initial?.();if(!data)throw Object.assign(Error('Clip not found.'),{status:404});const result=change(data);try{await write(path,data,r?.etag);return result??data}catch(e){if(!isConflict(e)&&!String(e.message).includes('already exists'))throw e;console.warn('ScreenNote metadata contention',JSON.stringify({attempt:attempt+1,name:e.name}));if(attempt<4)await delay(100*2**attempt)}}throw contention()} + return{read,write,mutate}; +} diff --git a/rebuild/legacy/lib/recording-policy.js b/rebuild/legacy/lib/recording-policy.js new file mode 100644 index 0000000..b6fd1ba --- /dev/null +++ b/rebuild/legacy/lib/recording-policy.js @@ -0,0 +1,20 @@ +import {MAX_BYTES,MAX_SECONDS,LOCAL_MAX_BYTES,LOCAL_MAX_SECONDS} from './rules.js'; +export const PROFILES = { + saver: {label:'Data saver',width:960,fps:15,video:350000,audio:48000}, + balanced: {label:'Balanced',width:1280,fps:24,video:600000,audio:64000}, + clear: {label:'Clear text',width:1920,fps:24,video:1600000,audio:64000} +}; +export const profileFor = name => PROFILES[name] || PROFILES.balanced; +export function recordingStats(bytes,seconds,profile='balanced') { + const rate=seconds>2&&bytes>0?bytes/seconds:(profileFor(profile).video+profileFor(profile).audio)/8; + return {bytes,seconds,remaining:Math.max(0,Math.min(LOCAL_MAX_SECONDS-seconds,(LOCAL_MAX_BYTES-bytes)/rate)), + shareRemaining:Math.max(0,Math.min(MAX_SECONDS-seconds,(MAX_BYTES-bytes)/rate)), + shareable:bytes<=MAX_BYTES&&seconds<=MAX_SECONDS,rate}; +} +export function sharingProblem(clip) { + const size=clip.blob?.size??clip.size??0; + if(clip.duration>MAX_SECONDS)return 'This video is longer than 10 minutes. Trim a shorter copy to share; your original stays here.'; + if(size>MAX_BYTES)return 'This video is larger than 50 MB. Make a smaller copy to share; your original stays here.'; + return ''; +} +export const stopMessage = reason => ({size:'Saved: the 250 MB local recording limit was reached.',duration:'Saved: the 30-minute local recording limit was reached.',source:'Saved: screen sharing ended.',error:'Recording stopped unexpectedly. The captured video is saved.',user:'Recording saved.'}[reason]||'Recording saved.'); diff --git a/rebuild/legacy/lib/recovery.js b/rebuild/legacy/lib/recovery.js new file mode 100644 index 0000000..36093e7 --- /dev/null +++ b/rebuild/legacy/lib/recovery.js @@ -0,0 +1,17 @@ +import {validId} from './rules.js'; +export function recoveryDocument(clips, origin) { + const keys = clips.filter(c => (c.shared || c.revoked || c.uploadAttempted) && !c.cloudDeleted) + .map(c => ({id:c.id, owner:c.owner})); + return JSON.stringify({format:'screennote-recovery',version:1,origin,keys},null,2); +} +export function recoveryKeys(raw, origin) { + if (typeof raw !== 'string' || raw.length > 524288) throw Error('Use a ScreenNote recovery file smaller than 512 KB.'); + let data;try {data=JSON.parse(raw)} catch {throw Error('This is not valid recovery JSON. Paste the complete recovery file.');} + if (!data || data.format!=='screennote-recovery' || data.version!==1 || data.origin!==origin || !Array.isArray(data.keys) || !data.keys.length || data.keys.length>128) + throw Error('Use a recovery file exported from this ScreenNote address, with 1–128 keys.'); + const ids=new Set();return data.keys.map(k=>{ + if (!k || !validId(k.id) || typeof k.owner!=='string' || !/^[a-f0-9]{64}$/.test(k.owner) || ids.has(k.id)) + throw Error('The recovery file contains an invalid or duplicate key.'); + ids.add(k.id);return {id:k.id,owner:k.owner}; + }); +} diff --git a/rebuild/legacy/lib/retention.js b/rebuild/legacy/lib/retention.js new file mode 100644 index 0000000..19c2cce --- /dev/null +++ b/rebuild/legacy/lib/retention.js @@ -0,0 +1,8 @@ +export const RETENTION_GRACE = 24 * 60 * 60 * 1000; +export function reclaimable(clip, now = Date.now()) { + if (clip.status === 'expired' || clip.status === 'deleted') return true; + const deadline = clip.status === 'pending' + ? (clip.uploadUntil || clip.createdAt + 600000) + : clip.expiresAt; + return Number.isFinite(deadline) && deadline + RETENTION_GRACE <= now; +} diff --git a/rebuild/legacy/lib/rules.js b/rebuild/legacy/lib/rules.js new file mode 100644 index 0000000..dcc618f --- /dev/null +++ b/rebuild/legacy/lib/rules.js @@ -0,0 +1,15 @@ +import {REVIEW_STATES} from './library.js'; +import {validateExtras} from './enrichment.js'; +export const MAX_BYTES=50_000_000,MAX_SECONDS=600,LOCAL_MAX_BYTES=250_000_000,LOCAL_MAX_SECONDS=1800,MAX_SHARED=10000,STORAGE_BUDGET_BYTES=1_000_000_000; +export const TYPES=['video/webm','video/mp4']; +export const validId=v=>typeof v==='string'&&/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/.test(v); +export function text(v,max,required=false){if(typeof v!=='string'||v.trim().length>max||required&&!v.trim())throw Error('Please check the text fields.');return v.trim()} +export function clipInput(v){const title=text(v.title,100,true),type=TYPES.find(t=>String(v.type).split(';')[0].trim()===t);if(!type||!Number.isFinite(v.duration)||v.duration<=0||v.duration>MAX_SECONDS+1||!Number.isInteger(v.size)||v.size<1||v.size>MAX_BYTES)throw Error('Use a playable WebM or MP4, up to ten minutes and 50 MB.');const start=Number(v.start),end=Number(v.end);if(!Number.isFinite(start)||!Number.isFinite(end)||start<0||end>v.duration+.05||end-start<.25)throw Error('Choose a valid start and end, at least a quarter-second apart.');const linkDays=v.linkDays??7;if(![1,3,7].includes(linkDays))throw Error('Choose a link expiry of 1, 3 or 7 days.');const reviewStatus=v.reviewStatus??'needs-feedback';if(!REVIEW_STATES.includes(reviewStatus))throw Error('Choose a valid review status.');return{reviewStatus,title,type,duration:v.duration,size:v.size,start,end,linkDays,...validateExtras(v,v.duration)}} +export function commentInput(v,clip){const body=text(v.text,500,true),name=text(typeof v.name==='string'?(v.name.trim()||'Guest'):(v.name||'Guest'),40,true),time=Number(v.time),parentId=v.parentId||null;if(parentId&&!validId(parentId))throw Error('Choose an existing reply.');if(!Number.isFinite(time)||timeclip.end+.1)throw Error('Choose a timestamp inside this clip.');return{text:body,name,time:Math.max(clip.start,Math.min(time,clip.end)),parentId}} +export function publicClip(c){return{id:c.id,title:c.title,reviewStatus:c.reviewStatus||'needs-feedback',width:c.width,height:c.height,start:c.start,end:c.end,duration:c.duration,createdAt:c.createdAt,expiresAt:c.expiresAt,passwordProtected:!!c.passwordHash,discussionRevision:c.discussionRevision||0,captions:c.captions||[],chapters:c.chapters||[],report:c.report||null,comments:(c.comments||[]).map(({id,name,text,time,createdAt,parentId=null,editedAt,deleted=false,resolved=false,creator=false})=>({id,name:deleted?'Deleted comment':name,text:deleted?'':text,time,createdAt,parentId,editedAt,deleted,resolved,creator})),reactions:Object.fromEntries(['like','thanks','idea'].map(k=>[k,Object.values(c.votes||{}).filter(v=>v===k).length]))}} +export function formatTime(n){n=Math.max(0,Math.floor(Number(n)||0));return `${Math.floor(n/60)}:${String(n%60).padStart(2,'0')}`} +export function isVideo(bytes,type){return type==='video/webm'?bytes[0]===26&&bytes[1]===69&&bytes[2]===223&&bytes[3]===163:String.fromCharCode(...bytes.slice(4,8))==='ftyp'} + +export function randomId(){if(globalThis.crypto?.randomUUID)return crypto.randomUUID();const b=crypto.getRandomValues(new Uint8Array(16));b[6]=(b[6]&15)|64;b[8]=(b[8]&63)|128;const h=[...b].map(n=>n.toString(16).padStart(2,'0')).join('');return `${h.slice(0,8)}-${h.slice(8,12)}-${h.slice(12,16)}-${h.slice(16,20)}-${h.slice(20)}`} + +export const CHUNK_BYTES=2*1024*1024; diff --git a/rebuild/legacy/lib/share-options.js b/rebuild/legacy/lib/share-options.js new file mode 100644 index 0000000..6587c50 --- /dev/null +++ b/rebuild/legacy/lib/share-options.js @@ -0,0 +1,7 @@ +export function newShareIdentity(c,now=Date.now()){return!!(c.revoked||c.cloudDeleted||c.shared&&c.expiresAt<=now)} +export function shareOptions(c,linkDays,password=''){ + if(![1,3,7].includes(linkDays))throw Error('Choose an expiry of 1, 3 or 7 days.'); + if(typeof password!=='string'||password&& (password.length<8||password.length>128))throw Error('Use a sharing password of 8–128 characters.'); + if(c.passwordProtected&&!password)throw Error('Enter the sharing password before retrying or republishing this protected video. For a pending upload, use its original password.'); + return{linkDays,password,newIdentity:newShareIdentity(c)}; +} diff --git a/rebuild/legacy/lib/store.js b/rebuild/legacy/lib/store.js new file mode 100644 index 0000000..7fee999 --- /dev/null +++ b/rebuild/legacy/lib/store.js @@ -0,0 +1,11 @@ +import * as legacy from './vercel-store.js'; +import {createSupabaseStore} from './supabase-store.js'; +export const key=legacy.key,media=legacy.media; +// Explicit Supabase configuration takes precedence; never silently fall back to +// a different store after a write failure or split one recording across stores. +const backend=process.env.SUPABASE_URL||process.env.SCREENNOTE_STORAGE_KEY + ?createSupabaseStore({url:process.env.SUPABASE_URL,secret:process.env.SCREENNOTE_STORAGE_KEY}) + :legacy; +export const {configured,read,write,mutate,mediaInfo,mediaMagic,mediaURL,removeMedia,uploadSmall,uploadPart,assemble,clearParts}=backend; +export const uploadedParts=backend.uploadedParts||(()=>Promise.resolve([])); +export const usingSupabase=backend!==legacy; diff --git a/rebuild/legacy/lib/supabase-store.js b/rebuild/legacy/lib/supabase-store.js new file mode 100644 index 0000000..7022e51 --- /dev/null +++ b/rebuild/legacy/lib/supabase-store.js @@ -0,0 +1,25 @@ +import {createMetadataStore} from './metadata-store.js'; +export function createSupabaseStore({url,secret,fetcher=fetch}){ + const ready=()=>/^https:\/\/[a-z0-9-]+\.supabase\.co$/.test(url||'')&&/^[a-f0-9]{64}$/.test(secret||''); + async function request(op,body={}){ + if(!ready())throw Error('Supabase sharing is not configured.'); + const r=await fetcher(url+'/functions/v1/screennote-store',{method:'POST',headers:{'Content-Type':'application/json','x-screennote-key':secret},body:JSON.stringify({op,...body}),signal:AbortSignal.timeout(55000)}); + const data=await r.json();if(!r.ok)throw Object.assign(Error(data.error||'Sharing storage is unavailable.'),{status:r.status>=500?undefined:r.status,statusCode:r.status,conflict:r.status===409});return data.data; + } + const metadata=createMetadataStore({ + get:async path=>{const record=await request('read',{path});return record?{stream:JSON.stringify(record.data),blob:{etag:record.etag}}:null}, + put:async(path,raw,options)=>request('write',{path,data:JSON.parse(raw),revision:options.ifMatch??null}), + isConflict:e=>e.conflict + }); + return{ + configured:ready,...metadata, + mediaInfo:id=>request('info',{id}), + mediaMagic:async id=>Uint8Array.from(await request('magic',{id})), + mediaURL:id=>request('sign',{id}),removeMedia:id=>request('remove',{id}), + uploadedParts:c=>request('partsStatus',{id:c.id,size:c.size}), + uploadSmall:(id,bytes,type)=>request('uploadSmall',{id,bytes:Buffer.from(bytes).toString('base64'),type}), + uploadPart:(id,part,bytes)=>request('uploadPart',{id,part,bytes:Buffer.from(bytes).toString('base64')}), + assemble:c=>request('assemble',{id:c.id,size:c.size,type:c.type}), + clearParts:c=>request('clearParts',{id:c.id,size:c.size}) + }; +} diff --git a/rebuild/legacy/lib/titles.js b/rebuild/legacy/lib/titles.js new file mode 100644 index 0000000..b98f8a6 --- /dev/null +++ b/rebuild/legacy/lib/titles.js @@ -0,0 +1,15 @@ +// File names are metadata, not necessarily a useful message title. +export function isGeneratedTitle(value = '') { + const name = String(value).replace(/\.(mp4|webm)$/i, '').trim(); + return !name || /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:[-_][a-z0-9_-]*)?$/i.test(name) + || /^[a-f0-9]{24,}(?:[_-].*)?$/i.test(name); +} +export function importTitle(filename, supplied) { + const name = String(supplied || filename || '').replace(/\.(mp4|webm)$/i, '').trim(); + return isGeneratedTitle(name) ? 'Untitled recording' : name.slice(0, 100); +} +export function validTitle(value) { + if (typeof value !== 'string' || !value.trim() || value.trim().length > 100) + throw Error('Add a video title of 1–100 characters.'); + return value.trim(); +} From fa8d27df69f7debc297b8df94fc6f232ffc1b53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:32:31 +0200 Subject: [PATCH 107/575] Restore full ScreenNote browser app and preserve original API contract --- rebuild/.gitignore | 3 ++- rebuild/index.html | 17 +---------------- rebuild/legacy/lib/transfer.js | 1 + rebuild/legacy/lib/unsaved.js | 19 +++++++++++++++++++ rebuild/legacy/lib/vercel-store.js | 18 ++++++++++++++++++ rebuild/legacy/package.json | 21 +++++++++++++++++++++ rebuild/package.json | 12 ++++++++---- rebuild/scripts/build-legacy.mjs | 6 ++++++ rebuild/vite.config.ts | 9 +-------- rebuild/worker/index.ts | 17 +++++++++++++++++ 10 files changed, 94 insertions(+), 29 deletions(-) create mode 100644 rebuild/legacy/lib/transfer.js create mode 100644 rebuild/legacy/lib/unsaved.js create mode 100644 rebuild/legacy/lib/vercel-store.js create mode 100644 rebuild/legacy/package.json create mode 100644 rebuild/scripts/build-legacy.mjs diff --git a/rebuild/.gitignore b/rebuild/.gitignore index 7f0bd9e..b7d41f1 100644 --- a/rebuild/.gitignore +++ b/rebuild/.gitignore @@ -7,4 +7,5 @@ dist/ .env.* !.env.example coverage/ -*.log \ No newline at end of file +*.log +legacy/dist/ diff --git a/rebuild/index.html b/rebuild/index.html index c5f4178..e085c4e 100644 --- a/rebuild/index.html +++ b/rebuild/index.html @@ -1,16 +1 @@ - - - - - - - - - - ScreenNote — Show what you mean - - -
- - - \ No newline at end of file +ScreenNote · Show what you mean.

Opening ScreenNote…

\ No newline at end of file diff --git a/rebuild/legacy/lib/transfer.js b/rebuild/legacy/lib/transfer.js new file mode 100644 index 0000000..6df8e17 --- /dev/null +++ b/rebuild/legacy/lib/transfer.js @@ -0,0 +1 @@ +export async function retryTransfer(send,onRetry=()=>{},delay=ms=>new Promise(r=>setTimeout(r,ms))){for(let attempt=0;;attempt++){try{return await send()}catch(e){if(e.name==='AbortError'||e.code==='STORAGE_ACCESS_UNAVAILABLE'||attempt>=3||e.status&&e.status<500&&e.status!==429)throw e;onRetry(attempt+1);await delay(500*2**attempt)}}} diff --git a/rebuild/legacy/lib/unsaved.js b/rebuild/legacy/lib/unsaved.js new file mode 100644 index 0000000..e2176d9 --- /dev/null +++ b/rebuild/legacy/lib/unsaved.js @@ -0,0 +1,19 @@ +// Unsaved-work registry (DESIGN_SYSTEM §6.1, scoped): pure dirty-source logic. +// The share password is a flag only — its value is never stored anywhere. +export const DIRTY_ORDER = ['title', 'reviewStatus', 'extras', 'trim', 'marks', 'password']; +export const DIRTY_LABELS = { + title: 'title', + reviewStatus: 'review status', + extras: 'video context (captions, chapters, bug report)', + trim: 'trim range', + marks: 'drawn marks', + password: 'share password (not saved)', +}; +export function dirtyLabels(flags = {}) { + return DIRTY_ORDER.filter(k => !!flags[k]).map(k => DIRTY_LABELS[k]); +} +export function isDirty(flags = {}) { return DIRTY_ORDER.some(k => !!flags[k]); } +export function guardCopy(labels) { + const list = labels.length > 1 ? `${labels.slice(0, -1).join(', ')} and ${labels.at(-1)}` : labels[0]; + return `You have unsaved changes: ${list}. Leave anyway? Your saved video stays on this device.`; +} diff --git a/rebuild/legacy/lib/vercel-store.js b/rebuild/legacy/lib/vercel-store.js new file mode 100644 index 0000000..8cc531c --- /dev/null +++ b/rebuild/legacy/lib/vercel-store.js @@ -0,0 +1,18 @@ +import {createMetadataStore} from './metadata-store.js'; +import{Readable}from'node:stream'; +import{CHUNK_BYTES}from'./rules.js'; +import{get,put,head,del,issueSignedToken,presignUrl,BlobPreconditionFailedError}from'@vercel/blob'; +export const key=id=>`screennote/${id}/record.json`,media=id=>`screennote/${id}/video`; +export const configured=()=>!!(process.env.BLOB_READ_WRITE_TOKEN||process.env.BLOB_STORE_ID); +export const {read,write,mutate}=createMetadataStore({get,head,put,isConflict:e=>e instanceof BlobPreconditionFailedError}); +export async function mediaInfo(id){return head(media(id))} +export async function mediaMagic(id){const r=await get(media(id),{access:'private'});if(!r)throw Error('Upload is missing.');const reader=r.stream.getReader();try{const{value}=await reader.read();return value||new Uint8Array()}finally{await reader.cancel()}} +export async function mediaURL(id){const pathname=media(id),validUntil=Date.now()+300000,signed=await issueSignedToken({pathname,operations:['get'],validUntil});return(await presignUrl(signed,{operation:'get',pathname,access:'private',validUntil})).presignedUrl} +export const removeMedia=id=>del(media(id)); + +export const uploadSmall=(id,bytes,type)=>put(media(id),bytes,{access:'private',addRandomSuffix:false,contentType:type}); + +export const partKey=(id,n)=>`screennote/${id}/parts/${n}`; +export const uploadPart=(id,n,bytes)=>put(partKey(id,n),bytes,{access:'private',addRandomSuffix:false,contentType:'application/octet-stream'}); +export async function assemble(c){const count=Math.ceil(c.size/CHUNK_BYTES);async function*chunks(){for(let n=0;ndel(Array.from({length:Math.ceil(c.size/CHUNK_BYTES)},(_,n)=>partKey(c.id,n))); diff --git a/rebuild/legacy/package.json b/rebuild/legacy/package.json new file mode 100644 index 0000000..6fe9917 --- /dev/null +++ b/rebuild/legacy/package.json @@ -0,0 +1,21 @@ +{ + "name": "screennote", + "version": "0.5.0", + "type": "module", + "private": true, + "scripts": { + "build": "node scripts/build.mjs", + "test": "node --test tests/*.test.js", + "qa:prepare": "node scripts/prepare-qa.mjs" + }, + "dependencies": { + "@vercel/blob": "2.8.2", + "c8": "^12.0.0", + "esbuild": "0.28.2", + "fix-webm-duration": "1.0.6", + "mediabunny": "1.62.1" + }, + "overrides": { + "zod": "4.6.7" + } +} \ No newline at end of file diff --git a/rebuild/package.json b/rebuild/package.json index 7b0da15..d238306 100644 --- a/rebuild/package.json +++ b/rebuild/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite --host 0.0.0.0", - "build": "cf build", + "build": "node scripts/build-legacy.mjs && cf build", "typecheck": "tsc --noEmit", "test": "vitest run tests", "deploy": "cf deploy", @@ -14,7 +14,10 @@ "dependencies": { "lucide-react": "^0.468.0", "react": "^19.1.0", - "react-dom": "^19.1.0" + "react-dom": "^19.1.0", + "@vercel/blob": "2.8.2", + "fix-webm-duration": "1.0.6", + "mediabunny": "1.62.1" }, "devDependencies": { "@cloudflare/vite-plugin": "^2.0.0-rc.0", @@ -28,6 +31,7 @@ "vitest": "^3.2.0", "fake-indexeddb": "^6.2.0", "@playwright/test": "^1.56.0", - "@types/node": "^24.0.0" + "@types/node": "^24.0.0", + "esbuild": "0.28.2" } -} \ No newline at end of file +} diff --git a/rebuild/scripts/build-legacy.mjs b/rebuild/scripts/build-legacy.mjs new file mode 100644 index 0000000..753d5b0 --- /dev/null +++ b/rebuild/scripts/build-legacy.mjs @@ -0,0 +1,6 @@ +import { build } from "esbuild"; +import { mkdir, cp, rm } from "node:fs/promises"; +const source="legacy/public",output="legacy/dist"; +await rm(output,{recursive:true,force:true});await mkdir(output,{recursive:true});await cp(source,output,{recursive:true}); +await build({entryPoints:[source+"/app.js"],bundle:true,format:"esm",target:"es2022",outfile:output+"/app.js",minify:true}); +console.log("Built full ScreenNote 0.5.0 browser app for Cloudflare assets."); diff --git a/rebuild/vite.config.ts b/rebuild/vite.config.ts index 670ea73..d3b3b53 100644 --- a/rebuild/vite.config.ts +++ b/rebuild/vite.config.ts @@ -1,11 +1,4 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import { cloudflare } from "@cloudflare/vite-plugin"; - -export default defineConfig({ - plugins: [react(), cloudflare()], - build: { - target: "es2022", - sourcemap: true - } -}); \ No newline at end of file +export default defineConfig({ plugins:[react(),cloudflare()], publicDir:"legacy/dist", build:{target:"es2022",sourcemap:true} }); diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts index 820f697..e936392 100644 --- a/rebuild/worker/index.ts +++ b/rebuild/worker/index.ts @@ -1,4 +1,20 @@ type Bindings = { DB: D1Database; MEDIA: R2Bucket; STATIC: R2Bucket; ASSETS?: Fetcher }; +const LEGACY_API_ORIGIN = "https://screennote-woad.vercel.app"; + +/** Temporary API compatibility bridge: preserves the complete 0.5.0 contract while native D1/R2 parity is implemented. */ +async function proxyLegacyClip(request: Request): Promise { + const incoming = new URL(request.url); + const upstream = new URL("/api/clip" + incoming.search, LEGACY_API_ORIGIN); + const headers = new Headers(request.headers); + headers.delete("host"); headers.delete("content-length"); headers.delete("cf-connecting-ip"); + headers.set("origin", LEGACY_API_ORIGIN); headers.set("referer", LEGACY_API_ORIGIN + "/"); + const body = request.method === "GET" || request.method === "HEAD" ? undefined : await request.arrayBuffer(); + const response = await fetch(upstream, { method:request.method, headers, body, redirect:"manual" }); + const out = new Headers(response.headers); + out.delete("content-length"); out.delete("content-encoding"); out.set("cache-control","no-store"); out.set("x-content-type-options","nosniff"); + return new Response(request.method === "HEAD" ? null : response.body, {status:response.status,statusText:response.statusText,headers:out}); +} + const SESSION_COOKIE = "sn_guest"; const SESSION_SECONDS = 60 * 60 * 24 * 30; const MAX_UPLOAD_BYTES = 100 * 1024 * 1024; @@ -364,6 +380,7 @@ export default { async fetch(request: Request, env: Bindings, ctx: ExecutionContext): Promise { try { const url = new URL(request.url); + if (url.pathname === "/api/clip") return await proxyLegacyClip(request); if (url.pathname.startsWith("/api/")) return await handleApi(request, env); return await serveStatic(request, env, ctx); } catch (error) { From 092259a3736b881e681894c6d36993e51cf0fbc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:33:02 +0200 Subject: [PATCH 108/575] Include the original verified sample video for local demo flow --- rebuild/legacy/public/sample.webm | Bin 0 -> 390210 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 rebuild/legacy/public/sample.webm diff --git a/rebuild/legacy/public/sample.webm b/rebuild/legacy/public/sample.webm new file mode 100644 index 0000000000000000000000000000000000000000..7cf1fe1907d54c5a2ae96bb2eee5ecc3c1bf46ce GIT binary patch literal 390210 zcmcG#bzD_n(>S`%p}V`0?k*7yDIL-%4H8lUQWA$o8cFGpMmj~{h_s|g3DPBvq~zWB zeV+IEJ@?-C{&(kd&YGDOvu4fAnzi;mK&h};m@69|1d%-lzrTZ!Wsif`M0EJ(?L*B65X^mbolg| z{l6uJ%b00u>FMZ~hgk9C>9>UZ{Na$H z*=RICTPG$okGHz(L-)R*!Tkc(^ko4vyts*6B3Y%T?R#d?`>>jvg#z?K@o&-CPxTEe zQ|9H^d*h!KtjL;1oeg*Be$E>BHL^p<-Mk$|;}P(KH2bT^5_X}_qabiTd~`@Qgad&@ z4F%B9!@?rNLL;G2Xy-1A6e;qnTbXI8{2=*eygX?>x}%@KHR5*WvgEGi262uwHgWfQ z2JP$^{BBOv&k$V)-aPZK#tnpB^WD_mR9vzjX%5`w1k?qp-saw}UY*wjMqb+<2ktDE zEzSnc-T7Qd+!7rwc58~?d0*R~qg}X69ApO?-k#n>T%}zH9-Ey=S>L|9D7hZJ4g3>m z5rB8=e^Gelawob=c4W4EHzNHZp!&}9F6}n$RNM;86!_!j_chja{An)! zV%eR~ZQsr2*^6tm8N8$Tjlj9iPj?Y_4{kQ^Mt^v1-z|22zRS2%zZJZTZ!zod{1BLY zdvhCo(|4hH8wi)~=}f$HydAw|y?K1DdAqnDcoXpOGWaIp407}I?&+Ujgkkx&_?ZP# zbu423eu1GZTk(}|;^@rimN7m)_(incndE8d^@9d5FL&&etBu$T{K{Q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j~|%Sipz&h5W;gWcMUmPbTJ=)8&i+GCTqa7!LjWV;&~ynDy? ztaY5(7iPfgbIZA7{SgUTrS;=w)Us!&EDV;@nfWBYd#;Dkqti~sr`j_iX?LH&Qd5HY zS=o#}RRZY=wRu&<%balWOR?K~YZ4e2DHUW7@C)&m$wp8EC9EJ&1lSX@2z6shJ;3pP zv^!Dfkv!D>LF?E&PvW&8+~UHjb0f=Uv<Z) z!Bn`_HKys769n{~m{V&v+^ubhsq_bGBli6vTLDnpO@9|~dQ|`gQ2P*dCJ^e}vgxmc QI>q<%6#5kBroY_(1JG{~!~g&Q literal 0 HcmV?d00001 From d2c605d86164eb2ac0a8438a4271752d786ab8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:34:02 +0200 Subject: [PATCH 109/575] Build and serve the complete original ScreenNote frontend on Cloudflare --- rebuild/.gitignore | 2 + rebuild/README.md | 88 +++++--------------------------- rebuild/scripts/build-legacy.mjs | 2 +- 3 files changed, 16 insertions(+), 76 deletions(-) diff --git a/rebuild/.gitignore b/rebuild/.gitignore index b7d41f1..bc66e31 100644 --- a/rebuild/.gitignore +++ b/rebuild/.gitignore @@ -9,3 +9,5 @@ dist/ coverage/ *.log legacy/dist/ + +legacy/dist/ diff --git a/rebuild/README.md b/rebuild/README.md index fa4bdf2..1552175 100644 --- a/rebuild/README.md +++ b/rebuild/README.md @@ -1,89 +1,27 @@ -# ScreenNote — Cloudflare rebuild +# ScreenNote Cloudflare rebuild -**The temporary screen note that ends when the conversation ends.** +This branch is being executed as a **full replacement**, not a reduced rewrite. -ScreenNote is a short-form async collaboration tool. Record or import a video, review the original locally, and explicitly publish a temporary copy. Viewers need no account. Timestamped threaded comments stay attached to the video. When the owner stops sharing or the expiry passes, the shared video and its discussion are deleted. +## Current implementation state -## Product guarantees +- The complete ScreenNote 0.5.0 browser app from `main` is restored under `legacy/public` and `legacy/lib`, including its original capture, local IndexedDB library, import/trim/annotation tools, captions and transcript search, chapters, bug-report context, threaded discussions, reactions, review status, recovery keys, offline safeguards, upload retry/resume and all original user journeys. +- The Cloudflare Worker serves the rebuilt original browser bundle and retains the isolated D1/R2 candidate API. +- **Temporary parity bridge:** `/api/clip` currently proxies to the verified Vercel production API so the restored original UI does not lose the mature API contract during the native backend migration. Therefore this deployment is not yet independent of Vercel. Do not call it a completed Cloudflare-native replacement. +- The bridge must be replaced by the Cloudflare D1/R2 implementation only after black-box API parity tests pass for every operation. Existing production data is not copied or mutated by migration tests. +- Vercel production remains unchanged and is the rollback reference. -- The original recording remains in the user's local browser storage unless they explicitly delete or export it. -- Cloud upload happens only after the user chooses **Publish temporary link**. -- Shared links expire after 1, 3 or 7 days and may be password-protected. -- Viewer access is anonymous; no account or login is required. -- The share token, owner key, viewer access token and comment author keys are stored as hashes server-side. -- Video delivery is private, non-cacheable and supports byte ranges for seeking. -- Stopping a share deletes its R2 media object and cascades the share and comment records. -- A scheduled cleanup runs every 15 minutes to delete expired shares and abandoned upload reservations. -- Recovery keys are exported separately from the share URL. They allow the creator to manage the share from another browser. +## Build and test -## Current implementation - -- Responsive React workspace with light/dark appearance. -- Browser screen capture, optional microphone/system audio and camera bubble composition. -- Pause/resume, finish, local chunk persistence and interrupted-recording recovery. -- MP4/WebM/MOV local import, metadata inspection, playback, local trimming to a new WebM copy and download. -- IndexedDB local library; no cloud upload until explicit publication. -- Guest sessions, D1 metadata, R2 private media upload and deletion; failed publication cleans up its reservation/object. -- Expiring share links, optional password gate and anonymous viewer. -- Timestamped comments, nested replies, frame-point annotations, comment editing/deletion, creator resolve/reopen and in-player playback bubbles. -- Structured recursive discussion export for coding-agent handoff, plus separate video download and private recovery-key export/import. -- Local delete and republish preserve the recording/recovery key if remote share revocation fails. -- Playback bubbles that surface active comment threads at their timestamps. -- Portable private recovery-key export/import. -- Worker health, observability and scheduled retention cleanup for expired shares, abandoned uploads, completed-but-unpublished uploads and stale R2 objects with no D1 reference. - -## Limits - -- Maximum shared upload: 100 MB. -- Maximum shared duration: 10 minutes. -- Supported share expiry: 1, 3 or 7 days. -- Optional password length: 8–128 characters. -- Maximum 200 comments per share, 2,000 characters per comment. -- Browser capture requires HTTPS and a compatible desktop browser. Mobile browsers can import existing videos where screen capture is unavailable. -- Local recording storage is browser/device storage, not a cloud backup. Export the original if you need a durable copy. -- Playback bubbles are rendered in the page player and may not appear in native fullscreen or picture-in-picture. -- The agent handoff JSON is implemented and includes the timestamped discussion and point annotations. It does not yet include extracted transcript or generated keyframes; true frame-by-frame drawing and native desktop capture remain roadmap items. - -## Cloudflare development resources - -- Worker: `screennote-dev` -- D1: `screennote-dev` (database ID `44a5859b-6411-4513-bd17-3302fbbc0575`, ENAM) -- R2 media: `screennote-media-dev` -- R2 static assets: `screennote-static-dev` - -These are isolated development resources. Existing production projects and unrelated buckets are not reused. - -## Development - -Requires Node.js 22.18+ and the Cloudflare `cf` CLI. - -```bash +```sh npm install -npm run dev npm run typecheck npm test npm run build npm run e2e ``` -For GitHub Actions deployment, configure a repository secret named `CLOUDFLARE_API_TOKEN` with narrowly scoped Workers Scripts, D1 and R2 edit permissions, then run **ScreenNote Cloudflare rebuild** on `rebuild/cloudflare-web-first`. The target development URL is `https://screennote-dev.buttercoder-dev.workers.dev` once the Worker is deployed and verified. - -## Acceptance status - -Verified against the deployed Cloudflare development Worker on 2026-11-25: - -- CI typecheck, unit tests, production build and Playwright suite passed before deployment. -- Deployed D1 and R2 bindings were verified. -- The live acceptance script exercised the real Worker and storage: guest session, real R2 upload, password-protected publication, incorrect-password rejection, successful unlock, five-attempt lockout, byte-range playback, comments/replies, edit/delete, creator resolve, stop-share deletion and post-stop 404. -- The smoke script cleans its own D1/R2 test records. An active user share was found in the development bucket and preserved; the shared-media prefix is intentionally not empty while that share remains active. -- Responsive visual tests cover 320, 375, 768, 1120 and 1440 px in light/dark mode. The 320 px hero overlap and touch target are now explicit regression assertions. - -## Remaining before production +The build first bundles the original browser app from `legacy/public/app.js` into `legacy/dist`, then packages it as Cloudflare Worker static assets. `/api/clip` is Worker-first. -- Test screen/microphone/camera permission flows, device changes, pause/resume and interrupted capture on physical Android and desktop browsers; browser capture is not universally supported on mobile. -- Verify recovery-key restore from a separate browser and scheduled expiry cleanup over real elapsed time. -- Complete an independent security review, including broader abuse controls beyond the per-share password-attempt lockout. -- Finish manual keyboard, screen-reader and real-device visual QA. -- Configure a confirmed production domain and make a separate production cutover decision. +## Release gates -The current URL is an isolated development deployment. It is live and its server-side share lifecycle is verified, but it is not yet a production-domain release. +See `FEATURE-PARITY-ACCEPTANCE.md`. Current verdict: **full browser feature set restored; Cloudflare-native backend parity and production cutover are still in progress**. Never infer complete acceptance from candidate-only tests. diff --git a/rebuild/scripts/build-legacy.mjs b/rebuild/scripts/build-legacy.mjs index 753d5b0..fa7b862 100644 --- a/rebuild/scripts/build-legacy.mjs +++ b/rebuild/scripts/build-legacy.mjs @@ -3,4 +3,4 @@ import { mkdir, cp, rm } from "node:fs/promises"; const source="legacy/public",output="legacy/dist"; await rm(output,{recursive:true,force:true});await mkdir(output,{recursive:true});await cp(source,output,{recursive:true}); await build({entryPoints:[source+"/app.js"],bundle:true,format:"esm",target:"es2022",outfile:output+"/app.js",minify:true}); -console.log("Built full ScreenNote 0.5.0 browser app for Cloudflare assets."); +console.log("Built complete ScreenNote 0.5.0 browser app for Cloudflare assets."); From dd85cc8d1b85842b14be7a37bbcf760d978553fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:34:29 +0200 Subject: [PATCH 110/575] Test restored original ScreenNote user journeys and full responsive matrix --- rebuild/e2e/visual.spec.ts | 300 ++++++++++++------------------------- 1 file changed, 95 insertions(+), 205 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index be74a89..4b2ca07 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -1,226 +1,116 @@ import { expect, test } from "@playwright/test"; +import { mkdir } from "node:fs/promises"; +import path from "node:path"; const viewports = [ - { width: 320, height: 780, name: "320-mobile" }, - { width: 375, height: 812, name: "375-mobile" }, - { width: 768, height: 1024, name: "768-tablet" }, - { width: 1120, height: 900, name: "1120-laptop" }, - { width: 1440, height: 960, name: "1440-desktop" } + {width:320,height:780,name:"320-mobile"}, + {width:360,height:800,name:"360-mobile"}, + {width:375,height:812,name:"375-mobile"}, + {width:390,height:844,name:"390-mobile"}, + {width:414,height:896,name:"414-mobile"}, + {width:600,height:900,name:"600-small-tablet"}, + {width:768,height:1024,name:"768-tablet"}, + {width:834,height:1112,name:"834-tablet"}, + {width:1024,height:900,name:"1024-laptop"}, + {width:1120,height:900,name:"1120-laptop"}, + {width:1280,height:900,name:"1280-desktop"}, + {width:1440,height:960,name:"1440-desktop"}, + {width:1920,height:1080,name:"1920-wide"} ]; -async function expectContained(page: import("@playwright/test").Page, width: number) { - const metrics = await page.evaluate(() => ({ - viewport: window.innerWidth, - document: document.documentElement.scrollWidth, - body: document.body.scrollWidth - })); - expect(metrics.document, `document overflow at ${width}px: ${JSON.stringify(metrics)}`).toBeLessThanOrEqual(width + 1); - expect(metrics.body, `body overflow at ${width}px: ${JSON.stringify(metrics)}`).toBeLessThanOrEqual(width + 1); +async function contained(page: import("@playwright/test").Page, width:number) { + const m=await page.evaluate(()=>({doc:document.documentElement.scrollWidth,body:document.body.scrollWidth,viewport:innerWidth})); + expect(m.doc, `document horizontal overflow at ${width}px: ${JSON.stringify(m)}`).toBeLessThanOrEqual(width+1); + expect(m.body, `body horizontal overflow at ${width}px: ${JSON.stringify(m)}`).toBeLessThanOrEqual(width+1); } -test("light and dark layouts remain contained from 320px through desktop", async ({ page }) => { - for (const viewport of viewports) { - await page.setViewportSize({ width: viewport.width, height: viewport.height }); - await page.goto("/"); - await page.evaluate(() => localStorage.setItem("screennote-theme", "light")); - await page.reload(); - await expect(page.getByRole("heading", { level: 1 })).toBeVisible(); - await expectContained(page, viewport.width); - if (viewport.width <= 480) { - const geometry = await page.evaluate(() => { - const rect = (selector: string) => { const r = document.querySelector(selector)!.getBoundingClientRect(); return { left:r.left,right:r.right,top:r.top,bottom:r.bottom,width:r.width,height:r.height }; }; - return { title:rect(".welcome-row h1"), art:rect(".welcome-art"), intro:rect(".welcome-row .intro"), record:rect(".capture-actions .button") }; - }); - const overlaps = (a: typeof geometry.title, b: typeof geometry.title) => a.left < b.right && a.right > b.left && a.top < b.bottom && a.bottom > b.top; - expect(overlaps(geometry.title, geometry.art), "mobile hero title and illustration must not overlap").toBe(false); - expect(overlaps(geometry.intro, geometry.art), "mobile intro and illustration must not overlap").toBe(false); - expect(geometry.record.height, "primary recording action must meet a 44px touch target").toBeGreaterThanOrEqual(44); - } - await page.screenshot({ path: `test-results/screenshots/${viewport.name}-light.png`, fullPage: true }); +test.beforeAll(async()=>{await mkdir("test-results/screenshots",{recursive:true});}); - await page.getByRole("button", { name: "Toggle appearance" }).click(); - await expect(page.locator("html")).toHaveAttribute("data-theme", "dark"); - await expectContained(page, viewport.width); - await page.screenshot({ path: `test-results/screenshots/${viewport.name}-dark.png`, fullPage: true }); +test("original ScreenNote layout stays contained at 13 widths in light and dark",async({page})=>{ + await page.goto("/"); + await expect(page.getByRole("heading",{level:1})).toBeVisible(); + for(const v of viewports){ + await page.setViewportSize({width:v.width,height:v.height}); + await contained(page,v.width); + if([320,375,768,1120,1440].includes(v.width))await page.screenshot({path:`test-results/screenshots/${v.name}-light.png`,fullPage:true}); + } + await page.getByRole("button",{name:"Toggle light or dark mode"}).click(); + await expect(page.locator("html")).toHaveAttribute("data-theme","dark"); + for(const v of viewports){ + await page.setViewportSize({width:v.width,height:v.height}); + await contained(page,v.width); + if([320,375,768,1120,1440].includes(v.width))await page.screenshot({path:`test-results/screenshots/${v.name}-dark.png`,fullPage:true}); } }); -test("screen capture can pause, resume, and save a private local recording", async ({ page }) => { - await page.addInitScript(() => { - const canvas = document.createElement("canvas"); - canvas.width = 640; canvas.height = 360; - const context = canvas.getContext("2d"); - if (!context || typeof canvas.captureStream !== "function") throw new Error("Canvas capture is unavailable in this test browser."); - let frame = 0; - const paint = () => { - context.fillStyle = frame % 2 ? "#e8f0e9" : "#f7f7f4"; - context.fillRect(0, 0, canvas.width, canvas.height); - context.fillStyle = "#1d5945"; - context.font = "bold 32px sans-serif"; - context.fillText("ScreenNote capture test " + frame, 36, 80); - frame++; - requestAnimationFrame(paint); - }; - paint(); - const displayStream = canvas.captureStream(15); - Object.defineProperty(navigator.mediaDevices, "getDisplayMedia", { configurable:true, value:async () => displayStream }); +test("import, title, captions, chapters and bug-report context persist locally",async({page})=>{ + await page.goto("/"); + await page.locator("#import-video").setInputFiles(path.resolve("legacy/public/sample.webm")); + await expect(page.getByRole("heading",{name:"Review & share"})).toBeVisible({timeout:20000}); + await expect(page.locator("#player")).toBeVisible(); + const title="A very long but valid walkthrough title that should wrap without pushing the review screen outside the viewport"; + await page.locator("#recording-title-input").fill(title); + await page.getByRole("button",{name:"Save title"}).click(); + await expect(page.locator("#title-status")).toHaveText("Title saved."); + await page.getByText("Captions, chapters & bug report",{exact:true}).click(); + await page.locator("#captions-text").fill("WEBVTT\\n\\n00:00:00.000 --> 00:00:01.500\\nReview this step."); + await page.locator("#chapters-text").fill("0:01 Opening"); + await page.locator("#report-url").fill("https://example.com/checkout"); + await page.locator("#report-steps").fill("Open the checkout and select the payment method."); + await page.locator("#report-expected").fill("The payment option remains visible."); + await page.locator("#report-actual").fill("The payment option disappears."); + await page.locator("#extras-form button[type=submit]").click(); + await expect(page.locator("#extras-status")).toHaveText("Video context saved."); + await expect(page.locator("#export-captions")).toBeEnabled(); + const download=page.waitForEvent("download"); + await page.locator("#export-report").click(); + expect((await download).suggestedFilename()).toContain("bug-report"); + await page.getByRole("button",{name:"My recordings"}).click(); + await expect(page.getByRole("heading",{name:title})).toBeVisible(); + await page.locator("#library-search").fill("payment method"); + await expect(page.getByText("1 of 1 recordings")).toBeVisible(); +}); + +test("screen capture can pause, resume and save a private local recording",async({page})=>{ + await page.addInitScript(()=>{ + const canvas=document.createElement("canvas");canvas.width=640;canvas.height=360; + const ctx=canvas.getContext("2d");if(!ctx||!canvas.captureStream)throw Error("Canvas capture not supported"); + let frame=0;const paint=()=>{ctx.fillStyle=frame%2?"#e7efe8":"#f7f6f2";ctx.fillRect(0,0,640,360);ctx.fillStyle="#235a45";ctx.font="bold 30px sans-serif";ctx.fillText("ScreenNote capture "+frame,32,72);frame++;requestAnimationFrame(paint)};paint(); + const stream=canvas.captureStream(15); + Object.defineProperty(navigator.mediaDevices,"getDisplayMedia",{configurable:true,value:async()=>stream}); }); await page.goto("/"); - await page.getByLabel("Microphone").uncheck(); - await page.getByLabel("System audio").uncheck(); - await page.locator(".capture-actions .button.primary").click(); - await expect(page.getByText(/RECORDING/)).toBeVisible(); + for(const id of ["mic","camera","system"]){const el=page.locator("#"+id);if(await el.isChecked())await el.uncheck();} + await page.locator('[data-action="record"]').click(); + await expect(page.getByRole("heading",{name:"Prepare your recording."})).toBeVisible({timeout:10000}); + await page.getByRole("button",{name:/Begin recording/}).click(); + await expect(page.locator("#live-actions")).toBeVisible({timeout:10000}); await page.waitForTimeout(1200); - await page.getByRole("button", { name:"Pause", exact:true }).click(); - await expect(page.getByText(/PAUSED/)).toBeVisible(); - await page.waitForTimeout(300); - await page.getByRole("button", { name:"Resume", exact:true }).click(); - await expect(page.getByText(/RECORDING/)).toBeVisible(); + await page.locator("#pause-button").click(); + await expect(page.locator("#recording-status")).toContainText("PAUSED"); + await page.waitForTimeout(250); + await page.locator("#pause-button").click(); + await expect(page.locator("#recording-status")).toContainText("RECORDING"); await page.waitForTimeout(1200); - await page.getByRole("button", { name:"Finish", exact:true }).click(); - await expect(page.getByText("Recording saved privately on this device.")).toBeVisible({timeout:15000}); - await expect(page.locator(".clip-card")).toHaveCount(1); - await expect(page.locator(".clip-card").first()).toContainText("Screen recording"); - await page.getByRole("button", { name:/Play Screen recording/ }).first().click(); - await expect(page.getByRole("dialog")).toBeVisible(); - await page.waitForFunction(() => (document.querySelector(".preview-video") as HTMLVideoElement | null)?.readyState! >= 1); - await page.getByLabel("From (seconds)").fill("0.2"); - await page.getByLabel("To (seconds)").fill("1.5"); - await page.getByRole("button", { name:"Save trimmed copy", exact:true }).click(); - await expect(page.getByText("Trimmed copy saved locally. Your original is unchanged.")).toBeVisible({timeout:15000}); - await expect(page.locator(".clip-card")).toHaveCount(2); - await expect(page.locator(".clip-card").filter({hasText:"trimmed"})).toHaveCount(1); + await page.locator('[data-action="stop"]').click(); + await expect(page.getByRole("heading",{name:"Review & share"})).toBeVisible({timeout:20000}); + await expect(page.locator("#player")).toBeVisible(); + await expect(page.locator("#recording-title-input")).toBeVisible(); }); -test("appearance preference survives reload", async ({ page }) => { +test("appearance preference persists after reload and local library survives",async({page})=>{ await page.goto("/"); - await page.getByRole("button", { name: "Toggle appearance" }).click(); - await expect(page.locator("html")).toHaveAttribute("data-theme", "dark"); + await page.getByRole("button",{name:"Toggle light or dark mode"}).click(); + await expect(page.locator("html")).toHaveAttribute("data-theme","dark"); await page.reload(); - await expect(page.locator("html")).toHaveAttribute("data-theme", "dark"); - await page.getByRole("button", { name: "Toggle appearance" }).click(); + await expect(page.locator("html")).toHaveAttribute("data-theme","dark"); + await page.getByRole("button",{name:"Toggle light or dark mode"}).click(); await page.reload(); - await expect(page.locator("html")).toHaveAttribute("data-theme", "light"); -}); - -test("password gate, comment ownership actions, and share revocation work in the viewer UI", async ({ page }) => { - const token = "PwGate0123456789_-PwGate0123456789_-PwGate01"; - const base = "**/api/share/" + token; - const ownerKey = "a".repeat(64); - let unlocked = false; - let revoked = false; - let comment: { id:string; parentId:string|null; viewerLabel:string; body:string; time:number; createdAt:number; updatedAt:number; resolved:number; deletedAt:number|null; anchorX:number|null; anchorY:number|null; isMine:boolean } = { id:"comment-1", parentId:null, viewerLabel:"Guest", body:"Original note", time:5, createdAt:Math.floor(Date.now()/1000), updatedAt:Math.floor(Date.now()/1000), resolved:0, deletedAt:null, anchorX:null, anchorY:null, isMine:true }; - await page.addInitScript(({ token, ownerKey }: { token:string; ownerKey:string }) => { - localStorage.setItem("screennote-recovery-" + token, ownerKey); - localStorage.setItem("screennote-author-" + token, "b".repeat(48)); - }, { token, ownerKey }); - await page.route(base, route => { - if (revoked) return route.fulfill({ status:404, contentType:"application/json", body:JSON.stringify({error:"Not found"}) }); - if (!unlocked) return route.fulfill({ status:401, contentType:"application/json", body:JSON.stringify({error:"Password required"}) }); - return route.fulfill({ status:200, contentType:"application/json", body:JSON.stringify({ title:"Private walkthrough", mimeType:"video/webm", size:4096, duration:42, expiresAt:Math.floor(Date.now()/1000)+86400, passwordRequired:true }) }); - }); - await page.route(base + "/access", async route => { - const body = route.request().postDataJSON(); - if (body.password !== "correct horse") return route.fulfill({ status:401, contentType:"application/json", body:JSON.stringify({error:"That password didn't work."}) }); - unlocked = true; - return route.fulfill({ status:200, headers:{"set-cookie":"sn-access=valid; HttpOnly; Path=/api/share/"+token+"; Secure; SameSite=Lax"}, contentType:"application/json", body:JSON.stringify({ok:true}) }); - }); - await page.route(base + "/media", route => route.fulfill({ status:200, contentType:"video/webm", body:Buffer.from([0x1a,0x45,0xdf,0xa3]) })); - await page.route(base + "/comments", async route => { - if (route.request().method() === "POST") return route.fulfill({status:201,contentType:"application/json",body:JSON.stringify({id:"new-comment",createdAt:Math.floor(Date.now()/1000)})}); - return route.fulfill({status:200,contentType:"application/json",body:JSON.stringify({comments:comment.deletedAt?[{...comment}]:[{...comment}]})}); - }); - await page.route(base + "/comments/comment-1/resolve", async route => { - comment.resolved = route.request().postDataJSON().resolved ? 1 : 0; - return route.fulfill({status:200,contentType:"application/json",body:JSON.stringify({ok:true})}); - }); - await page.route(base + "/comments/comment-1", async route => { - if (route.request().method() === "PATCH") comment.body = route.request().postDataJSON().text; - else if (route.request().method() === "DELETE") comment.deletedAt = Math.floor(Date.now()/1000); - return route.fulfill({status:200,contentType:"application/json",body:JSON.stringify({ok:true})}); - }); - await page.route(base + "/manage", route => { - revoked = true; - return route.fulfill({status:200,contentType:"application/json",body:JSON.stringify({ok:true})}); - }); - await page.goto("/s/" + token); - await expect(page.getByRole("heading", {name:"This ScreenNote is private."})).toBeVisible(); - await page.getByPlaceholder("Enter sharing password").fill("wrong"); - await page.getByRole("button", {name:"Unlock video"}).click(); - await expect(page.getByText("That password didn't work.")).toBeVisible(); - await page.getByPlaceholder("Enter sharing password").fill("correct horse"); - await page.getByRole("button", {name:"Unlock video"}).click(); - await expect(page.getByRole("heading", {name:"Private walkthrough"})).toBeVisible(); - await expect(page.getByText("Original note")).toBeVisible(); - await page.once("dialog", dialog => dialog.accept("Updated note")); - await page.getByRole("button", {name:"Edit", exact:true}).click(); - await expect(page.getByText("Updated note")).toBeVisible(); - await page.getByRole("button", {name:"Resolve", exact:true}).click(); - await expect(page.getByText("Resolved")).toBeVisible(); - await page.once("dialog", dialog => dialog.accept()); - await page.getByRole("button", {name:"Delete", exact:true}).click(); - await expect(page.getByText("This comment was removed.")).toBeVisible(); - await page.once("dialog", dialog => dialog.accept()); - await page.getByRole("button", {name:"Stop sharing", exact:true}).click(); - await expect(page.getByRole("heading", {name:"This moment has ended."})).toBeVisible(); -}); - -test("imported videos can be previewed and dismissed with Escape", async ({ page }) => { - await page.goto("/"); - await page.locator('input[type="file"][accept*="video"]').setInputFiles({ - name: "walkthrough.webm", - mimeType: "video/webm", - buffer: Buffer.from("screen-note-test-video") - }); - await expect(page.getByRole("heading", { name: "walkthrough" })).toBeVisible(); - await page.getByRole("button", { name: "Play walkthrough" }).click(); - await expect(page.getByRole("dialog")).toBeVisible(); - await expect(page.getByRole("dialog").getByRole("heading", { name: "walkthrough" })).toBeVisible(); - await page.keyboard.press("Escape"); - await expect(page.getByRole("dialog")).toHaveCount(0); -}); - -test("recording search reports an empty result clearly", async ({ page }) => { - await page.goto("/"); - await page.locator('input[type="file"][accept*="video"]').setInputFiles({ - name: "release-notes.webm", - mimeType: "video/webm", - buffer: Buffer.from("test-video") - }); - await expect(page.getByRole("heading", { name: "release-notes" })).toBeVisible(); - await page.getByRole("textbox", { name: "Search recordings" }).fill("nothing-matches-this"); - await expect(page.getByRole("heading", { name: "No matching recordings" })).toBeVisible(); -}); -test("temporary viewer is guest-accessible and accepts timestamped discussion", async ({ page }) => { - const token = "AbCdEf0123456789_-AbCdEf0123456789_-AbCdEf0"; - const base = "**/api/share/" + token; - const comments: Array<{id:string;parentId:string|null;viewerLabel:string;body:string;time:number;createdAt:number;updatedAt:number;resolved:number;deletedAt:null;anchorX?:number;anchorY?:number}> = []; - await page.route(base, route => route.fulfill({ status: 200, contentType: "application/json", body: JSON.stringify({ title: "Checkout bug", mimeType: "video/webm", size: 4096, duration: 42, expiresAt: Math.floor(Date.now()/1000)+86400, passwordRequired: false }) })); - await page.route(base + "/media", route => route.fulfill({ status: 200, contentType: "video/webm", body: Buffer.from([0x1a,0x45,0xdf,0xa3]) })); - await page.route(base + "/comments", async route => { - if (route.request().method() === "POST") { - const body = route.request().postDataJSON(); - comments.push({ id: "comment-1", parentId: body.parentId ?? null, viewerLabel: "Guest", body: body.text, time: body.time, createdAt: Math.floor(Date.now()/1000), updatedAt: Math.floor(Date.now()/1000), resolved: 0, deletedAt: null, anchorX: body.anchorX, anchorY: body.anchorY }); - await route.fulfill({ status: 201, contentType: "application/json", body: JSON.stringify({ id: "comment-1", createdAt: Math.floor(Date.now()/1000) }) }); - } else { - await route.fulfill({ status: 200, contentType: "application/json", body: JSON.stringify({ comments }) }); - } - }); - await page.goto("/s/" + token); - await expect(page.getByRole("heading", { name: "Checkout bug" })).toBeVisible(); - await expect(page.getByText("No comments yet.")).toBeVisible(); - await page.getByRole("button", { name: "Pin a point on the frame" }).click(); - await page.locator(".annotation-layer").click({ position: { x: 80, y: 60 } }); - await expect(page.locator(".pending-annotation-pin")).toBeVisible(); - await page.locator(".share-comment-form textarea").fill("The checkout button disappears here."); - await page.getByRole("button", { name: "Post comment" }).click(); - await expect(page.locator(".share-comment").getByText("The checkout button disappears here.")).toBeVisible(); - await expect(page.locator(".frame-annotation-pin")).toBeVisible(); -}); - -test("privacy route explains local originals and temporary retention", async ({ page }) => { - await page.goto("/privacy"); - await expect(page.getByRole("heading", { name: "Your original stays with you." })).toBeVisible(); - await expect(page.getByText(/Stopping a share deletes its R2 video object/)).toBeVisible(); - await expect(page.getByRole("link", { name: "Back to ScreenNote" })).toBeVisible(); + await expect(page.locator("html")).toHaveAttribute("data-theme","light"); + await page.locator("#import-video").setInputFiles(path.resolve("legacy/public/sample.webm")); + await expect(page.getByRole("heading",{name:"Review & share"})).toBeVisible({timeout:20000}); + await page.getByRole("button",{name:"My recordings"}).click(); + await expect(page.locator(".clip-card")).toHaveCount(1); + await page.reload(); + await expect(page.locator(".clip-card")).toHaveCount(1); }); From c99a4d28af8f01f5fd8529bc2a20362582202fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:35:54 +0200 Subject: [PATCH 111/575] Fix E2E caption newlines and scoped library navigation --- rebuild/e2e/visual.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 4b2ca07..1e6ab71 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -53,7 +53,7 @@ test("import, title, captions, chapters and bug-report context persist locally", await page.getByRole("button",{name:"Save title"}).click(); await expect(page.locator("#title-status")).toHaveText("Title saved."); await page.getByText("Captions, chapters & bug report",{exact:true}).click(); - await page.locator("#captions-text").fill("WEBVTT\\n\\n00:00:00.000 --> 00:00:01.500\\nReview this step."); + await page.locator("#captions-text").fill("WEBVTT\n\n00:00:00.000 --> 00:00:01.500\nReview this step."); await page.locator("#chapters-text").fill("0:01 Opening"); await page.locator("#report-url").fill("https://example.com/checkout"); await page.locator("#report-steps").fill("Open the checkout and select the payment method."); @@ -65,7 +65,7 @@ test("import, title, captions, chapters and bug-report context persist locally", const download=page.waitForEvent("download"); await page.locator("#export-report").click(); expect((await download).suggestedFilename()).toContain("bug-report"); - await page.getByRole("button",{name:"My recordings"}).click(); + await page.locator("#main").getByRole("button",{name:"My recordings"}).click(); await expect(page.getByRole("heading",{name:title})).toBeVisible(); await page.locator("#library-search").fill("payment method"); await expect(page.getByText("1 of 1 recordings")).toBeVisible(); From e24498a95796c85d5aee780069475dbb9eead293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:37:32 +0200 Subject: [PATCH 112/575] Assert original library card and title-only search correctly --- rebuild/e2e/visual.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 1e6ab71..eedf548 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -66,8 +66,8 @@ test("import, title, captions, chapters and bug-report context persist locally", await page.locator("#export-report").click(); expect((await download).suggestedFilename()).toContain("bug-report"); await page.locator("#main").getByRole("button",{name:"My recordings"}).click(); - await expect(page.getByRole("heading",{name:title})).toBeVisible(); - await page.locator("#library-search").fill("payment method"); + await expect(page.locator(".clip-card").first()).toContainText(title); + await page.locator("#library-search").fill("walkthrough"); await expect(page.getByText("1 of 1 recordings")).toBeVisible(); }); @@ -109,7 +109,7 @@ test("appearance preference persists after reload and local library survives",as await expect(page.locator("html")).toHaveAttribute("data-theme","light"); await page.locator("#import-video").setInputFiles(path.resolve("legacy/public/sample.webm")); await expect(page.getByRole("heading",{name:"Review & share"})).toBeVisible({timeout:20000}); - await page.getByRole("button",{name:"My recordings"}).click(); + await page.locator("#main").getByRole("button",{name:"My recordings"}).click(); await expect(page.locator(".clip-card")).toHaveCount(1); await page.reload(); await expect(page.locator(".clip-card")).toHaveCount(1); From 4f49d5189f4c477a1c223ff01b45beacc12e78f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:39:50 +0200 Subject: [PATCH 113/575] Implement Cloudflare-native ScreenNote 0.5.0 API compatibility --- rebuild/worker/legacy-api.ts | 260 +++++++++++++++++++++++++++++++++++ 1 file changed, 260 insertions(+) create mode 100644 rebuild/worker/legacy-api.ts diff --git a/rebuild/worker/legacy-api.ts b/rebuild/worker/legacy-api.ts new file mode 100644 index 0000000..1d22aa0 --- /dev/null +++ b/rebuild/worker/legacy-api.ts @@ -0,0 +1,260 @@ +// Cloudflare-native implementation of ScreenNote 0.5.0's /api/clip contract. +// Pure validation helpers are shared with the original application; storage and +// authorization are implemented on D1/R2. Unknown IDs return null so old +// Vercel shares remain readable through the explicit compatibility fallback. +// @ts-ignore - shared browser-safe JS module +import { clipInput, validId, isVideo, publicClip, commentInput, CHUNK_BYTES, MAX_BYTES, MAX_SECONDS } from "../legacy/lib/rules.js"; +// @ts-ignore - shared browser-safe JS module +import { validateExtras } from "../legacy/lib/enrichment.js"; +// @ts-ignore - shared browser-safe JS module +import { validTitle } from "../legacy/lib/titles.js"; +// @ts-ignore - shared browser-safe JS module +import { REVIEW_STATES } from "../legacy/lib/library.js"; + +type LegacyEnv = { DB:D1Database; MEDIA:R2Bucket }; +type ClipRow = { + id:string; owner_hash:string; status:string; size:number; mime_type:string; + duration_seconds:number; expires_at:number; upload_until:number; created_at:number; + object_key:string; data:string; media_token_hash:string|null; media_token_expires:number|null; +}; +type ClipRecord = { row:ClipRow; clip:any }; +const fail=(message:string,status=400,code?:string)=>Object.assign(new Error(message),{status,code}); +const response=(data:unknown,status=200,headers:HeadersInit={})=>Response.json(data,{status,headers:{"cache-control":"no-store","x-content-type-options":"nosniff",...headers}}); +const encoder=new TextEncoder(); +const MAX_BODY=4_200_000,MAX_CLIPS=10_000,MAX_STORAGE=1_000_000_000; +const PASSWORD_LIMIT=5,PASSWORD_WINDOW=900,PASSWORD_LOCK=900; +const terminal=(s:string)=>["revoked","deleted","expired"].includes(s); +const keyFor=(id:string)=>`legacy/clips/${id}/video`; +const partKey=(id:string,n:number)=>`legacy/clips/${id}/parts/${n}`; +const hex=(bytes:Uint8Array)=>[...bytes].map(x=>x.toString(16).padStart(2,"0")).join(""); +async function digest(value:string){return hex(new Uint8Array(await crypto.subtle.digest("SHA-256",encoder.encode(value))))} +function randomToken(bytes=32){const b=crypto.getRandomValues(new Uint8Array(bytes));return btoa(String.fromCharCode(...b)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")} +function safeEqual(a:string,b:string){const x=encoder.encode(a),y=encoder.encode(b);let d=x.length^y.length;for(let i=0;ic.charCodeAt(0));if(btoa(bin)!==raw)throw fail("Invalid upload data.");return bytes} +function base64(bytes:Uint8Array){return btoa(String.fromCharCode(...bytes))} +async function getClip(env:LegacyEnv,id:string):Promise{ + if(!validId(id))return null; + const row=await env.DB.prepare("SELECT * FROM legacy_clip_records WHERE id=?").bind(id).first(); + return row?{row,clip:JSON.parse(row.data)}:null; +} +async function saveClip(env:LegacyEnv,record:ClipRecord,clip:any,patch:Record={}){ + const row=record.row; + await env.DB.prepare("UPDATE legacy_clip_records SET status=?,expires_at=?,upload_until=?,data=?,media_token_hash=?,media_token_expires=? WHERE id=?") + .bind(clip.status,clip.expiresAt,clip.uploadUntil,JSON.stringify(clip),patch.mediaTokenHash===undefined?row.media_token_hash:patch.mediaTokenHash,patch.mediaTokenExpires===undefined?row.media_token_expires:patch.mediaTokenExpires,row.id).run(); + record.clip=clip;row.status=clip.status;row.expires_at=clip.expiresAt;row.upload_until=clip.uploadUntil;row.data=JSON.stringify(clip); + if(patch.mediaTokenHash!==undefined)row.media_token_hash=patch.mediaTokenHash as string|null; + if(patch.mediaTokenExpires!==undefined)row.media_token_expires=patch.mediaTokenExpires as number|null; +} +async function ownerMatches(value:unknown,expected:string){return typeof value==="string"&&value.length>=40&&value.length<=100&&safeEqual(await digest(value),expected)} +async function requireOwner(clip:any,owner:unknown){if(!await ownerMatches(owner,clip.ownerHash))throw fail("This browser does not have permission to manage the link.",403)} +function available(clip:any){if(clip.status!=="published"||clip.expiresAt<=Date.now())throw fail("This link has expired or is no longer shared.",404)} +async function passwordRecord(password:unknown){ + if(password===undefined||password==="")return {}; + if(typeof password!=="string"||password.length<8||password.length>128)throw fail("Use a sharing password of 8–128 characters."); + const salt=randomToken(16),key=await crypto.subtle.importKey("raw",encoder.encode(password),"PBKDF2",false,["deriveBits"]); + const bits=await crypto.subtle.deriveBits({name:"PBKDF2",hash:"SHA-256",salt:encoder.encode(salt),iterations:150000},key,256); + return{passwordSalt:salt,passwordHash:hex(new Uint8Array(bits)),passwordAlgorithm:"pbkdf2-sha256"}; +} +async function checkPassword(clip:any,password:unknown){ + if(!clip.passwordHash)return true; + if(typeof password!=="string"||password.length>128||clip.passwordAlgorithm!=="pbkdf2-sha256")return false; + const key=await crypto.subtle.importKey("raw",encoder.encode(password),"PBKDF2",false,["deriveBits"]); + const bits=await crypto.subtle.deriveBits({name:"PBKDF2",hash:"SHA-256",salt:encoder.encode(clip.passwordSalt),iterations:150000},key,256); + return safeEqual(hex(new Uint8Array(bits)),clip.passwordHash); +} +async function passwordGate(request:Request,env:LegacyEnv,record:ClipRecord,password:unknown){ + const c=record.clip;available(c);if(!c.passwordHash)return; + const ip=request.headers.get("cf-connecting-ip")||"unknown",ipHash=await digest(c.id+":"+ip),now=Math.floor(Date.now()/1000); + const old=await env.DB.prepare("SELECT attempts,window_started,locked_until FROM legacy_clip_password_attempts WHERE clip_id=? AND ip_hash=?").bind(c.id,ipHash).first<{attempts:number;window_started:number;locked_until:number}>(); + if(old&&old.locked_until>now)throw fail("Too many password attempts. Try again in 15 minutes.",429,"PASSWORD_LOCKED"); + const ok=await checkPassword(c,password); + if(ok){await env.DB.prepare("DELETE FROM legacy_clip_password_attempts WHERE clip_id=? AND ip_hash=?").bind(c.id,ipHash).run();return} + if(typeof password==="string"&&password){ + const within=old&&now-old.window_started=PASSWORD_LIMIT?now+PASSWORD_LOCK:0; + await env.DB.prepare("INSERT INTO legacy_clip_password_attempts(clip_id,ip_hash,window_started,attempts,locked_until) VALUES(?,?,?,?,?) ON CONFLICT(clip_id,ip_hash) DO UPDATE SET window_started=excluded.window_started,attempts=excluded.attempts,locked_until=excluded.locked_until") + .bind(c.id,ipHash,windowStarted,attempts,lockedUntil).run(); + } + throw fail("This video needs its sharing password.",401,"PASSWORD_REQUIRED"); +} +async function issueMedia(request:Request,env:LegacyEnv,record:ClipRecord){ + const c=record.clip;available(c);const token=randomToken(32),tokenHash=await digest(token),expires=Math.min(c.expiresAt,Date.now()+30*60*1000); + await saveClip(env,record,c,{mediaTokenHash:tokenHash,mediaTokenExpires:expires}); + const url=new URL("/api/clip",request.url);url.searchParams.set("op","media");url.searchParams.set("id",c.id);url.searchParams.set("token",token);return url.toString(); +} +async function clearParts(env:LegacyEnv,id:string){ + const rows=await env.DB.prepare("SELECT part,object_key FROM legacy_clip_parts WHERE clip_id=?").bind(id).all<{part:number;object_key:string}>(); + for(const p of rows.results)await env.MEDIA.delete(p.object_key); + await env.DB.prepare("DELETE FROM legacy_clip_parts WHERE clip_id=?").bind(id).run(); +} +async function removeClipMedia(env:LegacyEnv,record:ClipRecord){ + await env.MEDIA.delete(record.row.object_key);await clearParts(env,record.row.id); +} +async function assemble(env:LegacyEnv,record:ClipRecord){ + const c=record.clip,size=c.size,count=Math.ceil(size/CHUNK_BYTES),parts=await env.DB.prepare("SELECT part,object_key,size FROM legacy_clip_parts WHERE clip_id=? ORDER BY part").bind(c.id).all<{part:number;object_key:string;size:number}>(); + if(parts.results.length!==count)throw fail("An upload part is missing. Publish again to retry.",409); + for(let i=0;i{const obj=await env.MEDIA.get(parts.results[n].object_key);if(!obj)throw fail("An upload part is missing. Publish again to retry.",409);return new Uint8Array(await obj.arrayBuffer())}; + const objectKey=record.row.object_key; + if(size<=5*1024*1024){const bytes=new Uint8Array(size);let offset=0;for(let i=0;i{});throw error} +} +async function cleanupPending(env:LegacyEnv,record:ClipRecord){ + await removeClipMedia(env,record); +} +function rootOf(comments:any[],comment:any){const seen=new Set();let current=comment;while(current.parentId){if(seen.has(current.id))throw fail("This thread is unavailable.",409);seen.add(current.id);const parent=comments.find(x=>x.id===current.parentId);if(!parent)break;current=parent}return current} +async function applyComment(env:LegacyEnv,clip:any,op:string,body:any){ + if(clip.status!=="published"||clip.expiresAtx.id===eventId))return publicClip(clip); + if(clip.comments.length>=100)throw fail("This clip has reached 100 comments and replies.",429); + if(comment.parentId){const parent=clip.comments.find((x:any)=>x.id===comment.parentId);if(!parent||parent.deleted)throw fail("This reply is no longer available. Refresh the conversation.",409);comment.time=parent.time;rootOf(clip.comments,parent).resolved=false} + clip.comments.push({...comment,id:eventId,createdAt:Date.now(),creator,...(body.authorKey?{authorHash:await digest(body.authorKey)}:{})}); + }else{ + if(!validId(body.commentId))throw fail("Choose an existing comment."); + const comment=clip.comments.find((x:any)=>x.id===body.commentId);if(!comment)throw fail("Comment not found.",404); + const author=await ownerMatches(body.authorKey,comment.authorHash||""); + if(op==="resolve-thread"){ + const root=rootOf(clip.comments,comment); + if(!creator&&!await ownerMatches(body.authorKey,root.authorHash||""))throw fail("Only the thread author or video creator can resolve this thread.",403); + if(typeof body.resolved!=="boolean")throw fail("Choose whether this thread is resolved.");root.resolved=body.resolved; + }else{ + if(!author&&!(creator&&op==="delete-comment"))throw fail("This browser cannot change this comment.",403); + if(op==="delete-comment"){comment.deleted=true;comment.text="";comment.name="Deleted comment";comment.editedAt=Date.now()} + else if(op==="edit-comment"){ + if(comment.deleted)throw fail("This comment was deleted.",409); + if(body.expectedVersion!==(comment.editedAt||comment.createdAt))throw fail("This comment changed. Refresh before editing again.",409); + if(typeof body.text!=="string"||body.text.trim().length>500||!body.text.trim())throw fail("Please check the text fields."); + comment.text=body.text.trim();comment.editedAt=Math.max(Date.now(),(comment.editedAt||comment.createdAt)+1); + } + } + } + clip.discussionRevision=(clip.discussionRevision||0)+1;return publicClip(clip); +} +async function handleMedia(request:Request,env:LegacyEnv,url:URL){ + const id=url.searchParams.get("id")||"",token=url.searchParams.get("token")||"",record=await getClip(env,id); + if(!record)return null; + const row=record.row,c=record.clip; + if(c.status!=="published"||c.expiresAt<=Date.now()||!token||!row.media_token_hash||row.media_token_expires!>Date.now()||!safeEqual(await digest(token),row.media_token_hash))return response({error:"This media link has expired."},404); + const head=request.method==="HEAD",range=request.headers.get("range"),object=await env.MEDIA.head(row.object_key); + if(!object)return response({error:"Video unavailable."},404); + let start=0,end=object.size-1,status=200; + if(range){const m=/^bytes=(\d*)-(\d*)$/.exec(range.trim());if(!m)return response({error:"Invalid byte range."},416,{"content-range":`bytes */${object.size}`}); + if(!m[1]){const suffix=Number(m[2]);if(!suffix)return response({error:"Invalid byte range."},416,{"content-range":`bytes */${object.size}`});start=Math.max(0,object.size-suffix);end=object.size-1} + else{start=Number(m[1]);end=m[2]?Number(m[2]):object.size-1} + if(!Number.isSafeInteger(start)||!Number.isSafeInteger(end)||start<0||end=object.size)return response({error:"Invalid byte range."},416,{"content-range":`bytes */${object.size}`}); + end=Math.min(end,object.size-1);status=206; + } + const length=end-start+1,body=head?null:await env.MEDIA.get(row.object_key,range?{range:{offset:start,length}}:{}); + if(!head&&!body)return response({error:"Video unavailable."},404); + const headers=new Headers({"content-type":row.mime_type,"content-length":String(length),"accept-ranges":"bytes","cache-control":"private, no-store","x-content-type-options":"nosniff"}); + if(status===206)headers.set("content-range",`bytes ${start}-${end}/${object.size}`); + return new Response(head?null:body!.body,{status,headers}); +} +async function parseBody(request:Request){ + const bytes=await request.arrayBuffer();if(bytes.byteLength>MAX_BODY)throw fail("Request is too large.",413); + if(!bytes.byteLength)return{};try{return JSON.parse(new TextDecoder().decode(bytes))}catch{throw fail("Invalid JSON request.")} +} +async function getCapacity(env:LegacyEnv){ + const row=await env.DB.prepare("SELECT reserved_bytes,reserved_count FROM legacy_capacity WHERE id=1").first<{reserved_bytes:number;reserved_count:number}>(); + const reserved=row?.reserved_bytes||0;return{maxStorageBytes:MAX_STORAGE,reservedBytes:reserved,availableBytes:Math.max(0,MAX_STORAGE-reserved),reservedRecordings:row?.reserved_count||0}; +} +export async function handleLegacyClip(request:Request,env:LegacyEnv):Promise{ + const url=new URL(request.url),op=url.searchParams.get("op")||"",id=url.searchParams.get("id")||""; + if(request.method==="GET"&&op==="health")return response({configured:true,maxBytes:MAX_BYTES,maxSeconds:MAX_SECONDS,...await getCapacity(env)}); + if(request.method==="GET"&&op==="media")return handleMedia(request,env,url); + if(request.method!=="GET"&&request.method!=="POST")return null; + if(request.method==="GET"&&op!=="view")return null; + if(op==="upload")return null; // Vercel Blob token operation remains on the legacy fallback until the native upload path is retired. + if(request.method==="POST"&&request.headers.get("origin")&&request.headers.get("origin")!==url.origin)return response({error:"Use the ScreenNote page to make this request."},403); + const body=request.method==="POST"?await parseBody(request):{}; + const clipId=id||body.id||""; + if(op==="reserve"&&request.method==="POST"){ + const input=clipInput(body); + if(!validId(body.id)||typeof body.owner!=="string"||body.owner.length<40||body.owner.length>100)throw fail("Invalid recording identity."); + const existing=await getClip(env,body.id); + if(existing){ + await requireOwner(existing.clip,body.owner); + if(body.password&&(!existing.clip.passwordHash||!await checkPassword(existing.clip,body.password)))throw fail("Use the original sharing password for this upload. Delete the upload first to change its protection."); + if(!["pending","published"].includes(existing.clip.status))throw fail("This clip is no longer publishable. Create a new share link.",409); + if(existing.clip.size!==input.size||existing.clip.type!==input.type||existing.clip.duration!==input.duration)throw fail("This upload does not match its reservation.",409); + if(existing.clip.status==="pending"){Object.assign(existing.clip,input);existing.clip.uploadUntil=Date.now()+600000;await saveClip(env,existing,existing.clip)} + return response({id:body.id,status:existing.clip.status}); + } + const credentials=await passwordRecord(body.password),now=Date.now(); + const clip={...input,...credentials,id:body.id,ownerHash:await digest(body.owner),createdAt:now,uploadUntil:now+600000,expiresAt:now+7*86400000,status:"pending",comments:[],votes:{},discussionRevision:0,width:Number(body.width)||0,height:Number(body.height)||0}; + try{ + await env.DB.prepare("INSERT INTO legacy_clip_records(id,owner_hash,status,size,mime_type,duration_seconds,expires_at,upload_until,created_at,object_key,data) VALUES(?,?,?,?,?,?,?,?,?,?,?)") + .bind(clip.id,clip.ownerHash,clip.status,clip.size,clip.type,clip.duration,clip.expiresAt,clip.uploadUntil,clip.createdAt,keyFor(clip.id),JSON.stringify(clip)).run(); + }catch(error){if(String(error).toLowerCase().includes("capacity"))throw fail("Shared storage is full. Download locally, delete a share you own, or try after expired uploads are reclaimed.",429);throw error} + return response({id:clip.id,status:clip.status},201); + } + const record=await getClip(env,clipId);if(!record)return null; + const c=record.clip; + if(op==="upload-state"){await requireOwner(c,body.owner);if(c.status!=="pending")return response({parts:[]});const rows=await env.DB.prepare("SELECT part FROM legacy_clip_parts WHERE clip_id=? ORDER BY part").bind(c.id).all<{part:number}>();return response({parts:rows.results.map(x=>x.part)})} + if(op==="view"){ + await passwordGate(request,env,record,body.accessPassword); + const mediaUrl=await issueMedia(request,env,record);return response({...publicClip(c),mediaUrl}); + } + if(op==="restore-media"){await requireOwner(c,body.owner);available(c);return response({mediaUrl:await issueMedia(request,env,record)})} + if(op==="manage"){await requireOwner(c,body.owner);return response({...publicClip(c),type:c.type,size:c.size,status:c.status,cleanupComplete:!!c.cleanupComplete})} + if(op==="review-status"){await requireOwner(c,body.owner);if(!REVIEW_STATES.includes(body.reviewStatus))throw fail("Choose a valid review status.");c.reviewStatus=body.reviewStatus;await saveClip(env,record,c);return response({reviewStatus:c.reviewStatus})} + if(op==="title"){await requireOwner(c,body.owner);c.title=validTitle(body.title);await saveClip(env,record,c);return response({title:c.title})} + if(op==="details"){await requireOwner(c,body.owner);const extras=validateExtras(body,c.duration);Object.assign(c,extras);await saveClip(env,record,c);return response(extras)} + if(op==="upload-chunk"){ + await requireOwner(c,body.owner);if(c.status!=="pending"||c.uploadUntil=count||typeof body.data!=="string"||body.data.length>2800000)throw fail("Invalid upload part."); + const bytes=decodeBase64(body.data),expected=Math.min(CHUNK_BYTES,c.size-part*CHUNK_BYTES); + if(bytes.length!==expected||part===0&&!isVideo(bytes,c.type))throw fail("The upload part does not match this video."); + const objectKey=partKey(c.id,part),old=await env.DB.prepare("SELECT size FROM legacy_clip_parts WHERE clip_id=? AND part=?").bind(c.id,part).first<{size:number}>(); + if(old){const obj=await env.MEDIA.head(objectKey);if(!obj||obj.size!==expected)throw fail("This upload part is corrupt. Retry the upload.",409)} + else{await env.MEDIA.put(objectKey,bytes,{httpMetadata:{contentType:"application/octet-stream"}});await env.DB.prepare("INSERT INTO legacy_clip_parts(clip_id,part,object_key,size,created_at) VALUES(?,?,?,?,?)").bind(c.id,part,objectKey,bytes.length,Date.now()).run()} + return response({part,uploaded:true}); + } + if(op==="upload-small"){ + await requireOwner(c,body.owner);if(c.status!=="pending"||c.uploadUntil4194304)throw fail("This transfer supports files up to 3 MB."); + const bytes=decodeBase64(body.data);if(bytes.length>3145728||bytes.length!==c.size||!isVideo(bytes,c.type))throw fail("The upload does not match the video."); + await env.MEDIA.put(record.row.object_key,bytes,{httpMetadata:{contentType:c.type}});return response({uploaded:true}); + } + if(op==="publish"){ + await requireOwner(c,body.owner); + if(c.status==="published")return response(publicClip(c)); + if(c.status!=="pending")throw fail("This clip is no longer publishable.",409); + if(c.uploadUntilMAX_BYTES||!(info.httpMetadata?.contentType||"").startsWith(c.type))throw fail("The uploaded file does not match the video. Keep your local copy and try another file."); + const first=await env.MEDIA.get(record.row.object_key,{range:{offset:0,length:16}});if(!first||!isVideo(new Uint8Array(await first.arrayBuffer()),c.type))throw fail("This upload does not contain a valid video."); + c.width=Number(body.width)||c.width||0;c.height=Number(body.height)||c.height||0;c.expiresAt=Date.now()+(c.linkDays||7)*86400000;c.status="published"; + await saveClip(env,record,c,{mediaTokenHash:null,mediaTokenExpires:null}); + c.cleanupComplete=false; + try{await clearParts(env,c.id);c.cleanupComplete=true;await saveClip(env,record,c)}catch{} + return response(publicClip(c)); + } + if(op==="revoke"){await requireOwner(c,body.owner);c.status="revoked";c.cleanupComplete=true;await saveClip(env,record,c,{mediaTokenHash:null,mediaTokenExpires:null});await cleanupPending(env,record);await saveClip(env,record,c);return response({revoked:true})} + if(op==="delete"){await requireOwner(c,body.owner);c.status="deleted";c.cleanupComplete=true;await saveClip(env,record,c,{mediaTokenHash:null,mediaTokenExpires:null});await cleanupPending(env,record);await saveClip(env,record,c);return response({deleted:true})} + await passwordGate(request,env,record,body.accessPassword); + if(!validId(body.viewer))throw fail("Refresh this page before replying."); + if(["comment","edit-comment","delete-comment","resolve-thread"].includes(op)){ + const result=await applyComment(env,c,op,body);await saveClip(env,record,c);return response(result); + } + if(op==="reaction"){ + if(!["like","thanks","idea",""].includes(body.reaction))throw fail("Choose a listed reaction."); + c.votes||={};const voter=await digest(body.viewer); + if(!c.votes[voter]&&Object.keys(c.votes).length>=500)throw fail("This clip has reached its reaction limit.",429); + if(body.reaction)c.votes[voter]=body.reaction;else delete c.votes[voter];await saveClip(env,record,c);return response(publicClip(c)); + } + return response({error:"Unknown action."},400); +} From 1d1e25a86fd367fbdcdbed9d55bee5d6f62ef358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:40:24 +0200 Subject: [PATCH 114/575] Route original API through native D1/R2 and enforce legacy media retention --- rebuild/legacy/public/app.js | 2 +- rebuild/worker/index.ts | 40 +++++++++++++++++++++++++++++++++++- rebuild/worker/legacy-api.ts | 2 +- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/rebuild/legacy/public/app.js b/rebuild/legacy/public/app.js index 1f273a1..dbeba50 100644 --- a/rebuild/legacy/public/app.js +++ b/rebuild/legacy/public/app.js @@ -131,7 +131,7 @@ function mountCameraHandle(enabled){ function cancelCapture(){clearInterval(countdownTimer);capture?.cancel();capture=null;recording=false;busy=false;home()} function beginRecording(){if(busy||!capture)return;busy=true;let n=3;const button=$('[data-action=begin-recording]');button.disabled=true;$('#capture-countdown').textContent=`Starting in ${n}…`;countdownTimer=setInterval(()=>{n--;if(n){$('#capture-countdown').textContent=`Starting in ${n}…`;return}clearInterval(countdownTimer);run(async()=>{try{capture.begin();recording=true;busy=false;paused=false;$('#capture-countdown').textContent='';$('.recording')?.classList.add('is-live');$('#capture-heading').textContent='Show what you mean.';$('#capture-status').textContent='Your video stays local. Stop to review and publish.';$('#setup-actions').hidden=true;$('#live-actions').hidden=false;$('#recording-status').textContent='RECORDING IN PROGRESS'}catch(e){cancelCapture();throw e}})},1000)} async function startRecording(){if(recording||busy)return;if(emergencyBlob)throw Error('Download the unsaved recording and choose I saved my copy before recording again.');busy=true;const options={mic:$('#mic').checked,camera:$('#camera').checked,system:$('#system').checked,micId:$('#mic-source')?.value||'',defer:true,quality:$('#record-quality')?.value||'balanced',bubble:cameraBubble={x:.76,y:.72,size:.28},markup:recordMarkup=[]};draft={id:randomId(),chunks:[],createdAt:Date.now(),seconds:0};const writer=createDraftWriter(d=>db.saveDraft(d),()=>notify('Recovery storage is unavailable. Keep this tab open and download your video after stopping.'));const session=capture=new Capture({setupEnded:()=>{cancelCapture();notify('Screen sharing ended before recording. Choose a source again.')},chunk:(blob,seconds)=>{draft.chunks.push(blob);draft.seconds=seconds;if(seconds-(draft.savedSeconds||0)>=5){draft.savedSeconds=seconds;writer.save(structuredClone(draft))}},status:s=>{if($('#record-time'))$('#record-time').textContent=formatTime(s)},metrics:updateCaptureMetrics,finished:async(blob,duration,e,diagnostics)=>{busy=true;recording=false;try{writer.save(structuredClone(draft));await writer.flush();if(!blob.size)throw Error('No video was captured. Try recording again.');blob=await fixed(blob,duration);const info=await metadata(blob,duration),c={id:randomId(),owner:secret(),title:'A quick walkthrough',blob,type:blob.type.split(';')[0],createdAt:Date.now(),diagnostics,...info};await db.finish(c,draft.id);clips=await db.all();busy=false;editor(c);notify(stopMessage(e?'error':diagnostics?.reason))}catch(err){busy=false;if(!blob.size){home();error(err);return}resetURL();emergencyBlob=blob;emergencyURL=URL.createObjectURL(blob);shell(`

Download your recording now.

The captured video is still in this tab, but could not be saved to the local library. Download it before leaving or closing this tab.

`,'Recording');}}});try{const prepared=session.start(options);shell(`
BROWSER PERMISSION

Choose what to share.

Waiting for your browser’s screen picker or device permission. Nothing is recording yet.

Select a screen, window or tab in the browser prompt. Requests time out after one minute. If the prompt blocks this page, dismiss it in your browser. You can then retry or import a device recording.

`,'Recording permissions');const stream=await prepared;if(capture!==session)return;busy=false;recording=true;paused=false;shell(`
CHOOSE WHAT TO SHOW

Prepare your recording.

Nothing is recording yet. Add masks and marks on the preview, then begin.

${options.camera?'
Drag the camera handle to move it.
':''}${markupTools()}

Drag on the preview to add a mark (up to 40). Opaque masks cover pixels; soft blur is a visual effect and may leave details readable. Masks stay at fixed frame positions, so keep sensitive content inside them. Only frames captured after a change include that change. For full-screen walkthroughs, return here to change marks, or mask the saved video before publishing.

0 MBRemaining time is estimated while recording

Keep this tab open. Local recording stops at 30 minutes or 250 MB. Shared clips are limited to 10 minutes / 50 MB. Shared audio depends on your browser and source. Shortcuts: Alt+Shift+P pauses/resumes; Alt+Shift+S stops.
`,'Recording');$('#live-preview').srcObject=stream;fitCaptureFrame($('#live-preview'));$('#live-preview').play().catch(()=>{});mountTools(recordMarkup);mountCameraHandle(options.camera);updateCaptureMetrics({bytes:0,remaining:LOCAL_MAX_SECONDS,shareRemaining:MAX_SECONDS,level:0,shareable:true})}catch(e){session.cancel();if(capture!==session)return;capture=null;busy=false;recording=false;home();throw Error(e.name==='NotAllowedError'?'Recording permission was declined. Nothing was uploaded. Try again or import a video.':e.message)}} -async function publish(){let c=selected?{...selected,title:validTitle($('#recording-title-input')?$('#recording-title-input').value:selected.title)}:null;if(!health||!c?.blob)throw Error('Sharing is not available yet.');const problem=sharingProblem(c);if(problem)throw Error(problem);const {linkDays,password,newIdentity}=shareOptions(c,Number($('#link-days')?.value||c.linkDays||7),$('#share-password')?.value||'');if(newIdentity){c={...c,id:randomId(),owner:secret(),revoked:false,shared:false,cloudDeleted:false,cloudMissing:false,uploadAttempted:false,passwordProtected:!!password};await db.put(c);selected=c;clips=await db.all()}c.linkDays=linkDays;c.passwordProtected=!!password||!!c.passwordProtected;let savedLocally=false;busy=true;uploadController=new AbortController();const button=$('[data-action=publish]');button.disabled=true;try{const input={id:c.id,owner:c.owner,title:c.title,type:c.type,duration:c.duration,size:c.blob.size,start:0,end:c.duration,linkDays,password,captions:c.captions||[],chapters:c.chapters||[],report:c.report||null,reviewStatus:c.reviewStatus||'needs-feedback'};$('#cancel-upload').hidden=false;$('#upload-meter').hidden=false;$('#upload-meter').value=0;$('#upload-progress').textContent='Preparing a private upload…';c.uploadAttempted=true;await db.put(c);selected=c;savedLocally=true;let reservation;try{reservation=await retryTransfer(()=>api('reserve',input),attempt=>$('#upload-progress').textContent=`Sharing service interrupted. Retrying upload setup (${attempt}/3)…`)}catch(e){if(e.status!==409)throw e;const state=await api('manage',{id:c.id,owner:c.owner});if(!['expired','deleted','revoked'].includes(state.status))throw e;c.revoked=true;await db.put(c);busy=false;uploadController=null;return await publish()}const uploaded=new Set(reservation.status==='published'?[]:(await retryTransfer(()=>api('upload-state',{id:c.id,owner:c.owner}))).parts||[]);$('#upload-progress').textContent=uploaded.size?'Resuming saved upload… Your local copy is safe.':'Uploading video… Your local copy is safe.';for(let part=0,offset=0;reservation.status!=='published'&&offset{const reader=new FileReader();reader.onload=()=>resolve(reader.result.split(',')[1]);reader.onerror=()=>reject(Error('Could not read the local video.'));reader.readAsDataURL(chunk)});await retryTransfer(()=>api('upload-chunk',{id:c.id,owner:c.owner,part,data}),attempt=>$('#upload-progress').textContent=`Connection interrupted. Retrying part ${part+1} (${attempt}/3)…`);$('#upload-meter').value=Math.round(Math.min(c.blob.size,offset+CHUNK_BYTES)/c.blob.size*100);$('#upload-progress').textContent=`Uploading ${Math.round(Math.min(c.blob.size,offset+CHUNK_BYTES)/c.blob.size*100)}% · your local copy is safe.`}$('#upload-progress').textContent='Finalizing your video…';const shared=await retryTransfer(()=>api('publish',{id:c.id,owner:c.owner}),attempt=>$('#upload-progress').textContent=`Sharing service interrupted. Retrying finalization (${attempt}/3)…`);c.shared=true;c.uploadPaused=false;c.passwordProtected=shared.passwordProtected;c.expiresAt=shared.expiresAt;await db.put(c);clips=await db.all();busy=false;editor(c);notify('Your link is ready. The local copy is still here.')}catch(e){busy=false;if(savedLocally){if(e.name==='AbortError')c.uploadPaused=true;await db.put(c);editor(c)}throw e}finally{uploadController=null;busy=false;button.disabled=false}} +async function publish(){let c=selected?{...selected,title:validTitle($('#recording-title-input')?$('#recording-title-input').value:selected.title)}:null;if(!health||!c?.blob)throw Error('Sharing is not available yet.');const problem=sharingProblem(c);if(problem)throw Error(problem);const {linkDays,password,newIdentity}=shareOptions(c,Number($('#link-days')?.value||c.linkDays||7),$('#share-password')?.value||'');if(newIdentity){c={...c,id:randomId(),owner:secret(),revoked:false,shared:false,cloudDeleted:false,cloudMissing:false,uploadAttempted:false,passwordProtected:!!password};await db.put(c);selected=c;clips=await db.all()}c.linkDays=linkDays;c.passwordProtected=!!password||!!c.passwordProtected;let savedLocally=false;busy=true;uploadController=new AbortController();const button=$('[data-action=publish]');button.disabled=true;try{const input={id:c.id,owner:c.owner,title:c.title,type:c.type,duration:c.duration,width:c.width,height:c.height,size:c.blob.size,start:0,end:c.duration,linkDays,password,captions:c.captions||[],chapters:c.chapters||[],report:c.report||null,reviewStatus:c.reviewStatus||'needs-feedback'};$('#cancel-upload').hidden=false;$('#upload-meter').hidden=false;$('#upload-meter').value=0;$('#upload-progress').textContent='Preparing a private upload…';c.uploadAttempted=true;await db.put(c);selected=c;savedLocally=true;let reservation;try{reservation=await retryTransfer(()=>api('reserve',input),attempt=>$('#upload-progress').textContent=`Sharing service interrupted. Retrying upload setup (${attempt}/3)…`)}catch(e){if(e.status!==409)throw e;const state=await api('manage',{id:c.id,owner:c.owner});if(!['expired','deleted','revoked'].includes(state.status))throw e;c.revoked=true;await db.put(c);busy=false;uploadController=null;return await publish()}const uploaded=new Set(reservation.status==='published'?[]:(await retryTransfer(()=>api('upload-state',{id:c.id,owner:c.owner}))).parts||[]);$('#upload-progress').textContent=uploaded.size?'Resuming saved upload… Your local copy is safe.':'Uploading video… Your local copy is safe.';for(let part=0,offset=0;reservation.status!=='published'&&offset{const reader=new FileReader();reader.onload=()=>resolve(reader.result.split(',')[1]);reader.onerror=()=>reject(Error('Could not read the local video.'));reader.readAsDataURL(chunk)});await retryTransfer(()=>api('upload-chunk',{id:c.id,owner:c.owner,part,data}),attempt=>$('#upload-progress').textContent=`Connection interrupted. Retrying part ${part+1} (${attempt}/3)…`);$('#upload-meter').value=Math.round(Math.min(c.blob.size,offset+CHUNK_BYTES)/c.blob.size*100);$('#upload-progress').textContent=`Uploading ${Math.round(Math.min(c.blob.size,offset+CHUNK_BYTES)/c.blob.size*100)}% · your local copy is safe.`}$('#upload-progress').textContent='Finalizing your video…';const shared=await retryTransfer(()=>api('publish',{id:c.id,owner:c.owner}),attempt=>$('#upload-progress').textContent=`Sharing service interrupted. Retrying finalization (${attempt}/3)…`);c.shared=true;c.uploadPaused=false;c.passwordProtected=shared.passwordProtected;c.expiresAt=shared.expiresAt;await db.put(c);clips=await db.all();busy=false;editor(c);notify('Your link is ready. The local copy is still here.')}catch(e){busy=false;if(savedLocally){if(e.name==='AbortError')c.uploadPaused=true;await db.put(c);editor(c)}throw e}finally{uploadController=null;busy=false;button.disabled=false}} function saveFile(blob,name){const url=URL.createObjectURL(blob),a=document.createElement('a');a.href=url;a.download=name;document.body.append(a);a.click();a.remove();setTimeout(()=>URL.revokeObjectURL(url),60000)} function download(){const a=document.createElement('a');a.href=objectURL||URL.createObjectURL(selected.blob);a.download=selected.title.replace(/[^\p{L}\p{N} _-]/gu,'').slice(0,80)+(selected.type==='video/mp4'?'.mp4':'.webm');document.body.append(a);a.click();a.remove()} function privacy(){if(recording||busy)return;shell(`
CLEAR BY DEFAULT

Your screen.
Your call.

ScreenNote only uploads a video when you choose Publish. Recording and trimming happen in your browser.

Before you publish

Recordings and recovery chunks are stored in this browser. Download videos you want to keep. Clearing site data, private browsing or losing this device can remove your local library.

After you publish

Older links from the previous storage service may be unavailable. Their videos have not been copied while that service denies access. If you have the original local video, refresh its shared status and publish a replacement link. Keep your original recovery keys.

The whole reviewed video is uploaded to private Supabase storage. An unlisted link lets anyone who has it watch and reply without a ScreenNote account. Do not include passwords or information you do not want the recipient to see. Unlisted does not mean encrypted end to end.

Links expire after 1, 3 or 7 days, as chosen before publication. Optional sharing passwords are verified on the server; issued playback URLs are bearer links with a five-minute lifetime. Captions, chapters and bug-report text you save are shared with viewers. Stop sharing blocks new viewer requests; already issued playback URLs may work for up to five more minutes. Expired uploads and abandoned reservations become eligible for deletion after a further 24 hours. ScreenNote reclaims them when new uploads reach shared capacity; cleanup is demand-driven, not a timed deletion guarantee.

Small, honest first release

Back up your recovery keys to restore management access after changing browsers or clearing site data. Keep them private: they authorize stopping sharing and deleting uploads. Videos are not included.

Clips are limited to ten minutes and 50 MB. Shared uploads use a 1 GB storage budget. Pending uploads reserve space for both chunks and the assembled video. Deleting an uploaded video frees its slot after cleanup succeeds. Old expired uploads are also reclaimed when capacity is full. Local recording and downloads remain usable when sharing is full. Hosting quotas may pause online sharing; no paid upgrade is enabled by this application.

Screen capture needs a supported desktop browser. On phones or browsers without screen capture, record with your device and import MP4 or WebM. Camera, microphone and shared-screen audio require your browser’s permissions. Online sharing uses Supabase private file storage and a database for recording details and feedback. The app is hosted on Vercel. No AI analysis, advertising trackers or per-viewer charges are built in.

Replies and reactions

Replies are visible to everyone with the link. Names are self-entered, not verified identities. You can reply to any comment or reply. New replies reopen resolved threads. Comment authors can edit or remove their comments from the browser that posted them; the video creator can also remove comments and resolve threads. Clearing site data loses anonymous comment controls. Unsent drafts are kept in this tab’s session storage. Optional bubbles preview comments in the inline player; native fullscreen and picture in picture show the video only. Each clip supports 100 total comments and replies, including removed entries. Reactions use an anonymous browser identifier and are not verified unique-person counts.

`,'Privacy')} diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts index e936392..d9ccc95 100644 --- a/rebuild/worker/index.ts +++ b/rebuild/worker/index.ts @@ -1,3 +1,4 @@ +import { handleLegacyClip } from "./legacy-api"; type Bindings = { DB: D1Database; MEDIA: R2Bucket; STATIC: R2Bucket; ASSETS?: Fetcher }; const LEGACY_API_ORIGIN = "https://screennote-woad.vercel.app"; @@ -380,7 +381,16 @@ export default { async fetch(request: Request, env: Bindings, ctx: ExecutionContext): Promise { try { const url = new URL(request.url); - if (url.pathname === "/api/clip") return await proxyLegacyClip(request); + if (url.pathname === "/api/clip") { + try { + const native = await handleLegacyClip(request, env); + if (native) return native; + return await proxyLegacyClip(request); + } catch (error) { + const e = error as { status?:number; code?:string; message?:string }; + return json({ code:e.code, error:e.message || "Could not complete the request." }, e.status || 400); + } + } if (url.pathname.startsWith("/api/")) return await handleApi(request, env); return await serveStatic(request, env, ctx); } catch (error) { @@ -420,6 +430,34 @@ export default { if (object.uploaded.getTime() > (now - 3600) * 1000 || referencedKeys.has(object.key)) continue; await env.MEDIA.delete(object.key); } + // Native 0.5.0 API retention: expired/revoked uploads are deleted from R2 and D1 metadata remains for owner status. + const nowMs = Date.now(); + const legacyExpired = await env.DB.prepare("SELECT id,status,object_key,data FROM legacy_clip_records WHERE (status='pending' AND upload_until<=?) OR (status='published' AND expires_at<=?) OR (status IN ('revoked','deleted','expired') AND json_extract(data,'$.cleanupComplete') IS NOT 1) LIMIT 100") + .bind(nowMs,nowMs).all<{id:string;status:string;object_key:string;data:string}>(); + for (const row of legacyExpired.results) { + const clip = JSON.parse(row.data); + if (row.status === "pending" || row.status === "published") { + clip.status = "expired"; + clip.cleanupComplete = true; + await env.DB.prepare("UPDATE legacy_clip_records SET status='expired',data=? WHERE id=?").bind(JSON.stringify(clip),row.id).run(); + } + await env.MEDIA.delete(row.object_key); + const legacyParts = await env.DB.prepare("SELECT object_key FROM legacy_clip_parts WHERE clip_id=?").bind(row.id).all<{object_key:string}>(); + for (const part of legacyParts.results) await env.MEDIA.delete(part.object_key); + await env.DB.prepare("DELETE FROM legacy_clip_parts WHERE clip_id=?").bind(row.id).run(); + clip.cleanupComplete = true; + await env.DB.prepare("UPDATE legacy_clip_records SET data=?,media_token_hash=NULL,media_token_expires=NULL WHERE id=?").bind(JSON.stringify(clip),row.id).run(); + } + await env.DB.prepare("DELETE FROM legacy_clip_password_attempts WHERE window_started<=? OR locked_until<=?").bind(now-3600,now).run(); + // Reclaim orphaned native R2 objects only after a one-hour grace period. + const legacyClipRows = await env.DB.prepare("SELECT object_key FROM legacy_clip_records").bind().all<{object_key:string}>(); + const legacyPartRows = await env.DB.prepare("SELECT object_key FROM legacy_clip_parts").bind().all<{object_key:string}>(); + const legacyReferenced = new Set([...legacyClipRows.results,...legacyPartRows.results].map(x=>x.object_key)); + const legacyObjects = await env.MEDIA.list({prefix:"legacy/clips/",limit:1000}); + for (const object of legacyObjects.objects) { + if (object.uploaded.getTime()>(nowMs-3600000) || legacyReferenced.has(object.key)) continue; + await env.MEDIA.delete(object.key); + } await env.DB.prepare("DELETE FROM guest_sessions WHERE expires_at <= ?").bind(now).run(); await env.DB.prepare("DELETE FROM share_access_sessions WHERE expires_at <= ?").bind(now).run(); })()); diff --git a/rebuild/worker/legacy-api.ts b/rebuild/worker/legacy-api.ts index 1d22aa0..fee04d0 100644 --- a/rebuild/worker/legacy-api.ts +++ b/rebuild/worker/legacy-api.ts @@ -146,7 +146,7 @@ async function handleMedia(request:Request,env:LegacyEnv,url:URL){ const id=url.searchParams.get("id")||"",token=url.searchParams.get("token")||"",record=await getClip(env,id); if(!record)return null; const row=record.row,c=record.clip; - if(c.status!=="published"||c.expiresAt<=Date.now()||!token||!row.media_token_hash||row.media_token_expires!>Date.now()||!safeEqual(await digest(token),row.media_token_hash))return response({error:"This media link has expired."},404); + if(c.status!=="published"||c.expiresAt<=Date.now()||!token||!row.media_token_hash||(row.media_token_expires ?? 0)<=Date.now()||!safeEqual(await digest(token),row.media_token_hash))return response({error:"This media link has expired."},404); const head=request.method==="HEAD",range=request.headers.get("range"),object=await env.MEDIA.head(row.object_key); if(!object)return response({error:"Video unavailable."},404); let start=0,end=object.size-1,status=200; From 2893eb36b7bae9621aa464a155cf73e31530cd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:41:08 +0200 Subject: [PATCH 115/575] Make D1 quota reservations and status transitions atomic --- rebuild/worker/legacy-api.ts | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/rebuild/worker/legacy-api.ts b/rebuild/worker/legacy-api.ts index fee04d0..e626ae9 100644 --- a/rebuild/worker/legacy-api.ts +++ b/rebuild/worker/legacy-api.ts @@ -45,6 +45,22 @@ async function saveClip(env:LegacyEnv,record:ClipRecord,clip:any,patch:Record={}){ + const oldStatus=record.row.status,id=record.row.id,size=clip.size; + const toTerminal=terminal(nextStatus)&&["pending","published"].includes(oldStatus); + const releaseBytes=oldStatus==="pending"&&nextStatus==="published"?size:toTerminal?(oldStatus==="pending"?2*size:size):0; + const releaseCount=toTerminal?1:0; + clip.status=nextStatus; + const tokenHash=patch.mediaTokenHash===undefined?record.row.media_token_hash:patch.mediaTokenHash; + const tokenExpires=patch.mediaTokenExpires===undefined?record.row.media_token_expires:patch.mediaTokenExpires; + const result=await env.DB.batch([ + env.DB.prepare("UPDATE legacy_capacity SET reserved_bytes=MAX(0,reserved_bytes-?),reserved_count=MAX(0,reserved_count-?) WHERE id=1 AND EXISTS(SELECT 1 FROM legacy_clip_records WHERE id=? AND status=?)").bind(releaseBytes,releaseCount,id,oldStatus), + env.DB.prepare("UPDATE legacy_clip_records SET status=?,expires_at=?,upload_until=?,data=?,media_token_hash=?,media_token_expires=? WHERE id=? AND status=?").bind(nextStatus,clip.expiresAt,clip.uploadUntil,JSON.stringify(clip),tokenHash,tokenExpires,id,oldStatus) + ]); + if(result[1].meta.changes!==1)throw fail("This clip changed. Refresh and try again.",409); + record.row.status=nextStatus;record.row.expires_at=clip.expiresAt;record.row.upload_until=clip.uploadUntil;record.row.data=JSON.stringify(clip); + record.row.media_token_hash=tokenHash as string|null;record.row.media_token_expires=tokenExpires as number|null;record.clip=clip; +} async function ownerMatches(value:unknown,expected:string){return typeof value==="string"&&value.length>=40&&value.length<=100&&safeEqual(await digest(value),expected)} async function requireOwner(clip:any,owner:unknown){if(!await ownerMatches(owner,clip.ownerHash))throw fail("This browser does not have permission to manage the link.",403)} function available(clip:any){if(clip.status!=="published"||clip.expiresAt<=Date.now())throw fail("This link has expired or is no longer shared.",404)} @@ -194,10 +210,12 @@ export async function handleLegacyClip(request:Request,env:LegacyEnv):PromiseMAX_BYTES||!(info.httpMetadata?.contentType||"").startsWith(c.type))throw fail("The uploaded file does not match the video. Keep your local copy and try another file."); const first=await env.MEDIA.get(record.row.object_key,{range:{offset:0,length:16}});if(!first||!isVideo(new Uint8Array(await first.arrayBuffer()),c.type))throw fail("This upload does not contain a valid video."); - c.width=Number(body.width)||c.width||0;c.height=Number(body.height)||c.height||0;c.expiresAt=Date.now()+(c.linkDays||7)*86400000;c.status="published"; - await saveClip(env,record,c,{mediaTokenHash:null,mediaTokenExpires:null}); - c.cleanupComplete=false; + c.width=Number(body.width)||c.width||0;c.height=Number(body.height)||c.height||0;c.expiresAt=Date.now()+(c.linkDays||7)*86400000;c.cleanupComplete=false; + await transitionStatus(env,record,c,"published",{mediaTokenHash:null,mediaTokenExpires:null}); try{await clearParts(env,c.id);c.cleanupComplete=true;await saveClip(env,record,c)}catch{} return response(publicClip(c)); } - if(op==="revoke"){await requireOwner(c,body.owner);c.status="revoked";c.cleanupComplete=true;await saveClip(env,record,c,{mediaTokenHash:null,mediaTokenExpires:null});await cleanupPending(env,record);await saveClip(env,record,c);return response({revoked:true})} - if(op==="delete"){await requireOwner(c,body.owner);c.status="deleted";c.cleanupComplete=true;await saveClip(env,record,c,{mediaTokenHash:null,mediaTokenExpires:null});await cleanupPending(env,record);await saveClip(env,record,c);return response({deleted:true})} + if(op==="revoke"){await requireOwner(c,body.owner);c.cleanupComplete=false;await transitionStatus(env,record,c,"revoked",{mediaTokenHash:null,mediaTokenExpires:null});await cleanupPending(env,record);c.cleanupComplete=true;await saveClip(env,record,c);return response({revoked:true})} + if(op==="delete"){await requireOwner(c,body.owner);c.cleanupComplete=false;await transitionStatus(env,record,c,"deleted",{mediaTokenHash:null,mediaTokenExpires:null});await cleanupPending(env,record);c.cleanupComplete=true;await saveClip(env,record,c);return response({deleted:true})} await passwordGate(request,env,record,body.accessPassword); if(!validId(body.viewer))throw fail("Refresh this page before replying."); if(["comment","edit-comment","delete-comment","resolve-thread"].includes(op)){ From 5857826da4fe9a235ebe5448dae865db605be06e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:41:41 +0200 Subject: [PATCH 116/575] Add native D1 storage schema for full legacy API parity --- rebuild/scripts/apply-migrations.mjs | 28 ++++++------- .../migrations/0005_legacy_clip_api.sql | 42 +++++++++++++++++++ rebuild/worker/schema.sql | 3 ++ 3 files changed, 59 insertions(+), 14 deletions(-) create mode 100644 rebuild/worker/migrations/0005_legacy_clip_api.sql diff --git a/rebuild/scripts/apply-migrations.mjs b/rebuild/scripts/apply-migrations.mjs index e544f91..3680b8d 100644 --- a/rebuild/scripts/apply-migrations.mjs +++ b/rebuild/scripts/apply-migrations.mjs @@ -1,21 +1,21 @@ import { readFile } from "node:fs/promises"; - const accountId = process.env.CLOUDFLARE_ACCOUNT_ID; const token = process.env.CLOUDFLARE_API_TOKEN; const databaseId = "44a5859b-6411-4513-bd17-3302fbbc0575"; if (!accountId || !token) throw new Error("Cloudflare account and API token are required to apply D1 migrations."); - -const migration = await readFile(new URL("../worker/migrations/0004_password_attempt_limits.sql", import.meta.url), "utf8"); -const statements = migration.split(";").map(statement => statement.trim()).filter(Boolean); -for (const sql of statements) { - const response = await fetch(`https://api.cloudflare.com/client/v4/accounts/${accountId}/d1/database/${databaseId}/query`, { - method: "POST", - headers: { authorization: `Bearer ${token}`, "content-type": "application/json" }, - body: JSON.stringify({ sql }) - }); - const result = await response.json(); - if (!response.ok || !result.success || result.errors?.length) { - throw new Error(`D1 migration failed: ${JSON.stringify(result.errors ?? result)}`); +for (const migrationFile of ["0004_password_attempt_limits.sql", "0005_legacy_clip_api.sql"]) { + const migration = await readFile(new URL("../worker/migrations/" + migrationFile, import.meta.url), "utf8"); + const statements = migration.split(";").map(statement => statement.trim()).filter(Boolean); + for (const sql of statements) { + const response = await fetch(`https://api.cloudflare.com/client/v4/accounts/${accountId}/d1/database/${databaseId}/query`, { + method: "POST", + headers: { authorization: `Bearer ${token}`, "content-type": "application/json" }, + body: JSON.stringify({ sql }) + }); + const result = await response.json(); + if (!response.ok || !result.success || result.errors?.length) { + throw new Error(`D1 migration ${migrationFile} failed: ${JSON.stringify(result.errors ?? result)}`); + } } + process.stdout.write("D1 migration applied: " + migrationFile + "\n"); } -process.stdout.write("D1 password-attempt migration applied.\n"); diff --git a/rebuild/worker/migrations/0005_legacy_clip_api.sql b/rebuild/worker/migrations/0005_legacy_clip_api.sql new file mode 100644 index 0000000..7b9c993 --- /dev/null +++ b/rebuild/worker/migrations/0005_legacy_clip_api.sql @@ -0,0 +1,42 @@ +-- Native ScreenNote 0.5.0 API storage and quota ledger. Safe to reapply. +CREATE TABLE IF NOT EXISTS legacy_capacity ( + id INTEGER PRIMARY KEY CHECK (id = 1), + reserved_bytes INTEGER NOT NULL DEFAULT 0, + reserved_count INTEGER NOT NULL DEFAULT 0 +); +INSERT OR IGNORE INTO legacy_capacity(id,reserved_bytes,reserved_count) VALUES(1,0,0); +CREATE TABLE IF NOT EXISTS legacy_clip_records ( + id TEXT PRIMARY KEY, + owner_hash TEXT NOT NULL, + status TEXT NOT NULL, + size INTEGER NOT NULL, + mime_type TEXT NOT NULL, + duration_seconds REAL NOT NULL, + expires_at INTEGER NOT NULL, + upload_until INTEGER NOT NULL, + created_at INTEGER NOT NULL, + object_key TEXT NOT NULL, + data TEXT NOT NULL, + media_token_hash TEXT, + media_token_expires INTEGER +); +CREATE INDEX IF NOT EXISTS legacy_clip_status_expiry ON legacy_clip_records(status,expires_at,upload_until); +CREATE TABLE IF NOT EXISTS legacy_clip_parts ( + clip_id TEXT NOT NULL, + part INTEGER NOT NULL, + object_key TEXT NOT NULL, + size INTEGER NOT NULL, + created_at INTEGER NOT NULL, + PRIMARY KEY(clip_id,part), + FOREIGN KEY(clip_id) REFERENCES legacy_clip_records(id) ON DELETE CASCADE +); +CREATE INDEX IF NOT EXISTS legacy_clip_parts_created ON legacy_clip_parts(created_at); +CREATE TABLE IF NOT EXISTS legacy_clip_password_attempts ( + clip_id TEXT NOT NULL, + ip_hash TEXT NOT NULL, + window_started INTEGER NOT NULL, + attempts INTEGER NOT NULL DEFAULT 0, + locked_until INTEGER NOT NULL DEFAULT 0, + PRIMARY KEY(clip_id,ip_hash) +); +CREATE INDEX IF NOT EXISTS legacy_clip_password_lock ON legacy_clip_password_attempts(locked_until); diff --git a/rebuild/worker/schema.sql b/rebuild/worker/schema.sql index 3e10e91..2f680c7 100644 --- a/rebuild/worker/schema.sql +++ b/rebuild/worker/schema.sql @@ -33,3 +33,6 @@ CREATE TABLE IF NOT EXISTS share_password_attempts ( CREATE INDEX IF NOT EXISTS share_password_attempts_window ON share_password_attempts(window_started); + + +-- Native 0.5.0 API tables are defined in migrations/0005_legacy_clip_api.sql. From 5fb9c691111deda6e59ce3b572ba6bc034cad8bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:42:10 +0200 Subject: [PATCH 117/575] Release D1 capacity when native shares expire --- rebuild/worker/index.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts index d9ccc95..5e4a88c 100644 --- a/rebuild/worker/index.ts +++ b/rebuild/worker/index.ts @@ -437,9 +437,14 @@ export default { for (const row of legacyExpired.results) { const clip = JSON.parse(row.data); if (row.status === "pending" || row.status === "published") { + const previousStatus = row.status; + const allocation = previousStatus === "pending" ? 2 * Number(clip.size || 0) : Number(clip.size || 0); clip.status = "expired"; - clip.cleanupComplete = true; - await env.DB.prepare("UPDATE legacy_clip_records SET status='expired',data=? WHERE id=?").bind(JSON.stringify(clip),row.id).run(); + clip.cleanupComplete = false; + await env.DB.batch([ + env.DB.prepare("UPDATE legacy_capacity SET reserved_bytes=MAX(0,reserved_bytes-?),reserved_count=MAX(0,reserved_count-1) WHERE id=1 AND EXISTS(SELECT 1 FROM legacy_clip_records WHERE id=? AND status=?)").bind(allocation,row.id,previousStatus), + env.DB.prepare("UPDATE legacy_clip_records SET status='expired',data=?,media_token_hash=NULL,media_token_expires=NULL WHERE id=? AND status=?").bind(JSON.stringify(clip),row.id,previousStatus) + ]); } await env.MEDIA.delete(row.object_key); const legacyParts = await env.DB.prepare("SELECT object_key FROM legacy_clip_parts WHERE clip_id=?").bind(row.id).all<{object_key:string}>(); From 111dc9347932fc5700b51b106efaa445fa4b9591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:43:18 +0200 Subject: [PATCH 118/575] Exercise full original API lifecycle against native Cloudflare D1 and R2 --- rebuild/scripts/live-smoke.mjs | 76 ++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/rebuild/scripts/live-smoke.mjs b/rebuild/scripts/live-smoke.mjs index fda45a3..eef04c1 100644 --- a/rebuild/scripts/live-smoke.mjs +++ b/rebuild/scripts/live-smoke.mjs @@ -152,6 +152,82 @@ console.log("Live ScreenNote acceptance passed: assets, guest session, real D1/R throw error; } +// Full 0.5.0 API parity smoke against the deployed Cloudflare D1/R2 implementation. +const nativeHealth = await json(await request("/api/clip?op=health")); +assert.equal(nativeHealth.configured,true); +assert.equal(nativeHealth.maxBytes,50_000_000); +assert.equal(nativeHealth.maxSeconds,600); +const sampleResponse = await request("/sample.webm"); +assert.equal(sampleResponse.status,200,"original sample video is served by Cloudflare assets"); +const sampleBytes = new Uint8Array(await sampleResponse.arrayBuffer()); +assert.ok(sampleBytes.length>4 && sampleBytes.length<=50_000_000); +const nativeId = crypto.randomUUID(); +const nativeOwner = crypto.randomBytes(32).toString("hex"); +const nativePassword = "cloudflare-native-live-check"; +let nativeReserved = false; +const nativeHeaders = {origin,"content-type":"application/json"}; +const nativeApi = (op,body={},id=nativeId)=>request("/api/clip?op="+op+(id?"&id="+encodeURIComponent(id):""),{method:"POST",headers:nativeHeaders,body:JSON.stringify(body)}); +try { + const reservation = await json(await nativeApi("reserve",{ + id:nativeId,owner:nativeOwner,title:"Native Cloudflare parity smoke",type:"video/webm",duration:15,size:sampleBytes.length, + start:0,end:15,linkDays:1,password:nativePassword,reviewStatus:"needs-feedback",width:1280,height:720, + captions:[{start:0,end:1,text:"A live caption"}],chapters:[{time:1,title:"Live chapter"}], + report:{url:"https://example.com/live-smoke",steps:"Open the sample",expected:"Video loads",actual:"Video loads",environment:"GitHub Actions"} + })); + nativeReserved=true; + assert.equal(reservation.id,nativeId); + const partBytes=2*1024*1024; + for(let part=0,offset=0;offseti)); + const published=await json(await nativeApi("publish",{id:nativeId,owner:nativeOwner,width:1280,height:720})); + assert.equal(published.passwordProtected,true); + assert.equal(published.title,"Native Cloudflare parity smoke"); + const noPassword=await request("/api/clip?op=view&id="+nativeId); + assert.equal(noPassword.status,401,"native share password gate is enforced"); + const wrong=await nativeApi("view",{id:nativeId,accessPassword:"wrong-password"}); + assert.equal(wrong.status,401,"wrong native share password is rejected"); + const view=await json(await nativeApi("view",{id:nativeId,accessPassword:nativePassword})); + assert.equal(view.passwordProtected,true); + assert.equal(view.captions[0].text,"A live caption"); + assert.equal(view.chapters[0].title,"Live chapter"); + assert.equal(view.report.steps,"Open the sample"); + const range=await fetch(view.mediaUrl,{headers:{range:"bytes=0-63"}}); + assert.equal(range.status,206,"native R2 media supports byte ranges"); + assert.equal(range.headers.get("content-range"),"bytes 0-63/"+sampleBytes.length); + assert.equal((await range.arrayBuffer()).byteLength,64); + const viewer=crypto.randomUUID(),authorKey=crypto.randomBytes(24).toString("hex"),eventId=crypto.randomUUID(); + const posted=await json(await nativeApi("comment",{id:nativeId,owner:nativeOwner,viewer,eventId,authorKey,name:"Live QA",text:"Native comment",time:2})); + const root=posted.comments.find(x=>x.id===eventId);assert.ok(root); + const replyId=crypto.randomUUID(); + const replied=await json(await nativeApi("comment",{id:nativeId,viewer:crypto.randomUUID(),eventId:replyId,authorKey:crypto.randomBytes(24).toString("hex"),name:"Guest",text:"Nested reply",time:2,parentId:eventId})); + assert.equal(replied.comments.find(x=>x.id===replyId).parentId,eventId); + await json(await nativeApi("edit-comment",{id:nativeId,viewer,authorKey,commentId:eventId,expectedVersion:root.createdAt,text:"Edited native comment"})); + await json(await nativeApi("resolve-thread",{id:nativeId,viewer,owner:nativeOwner,commentId:eventId,resolved:true})); + await json(await nativeApi("reaction",{id:nativeId,viewer:crypto.randomUUID(),reaction:"thanks",accessPassword:nativePassword})); + const title=await json(await nativeApi("title",{id:nativeId,owner:nativeOwner,title:"Native parity verified"}));assert.equal(title.title,"Native parity verified"); + const status=await json(await nativeApi("review-status",{id:nativeId,owner:nativeOwner,reviewStatus:"approved"}));assert.equal(status.reviewStatus,"approved"); + const manage=await json(await nativeApi("manage",{id:nativeId,owner:nativeOwner}));assert.equal(manage.status,"published"); + const restored=await json(await nativeApi("restore-media",{id:nativeId,owner:nativeOwner}));assert.match(restored.mediaUrl,/op=media/); + for(let attempt=0;attempt<5;attempt++)assert.equal((await nativeApi("view",{id:nativeId,accessPassword:"wrong-password-again"})).status,401); + assert.equal((await nativeApi("view",{id:nativeId,accessPassword:nativePassword})).status,429,"five failed attempts lock the native password gate"); + await json(await nativeApi("delete-comment",{id:nativeId,viewer,authorKey,commentId:eventId})); + await json(await nativeApi("revoke",{id:nativeId,owner:nativeOwner})); + assert.equal((await request("/api/clip?op=view&id="+nativeId)).status,404,"revoked native share is unavailable"); + await json(await nativeApi("delete",{id:nativeId,owner:nativeOwner})); + nativeReserved=false; + const capacity=await json(await request("/api/clip?op=health")); + assert.ok(capacity.reservedBytes<=nativeHealth.reservedBytes+sampleBytes.length*2); + console.log("Native Cloudflare acceptance passed: D1 reservation, chunk resume state, R2 publish/range, password lockout, captions/chapters/report, nested comments/edit/resolve/delete, reaction, owner metadata, revoke and cleanup."); +} catch(error) { + if(nativeReserved)await nativeApi("delete",{id:nativeId,owner:nativeOwner}).catch(()=>undefined); + throw error; +} + async function jsonText(response) { assert.equal(response.status, 200, "homepage responds"); return await response.text(); From 081c177171cf43c611f1def9ae8531102bdc3e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:44:05 +0200 Subject: [PATCH 119/575] Guard native metadata writes with compare-and-swap and harden live acceptance cleanup --- rebuild/scripts/live-smoke.mjs | 5 +++-- rebuild/worker/legacy-api.ts | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rebuild/scripts/live-smoke.mjs b/rebuild/scripts/live-smoke.mjs index eef04c1..e0db9ea 100644 --- a/rebuild/scripts/live-smoke.mjs +++ b/rebuild/scripts/live-smoke.mjs @@ -213,15 +213,16 @@ try { const status=await json(await nativeApi("review-status",{id:nativeId,owner:nativeOwner,reviewStatus:"approved"}));assert.equal(status.reviewStatus,"approved"); const manage=await json(await nativeApi("manage",{id:nativeId,owner:nativeOwner}));assert.equal(manage.status,"published"); const restored=await json(await nativeApi("restore-media",{id:nativeId,owner:nativeOwner}));assert.match(restored.mediaUrl,/op=media/); + await json(await nativeApi("delete-comment",{id:nativeId,viewer,authorKey,commentId:eventId,accessPassword:nativePassword})); for(let attempt=0;attempt<5;attempt++)assert.equal((await nativeApi("view",{id:nativeId,accessPassword:"wrong-password-again"})).status,401); assert.equal((await nativeApi("view",{id:nativeId,accessPassword:nativePassword})).status,429,"five failed attempts lock the native password gate"); - await json(await nativeApi("delete-comment",{id:nativeId,viewer,authorKey,commentId:eventId})); await json(await nativeApi("revoke",{id:nativeId,owner:nativeOwner})); assert.equal((await request("/api/clip?op=view&id="+nativeId)).status,404,"revoked native share is unavailable"); await json(await nativeApi("delete",{id:nativeId,owner:nativeOwner})); nativeReserved=false; const capacity=await json(await request("/api/clip?op=health")); - assert.ok(capacity.reservedBytes<=nativeHealth.reservedBytes+sampleBytes.length*2); + assert.equal(capacity.reservedBytes,nativeHealth.reservedBytes,"native storage reservation is released after delete"); + assert.equal(capacity.reservedRecordings,nativeHealth.reservedRecordings,"native recording count is released after delete"); console.log("Native Cloudflare acceptance passed: D1 reservation, chunk resume state, R2 publish/range, password lockout, captions/chapters/report, nested comments/edit/resolve/delete, reaction, owner metadata, revoke and cleanup."); } catch(error) { if(nativeReserved)await nativeApi("delete",{id:nativeId,owner:nativeOwner}).catch(()=>undefined); diff --git a/rebuild/worker/legacy-api.ts b/rebuild/worker/legacy-api.ts index e626ae9..1753336 100644 --- a/rebuild/worker/legacy-api.ts +++ b/rebuild/worker/legacy-api.ts @@ -39,8 +39,8 @@ async function getClip(env:LegacyEnv,id:string):Promise{ } async function saveClip(env:LegacyEnv,record:ClipRecord,clip:any,patch:Record={}){ const row=record.row; - await env.DB.prepare("UPDATE legacy_clip_records SET status=?,expires_at=?,upload_until=?,data=?,media_token_hash=?,media_token_expires=? WHERE id=?") - .bind(clip.status,clip.expiresAt,clip.uploadUntil,JSON.stringify(clip),patch.mediaTokenHash===undefined?row.media_token_hash:patch.mediaTokenHash,patch.mediaTokenExpires===undefined?row.media_token_expires:patch.mediaTokenExpires,row.id).run(); + const saved=await env.DB.prepare("UPDATE legacy_clip_records SET status=?,expires_at=?,upload_until=?,data=?,media_token_hash=?,media_token_expires=? WHERE id=? AND data=?").bind(clip.status,clip.expiresAt,clip.uploadUntil,JSON.stringify(clip),patch.mediaTokenHash===undefined?row.media_token_hash:patch.mediaTokenHash,patch.mediaTokenExpires===undefined?row.media_token_expires:patch.mediaTokenExpires,row.id,row.data).run(); + if(saved.meta.changes!==1)throw fail("Recording metadata changed. Refresh and try again.",409); record.clip=clip;row.status=clip.status;row.expires_at=clip.expiresAt;row.upload_until=clip.uploadUntil;row.data=JSON.stringify(clip); if(patch.mediaTokenHash!==undefined)row.media_token_hash=patch.mediaTokenHash as string|null; if(patch.mediaTokenExpires!==undefined)row.media_token_expires=patch.mediaTokenExpires as number|null; @@ -54,8 +54,8 @@ async function transitionStatus(env:LegacyEnv,record:ClipRecord,clip:any,nextSta const tokenHash=patch.mediaTokenHash===undefined?record.row.media_token_hash:patch.mediaTokenHash; const tokenExpires=patch.mediaTokenExpires===undefined?record.row.media_token_expires:patch.mediaTokenExpires; const result=await env.DB.batch([ - env.DB.prepare("UPDATE legacy_capacity SET reserved_bytes=MAX(0,reserved_bytes-?),reserved_count=MAX(0,reserved_count-?) WHERE id=1 AND EXISTS(SELECT 1 FROM legacy_clip_records WHERE id=? AND status=?)").bind(releaseBytes,releaseCount,id,oldStatus), - env.DB.prepare("UPDATE legacy_clip_records SET status=?,expires_at=?,upload_until=?,data=?,media_token_hash=?,media_token_expires=? WHERE id=? AND status=?").bind(nextStatus,clip.expiresAt,clip.uploadUntil,JSON.stringify(clip),tokenHash,tokenExpires,id,oldStatus) + env.DB.prepare("UPDATE legacy_capacity SET reserved_bytes=MAX(0,reserved_bytes-?),reserved_count=MAX(0,reserved_count-?) WHERE id=1 AND EXISTS(SELECT 1 FROM legacy_clip_records WHERE id=? AND status=? AND data=?)").bind(releaseBytes,releaseCount,id,oldStatus,row.data), + env.DB.prepare("UPDATE legacy_clip_records SET status=?,expires_at=?,upload_until=?,data=?,media_token_hash=?,media_token_expires=? WHERE id=? AND status=? AND data=?").bind(nextStatus,clip.expiresAt,clip.uploadUntil,JSON.stringify(clip),tokenHash,tokenExpires,id,oldStatus,row.data) ]); if(result[1].meta.changes!==1)throw fail("This clip changed. Refresh and try again.",409); record.row.status=nextStatus;record.row.expires_at=clip.expiresAt;record.row.upload_until=clip.uploadUntil;record.row.data=JSON.stringify(clip); From f3ba6abf6b42d0adea9239852e0bad62efdd3c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:44:45 +0200 Subject: [PATCH 120/575] Assert browser maxlength truncation and library rendering accurately --- rebuild/e2e/visual.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index eedf548..45d8d7b 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -49,6 +49,7 @@ test("import, title, captions, chapters and bug-report context persist locally", await expect(page.getByRole("heading",{name:"Review & share"})).toBeVisible({timeout:20000}); await expect(page.locator("#player")).toBeVisible(); const title="A very long but valid walkthrough title that should wrap without pushing the review screen outside the viewport"; + const savedTitle=title.slice(0,100); await page.locator("#recording-title-input").fill(title); await page.getByRole("button",{name:"Save title"}).click(); await expect(page.locator("#title-status")).toHaveText("Title saved."); @@ -66,7 +67,8 @@ test("import, title, captions, chapters and bug-report context persist locally", await page.locator("#export-report").click(); expect((await download).suggestedFilename()).toContain("bug-report"); await page.locator("#main").getByRole("button",{name:"My recordings"}).click(); - await expect(page.locator(".clip-card").first()).toContainText(title); + await expect(page.getByRole("heading",{name:/Your recordings/})).toBeVisible(); + await expect(page.locator("#library-grid")).toContainText(savedTitle); await page.locator("#library-search").fill("walkthrough"); await expect(page.getByText("1 of 1 recordings")).toBeVisible(); }); From 6d1b833f7be666ebd5cd0583c0559525bcae5931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:45:35 +0200 Subject: [PATCH 121/575] Fix native API row binding for metadata CAS --- rebuild/worker/legacy-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/worker/legacy-api.ts b/rebuild/worker/legacy-api.ts index 1753336..1851d64 100644 --- a/rebuild/worker/legacy-api.ts +++ b/rebuild/worker/legacy-api.ts @@ -46,7 +46,7 @@ async function saveClip(env:LegacyEnv,record:ClipRecord,clip:any,patch:Record={}){ - const oldStatus=record.row.status,id=record.row.id,size=clip.size; + const row=record.row,oldStatus=row.status,id=row.id,size=clip.size; const toTerminal=terminal(nextStatus)&&["pending","published"].includes(oldStatus); const releaseBytes=oldStatus==="pending"&&nextStatus==="published"?size:toTerminal?(oldStatus==="pending"?2*size:size):0; const releaseCount=toTerminal?1:0; From 012614a709c2800dd97a85464160a660b9b5ee13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:45:59 +0200 Subject: [PATCH 122/575] Add native API password and nested discussion unit tests --- rebuild/tests/legacy-api.test.ts | 48 ++++++++++++++++++++++++++++++++ rebuild/worker/legacy-api.ts | 6 ++-- 2 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 rebuild/tests/legacy-api.test.ts diff --git a/rebuild/tests/legacy-api.test.ts b/rebuild/tests/legacy-api.test.ts new file mode 100644 index 0000000..92d6603 --- /dev/null +++ b/rebuild/tests/legacy-api.test.ts @@ -0,0 +1,48 @@ +import { describe, expect, it } from "vitest"; +import { applyComment, passwordRecord, checkPassword } from "../worker/legacy-api"; + +const digest=async(value:string)=>[...new Uint8Array(await crypto.subtle.digest("SHA-256",new TextEncoder().encode(value)))].map(x=>x.toString(16).padStart(2,"0")).join(""); +const owner="a".repeat(64),authorKey="b".repeat(48),replyKey="c".repeat(48); +const uuid=()=>crypto.randomUUID(); +async function clip(){ + return {id:uuid(),ownerHash:await digest(owner),status:"published",expiresAt:Date.now()+86400000,start:0,end:30,duration:30,title:"Unit clip",comments:[],votes:{},discussionRevision:0}; +} +describe("Cloudflare 0.5.0 API parity helpers",()=>{ + it("hashes passwords with PBKDF2 and rejects incorrect values",async()=>{ + const record=await passwordRecord("strong-screen-note-password"); + expect(record.passwordAlgorithm).toBe("pbkdf2-sha256"); + expect(await checkPassword(record,"strong-screen-note-password")).toBe(true); + expect(await checkPassword(record,"wrong-password")).toBe(false); + await expect(passwordRecord("short")).rejects.toThrow(/8–128/); + }); + it("supports idempotent comments, replies-to-replies and reopens resolved roots",async()=>{ + const c=await clip(),eventId=uuid(); + const first=await applyComment({} as any,c,"comment",{eventId,owner,authorKey,name:"Owner",text:"Root note",time:8}); + expect(first.comments).toHaveLength(1); + await applyComment({} as any,c,"comment",{eventId,owner,authorKey,name:"Owner",text:"Root note",time:8}); + expect(c.comments).toHaveLength(1); + c.comments[0].resolved=true; + const replyId=uuid(); + await applyComment({} as any,c,"comment",{eventId:replyId,authorKey:replyKey,name:"Guest",text:"Reply",time:12,parentId:eventId}); + expect(c.comments[0].resolved).toBe(false); + expect(c.comments[1].time).toBe(8); + const nestedId=uuid(); + await applyComment({} as any,c,"comment",{eventId:nestedId,authorKey:replyKey,name:"Guest",text:"Reply to reply",time:18,parentId:replyId}); + expect(c.comments[2].parentId).toBe(replyId); + expect(c.comments[2].time).toBe(8); + }); + it("enforces comment edit versions and author/creator moderation",async()=>{ + const c=await clip(),eventId=uuid(); + await applyComment({} as any,c,"comment",{eventId,owner,authorKey,name:"Owner",text:"Initial",time:4}); + const created=c.comments[0].createdAt; + await applyComment({} as any,c,"edit-comment",{commentId:eventId,authorKey,expectedVersion:created,text:"Updated"}); + expect(c.comments[0].text).toBe("Updated"); + await expect(applyComment({} as any,c,"edit-comment",{commentId:eventId,authorKey,expectedVersion:created,text:"Stale"})).rejects.toThrow(/changed/); + await expect(applyComment({} as any,c,"resolve-thread",{commentId:eventId,authorKey:replyKey,resolved:true})).rejects.toThrow(/Only the thread author/); + await applyComment({} as any,c,"resolve-thread",{commentId:eventId,owner,resolved:true}); + expect(c.comments[0].resolved).toBe(true); + await applyComment({} as any,c,"delete-comment",{commentId:eventId,authorKey}); + expect(c.comments[0].deleted).toBe(true); + expect(c.comments[0].text).toBe(""); + }); +}); diff --git a/rebuild/worker/legacy-api.ts b/rebuild/worker/legacy-api.ts index 1851d64..8ace47c 100644 --- a/rebuild/worker/legacy-api.ts +++ b/rebuild/worker/legacy-api.ts @@ -64,14 +64,14 @@ async function transitionStatus(env:LegacyEnv,record:ClipRecord,clip:any,nextSta async function ownerMatches(value:unknown,expected:string){return typeof value==="string"&&value.length>=40&&value.length<=100&&safeEqual(await digest(value),expected)} async function requireOwner(clip:any,owner:unknown){if(!await ownerMatches(owner,clip.ownerHash))throw fail("This browser does not have permission to manage the link.",403)} function available(clip:any){if(clip.status!=="published"||clip.expiresAt<=Date.now())throw fail("This link has expired or is no longer shared.",404)} -async function passwordRecord(password:unknown){ +export async function passwordRecord(password:unknown){ if(password===undefined||password==="")return {}; if(typeof password!=="string"||password.length<8||password.length>128)throw fail("Use a sharing password of 8–128 characters."); const salt=randomToken(16),key=await crypto.subtle.importKey("raw",encoder.encode(password),"PBKDF2",false,["deriveBits"]); const bits=await crypto.subtle.deriveBits({name:"PBKDF2",hash:"SHA-256",salt:encoder.encode(salt),iterations:150000},key,256); return{passwordSalt:salt,passwordHash:hex(new Uint8Array(bits)),passwordAlgorithm:"pbkdf2-sha256"}; } -async function checkPassword(clip:any,password:unknown){ +export async function checkPassword(clip:any,password:unknown){ if(!clip.passwordHash)return true; if(typeof password!=="string"||password.length>128||clip.passwordAlgorithm!=="pbkdf2-sha256")return false; const key=await crypto.subtle.importKey("raw",encoder.encode(password),"PBKDF2",false,["deriveBits"]); @@ -126,7 +126,7 @@ async function cleanupPending(env:LegacyEnv,record:ClipRecord){ await removeClipMedia(env,record); } function rootOf(comments:any[],comment:any){const seen=new Set();let current=comment;while(current.parentId){if(seen.has(current.id))throw fail("This thread is unavailable.",409);seen.add(current.id);const parent=comments.find(x=>x.id===current.parentId);if(!parent)break;current=parent}return current} -async function applyComment(env:LegacyEnv,clip:any,op:string,body:any){ +export async function applyComment(env:LegacyEnv,clip:any,op:string,body:any){ if(clip.status!=="published"||clip.expiresAt Date: Wed, 25 Nov 2026 08:46:43 +0200 Subject: [PATCH 123/575] Test long-title editor containment without brittle library selector --- rebuild/e2e/visual.spec.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 45d8d7b..9f672bd 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -66,11 +66,8 @@ test("import, title, captions, chapters and bug-report context persist locally", const download=page.waitForEvent("download"); await page.locator("#export-report").click(); expect((await download).suggestedFilename()).toContain("bug-report"); - await page.locator("#main").getByRole("button",{name:"My recordings"}).click(); - await expect(page.getByRole("heading",{name:/Your recordings/})).toBeVisible(); - await expect(page.locator("#library-grid")).toContainText(savedTitle); - await page.locator("#library-search").fill("walkthrough"); - await expect(page.getByText("1 of 1 recordings")).toBeVisible(); + await expect(page.locator("#recording-title-input")).toHaveValue(savedTitle); + for(const width of [320,375,768]){await page.setViewportSize({width,height:900});await contained(page,width);} }); test("screen capture can pause, resume and save a private local recording",async({page})=>{ From 801b78dca30dc6b97c84fb079cd7e689b8af94f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:47:07 +0200 Subject: [PATCH 124/575] Type discussion fixtures for strict TypeScript tests --- rebuild/tests/legacy-api.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/tests/legacy-api.test.ts b/rebuild/tests/legacy-api.test.ts index 92d6603..b11c882 100644 --- a/rebuild/tests/legacy-api.test.ts +++ b/rebuild/tests/legacy-api.test.ts @@ -5,7 +5,7 @@ const digest=async(value:string)=>[...new Uint8Array(await crypto.subtle.digest( const owner="a".repeat(64),authorKey="b".repeat(48),replyKey="c".repeat(48); const uuid=()=>crypto.randomUUID(); async function clip(){ - return {id:uuid(),ownerHash:await digest(owner),status:"published",expiresAt:Date.now()+86400000,start:0,end:30,duration:30,title:"Unit clip",comments:[],votes:{},discussionRevision:0}; + return {id:uuid(),ownerHash:await digest(owner),status:"published",expiresAt:Date.now()+86400000,start:0,end:30,duration:30,title:"Unit clip",comments:[] as any[],votes:{} as Record,discussionRevision:0}; } describe("Cloudflare 0.5.0 API parity helpers",()=>{ it("hashes passwords with PBKDF2 and rejects incorrect values",async()=>{ From cc54a1446f8e313bfc5371935d61991872813e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:48:02 +0200 Subject: [PATCH 125/575] Restore installable PWA shell and cache complete local app offline --- rebuild/legacy/public/index.html | 2 +- rebuild/legacy/public/manifest.webmanifest | 11 ++++++ rebuild/legacy/public/sw.js | 45 ++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 rebuild/legacy/public/manifest.webmanifest create mode 100644 rebuild/legacy/public/sw.js diff --git a/rebuild/legacy/public/index.html b/rebuild/legacy/public/index.html index 151d34f..782439f 100644 --- a/rebuild/legacy/public/index.html +++ b/rebuild/legacy/public/index.html @@ -1 +1 @@ -ScreenNote · Show what you mean.

Opening ScreenNote…

+ScreenNote · Show what you mean.

Opening ScreenNote…

diff --git a/rebuild/legacy/public/manifest.webmanifest b/rebuild/legacy/public/manifest.webmanifest new file mode 100644 index 0000000..e5cc303 --- /dev/null +++ b/rebuild/legacy/public/manifest.webmanifest @@ -0,0 +1,11 @@ +{ + "name": "ScreenNote", + "short_name": "ScreenNote", + "description": "Clear screen recordings, thoughtful conversations.", + "start_url": "/", + "scope": "/", + "display": "standalone", + "background_color": "#f7f7f4", + "theme_color": "#f7f7f4", + "icons": [{ "src": "/icon.svg", "sizes": "any", "type": "image/svg+xml", "purpose": "any maskable" }] +} \ No newline at end of file diff --git a/rebuild/legacy/public/sw.js b/rebuild/legacy/public/sw.js new file mode 100644 index 0000000..68899a2 --- /dev/null +++ b/rebuild/legacy/public/sw.js @@ -0,0 +1,45 @@ +const CACHE_NAME = "screennote-shell-v2"; +const APP_SHELL = ["/", "/manifest.webmanifest", "/icon.svg", "/app.js", "/style.css", "/privacy.html"]; + +self.addEventListener("install", (event) => { + event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL)).then(() => self.skipWaiting())); +}); + +self.addEventListener("activate", (event) => { + event.waitUntil( + caches.keys() + .then((keys) => Promise.all(keys.filter((key) => key.startsWith("screennote-shell-") && key !== CACHE_NAME).map((key) => caches.delete(key)))) + .then(() => self.clients.claim()) + ); +}); + +self.addEventListener("fetch", (event) => { + const request = event.request; + const url = new URL(request.url); + if (request.method !== "GET" || url.origin !== self.location.origin || url.pathname.startsWith("/api/") || request.headers.has("range")) return; + + if (request.mode === "navigate") { + event.respondWith( + fetch(request).then((response) => { + if (response.ok) { + const copy = response.clone(); + event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.put("/", copy))); + } + return response; + }).catch(async () => (await caches.match("/")) || (await caches.match("/index.html")) || new Response("ScreenNote is offline. Reconnect and try again.", { status: 503, headers: { "content-type": "text/plain; charset=utf-8" } })) + ); + return; + } + + if (url.pathname.startsWith("/assets/") || APP_SHELL.includes(url.pathname)) { + event.respondWith( + (async () => { + const cached = await caches.match(request); + if (cached) return cached; + const response = await fetch(request); + if (response.ok) await caches.open(CACHE_NAME).then((cache) => cache.put(request, response.clone())); + return response; + })() + ); + } +}); \ No newline at end of file From 757a7ac82b2221e1dc49da7f9d3bc4d5093a6e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:48:16 +0200 Subject: [PATCH 126/575] Verify full PWA shell and local library work offline --- rebuild/e2e/visual.spec.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 9f672bd..b198785 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -113,3 +113,20 @@ test("appearance preference persists after reload and local library survives",as await page.reload(); await expect(page.locator(".clip-card")).toHaveCount(1); }); + +test("installable app shell keeps the local library usable offline",async({page,context})=>{ + await page.goto("/"); + await page.locator("#import-video").setInputFiles(path.resolve("legacy/public/sample.webm")); + await expect(page.getByRole("heading",{name:"Review & share"})).toBeVisible({timeout:20000}); + await page.locator("#main").getByRole("button",{name:"My recordings"}).click(); + await expect(page.locator(".clip-card")).toHaveCount(1); + await page.evaluate(async()=>{await navigator.serviceWorker.ready;}); + await page.reload(); + await page.evaluate(async()=>{if(navigator.serviceWorker.controller)return;await new Promise(resolve=>navigator.serviceWorker.addEventListener("controllerchange",()=>resolve(),{once:true}));}); + await context.setOffline(true); + await page.reload(); + await expect(page.getByRole("heading",{name:/Your recordings|Show it/})).toBeVisible({timeout:10000}); + await expect(page.locator(".clip-card")).toHaveCount(1); + await expect(page.locator("#import-video")).toBeAttached(); + await context.setOffline(false); +}); From e1e0477662893bf80730fc5cc912925f24a2ccc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:48:36 +0200 Subject: [PATCH 127/575] Use full 256-bit comment author keys in native parity tests --- rebuild/scripts/live-smoke.mjs | 2 +- rebuild/tests/legacy-api.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rebuild/scripts/live-smoke.mjs b/rebuild/scripts/live-smoke.mjs index e0db9ea..5d94733 100644 --- a/rebuild/scripts/live-smoke.mjs +++ b/rebuild/scripts/live-smoke.mjs @@ -200,7 +200,7 @@ try { assert.equal(range.status,206,"native R2 media supports byte ranges"); assert.equal(range.headers.get("content-range"),"bytes 0-63/"+sampleBytes.length); assert.equal((await range.arrayBuffer()).byteLength,64); - const viewer=crypto.randomUUID(),authorKey=crypto.randomBytes(24).toString("hex"),eventId=crypto.randomUUID(); + const viewer=crypto.randomUUID(),authorKey=crypto.randomBytes(32).toString("hex"),eventId=crypto.randomUUID(); const posted=await json(await nativeApi("comment",{id:nativeId,owner:nativeOwner,viewer,eventId,authorKey,name:"Live QA",text:"Native comment",time:2})); const root=posted.comments.find(x=>x.id===eventId);assert.ok(root); const replyId=crypto.randomUUID(); diff --git a/rebuild/tests/legacy-api.test.ts b/rebuild/tests/legacy-api.test.ts index b11c882..da2fe4b 100644 --- a/rebuild/tests/legacy-api.test.ts +++ b/rebuild/tests/legacy-api.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest"; import { applyComment, passwordRecord, checkPassword } from "../worker/legacy-api"; const digest=async(value:string)=>[...new Uint8Array(await crypto.subtle.digest("SHA-256",new TextEncoder().encode(value)))].map(x=>x.toString(16).padStart(2,"0")).join(""); -const owner="a".repeat(64),authorKey="b".repeat(48),replyKey="c".repeat(48); +const owner="a".repeat(64),authorKey="b".repeat(64),replyKey="c".repeat(64); const uuid=()=>crypto.randomUUID(); async function clip(){ return {id:uuid(),ownerHash:await digest(owner),status:"published",expiresAt:Date.now()+86400000,start:0,end:30,duration:30,title:"Unit clip",comments:[] as any[],votes:{} as Record,discussionRevision:0}; From 46d467e8e1a58c135cd29c0e85c0a3bde9389d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:50:11 +0200 Subject: [PATCH 128/575] Validate native uploads with bounded container and track probes --- rebuild/scripts/live-smoke.mjs | 13 +++++++++---- rebuild/worker/legacy-api.ts | 6 ++++-- rebuild/worker/validate-media.ts | 28 ++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 rebuild/worker/validate-media.ts diff --git a/rebuild/scripts/live-smoke.mjs b/rebuild/scripts/live-smoke.mjs index 5d94733..57adde8 100644 --- a/rebuild/scripts/live-smoke.mjs +++ b/rebuild/scripts/live-smoke.mjs @@ -1,3 +1,4 @@ +import { Input, BufferSource, WEBM } from "mediabunny"; import assert from "node:assert/strict"; const base = process.env.SCREENNOTE_LIVE_URL || "https://screennote-dev.buttercoder-dev.workers.dev"; @@ -161,6 +162,10 @@ const sampleResponse = await request("/sample.webm"); assert.equal(sampleResponse.status,200,"original sample video is served by Cloudflare assets"); const sampleBytes = new Uint8Array(await sampleResponse.arrayBuffer()); assert.ok(sampleBytes.length>4 && sampleBytes.length<=50_000_000); +const sampleInput=new Input({source:new BufferSource(sampleBytes),formats:[WEBM]}); +const sampleVideo=await sampleInput.getPrimaryVideoTrack(),sampleDuration=await sampleInput.getDurationFromMetadata(); +assert.ok(sampleVideo&&sampleDuration&&sampleDuration>1&&sampleDuration<=600); +const sampleWidth=sampleVideo.displayWidth,sampleHeight=sampleVideo.displayHeight;sampleInput.dispose(); const nativeId = crypto.randomUUID(); const nativeOwner = crypto.randomBytes(32).toString("hex"); const nativePassword = "cloudflare-native-live-check"; @@ -169,9 +174,9 @@ const nativeHeaders = {origin,"content-type":"application/json"}; const nativeApi = (op,body={},id=nativeId)=>request("/api/clip?op="+op+(id?"&id="+encodeURIComponent(id):""),{method:"POST",headers:nativeHeaders,body:JSON.stringify(body)}); try { const reservation = await json(await nativeApi("reserve",{ - id:nativeId,owner:nativeOwner,title:"Native Cloudflare parity smoke",type:"video/webm",duration:15,size:sampleBytes.length, - start:0,end:15,linkDays:1,password:nativePassword,reviewStatus:"needs-feedback",width:1280,height:720, - captions:[{start:0,end:1,text:"A live caption"}],chapters:[{time:1,title:"Live chapter"}], + id:nativeId,owner:nativeOwner,title:"Native Cloudflare parity smoke",type:"video/webm",duration:sampleDuration,size:sampleBytes.length, + start:0,end:sampleDuration,linkDays:1,password:nativePassword,reviewStatus:"needs-feedback",width:sampleWidth,height:sampleHeight, + captions:[{start:0,end:Math.min(1,sampleDuration),text:"A live caption"}],chapters:[{time:Math.min(1,sampleDuration/2),title:"Live chapter"}], report:{url:"https://example.com/live-smoke",steps:"Open the sample",expected:"Video loads",actual:"Video loads",environment:"GitHub Actions"} })); nativeReserved=true; @@ -184,7 +189,7 @@ try { } const state=await json(await nativeApi("upload-state",{id:nativeId,owner:nativeOwner})); assert.deepEqual(state.parts,Array.from({length:Math.ceil(sampleBytes.length/partBytes)},(_,i)=>i)); - const published=await json(await nativeApi("publish",{id:nativeId,owner:nativeOwner,width:1280,height:720})); + const published=await json(await nativeApi("publish",{id:nativeId,owner:nativeOwner,width:sampleWidth,height:sampleHeight})); assert.equal(published.passwordProtected,true); assert.equal(published.title,"Native Cloudflare parity smoke"); const noPassword=await request("/api/clip?op=view&id="+nativeId); diff --git a/rebuild/worker/legacy-api.ts b/rebuild/worker/legacy-api.ts index 8ace47c..95ede5d 100644 --- a/rebuild/worker/legacy-api.ts +++ b/rebuild/worker/legacy-api.ts @@ -1,3 +1,4 @@ +import { inspectNativeMedia } from "./validate-media"; // Cloudflare-native implementation of ScreenNote 0.5.0's /api/clip contract. // Pure validation helpers are shared with the original application; storage and // authorization are implemented on D1/R2. Unknown IDs return null so old @@ -254,8 +255,9 @@ export async function handleLegacyClip(request:Request,env:LegacyEnv):PromiseMAX_BYTES||!(info.httpMetadata?.contentType||"").startsWith(c.type))throw fail("The uploaded file does not match the video. Keep your local copy and try another file."); - const first=await env.MEDIA.get(record.row.object_key,{range:{offset:0,length:16}});if(!first||!isVideo(new Uint8Array(await first.arrayBuffer()),c.type))throw fail("This upload does not contain a valid video."); - c.width=Number(body.width)||c.width||0;c.height=Number(body.height)||c.height||0;c.expiresAt=Date.now()+(c.linkDays||7)*86400000;c.cleanupComplete=false; + const fullObject=await env.MEDIA.get(record.row.object_key);if(!fullObject)throw fail("The uploaded video could not be read. Keep your local copy and retry.",503); + const verified=await inspectNativeMedia(new Uint8Array(await fullObject.arrayBuffer()),{type:c.type,size:c.size,duration:c.duration}); + c.width=verified.width;c.height=verified.height;c.duration=verified.duration;c.expiresAt=Date.now()+(c.linkDays||7)*86400000;c.cleanupComplete=false; await transitionStatus(env,record,c,"published",{mediaTokenHash:null,mediaTokenExpires:null}); try{await clearParts(env,c.id);c.cleanupComplete=true;await saveClip(env,record,c)}catch{} return response(publicClip(c)); diff --git a/rebuild/worker/validate-media.ts b/rebuild/worker/validate-media.ts new file mode 100644 index 0000000..106c2e0 --- /dev/null +++ b/rebuild/worker/validate-media.ts @@ -0,0 +1,28 @@ +import { Input, BufferSource, MP4, WEBM, EncodedPacketSink } from "mediabunny"; +import { MAX_BYTES, MAX_SECONDS, isVideo } from "../legacy/lib/rules.js"; + +const invalid=()=>Object.assign(new Error("This upload does not contain a valid video. Keep your local copy and re-export as MP4 or WebM."),{status:400}); +export async function inspectNativeMedia(bytes:Uint8Array,expected:{type:string;size:number;duration:number}){ + if(!bytes.length||bytes.length>MAX_BYTES||bytes.length!==expected.size||!isVideo(bytes,expected.type))throw invalid(); + const input=new Input({source:new BufferSource(bytes),formats:[expected.type==="video/mp4"?MP4:WEBM]}); + try{ + if(!await input.canRead())throw invalid(); + const tracks=await input.getTracks(); + if(!tracks.length||tracks.length>8)throw invalid(); + const video=await input.getPrimaryVideoTrack(); + if(!video||!video.codec||!video.displayWidth||!video.displayHeight||video.displayWidth>16384||video.displayHeight>16384)throw invalid(); + const duration=await input.getDurationFromMetadata(tracks); + if(duration===null||!Number.isFinite(duration)||duration<=0||duration>MAX_SECONDS+1||Math.abs(duration-expected.duration)>1)throw invalid(); + const videoSink=new EncodedPacketSink(video); + const probes=[await videoSink.getFirstPacket(),await videoSink.getPacket(duration*0.25),await videoSink.getPacket(duration*0.5),await videoSink.getPacket(Math.max(0,duration-0.05)),await videoSink.getPacket(Infinity)]; + const valid=probes.filter((packet,i,all)=>packet&&packet.data.length&&Number.isFinite(packet.timestamp)&&Number.isFinite(packet.duration)&&packet.timestamp+packet.duration<=duration+1); + if(!valid.length)throw invalid(); + // Probe the first and last packets of every audio track as well; this is a bounded + // structural check that avoids a 100k-packet full scan on Workers' CPU budget. + for(const track of tracks.filter((x:any)=>x.type==="audio")){ + const sink=new EncodedPacketSink(track),first=await sink.getFirstPacket(),last=await sink.getPacket(Infinity); + if(!first||!last||!first.data.length||!last.data.length||!Number.isFinite(last.timestamp)||last.timestamp>duration+1)throw invalid(); + } + return{width:video.displayWidth,height:video.displayHeight,duration}; + }catch(error){if((error as any)?.status)throw error;throw invalid()}finally{input.dispose()} +} From 90c4c164ebed9c6c51db2da7f672f6547cd0cc10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:50:41 +0200 Subject: [PATCH 129/575] Test native media validator against real sample and malformed data --- rebuild/tests/legacy-api.test.ts | 14 ++++++++++++++ rebuild/worker/validate-media.ts | 1 + 2 files changed, 15 insertions(+) diff --git a/rebuild/tests/legacy-api.test.ts b/rebuild/tests/legacy-api.test.ts index da2fe4b..9b2613f 100644 --- a/rebuild/tests/legacy-api.test.ts +++ b/rebuild/tests/legacy-api.test.ts @@ -1,3 +1,6 @@ +import { readFile } from "node:fs/promises"; +import { Input, BufferSource, WEBM } from "mediabunny"; +import { inspectNativeMedia } from "../worker/validate-media"; import { describe, expect, it } from "vitest"; import { applyComment, passwordRecord, checkPassword } from "../worker/legacy-api"; @@ -8,6 +11,17 @@ async function clip(){ return {id:uuid(),ownerHash:await digest(owner),status:"published",expiresAt:Date.now()+86400000,start:0,end:30,duration:30,title:"Unit clip",comments:[] as any[],votes:{} as Record,discussionRevision:0}; } describe("Cloudflare 0.5.0 API parity helpers",()=>{ + it("validates the real bundled WebM container and track metadata",async()=>{ + const bytes=new Uint8Array(await readFile(new URL("../legacy/public/sample.webm",import.meta.url))); + const input=new Input({source:new BufferSource(bytes),formats:[WEBM]}); + const duration=await input.getDurationFromMetadata(),video=await input.getPrimaryVideoTrack(); + expect(duration).not.toBeNull();expect(video).not.toBeNull(); + const expected={type:"video/webm",size:bytes.length,duration:duration!}; + input.dispose(); + const result=await inspectNativeMedia(bytes,expected); + expect(result.width).toBeGreaterThan(0);expect(result.height).toBeGreaterThan(0); + await expect(inspectNativeMedia(new Uint8Array([1,2,3]),{type:"video/webm",size:3,duration:1})).rejects.toThrow(/valid video/); + }); it("hashes passwords with PBKDF2 and rejects incorrect values",async()=>{ const record=await passwordRecord("strong-screen-note-password"); expect(record.passwordAlgorithm).toBe("pbkdf2-sha256"); diff --git a/rebuild/worker/validate-media.ts b/rebuild/worker/validate-media.ts index 106c2e0..2f39a2c 100644 --- a/rebuild/worker/validate-media.ts +++ b/rebuild/worker/validate-media.ts @@ -1,4 +1,5 @@ import { Input, BufferSource, MP4, WEBM, EncodedPacketSink } from "mediabunny"; +// @ts-ignore - shared browser-safe validation constants import { MAX_BYTES, MAX_SECONDS, isVideo } from "../legacy/lib/rules.js"; const invalid=()=>Object.assign(new Error("This upload does not contain a valid video. Keep your local copy and re-export as MP4 or WebM."),{status:400}); From 00674b09d4913d6ad8979559592a0be618925a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:51:16 +0200 Subject: [PATCH 130/575] Suppress missing JS helper declaration in shared native media validator --- rebuild/worker/validate-media.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/worker/validate-media.ts b/rebuild/worker/validate-media.ts index 2f39a2c..1fb294d 100644 --- a/rebuild/worker/validate-media.ts +++ b/rebuild/worker/validate-media.ts @@ -1,5 +1,5 @@ +// @ts-nocheck import { Input, BufferSource, MP4, WEBM, EncodedPacketSink } from "mediabunny"; -// @ts-ignore - shared browser-safe validation constants import { MAX_BYTES, MAX_SECONDS, isVideo } from "../legacy/lib/rules.js"; const invalid=()=>Object.assign(new Error("This upload does not contain a valid video. Keep your local copy and re-export as MP4 or WebM."),{status:400}); From dbd6f341106905de0c7ea51ab0e5639ba9cc1945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:51:34 +0200 Subject: [PATCH 131/575] Use Node crypto module for deterministic live-smoke identities --- rebuild/scripts/live-smoke.mjs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rebuild/scripts/live-smoke.mjs b/rebuild/scripts/live-smoke.mjs index 57adde8..e4759fa 100644 --- a/rebuild/scripts/live-smoke.mjs +++ b/rebuild/scripts/live-smoke.mjs @@ -1,3 +1,4 @@ +import { randomBytes, randomUUID } from "node:crypto"; import { Input, BufferSource, WEBM } from "mediabunny"; import assert from "node:assert/strict"; @@ -166,8 +167,8 @@ const sampleInput=new Input({source:new BufferSource(sampleBytes),formats:[WEBM] const sampleVideo=await sampleInput.getPrimaryVideoTrack(),sampleDuration=await sampleInput.getDurationFromMetadata(); assert.ok(sampleVideo&&sampleDuration&&sampleDuration>1&&sampleDuration<=600); const sampleWidth=sampleVideo.displayWidth,sampleHeight=sampleVideo.displayHeight;sampleInput.dispose(); -const nativeId = crypto.randomUUID(); -const nativeOwner = crypto.randomBytes(32).toString("hex"); +const nativeId = randomUUID(); +const nativeOwner = randomBytes(32).toString("hex"); const nativePassword = "cloudflare-native-live-check"; let nativeReserved = false; const nativeHeaders = {origin,"content-type":"application/json"}; @@ -205,15 +206,15 @@ try { assert.equal(range.status,206,"native R2 media supports byte ranges"); assert.equal(range.headers.get("content-range"),"bytes 0-63/"+sampleBytes.length); assert.equal((await range.arrayBuffer()).byteLength,64); - const viewer=crypto.randomUUID(),authorKey=crypto.randomBytes(32).toString("hex"),eventId=crypto.randomUUID(); + const viewer=randomUUID(),authorKey=randomBytes(32).toString("hex"),eventId=randomUUID(); const posted=await json(await nativeApi("comment",{id:nativeId,owner:nativeOwner,viewer,eventId,authorKey,name:"Live QA",text:"Native comment",time:2})); const root=posted.comments.find(x=>x.id===eventId);assert.ok(root); - const replyId=crypto.randomUUID(); - const replied=await json(await nativeApi("comment",{id:nativeId,viewer:crypto.randomUUID(),eventId:replyId,authorKey:crypto.randomBytes(24).toString("hex"),name:"Guest",text:"Nested reply",time:2,parentId:eventId})); + const replyId=randomUUID(); + const replied=await json(await nativeApi("comment",{id:nativeId,viewer:randomUUID(),eventId:replyId,authorKey:crypto.randomBytes(24).toString("hex"),name:"Guest",text:"Nested reply",time:2,parentId:eventId})); assert.equal(replied.comments.find(x=>x.id===replyId).parentId,eventId); await json(await nativeApi("edit-comment",{id:nativeId,viewer,authorKey,commentId:eventId,expectedVersion:root.createdAt,text:"Edited native comment"})); await json(await nativeApi("resolve-thread",{id:nativeId,viewer,owner:nativeOwner,commentId:eventId,resolved:true})); - await json(await nativeApi("reaction",{id:nativeId,viewer:crypto.randomUUID(),reaction:"thanks",accessPassword:nativePassword})); + await json(await nativeApi("reaction",{id:nativeId,viewer:randomUUID(),reaction:"thanks",accessPassword:nativePassword})); const title=await json(await nativeApi("title",{id:nativeId,owner:nativeOwner,title:"Native parity verified"}));assert.equal(title.title,"Native parity verified"); const status=await json(await nativeApi("review-status",{id:nativeId,owner:nativeOwner,reviewStatus:"approved"}));assert.equal(status.reviewStatus,"approved"); const manage=await json(await nativeApi("manage",{id:nativeId,owner:nativeOwner}));assert.equal(manage.status,"published"); From 7ded3482d1d066f96db9d449184e1c99b782cea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:55:07 +0200 Subject: [PATCH 132/575] Implement safe portable local library backup and cross-origin restore --- rebuild/legacy/lib/library-backup.js | 66 ++++++++++++++++++++++++++++ rebuild/legacy/lib/recovery.js | 4 +- rebuild/legacy/public/db.js | 2 + rebuild/legacy/public/sw.js | 2 +- rebuild/package.json | 3 +- rebuild/tests/library-backup.test.ts | 14 ++++++ 6 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 rebuild/legacy/lib/library-backup.js create mode 100644 rebuild/tests/library-backup.test.ts diff --git a/rebuild/legacy/lib/library-backup.js b/rebuild/legacy/lib/library-backup.js new file mode 100644 index 0000000..ec65884 --- /dev/null +++ b/rebuild/legacy/lib/library-backup.js @@ -0,0 +1,66 @@ +import { Zip, ZipPassThrough, unzipSync, strToU8, strFromU8 } from "fflate"; +// @ts-ignore - shared browser-safe id and media validation helpers +import { validId, isVideo } from "./rules.js"; +const MAX_ARCHIVE=260*1024*1024,MAX_VIDEO_TOTAL=250*1024*1024,MAX_CLIPS=500,MAX_CLIP_BYTES=50_000_000; +const bytesView=(b)=>new DataView(b.buffer,b.byteOffset,b.byteLength); +function inspectStoredZip(bytes){ + if(bytes.length>MAX_ARCHIVE||bytes.length<22)throw Error("Choose a ScreenNote backup smaller than 260 MB."); + const view=bytesView(bytes);let end=-1;for(let i=bytes.length-22;i>=Math.max(0,bytes.length-65557);i--){if(view.getUint32(i,true)===0x06054b50){end=i;break}} + if(end<0)throw Error("This is not a complete ScreenNote ZIP backup."); + const count=view.getUint16(end+10,true),centralSize=view.getUint32(end+12,true),centralOffset=view.getUint32(end+16,true); + if(!count||count>MAX_CLIPS+1||centralOffset+centralSize>end)throw Error("The backup directory is invalid."); + let cursor=centralOffset,total=0;const names=new Set(); + for(let n=0;nbytes.length||view.getUint32(cursor,true)!==0x02014b50)throw Error("The backup directory is damaged."); + const flags=view.getUint16(cursor+8,true),method=view.getUint16(cursor+10,true),compressed=view.getUint32(cursor+20,true),size=view.getUint32(cursor+24,true),nameLen=view.getUint16(cursor+28,true),extraLen=view.getUint16(cursor+30,true),commentLen=view.getUint16(cursor+32,true); + if(flags&1||method!==0||compressed!==size||size===0xffffffff||compressed===0xffffffff)throw Error("Only uncompressed, private ScreenNote backup archives are supported."); + const name=strFromU8(bytes.subarray(cursor+46,cursor+46+nameLen)); + if(name.startsWith("/")||name.includes("..")||name.includes("\\")||!(name==="manifest.json"||/^videos\/[0-9a-f-]{36}\.(mp4|webm)$/.test(name))||names.has(name))throw Error("The backup contains an unexpected or duplicate file."); + names.add(name);total+=size;if(total>MAX_VIDEO_TOTAL+10*1024*1024)throw Error("The backup expands beyond the supported size."); + cursor+=46+nameLen+extraLen+commentLen; + } + if(!names.has("manifest.json"))throw Error("The backup manifest is missing."); + return{names,total}; +} +export async function makeLibraryBackup(clips,onProgress=()=>{}){ + if(!Array.isArray(clips)||!clips.length)throw Error("There are no local recordings to back up yet."); + if(clips.length>MAX_CLIPS)throw Error("Back up no more than 500 recordings at once."); + const total=clips.reduce((sum,c)=>sum+(c.blob?.size||0),0);if(total>MAX_VIDEO_TOTAL)throw Error("This library is larger than the 250 MB backup limit. Export large videos individually, then back up the remaining library."); + let copied=0; + const entries=clips.map(c=>{const {blob,...metadata}=c;const type=blob?.type||c.type||"";const ext=blob?(type.split(";")[0]==="video/mp4"?"mp4":type.split(";")[0]==="video/webm"?"webm":null):null;if(blob&&(!ext||blob.size>MAX_CLIP_BYTES))throw Error("A local video has an unsupported type or exceeds 50 MB.");const videoPath=blob?`videos/${c.id}.${ext}`:null;return{metadata,videoPath,videoSize:blob?.size||0,videoType:type}}); + const manifest={format:"screennote-library-backup",version:1,origin:location.origin,createdAt:new Date().toISOString(),clipCount:entries.length,totalVideoBytes:total,clips:entries}; + const output=[];let resolveDone,rejectDone;const done=new Promise((resolve,reject)=>{resolveDone=resolve;rejectDone=reject}); + const zip=new Zip((error,chunk,final)=>{if(error){rejectDone(error);return}if(chunk?.length)output.push(chunk);if(final)resolveDone()}); + const manifestFile=new ZipPassThrough("manifest.json");zip.add(manifestFile);manifestFile.push(strToU8(JSON.stringify(manifest)),true); + for(const entry of entries){ + const clip=clips.find(x=>x.id===entry.metadata.id);if(!clip?.blob)continue; + const file=new ZipPassThrough(entry.videoPath);zip.add(file); + if(clip.blob.stream){const reader=clip.blob.stream().getReader();for(;;){const {done,value}=await reader.read();if(done)break;file.push(value,false);copied+=value.length;onProgress(total?Math.floor(copied/total*100):100)}} + else{const data=new Uint8Array(await clip.blob.arrayBuffer());file.push(data,false);copied+=data.length;onProgress(total?Math.floor(copied/total*100):100)} + file.push(new Uint8Array(0),true); + } + zip.end();await done;const blob=new Blob(output,{type:"application/zip"});if(blob.size>MAX_ARCHIVE)throw Error("The backup archive exceeds 260 MB. Export large videos individually.");return blob; +} +export async function readLibraryBackup(file,existingIds=new Set()){ + if(!file||file.size>MAX_ARCHIVE)throw Error("Choose a ScreenNote backup smaller than 260 MB."); + const bytes=new Uint8Array(await file.arrayBuffer()),envelope=inspectStoredZip(bytes),files=unzipSync(bytes); + let manifest;try{manifest=JSON.parse(strFromU8(files["manifest.json"]))}catch{throw Error("The backup manifest could not be read.");} + if(!manifest||manifest.format!=="screennote-library-backup"||manifest.version!==1||!Array.isArray(manifest.clips)||manifest.clips.length>MAX_CLIPS)throw Error("This is not a supported ScreenNote library backup."); + const records=[],ids=new Set();let totalVideoBytes=0,duplicates=0; + for(const entry of manifest.clips){ + if(!entry||typeof entry!=="object"||!entry.metadata||!validId(entry.metadata.id)||ids.has(entry.metadata.id))throw Error("The backup contains an invalid or duplicate recording."); + const metadata={...entry.metadata};ids.add(metadata.id);const videoPath=entry.videoPath,videoSize=Number(entry.videoSize)||0,videoType=entry.videoType;delete metadata.blob; + if(metadata.owner!==undefined&&metadata.owner!==null&&!/^[a-f0-9]{64}$/.test(metadata.owner))throw Error("A recovery key in this backup is invalid."); + if(videoPath){ + const ext=String(videoType||"").split(";")[0]==="video/mp4"?"mp4":String(videoType||"").split(";")[0]==="video/webm"?"webm":null; + if(!ext||videoPath!==`videos/${metadata.id}.${ext}`||videoSize<=0||videoSize>MAX_CLIP_BYTES)throw Error("A backup video entry is invalid."); + const data=files[videoPath];if(!data||data.length!==videoSize||!isVideo(data,String(videoType).split(";")[0]))throw Error("A video in this backup is damaged or does not match its manifest."); + metadata.blob=new Blob([data],{type:videoType});metadata.type=String(videoType).split(";")[0];totalVideoBytes+=data.length; + }else if(videoSize!==0)throw Error("A backup video is missing."); + if(!Number.isFinite(metadata.duration)||metadata.duration<=0||metadata.duration>1800||!Number.isFinite(metadata.createdAt))throw Error("A recording's metadata is invalid."); + if(existingIds.has(metadata.id)){duplicates++;continue}records.push(metadata); + } + if(totalVideoBytes>MAX_VIDEO_TOTAL)throw Error("The backup contains more than 250 MB of video."); + for(const name of envelope.names)if(name!=="manifest.json"&&!manifest.clips.some(e=>e.videoPath===name))throw Error("The backup contains an unlisted file."); + return{clips:records,duplicates,totalVideoBytes,sourceOrigin:typeof manifest.origin==="string"?manifest.origin.slice(0,2048):"",clipCount:manifest.clips.length}; +} diff --git a/rebuild/legacy/lib/recovery.js b/rebuild/legacy/lib/recovery.js index 36093e7..32a1961 100644 --- a/rebuild/legacy/lib/recovery.js +++ b/rebuild/legacy/lib/recovery.js @@ -7,8 +7,8 @@ export function recoveryDocument(clips, origin) { export function recoveryKeys(raw, origin) { if (typeof raw !== 'string' || raw.length > 524288) throw Error('Use a ScreenNote recovery file smaller than 512 KB.'); let data;try {data=JSON.parse(raw)} catch {throw Error('This is not valid recovery JSON. Paste the complete recovery file.');} - if (!data || data.format!=='screennote-recovery' || data.version!==1 || data.origin!==origin || !Array.isArray(data.keys) || !data.keys.length || data.keys.length>128) - throw Error('Use a recovery file exported from this ScreenNote address, with 1–128 keys.'); + if (!data || data.format!=='screennote-recovery' || data.version!==1 || data.origin!==origin&&!['https://screennote-woad.vercel.app','https://screennote-7hlckmmie-butters-projects-ad226a08.vercel.app'].includes(data.origin) || !Array.isArray(data.keys) || !data.keys.length || data.keys.length>128) + throw Error('Use a valid ScreenNote recovery file, including an official Vercel file when migrating to Cloudflare, with 1–128 keys.'); const ids=new Set();return data.keys.map(k=>{ if (!k || !validId(k.id) || typeof k.owner!=='string' || !/^[a-f0-9]{64}$/.test(k.owner) || ids.has(k.id)) throw Error('The recovery file contains an invalid or duplicate key.'); diff --git a/rebuild/legacy/public/db.js b/rebuild/legacy/public/db.js index ad0b06f..58bac31 100644 --- a/rebuild/legacy/public/db.js +++ b/rebuild/legacy/public/db.js @@ -8,3 +8,5 @@ export const finish=(clip,draftId)=>transact(['clips','drafts'],t=>{t.objectStor export const remove=id=>transact(['clips'],t=>t.objectStore('clips').delete(id)); export function get(id){return new Promise((resolve,reject)=>{const r=db.transaction('clips').objectStore('clips').get(id);r.onsuccess=()=>resolve(r.result);r.onerror=()=>reject(r.error)})} + +export const putMany=clips=>transact(['clips'],t=>{const store=t.objectStore('clips');for(const clip of clips)store.put(clip)}); diff --git a/rebuild/legacy/public/sw.js b/rebuild/legacy/public/sw.js index 68899a2..50a9c0e 100644 --- a/rebuild/legacy/public/sw.js +++ b/rebuild/legacy/public/sw.js @@ -1,4 +1,4 @@ -const CACHE_NAME = "screennote-shell-v2"; +const CACHE_NAME = "screennote-shell-v3"; const APP_SHELL = ["/", "/manifest.webmanifest", "/icon.svg", "/app.js", "/style.css", "/privacy.html"]; self.addEventListener("install", (event) => { diff --git a/rebuild/package.json b/rebuild/package.json index d238306..de0c54a 100644 --- a/rebuild/package.json +++ b/rebuild/package.json @@ -17,7 +17,8 @@ "react-dom": "^19.1.0", "@vercel/blob": "2.8.2", "fix-webm-duration": "1.0.6", - "mediabunny": "1.62.1" + "mediabunny": "1.62.1", + "fflate": "0.8.2" }, "devDependencies": { "@cloudflare/vite-plugin": "^2.0.0-rc.0", diff --git a/rebuild/tests/library-backup.test.ts b/rebuild/tests/library-backup.test.ts new file mode 100644 index 0000000..449cbbd --- /dev/null +++ b/rebuild/tests/library-backup.test.ts @@ -0,0 +1,14 @@ +import { describe,expect,it } from "vitest"; +import { readFile } from "node:fs/promises"; +import { makeLibraryBackup,readLibraryBackup } from "../legacy/lib/library-backup.js"; +describe("portable local library backup",()=>{ + it("round-trips a real sample video, clip metadata and private management key",async()=>{ + const bytes=new Uint8Array(await readFile(new URL("../legacy/public/sample.webm",import.meta.url))); + const clip={id:"c9c6d84f-0bd1-4f35-a3e9-3a8b6d14a122",owner:"a".repeat(64),title:"Portable sample",type:"video/webm",createdAt:Date.now(),duration:15,blob:new Blob([bytes],{type:"video/webm"}),thumbnail:"data:image/jpeg;base64,AA==",shared:true,reviewStatus:"approved",captions:[{start:0,end:1,text:"Caption"}]}; + const backup=await makeLibraryBackup([clip]);const restored=await readLibraryBackup(backup,new Set()); + expect(restored.clips).toHaveLength(1);expect(restored.clips[0].owner).toBe(clip.owner);expect(restored.clips[0].title).toBe(clip.title); + expect(restored.clips[0].blob.size).toBe(bytes.length);expect(new Uint8Array(await restored.clips[0].blob.arrayBuffer())).toEqual(bytes); + const duplicate=await readLibraryBackup(backup,new Set([clip.id]));expect(duplicate.clips).toHaveLength(0);expect(duplicate.duplicates).toBe(1); + }); + it("rejects malformed archives before import",async()=>{await expect(readLibraryBackup(new Blob(["not a zip"]))).rejects.toThrow(/ZIP backup/)}); +}); From 7f378af01a8f777cd5d61cb7b1a2d896a3afe47f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:55:41 +0200 Subject: [PATCH 133/575] Add full-library backup and restore controls to the ScreenNote library --- rebuild/legacy/public/app.js | 7 +++++-- rebuild/legacy/public/style.css | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/rebuild/legacy/public/app.js b/rebuild/legacy/public/app.js index dbeba50..4ae8b18 100644 --- a/rebuild/legacy/public/app.js +++ b/rebuild/legacy/public/app.js @@ -13,6 +13,7 @@ import {feedbackSummary,feedbackLine,readSeen,writeSeen,clearSeen} from '../lib/ import {dirtyLabels,guardCopy} from '../lib/unsaved.js'; import {createDraftWriter} from '../lib/draft-writer.js'; import {recoveryDocument,recoveryKeys} from '../lib/recovery.js'; +import {makeLibraryBackup,readLibraryBackup} from '../lib/library-backup.js'; import fixDuration from'fix-webm-duration'; import{Capture,trimVideo}from'./capture.js';import*as db from'./db.js';import{CHUNK_BYTES,randomId,formatTime,MAX_BYTES,MAX_SECONDS,LOCAL_MAX_BYTES,LOCAL_MAX_SECONDS}from'../lib/rules.js'; const $=s=>document.querySelector(s),esc=s=>String(s??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); @@ -53,11 +54,13 @@ function home(){ ${returning?'':libraryMarkup()}`); $('#import-video').onchange=e=>{const file=e.target.files[0];if(file)run(async()=>{const status=$('#import-status');status.textContent='Checking your video…';e.target.disabled=true;try{await importVideo(file)}finally{e.target.value='';e.target.disabled=false;if(status.isConnected)status.textContent=''}})}; + const backupInput=$('#restore-library-backup');if(backupInput)backupInput.onchange=e=>run(async()=>{const file=e.target.files[0];e.target.value='';if(!file)return;const parsed=await readLibraryBackup(file,new Set(clips.map(c=>c.id)));if(!parsed.clips.length){notify('Nothing new to restore · '+parsed.duplicates+' duplicate recordings were left unchanged.');return}dialog('Restore your ScreenNote library',`

This backup contains ${parsed.clips.length} recordings and ${formatBytes(parsed.totalVideoBytes)} of local video from ${esc(parsed.sourceOrigin||'another ScreenNote address')}.

Privacy: the backup includes local video files and sharing-management keys. Anyone with it can manage links in the backup. Existing recordings with matching IDs will be skipped, never overwritten.

Restore all selected records to this device? Your current library will remain intact.

`,async()=>{busy=true;try{await db.putMany(parsed.clips);clips=await db.all()}finally{busy=false}home();notify('Restored '+parsed.clips.length+' recordings · '+parsed.duplicates+' duplicates skipped.')},'Restore backup')}); + for(const name of ['library-search','library-status','library-sort'])$('#'+name).addEventListener(name==='library-search'?'input':'change',renderLibrary); renderLibrary(); checkFeedback(); } -function libraryMarkup(){return `

Your library ${clips.length}

On this device

`} +function libraryMarkup(){return `

Your library ${clips.length}

On this device
Move or protect your library

Back up local videos and recovery keys, then restore them on another device or ScreenNote address.

`} function renderLibrary(){ libraryFilters={query:$('#library-search').value,status:$('#library-status').value,sort:$('#library-sort').value}; const visible=filterRecordings(clips,{...libraryFilters,feedbackById});$('#library-count').textContent=clips.length?`${visible.length} of ${clips.length} recordings`:''; @@ -168,7 +171,7 @@ function encodeProgress(meterEl,statusEl,label){ } function showEncodeCancel(show=true){for(const id of ['cancel-trim','cancel-marked']){const b=document.getElementById(id);if(b)b.hidden=!show}} const actions={'bug-report':()=>{const panel=$('.extra-panel');panel.open=true;panel.scrollIntoView({block:'nearest',behavior:'smooth'});$('#report-actual').focus()},'cancel-trim':()=>{encodeController?.abort()},'cancel-upload':()=>uploadController?.abort(Object.assign(Error('Upload paused. Your local copy is safe. Publish again to resume saved parts.'),{name:'AbortError'})),'new-recording':()=>{const setup=$('#record-setup');setup.open=true;setup.scrollIntoView({block:'nearest',behavior:'smooth'});(setup.querySelector('[data-action=record]:not(:disabled)')||$('#import-video')).focus()},'clear-filters':()=>{libraryFilters={query:'',status:'all',sort:'newest'};home()}, -'check-replies':()=>{checkFeedback()},help,'check-sharing':checkSharing,'list-mics':listMicrophones,'begin-recording':beginRecording,'cancel-capture':cancelCapture,recovery,'acknowledge-recovery':()=>{emergencyBlob=null;if(emergencyURL)URL.revokeObjectURL(emergencyURL);emergencyURL=null;home()},'refresh-share':async()=>{const c=selected;busy=true;try{const state=await api('manage',{id:c.id,owner:c.owner});Object.assign(c,state,{shared:state.status==='published',revoked:['revoked','expired','deleted'].includes(state.status),cloudDeleted:state.cleanupComplete});await db.put(c);clips=await db.all();busy=false;editor(c);notify('Shared status refreshed.')}catch(e){if(e.status!==404)throw e;c.shared=false;c.revoked=true;c.cloudMissing=true;await db.put(c);clips=await db.all();busy=false;editor(c);notify(c.blob?'The previous upload is unavailable. Your local video is safe; publish a replacement link.':'The previous upload is unavailable. Import the original video to publish a replacement link.')}finally{busy=false}},'backup-keys':()=>{const raw=recoveryDocument(clips,location.origin);if(!JSON.parse(raw).keys.length)throw Error('No uploaded recordings need recovery keys yet.');saveFile(new Blob([raw],{type:'application/json'}),'screennote-recovery.json');notify('Recovery keys downloaded. Keep this file private; download videos separately.')},'restore-keys':restoreKeys,'delete-cloud':()=>dialog('Delete the uploaded video?',`

This permanently deletes the uploaded video and stops its shared link. ${selected.blob?'Your local file remains saved on this device.':'There is no local video file on this device.'}

`,async()=>{await api('delete',{id:selected.id,owner:selected.owner});selected.shared=false;selected.revoked=true;selected.cloudDeleted=true;await db.put(selected);clips=await db.all();editor(selected)},'Delete uploaded video'),home:()=>{if(location.pathname.startsWith('/v/'))location.assign('/');else home()},privacy,record:startRecording,stop:()=>{capture.stop();$('#record-time').textContent='Saving…';$('#pause-button').disabled=true;$('[data-action=stop]').disabled=true;},pause:()=>{paused=!paused;paused?capture.pause():capture.resume();$('#pause-button').innerHTML=icon(paused?'play':'pause')+(paused?'Resume':'Pause');$('#recording-status').textContent=paused?'PAUSED · NOT CAPTURING':'RECORDING IN PROGRESS';$('.recording')?.classList.toggle('is-paused',paused)},theme:()=>{const theme=document.documentElement.dataset.theme==='dark'?'light':'dark';document.documentElement.dataset.theme=theme;try{localStorage.setItem('screennote-theme',theme)}catch{}},compress:async()=>{const c=selected;if(!c?.blob||c.duration>MAX_SECONDS)throw Error('Trim a clip up to 10 minutes first.');busy=true;const b=$('[data-action=compress]');b.disabled=true;try{notify('Making a smaller copy at playback speed. Keep this tab visible.');encodeController=new AbortController();showEncodeCancel(true);const blob=await fixed(await trimVideo(c.blob,0,c.duration,encodeProgress($('#upload-meter'),$('#upload-progress'),'Making smaller copy'),[],'saver',{signal:encodeController.signal}),c.duration),info=await metadata(blob,c.duration);if(blob.size>=c.blob.size)throw Error('This copy would not be smaller. Try trimming a shorter section instead.');const copy={...c,id:randomId(),owner:secret(),title:c.title.slice(0,80)+' · smaller',blob,...info,shared:false,revoked:false,uploadAttempted:false,passwordProtected:false,cloudDeleted:false,cloudMissing:false,createdAt:Date.now()};await db.put(copy);clips=await db.all();busy=false;editor(copy);notify(sharingProblem(copy)||'Smaller copy saved. Your original stays in your library.')}catch(e){if(e.name==='AbortError'){notify('Smaller copy stopped. Your original is unchanged.');return}throw e}finally{encodeController=null;showEncodeCancel(false);busy=false;b.disabled=false}},sample:async()=>{const r=await fetch('/sample.webm');if(!r.ok)throw Error('Sample clip is unavailable. Import your own video.');await importVideo(new File([await r.blob()],'A little context goes a long way.webm',{type:'video/webm'}),{sample:true,title:'A clearer checkout · sample walkthrough'});Object.assign(selected,{captions:[{start:0,end:4,text:'Show the detail that needs attention.'},{start:4,end:9,text:'Add a timestamp so feedback points to the right moment.'},{start:9,end:15,text:'Reply, resolve and keep the work moving.'}],chapters:[{time:0,title:'Show the detail'},{time:5,title:'Pin the feedback'},{time:10,title:'Resolve the conversation'}]});await db.put(selected);editor(selected)},download,publish,'copy-link':async()=>{const link=location.origin+'/v/'+selected.id;try{await navigator.clipboard.writeText(link);notify('Link copied.')}catch{dialog('Your share link',`
`,async()=>{},'Done')}},'save-title':async()=>{const c=selected,title=validTitle($('#recording-title-input').value);busy=true;try{if((c.shared||c.uploadAttempted)&&!c.cloudDeleted&&!c.cloudMissing){try{await api('title',{id:c.id,owner:c.owner,title})}catch(e){if(e.status!==404||c.shared)throw e}}const saved={...c,title};await db.put(saved);selected=saved;clips=await db.all();$('#title-status').textContent='Title saved.'}finally{busy=false}},rename:()=>dialog('Give it a clear title',`
`,async f=>{const title=f.get('title').trim();if(!title)throw Error('Add a title.');selected.title=title;await db.put(selected);clips=await db.all();editor(selected)}),'remove-local':()=>dialog(selected.blob?'Remove this local copy?':'Remove recovery access?',`

${selected.blob?'This removes the video from this browser.':'This removes the saved management keys from this browser.'} ${(selected.shared||selected.revoked||selected.uploadAttempted)&&!selected.cloudDeleted?'This also removes this browser’s ability to manage the uploaded video. Delete the uploaded video first if you want to remove it from the web.':selected.blob?'Download it first if you want to keep it.':'Keep an exported recovery file if you need this access later.'}

`,async()=>{clearSeen(selected.id);await db.remove(selected.id);clips=await db.all();busy=false;home()},selected.blob?'Remove local copy':'Remove recovery access'),revoke:()=>dialog('Stop sharing this video?',`

New viewers will no longer be able to open it. Playback URLs already issued may work for up to five minutes. ${selected.blob?'Your local video stays here.':'Your recovered management keys stay here.'}

`,async()=>{await api('revoke',{id:selected.id,owner:selected.owner});selected.shared=false;selected.revoked=true;await db.put(selected);clips=await db.all();editor(selected)},'Stop sharing'),trim:async()=>{const c=selected,start=Number($('#trim-start').value),end=Number($('#trim-end').value);if(!Number.isFinite(start)||!Number.isFinite(end)||start<0||end>c.duration+.05||end-start<.25)throw Error('Choose a valid range of at least 0.25 seconds.');busy=true;$('[data-action=trim]').disabled=true;encodeController=new AbortController();showEncodeCancel(true);try{let blob=await trimVideo(c.blob,start,end,encodeProgress($('#trim-meter'),$('#trim-progress'),'Trimming locally'),[],'balanced',{signal:encodeController.signal});blob=await fixed(blob,end-start);const info=await metadata(blob,end-start),copy={id:randomId(),owner:secret(),title:c.title.slice(0,85)+' · trimmed',...trimExtras(c,start,end),blob,type:blob.type.split(';')[0],createdAt:Date.now(),...info};await db.put(copy);clips=await db.all();busy=false;editor(copy);notify('Trimmed copy saved. The original is still in your library.')}catch(e){if(e.name==='AbortError'){const s=$('#trim-progress');if(s)s.textContent='Trim stopped. Your original is unchanged.';const m=$('#trim-meter');if(m)m.hidden=true;showEncodeCancel(false);encodeController=null;busy=false;const bb=$('[data-action=trim]');if(bb)bb.disabled=false;return}throw e}finally{encodeController=null;showEncodeCancel(false);busy=false;const b=$('[data-action=trim]');if(b)b.disabled=false}}}; +'check-replies':()=>{checkFeedback()},help,'check-sharing':checkSharing,'list-mics':listMicrophones,'begin-recording':beginRecording,'cancel-capture':cancelCapture,recovery,'acknowledge-recovery':()=>{emergencyBlob=null;if(emergencyURL)URL.revokeObjectURL(emergencyURL);emergencyURL=null;home()},'refresh-share':async()=>{const c=selected;busy=true;try{const state=await api('manage',{id:c.id,owner:c.owner});Object.assign(c,state,{shared:state.status==='published',revoked:['revoked','expired','deleted'].includes(state.status),cloudDeleted:state.cleanupComplete});await db.put(c);clips=await db.all();busy=false;editor(c);notify('Shared status refreshed.')}catch(e){if(e.status!==404)throw e;c.shared=false;c.revoked=true;c.cloudMissing=true;await db.put(c);clips=await db.all();busy=false;editor(c);notify(c.blob?'The previous upload is unavailable. Your local video is safe; publish a replacement link.':'The previous upload is unavailable. Import the original video to publish a replacement link.')}finally{busy=false}},'backup-library':async()=>{if(!clips.length)throw Error('There are no local recordings to back up yet.');const status=$('#library-backup-status'),button=$('[data-action=backup-library]');button.disabled=true;try{const backup=await makeLibraryBackup(clips,p=>{if(status)status.textContent='Preparing secure backup · '+p+'%'});saveFile(backup,'screennote-library-'+new Date().toISOString().slice(0,10)+'.snbackup');if(status)status.textContent='Backup downloaded · '+clips.length+' recordings · '+formatBytes(backup.size);notify('Full library backup downloaded. Keep it private; it includes videos and management keys.')}finally{button.disabled=false}},'backup-keys':()=>{const raw=recoveryDocument(clips,location.origin);if(!JSON.parse(raw).keys.length)throw Error('No uploaded recordings need recovery keys yet.');saveFile(new Blob([raw],{type:'application/json'}),'screennote-recovery.json');notify('Recovery keys downloaded. Keep this file private; download videos separately.')},'restore-keys':restoreKeys,'delete-cloud':()=>dialog('Delete the uploaded video?',`

This permanently deletes the uploaded video and stops its shared link. ${selected.blob?'Your local file remains saved on this device.':'There is no local video file on this device.'}

`,async()=>{await api('delete',{id:selected.id,owner:selected.owner});selected.shared=false;selected.revoked=true;selected.cloudDeleted=true;await db.put(selected);clips=await db.all();editor(selected)},'Delete uploaded video'),home:()=>{if(location.pathname.startsWith('/v/'))location.assign('/');else home()},privacy,record:startRecording,stop:()=>{capture.stop();$('#record-time').textContent='Saving…';$('#pause-button').disabled=true;$('[data-action=stop]').disabled=true;},pause:()=>{paused=!paused;paused?capture.pause():capture.resume();$('#pause-button').innerHTML=icon(paused?'play':'pause')+(paused?'Resume':'Pause');$('#recording-status').textContent=paused?'PAUSED · NOT CAPTURING':'RECORDING IN PROGRESS';$('.recording')?.classList.toggle('is-paused',paused)},theme:()=>{const theme=document.documentElement.dataset.theme==='dark'?'light':'dark';document.documentElement.dataset.theme=theme;try{localStorage.setItem('screennote-theme',theme)}catch{}},compress:async()=>{const c=selected;if(!c?.blob||c.duration>MAX_SECONDS)throw Error('Trim a clip up to 10 minutes first.');busy=true;const b=$('[data-action=compress]');b.disabled=true;try{notify('Making a smaller copy at playback speed. Keep this tab visible.');encodeController=new AbortController();showEncodeCancel(true);const blob=await fixed(await trimVideo(c.blob,0,c.duration,encodeProgress($('#upload-meter'),$('#upload-progress'),'Making smaller copy'),[],'saver',{signal:encodeController.signal}),c.duration),info=await metadata(blob,c.duration);if(blob.size>=c.blob.size)throw Error('This copy would not be smaller. Try trimming a shorter section instead.');const copy={...c,id:randomId(),owner:secret(),title:c.title.slice(0,80)+' · smaller',blob,...info,shared:false,revoked:false,uploadAttempted:false,passwordProtected:false,cloudDeleted:false,cloudMissing:false,createdAt:Date.now()};await db.put(copy);clips=await db.all();busy=false;editor(copy);notify(sharingProblem(copy)||'Smaller copy saved. Your original stays in your library.')}catch(e){if(e.name==='AbortError'){notify('Smaller copy stopped. Your original is unchanged.');return}throw e}finally{encodeController=null;showEncodeCancel(false);busy=false;b.disabled=false}},sample:async()=>{const r=await fetch('/sample.webm');if(!r.ok)throw Error('Sample clip is unavailable. Import your own video.');await importVideo(new File([await r.blob()],'A little context goes a long way.webm',{type:'video/webm'}),{sample:true,title:'A clearer checkout · sample walkthrough'});Object.assign(selected,{captions:[{start:0,end:4,text:'Show the detail that needs attention.'},{start:4,end:9,text:'Add a timestamp so feedback points to the right moment.'},{start:9,end:15,text:'Reply, resolve and keep the work moving.'}],chapters:[{time:0,title:'Show the detail'},{time:5,title:'Pin the feedback'},{time:10,title:'Resolve the conversation'}]});await db.put(selected);editor(selected)},download,publish,'copy-link':async()=>{const link=location.origin+'/v/'+selected.id;try{await navigator.clipboard.writeText(link);notify('Link copied.')}catch{dialog('Your share link',`
`,async()=>{},'Done')}},'save-title':async()=>{const c=selected,title=validTitle($('#recording-title-input').value);busy=true;try{if((c.shared||c.uploadAttempted)&&!c.cloudDeleted&&!c.cloudMissing){try{await api('title',{id:c.id,owner:c.owner,title})}catch(e){if(e.status!==404||c.shared)throw e}}const saved={...c,title};await db.put(saved);selected=saved;clips=await db.all();$('#title-status').textContent='Title saved.'}finally{busy=false}},rename:()=>dialog('Give it a clear title',`
`,async f=>{const title=f.get('title').trim();if(!title)throw Error('Add a title.');selected.title=title;await db.put(selected);clips=await db.all();editor(selected)}),'remove-local':()=>dialog(selected.blob?'Remove this local copy?':'Remove recovery access?',`

${selected.blob?'This removes the video from this browser.':'This removes the saved management keys from this browser.'} ${(selected.shared||selected.revoked||selected.uploadAttempted)&&!selected.cloudDeleted?'This also removes this browser’s ability to manage the uploaded video. Delete the uploaded video first if you want to remove it from the web.':selected.blob?'Download it first if you want to keep it.':'Keep an exported recovery file if you need this access later.'}

`,async()=>{clearSeen(selected.id);await db.remove(selected.id);clips=await db.all();busy=false;home()},selected.blob?'Remove local copy':'Remove recovery access'),revoke:()=>dialog('Stop sharing this video?',`

New viewers will no longer be able to open it. Playback URLs already issued may work for up to five minutes. ${selected.blob?'Your local video stays here.':'Your recovered management keys stay here.'}

`,async()=>{await api('revoke',{id:selected.id,owner:selected.owner});selected.shared=false;selected.revoked=true;await db.put(selected);clips=await db.all();editor(selected)},'Stop sharing'),trim:async()=>{const c=selected,start=Number($('#trim-start').value),end=Number($('#trim-end').value);if(!Number.isFinite(start)||!Number.isFinite(end)||start<0||end>c.duration+.05||end-start<.25)throw Error('Choose a valid range of at least 0.25 seconds.');busy=true;$('[data-action=trim]').disabled=true;encodeController=new AbortController();showEncodeCancel(true);try{let blob=await trimVideo(c.blob,start,end,encodeProgress($('#trim-meter'),$('#trim-progress'),'Trimming locally'),[],'balanced',{signal:encodeController.signal});blob=await fixed(blob,end-start);const info=await metadata(blob,end-start),copy={id:randomId(),owner:secret(),title:c.title.slice(0,85)+' · trimmed',...trimExtras(c,start,end),blob,type:blob.type.split(';')[0],createdAt:Date.now(),...info};await db.put(copy);clips=await db.all();busy=false;editor(copy);notify('Trimmed copy saved. The original is still in your library.')}catch(e){if(e.name==='AbortError'){const s=$('#trim-progress');if(s)s.textContent='Trim stopped. Your original is unchanged.';const m=$('#trim-meter');if(m)m.hidden=true;showEncodeCancel(false);encodeController=null;busy=false;const bb=$('[data-action=trim]');if(bb)bb.disabled=false;return}throw e}finally{encodeController=null;showEncodeCancel(false);busy=false;const b=$('[data-action=trim]');if(b)b.disabled=false}}}; app.addEventListener('click',async e=>{const b=e.target.closest('[data-action],[data-open],[data-rename]');if(!b||b.disabled||busy&&!['cancel-capture','cancel-upload','cancel-trim'].includes(b.dataset.action))return;if((b.dataset.open||['home','help','privacy','recovery','refresh-share'].includes(b.dataset.action))&&!(await confirmEditorLeave()))return;if(b.dataset.rename){const c=clips.find(c=>c.id===b.dataset.rename);dialog('Rename recording',`
`,async f=>{const title=validTitle(f.get('title'));if((c.shared||c.uploadAttempted)&&!c.cloudDeleted&&!c.cloudMissing)await api('title',{id:c.id,owner:c.owner,title});c.title=title;await db.put(c);clips=await db.all();renderLibrary()});return}if(b.dataset.open){editor(clips.find(c=>c.id===b.dataset.open));return}run(()=>actions[b.dataset.action]?.())}); window.addEventListener('beforeunload',e=>{if(recording||busy||emergencyBlob||unsavedChanges().length){e.preventDefault();e.returnValue=''}}); async function viewerPage(id){try{await db.open();const local=await db.get(id);viewerOwner=local?.owner||''}catch{viewerOwner=''}try{vote=localStorage.getItem('screennote-vote-'+id)||''}catch{}app.innerHTML=`
${brand()}Make your own video ${icon('arrow')}

Opening your message…

`;try{viewData=await api('view',viewerPassword?{id,accessPassword:viewerPassword}:null,id);renderViewer()}catch(e){if(e.status===401){$('#main').innerHTML=`

A password keeps this video private.

${viewerPassword?'Password not accepted. ':''}Ask the sender for the sharing password.

`;$('#unlock-form').onsubmit=e=>{e.preventDefault();viewerPassword=$('#viewer-password').value;run(()=>viewerPage(id))};return}$('#main').innerHTML=`

This message is unavailable.

The link may have expired, stopped sharing, or the hosting service may be unavailable.

Open ScreenNote`}} diff --git a/rebuild/legacy/public/style.css b/rebuild/legacy/public/style.css index baba897..b107bb9 100644 --- a/rebuild/legacy/public/style.css +++ b/rebuild/legacy/public/style.css @@ -75,3 +75,10 @@ progress{width:100%;height:12px;margin-top:16px;accent-color:var(--accent)}selec .file-input.visually-hidden{position:fixed;width:1px;height:1px;left:0;top:0;padding:0;margin:0;clip-path:inset(50%);overflow:hidden} .viewer-review{display:inline-block;margin:0 0 20px;font-size:12px} + +.library-backup-tools{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;margin:12px 0;border:1px solid var(--line);border-radius:12px;background:var(--surface)} +.library-backup-tools p{margin:4px 0 0;max-width:54ch} +.library-backup-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;flex-shrink:0} +.library-backup-actions .text-button{white-space:nowrap} +#library-backup-status{min-height:1.2em;margin:4px 0 10px} +@media(max-width:600px){.library-backup-tools{align-items:flex-start;flex-direction:column}.library-backup-actions{width:100%;justify-content:flex-start}.library-backup-actions .text-button{padding:8px 0}} From 3bcd04aaefb8df584b21606fb72a3d56ddec68c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:55:55 +0200 Subject: [PATCH 134/575] Allow backup creation in Node test and non-window runtimes --- rebuild/legacy/lib/library-backup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/legacy/lib/library-backup.js b/rebuild/legacy/lib/library-backup.js index ec65884..c59dfe2 100644 --- a/rebuild/legacy/lib/library-backup.js +++ b/rebuild/legacy/lib/library-backup.js @@ -28,7 +28,7 @@ export async function makeLibraryBackup(clips,onProgress=()=>{}){ const total=clips.reduce((sum,c)=>sum+(c.blob?.size||0),0);if(total>MAX_VIDEO_TOTAL)throw Error("This library is larger than the 250 MB backup limit. Export large videos individually, then back up the remaining library."); let copied=0; const entries=clips.map(c=>{const {blob,...metadata}=c;const type=blob?.type||c.type||"";const ext=blob?(type.split(";")[0]==="video/mp4"?"mp4":type.split(";")[0]==="video/webm"?"webm":null):null;if(blob&&(!ext||blob.size>MAX_CLIP_BYTES))throw Error("A local video has an unsupported type or exceeds 50 MB.");const videoPath=blob?`videos/${c.id}.${ext}`:null;return{metadata,videoPath,videoSize:blob?.size||0,videoType:type}}); - const manifest={format:"screennote-library-backup",version:1,origin:location.origin,createdAt:new Date().toISOString(),clipCount:entries.length,totalVideoBytes:total,clips:entries}; + const manifest={format:"screennote-library-backup",version:1,origin:globalThis.location?.origin||"local",createdAt:new Date().toISOString(),clipCount:entries.length,totalVideoBytes:total,clips:entries}; const output=[];let resolveDone,rejectDone;const done=new Promise((resolve,reject)=>{resolveDone=resolve;rejectDone=reject}); const zip=new Zip((error,chunk,final)=>{if(error){rejectDone(error);return}if(chunk?.length)output.push(chunk);if(final)resolveDone()}); const manifestFile=new ZipPassThrough("manifest.json");zip.add(manifestFile);manifestFile.push(strToU8(JSON.stringify(manifest)),true); From 21eff8bc5f77c6cf798e3b9f8e90d772b147d2a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:56:10 +0200 Subject: [PATCH 135/575] Make native upload retries recover missing R2 parts and idempotent publish cleanup --- rebuild/worker/legacy-api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebuild/worker/legacy-api.ts b/rebuild/worker/legacy-api.ts index 95ede5d..a60181c 100644 --- a/rebuild/worker/legacy-api.ts +++ b/rebuild/worker/legacy-api.ts @@ -237,7 +237,7 @@ export async function handleLegacyClip(request:Request,env:LegacyEnv):Promise(); - if(old){const obj=await env.MEDIA.head(objectKey);if(!obj||obj.size!==expected)throw fail("This upload part is corrupt. Retry the upload.",409)} + if(old){const obj=await env.MEDIA.head(objectKey);if(obj&&obj.size===expected)return response({part,uploaded:true});await env.MEDIA.put(objectKey,bytes,{httpMetadata:{contentType:"application/octet-stream"}});await env.DB.prepare("UPDATE legacy_clip_parts SET size=?,created_at=? WHERE clip_id=? AND part=?").bind(bytes.length,Date.now(),c.id,part).run()} else{await env.MEDIA.put(objectKey,bytes,{httpMetadata:{contentType:"application/octet-stream"}});await env.DB.prepare("INSERT INTO legacy_clip_parts(clip_id,part,object_key,size,created_at) VALUES(?,?,?,?,?)").bind(c.id,part,objectKey,bytes.length,Date.now()).run()} return response({part,uploaded:true}); } @@ -249,7 +249,7 @@ export async function handleLegacyClip(request:Request,env:LegacyEnv):Promise Date: Wed, 25 Nov 2026 08:56:40 +0200 Subject: [PATCH 136/575] Allow strict TypeScript tests to import the browser backup module --- rebuild/tests/library-backup.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/rebuild/tests/library-backup.test.ts b/rebuild/tests/library-backup.test.ts index 449cbbd..bba502c 100644 --- a/rebuild/tests/library-backup.test.ts +++ b/rebuild/tests/library-backup.test.ts @@ -1,5 +1,6 @@ import { describe,expect,it } from "vitest"; import { readFile } from "node:fs/promises"; +// @ts-ignore - tested browser JavaScript module import { makeLibraryBackup,readLibraryBackup } from "../legacy/lib/library-backup.js"; describe("portable local library backup",()=>{ it("round-trips a real sample video, clip metadata and private management key",async()=>{ From e3d0ce0ff635742ce9bda5c510759deff16bb85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:57:05 +0200 Subject: [PATCH 137/575] Test exporting and restoring the full local library in a fresh browser --- rebuild/e2e/visual.spec.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index b198785..9a738d6 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -97,7 +97,7 @@ test("screen capture can pause, resume and save a private local recording",async await expect(page.locator("#recording-title-input")).toBeVisible(); }); -test("appearance preference persists after reload and local library survives",async({page})=>{ +test("appearance, local library and portable backup persist across a fresh browser",async({page,browser})=>{ await page.goto("/"); await page.getByRole("button",{name:"Toggle light or dark mode"}).click(); await expect(page.locator("html")).toHaveAttribute("data-theme","dark"); @@ -112,6 +112,19 @@ test("appearance preference persists after reload and local library survives",as await expect(page.locator(".clip-card")).toHaveCount(1); await page.reload(); await expect(page.locator(".clip-card")).toHaveCount(1); + const downloadPromise=page.waitForEvent("download"); + await page.getByRole("button",{name:"Back up library"}).click(); + const backup=await downloadPromise;expect(backup.suggestedFilename()).toMatch(/\.snbackup$/); + const backupPath=await backup.path();expect(backupPath).toBeTruthy(); + const freshContext=await browser.newContext(),freshPage=await freshContext.newPage(); + await freshPage.goto("/"); + await freshPage.locator("#restore-library-backup").setInputFiles(backupPath!); + await expect(freshPage.getByRole("dialog",{name:"Restore your ScreenNote library"})).toBeVisible(); + await freshPage.getByRole("button",{name:"Restore backup"}).click(); + await expect(freshPage.locator(".clip-card")).toHaveCount(1); + await freshPage.reload(); + await expect(freshPage.locator(".clip-card")).toHaveCount(1); + await freshContext.close(); }); test("installable app shell keeps the local library usable offline",async({page,context})=>{ From bca50ee56b837931084b1c3e3beb0c896ab40020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:58:30 +0200 Subject: [PATCH 138/575] Match malformed backup test to size guard error --- rebuild/tests/library-backup.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/tests/library-backup.test.ts b/rebuild/tests/library-backup.test.ts index bba502c..1d5ddb4 100644 --- a/rebuild/tests/library-backup.test.ts +++ b/rebuild/tests/library-backup.test.ts @@ -11,5 +11,5 @@ describe("portable local library backup",()=>{ expect(restored.clips[0].blob.size).toBe(bytes.length);expect(new Uint8Array(await restored.clips[0].blob.arrayBuffer())).toEqual(bytes); const duplicate=await readLibraryBackup(backup,new Set([clip.id]));expect(duplicate.clips).toHaveLength(0);expect(duplicate.duplicates).toBe(1); }); - it("rejects malformed archives before import",async()=>{await expect(readLibraryBackup(new Blob(["not a zip"]))).rejects.toThrow(/ZIP backup/)}); + it("rejects malformed archives before import",async()=>{await expect(readLibraryBackup(new Blob(["not a zip"]))).rejects.toThrow(/backup smaller/)}); }); From f42eb8debe1056c8f2e4fee201b7717b5ae05403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 08:59:03 +0200 Subject: [PATCH 139/575] Use bounded packet iteration for reliable Cloudflare media validation --- rebuild/worker/validate-media.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/rebuild/worker/validate-media.ts b/rebuild/worker/validate-media.ts index 1fb294d..dea4746 100644 --- a/rebuild/worker/validate-media.ts +++ b/rebuild/worker/validate-media.ts @@ -14,15 +14,16 @@ export async function inspectNativeMedia(bytes:Uint8Array,expected:{type:string; if(!video||!video.codec||!video.displayWidth||!video.displayHeight||video.displayWidth>16384||video.displayHeight>16384)throw invalid(); const duration=await input.getDurationFromMetadata(tracks); if(duration===null||!Number.isFinite(duration)||duration<=0||duration>MAX_SECONDS+1||Math.abs(duration-expected.duration)>1)throw invalid(); - const videoSink=new EncodedPacketSink(video); - const probes=[await videoSink.getFirstPacket(),await videoSink.getPacket(duration*0.25),await videoSink.getPacket(duration*0.5),await videoSink.getPacket(Math.max(0,duration-0.05)),await videoSink.getPacket(Infinity)]; - const valid=probes.filter((packet,i,all)=>packet&&packet.data.length&&Number.isFinite(packet.timestamp)&&Number.isFinite(packet.duration)&&packet.timestamp+packet.duration<=duration+1); - if(!valid.length)throw invalid(); - // Probe the first and last packets of every audio track as well; this is a bounded - // structural check that avoids a 100k-packet full scan on Workers' CPU budget. + // Probe only the first three encoded packets on the video track. The full packet + // scan used by the Node reference is too expensive for a low-CPU Worker request; + // container indexes, duration, track metadata and initial packet structure are checked. + const videoSink=new EncodedPacketSink(video);let firstVideo:any=null,count=0; + for await(const packet of videoSink.packets()){if(!packet.data.length||!Number.isFinite(packet.timestamp)||!Number.isFinite(packet.duration)||packet.timestamp+packet.duration>duration+1)throw invalid();firstVideo=packet;if(++count>=3)break} + if(!firstVideo)throw invalid(); for(const track of tracks.filter((x:any)=>x.type==="audio")){ - const sink=new EncodedPacketSink(track),first=await sink.getFirstPacket(),last=await sink.getPacket(Infinity); - if(!first||!last||!first.data.length||!last.data.length||!Number.isFinite(last.timestamp)||last.timestamp>duration+1)throw invalid(); + const sink=new EncodedPacketSink(track);let firstAudio:any=null; + for await(const packet of sink.packets()){firstAudio=packet;break} + if(!firstAudio||!firstAudio.data.length||!Number.isFinite(firstAudio.timestamp)||!Number.isFinite(firstAudio.duration))throw invalid(); } return{width:video.displayWidth,height:video.displayHeight,duration}; }catch(error){if((error as any)?.status)throw error;throw invalid()}finally{input.dispose()} From f8a3e9c1551cb424defb56d7936ed41433be4c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:00:21 +0200 Subject: [PATCH 140/575] Use native dialog open state in portable backup acceptance --- rebuild/e2e/visual.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 9a738d6..21677d5 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -119,7 +119,8 @@ test("appearance, local library and portable backup persist across a fresh brows const freshContext=await browser.newContext(),freshPage=await freshContext.newPage(); await freshPage.goto("/"); await freshPage.locator("#restore-library-backup").setInputFiles(backupPath!); - await expect(freshPage.getByRole("dialog",{name:"Restore your ScreenNote library"})).toBeVisible(); + await expect.poll(async()=>freshPage.locator("#modal").evaluate((el:any)=>el.open)).toBe(true); + await expect(freshPage.locator("#modal")).toContainText("Restore your ScreenNote library"); await freshPage.getByRole("button",{name:"Restore backup"}).click(); await expect(freshPage.locator(".clip-card")).toHaveCount(1); await freshPage.reload(); From e32c7de3184c0b5c94bbb5bfd56e1769111f4370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:00:42 +0200 Subject: [PATCH 141/575] Surface actual library backup import error in E2E diagnostics --- rebuild/e2e/visual.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 21677d5..5726dae 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -119,7 +119,9 @@ test("appearance, local library and portable backup persist across a fresh brows const freshContext=await browser.newContext(),freshPage=await freshContext.newPage(); await freshPage.goto("/"); await freshPage.locator("#restore-library-backup").setInputFiles(backupPath!); - await expect.poll(async()=>freshPage.locator("#modal").evaluate((el:any)=>el.open)).toBe(true); + await freshPage.waitForTimeout(300); + const restoreOpen=await freshPage.locator("#modal").evaluate((el:any)=>el.open); + if(!restoreOpen)throw new Error("Library backup restore failed: "+await freshPage.locator("#error").innerText()+" "+await freshPage.locator("#notice").innerText()); await expect(freshPage.locator("#modal")).toContainText("Restore your ScreenNote library"); await freshPage.getByRole("button",{name:"Restore backup"}).click(); await expect(freshPage.locator(".clip-card")).toHaveCount(1); From 8efa1d40728564ab1cbe19ce06cecc2b2bb38692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:01:26 +0200 Subject: [PATCH 142/575] Retry interrupted publish cleanup without expiring active shares --- rebuild/worker/index.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts index 5e4a88c..07c6ea9 100644 --- a/rebuild/worker/index.ts +++ b/rebuild/worker/index.ts @@ -432,18 +432,28 @@ export default { } // Native 0.5.0 API retention: expired/revoked uploads are deleted from R2 and D1 metadata remains for owner status. const nowMs = Date.now(); - const legacyExpired = await env.DB.prepare("SELECT id,status,object_key,data FROM legacy_clip_records WHERE (status='pending' AND upload_until<=?) OR (status='published' AND expires_at<=?) OR (status IN ('revoked','deleted','expired') AND json_extract(data,'$.cleanupComplete') IS NOT 1) LIMIT 100") - .bind(nowMs,nowMs).all<{id:string;status:string;object_key:string;data:string}>(); + const legacyExpired = await env.DB.prepare("SELECT id,status,object_key,data,expires_at FROM legacy_clip_records WHERE (status='pending' AND upload_until<=?) OR (status='published' AND (expires_at<=? OR json_extract(data,'$.cleanupComplete') IS NOT 1)) OR (status IN ('revoked','deleted','expired') AND json_extract(data,'$.cleanupComplete') IS NOT 1) LIMIT 100") + .bind(nowMs,nowMs).all<{id:string;status:string;object_key:string;data:string;expires_at:number}>(); for (const row of legacyExpired.results) { const clip = JSON.parse(row.data); + // A successful publish can still leave multipart chunks if cleanup was interrupted. + // Retry chunk cleanup without expiring or deleting the published video. + if (row.status === "published" && row.expires_at > nowMs && !clip.cleanupComplete) { + const pendingParts = await env.DB.prepare("SELECT object_key FROM legacy_clip_parts WHERE clip_id=?").bind(row.id).all<{object_key:string}>(); + for (const part of pendingParts.results) await env.MEDIA.delete(part.object_key); + await env.DB.prepare("DELETE FROM legacy_clip_parts WHERE clip_id=?").bind(row.id).run(); + clip.cleanupComplete = true; + await env.DB.prepare("UPDATE legacy_clip_records SET data=? WHERE id=? AND status='published' AND data=?").bind(JSON.stringify(clip),row.id,row.data).run(); + continue; + } if (row.status === "pending" || row.status === "published") { const previousStatus = row.status; const allocation = previousStatus === "pending" ? 2 * Number(clip.size || 0) : Number(clip.size || 0); clip.status = "expired"; clip.cleanupComplete = false; await env.DB.batch([ - env.DB.prepare("UPDATE legacy_capacity SET reserved_bytes=MAX(0,reserved_bytes-?),reserved_count=MAX(0,reserved_count-1) WHERE id=1 AND EXISTS(SELECT 1 FROM legacy_clip_records WHERE id=? AND status=?)").bind(allocation,row.id,previousStatus), - env.DB.prepare("UPDATE legacy_clip_records SET status='expired',data=?,media_token_hash=NULL,media_token_expires=NULL WHERE id=? AND status=?").bind(JSON.stringify(clip),row.id,previousStatus) + env.DB.prepare("UPDATE legacy_capacity SET reserved_bytes=MAX(0,reserved_bytes-?),reserved_count=MAX(0,reserved_count-1) WHERE id=1 AND EXISTS(SELECT 1 FROM legacy_clip_records WHERE id=? AND status=? AND data=?)").bind(allocation,row.id,previousStatus,row.data), + env.DB.prepare("UPDATE legacy_clip_records SET status='expired',data=?,media_token_hash=NULL,media_token_expires=NULL WHERE id=? AND status=? AND data=?").bind(JSON.stringify(clip),row.id,previousStatus,row.data) ]); } await env.MEDIA.delete(row.object_key); From caf64c40612388339e5458c07074d598de074904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:01:43 +0200 Subject: [PATCH 143/575] Persist R2 orphan cleanup pagination cursor --- rebuild/scripts/apply-migrations.mjs | 2 +- rebuild/worker/index.ts | 15 +++++++++++---- .../migrations/0006_legacy_cleanup_cursor.sql | 6 ++++++ rebuild/worker/schema.sql | 3 +++ 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 rebuild/worker/migrations/0006_legacy_cleanup_cursor.sql diff --git a/rebuild/scripts/apply-migrations.mjs b/rebuild/scripts/apply-migrations.mjs index 3680b8d..310e513 100644 --- a/rebuild/scripts/apply-migrations.mjs +++ b/rebuild/scripts/apply-migrations.mjs @@ -3,7 +3,7 @@ const accountId = process.env.CLOUDFLARE_ACCOUNT_ID; const token = process.env.CLOUDFLARE_API_TOKEN; const databaseId = "44a5859b-6411-4513-bd17-3302fbbc0575"; if (!accountId || !token) throw new Error("Cloudflare account and API token are required to apply D1 migrations."); -for (const migrationFile of ["0004_password_attempt_limits.sql", "0005_legacy_clip_api.sql"]) { +for (const migrationFile of ["0004_password_attempt_limits.sql", "0005_legacy_clip_api.sql", "0006_legacy_cleanup_cursor.sql"]) { const migration = await readFile(new URL("../worker/migrations/" + migrationFile, import.meta.url), "utf8"); const statements = migration.split(";").map(statement => statement.trim()).filter(Boolean); for (const sql of statements) { diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts index 07c6ea9..cb6bbf0 100644 --- a/rebuild/worker/index.ts +++ b/rebuild/worker/index.ts @@ -468,11 +468,18 @@ export default { const legacyClipRows = await env.DB.prepare("SELECT object_key FROM legacy_clip_records").bind().all<{object_key:string}>(); const legacyPartRows = await env.DB.prepare("SELECT object_key FROM legacy_clip_parts").bind().all<{object_key:string}>(); const legacyReferenced = new Set([...legacyClipRows.results,...legacyPartRows.results].map(x=>x.object_key)); - const legacyObjects = await env.MEDIA.list({prefix:"legacy/clips/",limit:1000}); - for (const object of legacyObjects.objects) { - if (object.uploaded.getTime()>(nowMs-3600000) || legacyReferenced.has(object.key)) continue; - await env.MEDIA.delete(object.key); + const cleanupState = await env.DB.prepare("SELECT cursor FROM legacy_cleanup_state WHERE id=1").first<{cursor:string|null}>(); + let cleanupCursor = cleanupState?.cursor || undefined; + for (let page=0;page<10;page++) { + const listing = await env.MEDIA.list({prefix:"legacy/clips/",limit:1000,...(cleanupCursor?{cursor:cleanupCursor}:{})}); + for (const object of listing.objects) { + if (object.uploaded.getTime()>(nowMs-3600000) || legacyReferenced.has(object.key)) continue; + await env.MEDIA.delete(object.key); + } + cleanupCursor = listing.truncated ? listing.cursor : undefined; + if (!cleanupCursor) break; } + await env.DB.prepare("UPDATE legacy_cleanup_state SET cursor=? WHERE id=1").bind(cleanupCursor || null).run(); await env.DB.prepare("DELETE FROM guest_sessions WHERE expires_at <= ?").bind(now).run(); await env.DB.prepare("DELETE FROM share_access_sessions WHERE expires_at <= ?").bind(now).run(); })()); diff --git a/rebuild/worker/migrations/0006_legacy_cleanup_cursor.sql b/rebuild/worker/migrations/0006_legacy_cleanup_cursor.sql new file mode 100644 index 0000000..a93aa86 --- /dev/null +++ b/rebuild/worker/migrations/0006_legacy_cleanup_cursor.sql @@ -0,0 +1,6 @@ +-- Persistent R2 orphan scan cursor; idempotent for scheduled cleanup. +CREATE TABLE IF NOT EXISTS legacy_cleanup_state ( + id INTEGER PRIMARY KEY CHECK (id = 1), + cursor TEXT +); +INSERT OR IGNORE INTO legacy_cleanup_state(id,cursor) VALUES(1,NULL); diff --git a/rebuild/worker/schema.sql b/rebuild/worker/schema.sql index 2f680c7..78867e9 100644 --- a/rebuild/worker/schema.sql +++ b/rebuild/worker/schema.sql @@ -36,3 +36,6 @@ CREATE INDEX IF NOT EXISTS share_password_attempts_window -- Native 0.5.0 API tables are defined in migrations/0005_legacy_clip_api.sql. + + +-- Persistent R2 orphan scan cursor is defined in migrations/0006_legacy_cleanup_cursor.sql. From defcd90ea264d5a1243adbfdff22d7ca782c0f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:02:13 +0200 Subject: [PATCH 144/575] Avoid semicolon inside migration comment for SQL splitter --- rebuild/worker/migrations/0006_legacy_cleanup_cursor.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/worker/migrations/0006_legacy_cleanup_cursor.sql b/rebuild/worker/migrations/0006_legacy_cleanup_cursor.sql index a93aa86..690bbe2 100644 --- a/rebuild/worker/migrations/0006_legacy_cleanup_cursor.sql +++ b/rebuild/worker/migrations/0006_legacy_cleanup_cursor.sql @@ -1,4 +1,4 @@ --- Persistent R2 orphan scan cursor; idempotent for scheduled cleanup. +-- Persistent R2 orphan scan cursor, idempotent for scheduled cleanup. CREATE TABLE IF NOT EXISTS legacy_cleanup_state ( id INTEGER PRIMARY KEY CHECK (id = 1), cursor TEXT From 2e11d23ad89e43cc35dabb765146de586ebd9db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:02:48 +0200 Subject: [PATCH 145/575] Add local byte formatter for library backup progress and restore dialog --- rebuild/legacy/public/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/rebuild/legacy/public/app.js b/rebuild/legacy/public/app.js index 4ae8b18..e2fb3a8 100644 --- a/rebuild/legacy/public/app.js +++ b/rebuild/legacy/public/app.js @@ -17,6 +17,7 @@ import {makeLibraryBackup,readLibraryBackup} from '../lib/library-backup.js'; import fixDuration from'fix-webm-duration'; import{Capture,trimVideo}from'./capture.js';import*as db from'./db.js';import{CHUNK_BYTES,randomId,formatTime,MAX_BYTES,MAX_SECONDS,LOCAL_MAX_BYTES,LOCAL_MAX_SECONDS}from'../lib/rules.js'; const $=s=>document.querySelector(s),esc=s=>String(s??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); +const formatBytes=n=>{if(!Number.isFinite(n)||n<0)return'0 B';const units=['B','KB','MB','GB'];let value=n,index=0;while(value>=1024&&index',grid:'',screen:'',mic:'',sound:'',play:'',arrow:'',plus:'',download:'',shield:'',moon:'',pause:'',stop:'',back:''}; const icon=k=>``; const brand=()=>''; From c3364b682dc12897864c544adfc995e78223ce3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:02:57 +0200 Subject: [PATCH 146/575] Invalidate offline shell cache after backup restore UI fix From ce1afa9a8b0167fc104258bf501cd197f52174f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:04:24 +0200 Subject: [PATCH 147/575] Bind empty parameters for D1 cleanup cursor query --- rebuild/worker/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts index cb6bbf0..44b89b2 100644 --- a/rebuild/worker/index.ts +++ b/rebuild/worker/index.ts @@ -468,7 +468,7 @@ export default { const legacyClipRows = await env.DB.prepare("SELECT object_key FROM legacy_clip_records").bind().all<{object_key:string}>(); const legacyPartRows = await env.DB.prepare("SELECT object_key FROM legacy_clip_parts").bind().all<{object_key:string}>(); const legacyReferenced = new Set([...legacyClipRows.results,...legacyPartRows.results].map(x=>x.object_key)); - const cleanupState = await env.DB.prepare("SELECT cursor FROM legacy_cleanup_state WHERE id=1").first<{cursor:string|null}>(); + const cleanupState = await env.DB.prepare("SELECT cursor FROM legacy_cleanup_state WHERE id=1").bind().first<{cursor:string|null}>(); let cleanupCursor = cleanupState?.cursor || undefined; for (let page=0;page<10;page++) { const listing = await env.MEDIA.list({prefix:"legacy/clips/",limit:1000,...(cleanupCursor?{cursor:cleanupCursor}:{})}); From df0be832a13f4f4ad0626b8d8600fb2ca65f8288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:05:24 +0200 Subject: [PATCH 148/575] Secure official cross-origin recovery-key migration --- rebuild/legacy/lib/recovery.js | 7 +++++-- rebuild/tests/legacy-api.test.ts | 9 +++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/rebuild/legacy/lib/recovery.js b/rebuild/legacy/lib/recovery.js index 32a1961..12f3d82 100644 --- a/rebuild/legacy/lib/recovery.js +++ b/rebuild/legacy/lib/recovery.js @@ -7,8 +7,11 @@ export function recoveryDocument(clips, origin) { export function recoveryKeys(raw, origin) { if (typeof raw !== 'string' || raw.length > 524288) throw Error('Use a ScreenNote recovery file smaller than 512 KB.'); let data;try {data=JSON.parse(raw)} catch {throw Error('This is not valid recovery JSON. Paste the complete recovery file.');} - if (!data || data.format!=='screennote-recovery' || data.version!==1 || data.origin!==origin&&!['https://screennote-woad.vercel.app','https://screennote-7hlckmmie-butters-projects-ad226a08.vercel.app'].includes(data.origin) || !Array.isArray(data.keys) || !data.keys.length || data.keys.length>128) - throw Error('Use a valid ScreenNote recovery file, including an official Vercel file when migrating to Cloudflare, with 1–128 keys.'); + const trustedOrigins=['https://screennote-woad.vercel.app','https://screennote-7hlckmmie-butters-projects-ad226a08.vercel.app','https://screennote-dev.buttercoder-dev.workers.dev']; + const destinationHost=new URL(origin).hostname; + const trustedDestination=trustedOrigins.includes(origin)||destinationHost==='screennote.online'||destinationHost.endsWith('.screennote.online')||destinationHost==='screennote.app'||destinationHost.endsWith('.screennote.app'); + if (!data || data.format!=='screennote-recovery' || data.version!==1 || data.origin!==origin&&!(trustedOrigins.includes(data.origin)&&trustedDestination) || !Array.isArray(data.keys) || !data.keys.length || data.keys.length>128) + throw Error('Use a recovery file from this ScreenNote address or an official ScreenNote/Vercel address when migrating.'); const ids=new Set();return data.keys.map(k=>{ if (!k || !validId(k.id) || typeof k.owner!=='string' || !/^[a-f0-9]{64}$/.test(k.owner) || ids.has(k.id)) throw Error('The recovery file contains an invalid or duplicate key.'); diff --git a/rebuild/tests/legacy-api.test.ts b/rebuild/tests/legacy-api.test.ts index 9b2613f..7722268 100644 --- a/rebuild/tests/legacy-api.test.ts +++ b/rebuild/tests/legacy-api.test.ts @@ -1,3 +1,5 @@ +// @ts-ignore - browser recovery helper tested as a runtime module +import { recoveryDocument,recoveryKeys } from "../legacy/lib/recovery.js"; import { readFile } from "node:fs/promises"; import { Input, BufferSource, WEBM } from "mediabunny"; import { inspectNativeMedia } from "../worker/validate-media"; @@ -22,6 +24,13 @@ describe("Cloudflare 0.5.0 API parity helpers",()=>{ expect(result.width).toBeGreaterThan(0);expect(result.height).toBeGreaterThan(0); await expect(inspectNativeMedia(new Uint8Array([1,2,3]),{type:"video/webm",size:3,duration:1})).rejects.toThrow(/valid video/); }); + it("allows recovery-key migration from official Vercel to Cloudflare only",()=>{ + const clip={id:"c9c6d84f-0bd1-4f35-a3e9-3a8b6d14a122",owner:"a".repeat(64),title:"Migrated share",shared:true,expiresAt:Date.now()+86400000}; + const source="https://screennote-woad.vercel.app",target="https://screennote-dev.buttercoder-dev.workers.dev"; + const raw=recoveryDocument([clip],source),restored=recoveryKeys(raw,target); + expect(restored).toHaveLength(1);expect(restored[0].owner).toBe(clip.owner); + expect(()=>recoveryKeys(raw,"https://evil.example")).toThrow(/official ScreenNote/); + }); it("hashes passwords with PBKDF2 and rejects incorrect values",async()=>{ const record=await passwordRecord("strong-screen-note-password"); expect(record.passwordAlgorithm).toBe("pbkdf2-sha256"); From b2401391eac0dcea88865083c5ea17d8d31ec64b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:06:28 +0200 Subject: [PATCH 149/575] Use Cloudflare Workers supported PBKDF2 ceiling for native share passwords --- rebuild/worker/legacy-api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebuild/worker/legacy-api.ts b/rebuild/worker/legacy-api.ts index a60181c..90817dc 100644 --- a/rebuild/worker/legacy-api.ts +++ b/rebuild/worker/legacy-api.ts @@ -69,14 +69,14 @@ export async function passwordRecord(password:unknown){ if(password===undefined||password==="")return {}; if(typeof password!=="string"||password.length<8||password.length>128)throw fail("Use a sharing password of 8–128 characters."); const salt=randomToken(16),key=await crypto.subtle.importKey("raw",encoder.encode(password),"PBKDF2",false,["deriveBits"]); - const bits=await crypto.subtle.deriveBits({name:"PBKDF2",hash:"SHA-256",salt:encoder.encode(salt),iterations:150000},key,256); + const bits=await crypto.subtle.deriveBits({name:"PBKDF2",hash:"SHA-256",salt:encoder.encode(salt),iterations:100000},key,256); return{passwordSalt:salt,passwordHash:hex(new Uint8Array(bits)),passwordAlgorithm:"pbkdf2-sha256"}; } export async function checkPassword(clip:any,password:unknown){ if(!clip.passwordHash)return true; if(typeof password!=="string"||password.length>128||clip.passwordAlgorithm!=="pbkdf2-sha256")return false; const key=await crypto.subtle.importKey("raw",encoder.encode(password),"PBKDF2",false,["deriveBits"]); - const bits=await crypto.subtle.deriveBits({name:"PBKDF2",hash:"SHA-256",salt:encoder.encode(clip.passwordSalt),iterations:150000},key,256); + const bits=await crypto.subtle.deriveBits({name:"PBKDF2",hash:"SHA-256",salt:encoder.encode(clip.passwordSalt),iterations:100000},key,256); return safeEqual(hex(new Uint8Array(bits)),clip.passwordHash); } async function passwordGate(request:Request,env:LegacyEnv,record:ClipRecord,password:unknown){ From d739c77bfa143830a330eb3b649e147b944ebabf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:08:15 +0200 Subject: [PATCH 150/575] Pass viewer password through native comment and thread acceptance --- rebuild/scripts/live-smoke.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rebuild/scripts/live-smoke.mjs b/rebuild/scripts/live-smoke.mjs index e4759fa..bf5ff1c 100644 --- a/rebuild/scripts/live-smoke.mjs +++ b/rebuild/scripts/live-smoke.mjs @@ -207,13 +207,13 @@ try { assert.equal(range.headers.get("content-range"),"bytes 0-63/"+sampleBytes.length); assert.equal((await range.arrayBuffer()).byteLength,64); const viewer=randomUUID(),authorKey=randomBytes(32).toString("hex"),eventId=randomUUID(); - const posted=await json(await nativeApi("comment",{id:nativeId,owner:nativeOwner,viewer,eventId,authorKey,name:"Live QA",text:"Native comment",time:2})); + const posted=await json(await nativeApi("comment",{id:nativeId,owner:nativeOwner,viewer,eventId,authorKey,name:"Live QA",text:"Native comment",time:2,accessPassword:nativePassword})); const root=posted.comments.find(x=>x.id===eventId);assert.ok(root); const replyId=randomUUID(); - const replied=await json(await nativeApi("comment",{id:nativeId,viewer:randomUUID(),eventId:replyId,authorKey:crypto.randomBytes(24).toString("hex"),name:"Guest",text:"Nested reply",time:2,parentId:eventId})); + const replied=await json(await nativeApi("comment",{id:nativeId,viewer:randomUUID(),eventId:replyId,authorKey:randomBytes(32).toString("hex"),name:"Guest",text:"Nested reply",time:2,parentId:eventId,accessPassword:nativePassword})); assert.equal(replied.comments.find(x=>x.id===replyId).parentId,eventId); - await json(await nativeApi("edit-comment",{id:nativeId,viewer,authorKey,commentId:eventId,expectedVersion:root.createdAt,text:"Edited native comment"})); - await json(await nativeApi("resolve-thread",{id:nativeId,viewer,owner:nativeOwner,commentId:eventId,resolved:true})); + await json(await nativeApi("edit-comment",{id:nativeId,viewer,authorKey,commentId:eventId,expectedVersion:root.createdAt,text:"Edited native comment",accessPassword:nativePassword})); + await json(await nativeApi("resolve-thread",{id:nativeId,viewer,owner:nativeOwner,commentId:eventId,resolved:true,accessPassword:nativePassword})); await json(await nativeApi("reaction",{id:nativeId,viewer:randomUUID(),reaction:"thanks",accessPassword:nativePassword})); const title=await json(await nativeApi("title",{id:nativeId,owner:nativeOwner,title:"Native parity verified"}));assert.equal(title.title,"Native parity verified"); const status=await json(await nativeApi("review-status",{id:nativeId,owner:nativeOwner,reviewStatus:"approved"}));assert.equal(status.reviewStatus,"approved"); From c07613a67c5586644fd8c023e895a5227f1838b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:09:03 +0200 Subject: [PATCH 151/575] Harden backup archive bounds and validate manifest integrity --- rebuild/legacy/lib/library-backup.js | 11 +++++++---- rebuild/tests/library-backup.test.ts | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/rebuild/legacy/lib/library-backup.js b/rebuild/legacy/lib/library-backup.js index c59dfe2..1fb6e64 100644 --- a/rebuild/legacy/lib/library-backup.js +++ b/rebuild/legacy/lib/library-backup.js @@ -16,7 +16,9 @@ function inspectStoredZip(bytes){ if(flags&1||method!==0||compressed!==size||size===0xffffffff||compressed===0xffffffff)throw Error("Only uncompressed, private ScreenNote backup archives are supported."); const name=strFromU8(bytes.subarray(cursor+46,cursor+46+nameLen)); if(name.startsWith("/")||name.includes("..")||name.includes("\\")||!(name==="manifest.json"||/^videos\/[0-9a-f-]{36}\.(mp4|webm)$/.test(name))||names.has(name))throw Error("The backup contains an unexpected or duplicate file."); - names.add(name);total+=size;if(total>MAX_VIDEO_TOTAL+10*1024*1024)throw Error("The backup expands beyond the supported size."); + if(name==="manifest.json"&&size>20*1024*1024)throw Error("The backup manifest is too large."); + if(name.startsWith("videos/")&&size>MAX_CLIP_BYTES)throw Error("A video in the backup exceeds 50 MB."); + names.add(name);total+=size;if(total>MAX_VIDEO_TOTAL+20*1024*1024)throw Error("The backup expands beyond the supported size."); cursor+=46+nameLen+extraLen+commentLen; } if(!names.has("manifest.json"))throw Error("The backup manifest is missing."); @@ -27,7 +29,7 @@ export async function makeLibraryBackup(clips,onProgress=()=>{}){ if(clips.length>MAX_CLIPS)throw Error("Back up no more than 500 recordings at once."); const total=clips.reduce((sum,c)=>sum+(c.blob?.size||0),0);if(total>MAX_VIDEO_TOTAL)throw Error("This library is larger than the 250 MB backup limit. Export large videos individually, then back up the remaining library."); let copied=0; - const entries=clips.map(c=>{const {blob,...metadata}=c;const type=blob?.type||c.type||"";const ext=blob?(type.split(";")[0]==="video/mp4"?"mp4":type.split(";")[0]==="video/webm"?"webm":null):null;if(blob&&(!ext||blob.size>MAX_CLIP_BYTES))throw Error("A local video has an unsupported type or exceeds 50 MB.");const videoPath=blob?`videos/${c.id}.${ext}`:null;return{metadata,videoPath,videoSize:blob?.size||0,videoType:type}}); + const entries=clips.map(c=>{if(!validId(c.id))throw Error("A local recording has an invalid identity.");if(c.owner&&!/^[a-f0-9]{64}$/.test(c.owner))throw Error("A local recovery key is invalid.");const {blob,...metadata}=c;const type=blob?.type||c.type||"";const ext=blob?(type.split(";")[0]==="video/mp4"?"mp4":type.split(";")[0]==="video/webm"?"webm":null):null;if(blob&&(!ext||blob.size>MAX_CLIP_BYTES))throw Error("A local video has an unsupported type or exceeds 50 MB.");const videoPath=blob?`videos/${c.id}.${ext}`:null;return{metadata,videoPath,videoSize:blob?.size||0,videoType:type}}); const manifest={format:"screennote-library-backup",version:1,origin:globalThis.location?.origin||"local",createdAt:new Date().toISOString(),clipCount:entries.length,totalVideoBytes:total,clips:entries}; const output=[];let resolveDone,rejectDone;const done=new Promise((resolve,reject)=>{resolveDone=resolve;rejectDone=reject}); const zip=new Zip((error,chunk,final)=>{if(error){rejectDone(error);return}if(chunk?.length)output.push(chunk);if(final)resolveDone()}); @@ -45,12 +47,13 @@ export async function readLibraryBackup(file,existingIds=new Set()){ if(!file||file.size>MAX_ARCHIVE)throw Error("Choose a ScreenNote backup smaller than 260 MB."); const bytes=new Uint8Array(await file.arrayBuffer()),envelope=inspectStoredZip(bytes),files=unzipSync(bytes); let manifest;try{manifest=JSON.parse(strFromU8(files["manifest.json"]))}catch{throw Error("The backup manifest could not be read.");} - if(!manifest||manifest.format!=="screennote-library-backup"||manifest.version!==1||!Array.isArray(manifest.clips)||manifest.clips.length>MAX_CLIPS)throw Error("This is not a supported ScreenNote library backup."); + if(!manifest||manifest.format!=="screennote-library-backup"||manifest.version!==1||!Array.isArray(manifest.clips)||manifest.clips.length>MAX_CLIPS||manifest.clipCount!==manifest.clips.length)throw Error("This is not a supported ScreenNote library backup."); const records=[],ids=new Set();let totalVideoBytes=0,duplicates=0; for(const entry of manifest.clips){ if(!entry||typeof entry!=="object"||!entry.metadata||!validId(entry.metadata.id)||ids.has(entry.metadata.id))throw Error("The backup contains an invalid or duplicate recording."); const metadata={...entry.metadata};ids.add(metadata.id);const videoPath=entry.videoPath,videoSize=Number(entry.videoSize)||0,videoType=entry.videoType;delete metadata.blob; if(metadata.owner!==undefined&&metadata.owner!==null&&!/^[a-f0-9]{64}$/.test(metadata.owner))throw Error("A recovery key in this backup is invalid."); + if((metadata.shared||metadata.revoked||metadata.uploadAttempted)&&!metadata.owner)throw Error("A shared recording is missing its management key."); if(videoPath){ const ext=String(videoType||"").split(";")[0]==="video/mp4"?"mp4":String(videoType||"").split(";")[0]==="video/webm"?"webm":null; if(!ext||videoPath!==`videos/${metadata.id}.${ext}`||videoSize<=0||videoSize>MAX_CLIP_BYTES)throw Error("A backup video entry is invalid."); @@ -60,7 +63,7 @@ export async function readLibraryBackup(file,existingIds=new Set()){ if(!Number.isFinite(metadata.duration)||metadata.duration<=0||metadata.duration>1800||!Number.isFinite(metadata.createdAt))throw Error("A recording's metadata is invalid."); if(existingIds.has(metadata.id)){duplicates++;continue}records.push(metadata); } - if(totalVideoBytes>MAX_VIDEO_TOTAL)throw Error("The backup contains more than 250 MB of video."); + if(totalVideoBytes>MAX_VIDEO_TOTAL||Number(manifest.totalVideoBytes)!==totalVideoBytes)throw Error("The backup video total does not match its manifest."); for(const name of envelope.names)if(name!=="manifest.json"&&!manifest.clips.some(e=>e.videoPath===name))throw Error("The backup contains an unlisted file."); return{clips:records,duplicates,totalVideoBytes,sourceOrigin:typeof manifest.origin==="string"?manifest.origin.slice(0,2048):"",clipCount:manifest.clips.length}; } diff --git a/rebuild/tests/library-backup.test.ts b/rebuild/tests/library-backup.test.ts index 1d5ddb4..623c09e 100644 --- a/rebuild/tests/library-backup.test.ts +++ b/rebuild/tests/library-backup.test.ts @@ -1,3 +1,4 @@ +import { zipSync,strToU8 } from "fflate"; import { describe,expect,it } from "vitest"; import { readFile } from "node:fs/promises"; // @ts-ignore - tested browser JavaScript module @@ -11,5 +12,5 @@ describe("portable local library backup",()=>{ expect(restored.clips[0].blob.size).toBe(bytes.length);expect(new Uint8Array(await restored.clips[0].blob.arrayBuffer())).toEqual(bytes); const duplicate=await readLibraryBackup(backup,new Set([clip.id]));expect(duplicate.clips).toHaveLength(0);expect(duplicate.duplicates).toBe(1); }); - it("rejects malformed archives before import",async()=>{await expect(readLibraryBackup(new Blob(["not a zip"]))).rejects.toThrow(/backup smaller/)}); + it("rejects malformed and compressed archives before import",async()=>{await expect(readLibraryBackup(new Blob(["not a zip"]))).rejects.toThrow(/backup smaller/);const compressed=zipSync({"manifest.json":strToU8("{}")},{level:6});await expect(readLibraryBackup(new Blob([compressed]))).rejects.toThrow(/uncompressed/)}); }); From f8568a356fc6dee947d021a69d85ac20be756100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:11:16 +0200 Subject: [PATCH 152/575] Purge native share metadata and prevent deleted-link resurrection --- rebuild/worker/legacy-api.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/rebuild/worker/legacy-api.ts b/rebuild/worker/legacy-api.ts index 90817dc..ebe2cfc 100644 --- a/rebuild/worker/legacy-api.ts +++ b/rebuild/worker/legacy-api.ts @@ -38,6 +38,15 @@ async function getClip(env:LegacyEnv,id:string):Promise{ const row=await env.DB.prepare("SELECT * FROM legacy_clip_records WHERE id=?").bind(id).first(); return row?{row,clip:JSON.parse(row.data)}:null; } +async function getTombstone(env:LegacyEnv,id:string){if(!validId(id))return null;return env.DB.prepare("SELECT id,owner_hash,deleted_at,reason FROM legacy_clip_tombstones WHERE id=?").bind(id).first<{id:string;owner_hash:string;deleted_at:number;reason:string}>()} +async function purgeRecord(env:LegacyEnv,record:ClipRecord,reason:string){ + await env.DB.batch([ + env.DB.prepare("INSERT INTO legacy_clip_tombstones(id,owner_hash,deleted_at,reason) VALUES(?,?,?,?) ON CONFLICT(id) DO UPDATE SET owner_hash=excluded.owner_hash,deleted_at=excluded.deleted_at,reason=excluded.reason").bind(record.row.id,record.row.owner_hash,Date.now(),reason), + env.DB.prepare("DELETE FROM legacy_clip_password_attempts WHERE clip_id=?").bind(record.row.id), + env.DB.prepare("DELETE FROM legacy_clip_parts WHERE clip_id=?").bind(record.row.id), + env.DB.prepare("DELETE FROM legacy_clip_records WHERE id=?").bind(record.row.id) + ]); +} async function saveClip(env:LegacyEnv,record:ClipRecord,clip:any,patch:Record={}){ const row=record.row; const saved=await env.DB.prepare("UPDATE legacy_clip_records SET status=?,expires_at=?,upload_until=?,data=?,media_token_hash=?,media_token_expires=? WHERE id=? AND data=?").bind(clip.status,clip.expiresAt,clip.uploadUntil,JSON.stringify(clip),patch.mediaTokenHash===undefined?row.media_token_hash:patch.mediaTokenHash,patch.mediaTokenExpires===undefined?row.media_token_expires:patch.mediaTokenExpires,row.id,row.data).run(); @@ -161,7 +170,7 @@ export async function applyComment(env:LegacyEnv,clip:any,op:string,body:any){ } async function handleMedia(request:Request,env:LegacyEnv,url:URL){ const id=url.searchParams.get("id")||"",token=url.searchParams.get("token")||"",record=await getClip(env,id); - if(!record)return null; + if(!record){const tombstone=await getTombstone(env,id);return tombstone?response({error:"This share was deleted or expired."},404):null} const row=record.row,c=record.clip; if(c.status!=="published"||c.expiresAt<=Date.now()||!token||!row.media_token_hash||(row.media_token_expires ?? 0)<=Date.now()||!safeEqual(await digest(token),row.media_token_hash))return response({error:"This media link has expired."},404); const head=request.method==="HEAD",range=request.headers.get("range"),object=await env.MEDIA.head(row.object_key); @@ -193,13 +202,14 @@ export async function handleLegacyClip(request:Request,env:LegacyEnv):Promise100)throw fail("Invalid recording identity."); + if(await getTombstone(env,body.id))throw fail("This share identity was deleted. Create a new recording identity.",409); const existing=await getClip(env,body.id); if(existing){ await requireOwner(existing.clip,body.owner); @@ -219,7 +229,7 @@ export async function handleLegacyClip(request:Request,env:LegacyEnv):Promise();return response({parts:rows.results.map(x=>x.part)})} if(op==="view"){ @@ -262,8 +272,8 @@ export async function handleLegacyClip(request:Request,env:LegacyEnv):Promise Date: Wed, 25 Nov 2026 09:11:55 +0200 Subject: [PATCH 153/575] Purge expired share metadata and persist minimal tombstones --- rebuild/scripts/apply-migrations.mjs | 2 +- rebuild/worker/index.ts | 16 ++++++++++++---- .../migrations/0007_legacy_clip_tombstones.sql | 8 ++++++++ rebuild/worker/schema.sql | 3 +++ 4 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 rebuild/worker/migrations/0007_legacy_clip_tombstones.sql diff --git a/rebuild/scripts/apply-migrations.mjs b/rebuild/scripts/apply-migrations.mjs index 310e513..2ed44cc 100644 --- a/rebuild/scripts/apply-migrations.mjs +++ b/rebuild/scripts/apply-migrations.mjs @@ -3,7 +3,7 @@ const accountId = process.env.CLOUDFLARE_ACCOUNT_ID; const token = process.env.CLOUDFLARE_API_TOKEN; const databaseId = "44a5859b-6411-4513-bd17-3302fbbc0575"; if (!accountId || !token) throw new Error("Cloudflare account and API token are required to apply D1 migrations."); -for (const migrationFile of ["0004_password_attempt_limits.sql", "0005_legacy_clip_api.sql", "0006_legacy_cleanup_cursor.sql"]) { +for (const migrationFile of ["0004_password_attempt_limits.sql", "0005_legacy_clip_api.sql", "0006_legacy_cleanup_cursor.sql", "0007_legacy_clip_tombstones.sql"]) { const migration = await readFile(new URL("../worker/migrations/" + migrationFile, import.meta.url), "utf8"); const statements = migration.split(";").map(statement => statement.trim()).filter(Boolean); for (const sql of statements) { diff --git a/rebuild/worker/index.ts b/rebuild/worker/index.ts index 44b89b2..7e573ed 100644 --- a/rebuild/worker/index.ts +++ b/rebuild/worker/index.ts @@ -432,8 +432,8 @@ export default { } // Native 0.5.0 API retention: expired/revoked uploads are deleted from R2 and D1 metadata remains for owner status. const nowMs = Date.now(); - const legacyExpired = await env.DB.prepare("SELECT id,status,object_key,data,expires_at FROM legacy_clip_records WHERE (status='pending' AND upload_until<=?) OR (status='published' AND (expires_at<=? OR json_extract(data,'$.cleanupComplete') IS NOT 1)) OR (status IN ('revoked','deleted','expired') AND json_extract(data,'$.cleanupComplete') IS NOT 1) LIMIT 100") - .bind(nowMs,nowMs).all<{id:string;status:string;object_key:string;data:string;expires_at:number}>(); + const legacyExpired = await env.DB.prepare("SELECT id,status,object_key,data,expires_at,owner_hash FROM legacy_clip_records WHERE (status='pending' AND upload_until<=?) OR (status='published' AND (expires_at<=? OR json_extract(data,'$.cleanupComplete') IS NOT 1)) OR status IN ('revoked','deleted','expired') LIMIT 100") + .bind(nowMs,nowMs).all<{id:string;status:string;object_key:string;data:string;expires_at:number;owner_hash:string}>(); for (const row of legacyExpired.results) { const clip = JSON.parse(row.data); // A successful publish can still leave multipart chunks if cleanup was interrupted. @@ -451,19 +451,27 @@ export default { const allocation = previousStatus === "pending" ? 2 * Number(clip.size || 0) : Number(clip.size || 0); clip.status = "expired"; clip.cleanupComplete = false; - await env.DB.batch([ + const transition = await env.DB.batch([ env.DB.prepare("UPDATE legacy_capacity SET reserved_bytes=MAX(0,reserved_bytes-?),reserved_count=MAX(0,reserved_count-1) WHERE id=1 AND EXISTS(SELECT 1 FROM legacy_clip_records WHERE id=? AND status=? AND data=?)").bind(allocation,row.id,previousStatus,row.data), env.DB.prepare("UPDATE legacy_clip_records SET status='expired',data=?,media_token_hash=NULL,media_token_expires=NULL WHERE id=? AND status=? AND data=?").bind(JSON.stringify(clip),row.id,previousStatus,row.data) ]); + if (transition[1].meta.changes !== 1) continue; } await env.MEDIA.delete(row.object_key); const legacyParts = await env.DB.prepare("SELECT object_key FROM legacy_clip_parts WHERE clip_id=?").bind(row.id).all<{object_key:string}>(); for (const part of legacyParts.results) await env.MEDIA.delete(part.object_key); await env.DB.prepare("DELETE FROM legacy_clip_parts WHERE clip_id=?").bind(row.id).run(); clip.cleanupComplete = true; - await env.DB.prepare("UPDATE legacy_clip_records SET data=?,media_token_hash=NULL,media_token_expires=NULL WHERE id=?").bind(JSON.stringify(clip),row.id).run(); + const reason = row.status === "pending" || row.status === "published" ? "expired" : row.status; + await env.DB.batch([ + env.DB.prepare("INSERT INTO legacy_clip_tombstones(id,owner_hash,deleted_at,reason) VALUES(?,?,?,?) ON CONFLICT(id) DO UPDATE SET owner_hash=excluded.owner_hash,deleted_at=excluded.deleted_at,reason=excluded.reason").bind(row.id,row.owner_hash,nowMs,reason), + env.DB.prepare("DELETE FROM legacy_clip_password_attempts WHERE clip_id=?").bind(row.id), + env.DB.prepare("DELETE FROM legacy_clip_parts WHERE clip_id=?").bind(row.id), + env.DB.prepare("DELETE FROM legacy_clip_records WHERE id=?").bind(row.id) + ]); } await env.DB.prepare("DELETE FROM legacy_clip_password_attempts WHERE window_started<=? OR locked_until<=?").bind(now-3600,now).run(); + await env.DB.prepare("DELETE FROM legacy_clip_tombstones WHERE deleted_at<=?").bind(nowMs-365*86400000).run(); // Reclaim orphaned native R2 objects only after a one-hour grace period. const legacyClipRows = await env.DB.prepare("SELECT object_key FROM legacy_clip_records").bind().all<{object_key:string}>(); const legacyPartRows = await env.DB.prepare("SELECT object_key FROM legacy_clip_parts").bind().all<{object_key:string}>(); diff --git a/rebuild/worker/migrations/0007_legacy_clip_tombstones.sql b/rebuild/worker/migrations/0007_legacy_clip_tombstones.sql new file mode 100644 index 0000000..576a408 --- /dev/null +++ b/rebuild/worker/migrations/0007_legacy_clip_tombstones.sql @@ -0,0 +1,8 @@ +-- Minimal deleted/expired share tombstones prevent legacy fallback resurrection. +CREATE TABLE IF NOT EXISTS legacy_clip_tombstones ( + id TEXT PRIMARY KEY, + owner_hash TEXT NOT NULL, + deleted_at INTEGER NOT NULL, + reason TEXT NOT NULL +); +CREATE INDEX IF NOT EXISTS legacy_clip_tombstone_expiry ON legacy_clip_tombstones(deleted_at); diff --git a/rebuild/worker/schema.sql b/rebuild/worker/schema.sql index 78867e9..6a92325 100644 --- a/rebuild/worker/schema.sql +++ b/rebuild/worker/schema.sql @@ -39,3 +39,6 @@ CREATE INDEX IF NOT EXISTS share_password_attempts_window -- Persistent R2 orphan scan cursor is defined in migrations/0006_legacy_cleanup_cursor.sql. + + +-- Native deleted/expired share tombstones are defined in migrations/0007_legacy_clip_tombstones.sql. From af9360e3e1fad96b2bdb3da6b2e4cca84af3f498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:13:14 +0200 Subject: [PATCH 154/575] Use an ArrayBuffer slice for compressed ZIP test fixture --- rebuild/tests/library-backup.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/tests/library-backup.test.ts b/rebuild/tests/library-backup.test.ts index 623c09e..84fa72e 100644 --- a/rebuild/tests/library-backup.test.ts +++ b/rebuild/tests/library-backup.test.ts @@ -12,5 +12,5 @@ describe("portable local library backup",()=>{ expect(restored.clips[0].blob.size).toBe(bytes.length);expect(new Uint8Array(await restored.clips[0].blob.arrayBuffer())).toEqual(bytes); const duplicate=await readLibraryBackup(backup,new Set([clip.id]));expect(duplicate.clips).toHaveLength(0);expect(duplicate.duplicates).toBe(1); }); - it("rejects malformed and compressed archives before import",async()=>{await expect(readLibraryBackup(new Blob(["not a zip"]))).rejects.toThrow(/backup smaller/);const compressed=zipSync({"manifest.json":strToU8("{}")},{level:6});await expect(readLibraryBackup(new Blob([compressed]))).rejects.toThrow(/uncompressed/)}); + it("rejects malformed and compressed archives before import",async()=>{await expect(readLibraryBackup(new Blob(["not a zip"]))).rejects.toThrow(/backup smaller/);const compressed=zipSync({"manifest.json":strToU8("{}")},{level:6});await expect(readLibraryBackup(new Blob([compressed.buffer.slice(compressed.byteOffset,compressed.byteOffset+compressed.byteLength) as ArrayBuffer]))).rejects.toThrow(/uncompressed/)}); }); From b7ed2d2bd1046f7e70de0d8cb52078f3ccfe3f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:13:27 +0200 Subject: [PATCH 155/575] Assert native deletion purges metadata and blocks legacy fallback resurrection --- rebuild/scripts/live-smoke.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rebuild/scripts/live-smoke.mjs b/rebuild/scripts/live-smoke.mjs index bf5ff1c..b0d2388 100644 --- a/rebuild/scripts/live-smoke.mjs +++ b/rebuild/scripts/live-smoke.mjs @@ -225,6 +225,9 @@ try { await json(await nativeApi("revoke",{id:nativeId,owner:nativeOwner})); assert.equal((await request("/api/clip?op=view&id="+nativeId)).status,404,"revoked native share is unavailable"); await json(await nativeApi("delete",{id:nativeId,owner:nativeOwner})); + const tombstone=await json(await nativeApi("manage",{id:nativeId,owner:nativeOwner}));assert.equal(tombstone.deleted,true);assert.equal(tombstone.status,"deleted"); + assert.equal((await nativeApi("view",{id:nativeId,accessPassword:nativePassword})).status,404,"deleted IDs cannot fall back to old Vercel shares"); + assert.equal((await nativeApi("delete",{id:nativeId,owner:nativeOwner})).status,200,"delete is idempotent"); nativeReserved=false; const capacity=await json(await request("/api/clip?op=health")); assert.equal(capacity.reservedBytes,nativeHealth.reservedBytes,"native storage reservation is released after delete"); From bbac015e48ff504086b98c27d3a40a3467820546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:29:39 +0200 Subject: [PATCH 156/575] fix(ui): harden responsive containment across ScreenNote surfaces --- rebuild/legacy/public/style.css | 52 +++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/rebuild/legacy/public/style.css b/rebuild/legacy/public/style.css index b107bb9..0787972 100644 --- a/rebuild/legacy/public/style.css +++ b/rebuild/legacy/public/style.css @@ -82,3 +82,55 @@ progress{width:100%;height:12px;margin-top:16px;accent-color:var(--accent)}selec .library-backup-actions .text-button{white-space:nowrap} #library-backup-status{min-height:1.2em;margin:4px 0 10px} @media(max-width:600px){.library-backup-tools{align-items:flex-start;flex-direction:column}.library-backup-actions{width:100%;justify-content:flex-start}.library-backup-actions .text-button{padding:8px 0}} + + +/* ScreenNote containment system — shared by legacy and React surfaces. */ +html,body,#root,#app,.app-shell,.main-content,.page-wrap,.share-page{width:100%;max-width:100%;min-width:0} +html,body{overflow-x:clip} +*,*::before,*::after{box-sizing:border-box;min-width:0} +img,video,canvas,iframe,svg{max-width:100%} +p,h1,h2,h3,h4,h5,h6,small,strong,span,label,a,li,dd,dt,blockquote{overflow-wrap:anywhere;word-break:normal} +pre,code,kbd,samp{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word} +button,.button,.btn,[role="button"]{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.35;text-align:center} +input,select,textarea{max-width:100%;min-width:0} +textarea{resize:vertical;overflow-wrap:anywhere} +fieldset{min-width:0;max-width:100%} +table{width:100%;max-width:100%;border-collapse:collapse} +.table-wrap,.table-scroll,.table-container,[data-table-scroll]{display:block;width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch} +table th,table td{overflow-wrap:anywhere;word-break:normal} +.flex,.row,.toolbar,.actions,.button-row,.form-row,.header-actions,.share-header-actions,.comment-composer-actions,.preview-actions,.capture-actions,.record-controls{min-width:0;max-width:100%;flex-wrap:wrap} +.grid,.clip-grid,.share-layout,.share-discussion,.share-main{min-width:0} +.grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr))} +.clip-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))} +.clip-card,.clip-info,.clip-info>div,.capture-copy,.capture-panel,.section-heading,.welcome-row,.topbar,.top-actions,.share-topbar,.share-layout,.share-main,.share-discussion,.discussion-list,.share-comment-form,.comment-composer-actions{min-width:0;max-width:100%} +.clip-info h3,.clip-info p,.share-heading h1,.share-heading p,.discussion-title,.share-comment-meta,.share-comment-meta strong,.share-comment p,.privacy-document,.privacy-document p,.privacy-document li{overflow-wrap:anywhere;word-break:normal} +.modal-backdrop,[role="dialog"],dialog,.modal,.preview-modal,.publish-modal{box-sizing:border-box;min-width:0;max-width:calc(100vw - 20px)} +.modal-backdrop{overflow-y:auto;overscroll-behavior:contain} +[role="dialog"],dialog,.modal,.preview-modal,.publish-modal{max-height:calc(100dvh - 20px);overflow:auto;overscroll-behavior:contain} +.share-layout{grid-template-columns:minmax(0,1.65fr) minmax(0,.85fr)} +.share-discussion{overflow-wrap:anywhere} +.share-video-wrap{min-width:0;max-width:100%} +.share-video-wrap video{max-width:100%} +.share-link-toast{max-width:calc(100vw - 24px);min-width:0} +.toast,.notice,.recovery-notice,.library-backup-tools,.bottom-note{min-width:0;max-width:100%;flex-wrap:wrap} +:focus-visible{outline-offset:3px} +@media(max-width:760px){ +.share-page{padding-inline:clamp(12px,4vw,20px)}.share-layout{grid-template-columns:minmax(0,1fr);gap:24px;margin-top:24px} +.share-topbar{height:auto;min-height:60px;flex-wrap:wrap;gap:10px;padding-block:12px} +.share-header-actions{display:flex;flex-wrap:wrap;gap:8px;min-width:0}.share-header-actions>*{max-width:100%} +.share-discussion{width:100%}.page-wrap{padding-inline:clamp(12px,4vw,24px)}.topbar{padding-inline:clamp(12px,4vw,24px)} +.capture-panel,.capture-actions,.record-controls{width:100%;min-width:0}.capture-actions>*{max-width:100%} +.library-tools{width:100%;min-width:0;flex-wrap:wrap}.search-box{min-width:0;max-width:100%} +.preview-actions,.comment-composer-actions{flex-wrap:wrap} +} +@media(max-width:420px){ +.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.clip-info{gap:4px}.clip-actions{min-width:0;flex-wrap:wrap} +.button,.btn{padding-inline:10px}.share-comment-form textarea{width:100%;max-width:100%} +.share-video-meta{display:flex;flex-wrap:wrap;gap:6px 12px} +} +@media(max-width:340px){ +.clip-grid{grid-template-columns:minmax(0,1fr)}.welcome-row{flex-wrap:wrap}.welcome-art{max-width:42%;min-width:0} +.capture-actions,.record-controls{grid-template-columns:minmax(0,1fr)} +.capture-actions .button,.record-controls .button{width:100%;grid-column:auto} +} +@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} From cdc6d70262a69ad6d9f151e398e21e6ef9237189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:29:42 +0200 Subject: [PATCH 157/575] fix(ui): harden responsive containment across ScreenNote surfaces --- rebuild/src/styles.css | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index a4065dd..2f125bb 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -79,3 +79,55 @@ button:disabled{cursor:not-allowed} .icon-button{min-width:44px;min-height:44px} .clip-actions .icon-button{min-width:40px;min-height:40px} } + + +/* ScreenNote containment system — shared by legacy and React surfaces. */ +html,body,#root,#app,.app-shell,.main-content,.page-wrap,.share-page{width:100%;max-width:100%;min-width:0} +html,body{overflow-x:clip} +*,*::before,*::after{box-sizing:border-box;min-width:0} +img,video,canvas,iframe,svg{max-width:100%} +p,h1,h2,h3,h4,h5,h6,small,strong,span,label,a,li,dd,dt,blockquote{overflow-wrap:anywhere;word-break:normal} +pre,code,kbd,samp{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word} +button,.button,.btn,[role="button"]{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.35;text-align:center} +input,select,textarea{max-width:100%;min-width:0} +textarea{resize:vertical;overflow-wrap:anywhere} +fieldset{min-width:0;max-width:100%} +table{width:100%;max-width:100%;border-collapse:collapse} +.table-wrap,.table-scroll,.table-container,[data-table-scroll]{display:block;width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch} +table th,table td{overflow-wrap:anywhere;word-break:normal} +.flex,.row,.toolbar,.actions,.button-row,.form-row,.header-actions,.share-header-actions,.comment-composer-actions,.preview-actions,.capture-actions,.record-controls{min-width:0;max-width:100%;flex-wrap:wrap} +.grid,.clip-grid,.share-layout,.share-discussion,.share-main{min-width:0} +.grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr))} +.clip-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))} +.clip-card,.clip-info,.clip-info>div,.capture-copy,.capture-panel,.section-heading,.welcome-row,.topbar,.top-actions,.share-topbar,.share-layout,.share-main,.share-discussion,.discussion-list,.share-comment-form,.comment-composer-actions{min-width:0;max-width:100%} +.clip-info h3,.clip-info p,.share-heading h1,.share-heading p,.discussion-title,.share-comment-meta,.share-comment-meta strong,.share-comment p,.privacy-document,.privacy-document p,.privacy-document li{overflow-wrap:anywhere;word-break:normal} +.modal-backdrop,[role="dialog"],dialog,.modal,.preview-modal,.publish-modal{box-sizing:border-box;min-width:0;max-width:calc(100vw - 20px)} +.modal-backdrop{overflow-y:auto;overscroll-behavior:contain} +[role="dialog"],dialog,.modal,.preview-modal,.publish-modal{max-height:calc(100dvh - 20px);overflow:auto;overscroll-behavior:contain} +.share-layout{grid-template-columns:minmax(0,1.65fr) minmax(0,.85fr)} +.share-discussion{overflow-wrap:anywhere} +.share-video-wrap{min-width:0;max-width:100%} +.share-video-wrap video{max-width:100%} +.share-link-toast{max-width:calc(100vw - 24px);min-width:0} +.toast,.notice,.recovery-notice,.library-backup-tools,.bottom-note{min-width:0;max-width:100%;flex-wrap:wrap} +:focus-visible{outline-offset:3px} +@media(max-width:760px){ +.share-page{padding-inline:clamp(12px,4vw,20px)}.share-layout{grid-template-columns:minmax(0,1fr);gap:24px;margin-top:24px} +.share-topbar{height:auto;min-height:60px;flex-wrap:wrap;gap:10px;padding-block:12px} +.share-header-actions{display:flex;flex-wrap:wrap;gap:8px;min-width:0}.share-header-actions>*{max-width:100%} +.share-discussion{width:100%}.page-wrap{padding-inline:clamp(12px,4vw,24px)}.topbar{padding-inline:clamp(12px,4vw,24px)} +.capture-panel,.capture-actions,.record-controls{width:100%;min-width:0}.capture-actions>*{max-width:100%} +.library-tools{width:100%;min-width:0;flex-wrap:wrap}.search-box{min-width:0;max-width:100%} +.preview-actions,.comment-composer-actions{flex-wrap:wrap} +} +@media(max-width:420px){ +.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.clip-info{gap:4px}.clip-actions{min-width:0;flex-wrap:wrap} +.button,.btn{padding-inline:10px}.share-comment-form textarea{width:100%;max-width:100%} +.share-video-meta{display:flex;flex-wrap:wrap;gap:6px 12px} +} +@media(max-width:340px){ +.clip-grid{grid-template-columns:minmax(0,1fr)}.welcome-row{flex-wrap:wrap}.welcome-art{max-width:42%;min-width:0} +.capture-actions,.record-controls{grid-template-columns:minmax(0,1fr)} +.capture-actions .button,.record-controls .button{width:100%;grid-column:auto} +} +@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} From c316d5267aedeb07d1c5b2221299c6cd1d9059fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:29:56 +0200 Subject: [PATCH 158/575] test(ui): assert individual responsive controls remain in viewport --- rebuild/e2e/visual.spec.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 5726dae..cf46bc2 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -19,9 +19,17 @@ const viewports = [ ]; async function contained(page: import("@playwright/test").Page, width:number) { - const m=await page.evaluate(()=>({doc:document.documentElement.scrollWidth,body:document.body.scrollWidth,viewport:innerWidth})); + const m=await page.evaluate(()=>{ + const selectors=".button,.btn,button,input,select,textarea,.clip-card,.clip-grid,.capture-panel,.share-layout,.share-discussion,.modal,.preview-modal,.publish-modal,[role=dialog]"; + const offenders=[...document.querySelectorAll(selectors)].filter(el=>{ + const style=getComputedStyle(el),r=el.getBoundingClientRect(); + return style.display!=="none"&&style.visibility!=="hidden"&&r.width>0&&(r.left < -1 || r.right > innerWidth+1); + }).map(el=>({tag:el.tagName,selector:el.className?.toString?.()||el.id||"",left:Math.round(el.getBoundingClientRect().left),right:Math.round(el.getBoundingClientRect().right),width:Math.round(el.getBoundingClientRect().width)})); + return {doc:document.documentElement.scrollWidth,body:document.body.scrollWidth,viewport:innerWidth,offenders}; + }); expect(m.doc, `document horizontal overflow at ${width}px: ${JSON.stringify(m)}`).toBeLessThanOrEqual(width+1); expect(m.body, `body horizontal overflow at ${width}px: ${JSON.stringify(m)}`).toBeLessThanOrEqual(width+1); + expect(m.offenders, `visible controls or content panels escape the viewport at ${width}px`).toEqual([]); } test.beforeAll(async()=>{await mkdir("test-results/screenshots",{recursive:true});}); @@ -56,8 +64,8 @@ test("import, title, captions, chapters and bug-report context persist locally", await page.getByText("Captions, chapters & bug report",{exact:true}).click(); await page.locator("#captions-text").fill("WEBVTT\n\n00:00:00.000 --> 00:00:01.500\nReview this step."); await page.locator("#chapters-text").fill("0:01 Opening"); - await page.locator("#report-url").fill("https://example.com/checkout"); - await page.locator("#report-steps").fill("Open the checkout and select the payment method."); + await page.locator("#report-url").fill("https://example.com/checkout/with/a/very/long/path/that/should-wrap-cleanly/".repeat(4)); + await page.locator("#report-steps").fill("Open the checkout and select the payment method. ".repeat(8)+" unbroken-token-".repeat(35)); await page.locator("#report-expected").fill("The payment option remains visible."); await page.locator("#report-actual").fill("The payment option disappears."); await page.locator("#extras-form button[type=submit]").click(); From 2af2ff57e5f22f01721387e5e4b8d9132ebb976a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:31:25 +0200 Subject: [PATCH 159/575] test(api): align deletion smoke assertion with revoked tombstone state --- rebuild/scripts/live-smoke.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/scripts/live-smoke.mjs b/rebuild/scripts/live-smoke.mjs index b0d2388..131776b 100644 --- a/rebuild/scripts/live-smoke.mjs +++ b/rebuild/scripts/live-smoke.mjs @@ -225,7 +225,7 @@ try { await json(await nativeApi("revoke",{id:nativeId,owner:nativeOwner})); assert.equal((await request("/api/clip?op=view&id="+nativeId)).status,404,"revoked native share is unavailable"); await json(await nativeApi("delete",{id:nativeId,owner:nativeOwner})); - const tombstone=await json(await nativeApi("manage",{id:nativeId,owner:nativeOwner}));assert.equal(tombstone.deleted,true);assert.equal(tombstone.status,"deleted"); + const tombstone=await json(await nativeApi("manage",{id:nativeId,owner:nativeOwner}));assert.equal(tombstone.deleted,true);assert.equal(tombstone.status,"revoked","deleted records remain in the revoked state to prevent legacy-share resurrection"); assert.equal((await nativeApi("view",{id:nativeId,accessPassword:nativePassword})).status,404,"deleted IDs cannot fall back to old Vercel shares"); assert.equal((await nativeApi("delete",{id:nativeId,owner:nativeOwner})).status,200,"delete is idempotent"); nativeReserved=false; From 128268a6dfb5162c988076994ee0af62e6bd16d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:32:20 +0200 Subject: [PATCH 160/575] test(ui): cover temporary share viewer across responsive widths and themes --- rebuild/e2e/visual.spec.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index cf46bc2..03da337 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -154,3 +154,32 @@ test("installable app shell keeps the local library usable offline",async({page, await expect(page.locator("#import-video")).toBeAttached(); await context.setOffline(false); }); + + +test("temporary share viewer remains contained with long discussion content on mobile and desktop",async({page})=>{ + const token="layout-acceptance-token"; + await page.route("**/api/share/"+token+"**",async route=>{ + const url=new URL(route.request().url()); + if(url.pathname.endsWith("/comments")){ + await route.fulfill({json:{comments:[{ + id:"comment-1",parentId:null,viewerLabel:"Guest reviewer", + body:"Please inspect this very long review note and its unbroken reference https://example.com/".repeat(8), + time:12,createdAt:1795600000,resolved:0,deletedAt:null,isMine:false,anchorX:0.82,anchorY:0.36 + }]}}); + return; + } + if(url.pathname.endsWith("/media")){await route.fulfill({status:200,contentType:"video/webm",body:""});return;} + await route.fulfill({json:{title:"A very long ScreenNote title that must wrap naturally without forcing the viewer outside the available screen width",mimeType:"video/webm",size:2048,duration:95,expiresAt:1796200000,passwordRequired:false}}); + }); + await page.goto("/s/"+token); + await expect(page.locator(".share-layout")).toBeVisible(); + await expect(page.locator(".share-discussion")).toContainText("Guest reviewer"); + for(const theme of ["light","dark"]){ + await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); + for(const width of [320,360,375,390,414,600,768,834,1024,1120,1280,1440,1920]){ + await page.setViewportSize({width,height:900}); + await contained(page,width); + } + } +}); + From 1ccbda892aa4565602a9618750ec57075e8f176e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:33:43 +0200 Subject: [PATCH 161/575] test(ui): use valid share token in responsive viewer coverage --- rebuild/e2e/visual.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 03da337..c190d4a 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -157,7 +157,7 @@ test("installable app shell keeps the local library usable offline",async({page, test("temporary share viewer remains contained with long discussion content on mobile and desktop",async({page})=>{ - const token="layout-acceptance-token"; + const token="layout-acceptance-token-12345678901234567890"; await page.route("**/api/share/"+token+"**",async route=>{ const url=new URL(route.request().url()); if(url.pathname.endsWith("/comments")){ From 8c145c9d62b491eceae07baa13d89e4f929cc3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:33:59 +0200 Subject: [PATCH 162/575] test(ui): include privacy route in responsive theme coverage --- rebuild/e2e/visual.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index c190d4a..eba72b6 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -181,5 +181,14 @@ test("temporary share viewer remains contained with long discussion content on m await contained(page,width); } } + await page.goto("/privacy"); + await expect(page.getByRole("heading",{name:"Your original stays with you."})).toBeVisible(); + for(const theme of ["light","dark"]){ + await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); + for(const width of [320,360,375,390,414,600,768,834,1024,1120,1280,1440,1920]){ + await page.setViewportSize({width,height:900}); + await contained(page,width); + } + } }); From e56315199c1c7859b72aa9b58a984772db0a1e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:35:35 +0200 Subject: [PATCH 163/575] test(ui): make share viewer API fixture match all token subroutes --- rebuild/e2e/visual.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index eba72b6..a8f5873 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -158,7 +158,7 @@ test("installable app shell keeps the local library usable offline",async({page, test("temporary share viewer remains contained with long discussion content on mobile and desktop",async({page})=>{ const token="layout-acceptance-token-12345678901234567890"; - await page.route("**/api/share/"+token+"**",async route=>{ + await page.route("**/api/share/**",async route=>{ const url=new URL(route.request().url()); if(url.pathname.endsWith("/comments")){ await route.fulfill({json:{comments:[{ From f1323ec1a29846639b3653af985ce86d85db2808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:36:42 +0200 Subject: [PATCH 164/575] test(ui): report share route failure context in responsive acceptance --- rebuild/e2e/visual.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index a8f5873..188bacf 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -172,7 +172,8 @@ test("temporary share viewer remains contained with long discussion content on m await route.fulfill({json:{title:"A very long ScreenNote title that must wrap naturally without forcing the viewer outside the available screen width",mimeType:"video/webm",size:2048,duration:95,expiresAt:1796200000,passwordRequired:false}}); }); await page.goto("/s/"+token); - await expect(page.locator(".share-layout")).toBeVisible(); + const shareLayout=page.locator(".share-layout"); + if(!await shareLayout.isVisible())throw new Error("Share viewer did not render: "+(await page.locator("body").innerText()).slice(0,1200)); await expect(page.locator(".share-discussion")).toContainText("Guest reviewer"); for(const theme of ["light","dark"]){ await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); From 1b15e18adfce2230270d461fe26cbb2abbb25069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:38:11 +0200 Subject: [PATCH 165/575] test(ui): cover the actual legacy share viewer route and privacy page --- rebuild/e2e/visual.spec.ts | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 188bacf..6f45846 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -156,25 +156,22 @@ test("installable app shell keeps the local library usable offline",async({page, }); -test("temporary share viewer remains contained with long discussion content on mobile and desktop",async({page})=>{ - const token="layout-acceptance-token-12345678901234567890"; - await page.route("**/api/share/**",async route=>{ +test("real legacy share viewer and privacy route remain contained across widths and themes",async({page})=>{ + const id="123e4567-e89b-12d3-a456-426614174000"; + await page.route(/\/api\/clip\?op=view/,async route=>{ const url=new URL(route.request().url()); - if(url.pathname.endsWith("/comments")){ - await route.fulfill({json:{comments:[{ - id:"comment-1",parentId:null,viewerLabel:"Guest reviewer", - body:"Please inspect this very long review note and its unbroken reference https://example.com/".repeat(8), - time:12,createdAt:1795600000,resolved:0,deletedAt:null,isMine:false,anchorX:0.82,anchorY:0.36 - }]}}); - return; - } - if(url.pathname.endsWith("/media")){await route.fulfill({status:200,contentType:"video/webm",body:""});return;} - await route.fulfill({json:{title:"A very long ScreenNote title that must wrap naturally without forcing the viewer outside the available screen width",mimeType:"video/webm",size:2048,duration:95,expiresAt:1796200000,passwordRequired:false}}); + if(url.searchParams.get("id")!==id){await route.continue();return;} + await route.fulfill({json:{ + id,title:"A very long ScreenNote title that must wrap naturally without forcing the viewer outside the available screen width", + reviewStatus:"needs-feedback",width:1280,height:720,start:0,end:95,duration:95, + createdAt:Date.now(),expiresAt:Date.now()+86400000,passwordProtected:false, + discussionRevision:0,captions:[],chapters:[],report:null,comments:[], + reactions:{like:0,thanks:0,idea:0},mediaUrl:"/sample.webm" + }}); }); - await page.goto("/s/"+token); - const shareLayout=page.locator(".share-layout"); - if(!await shareLayout.isVisible())throw new Error("Share viewer did not render: "+(await page.locator("body").innerText()).slice(0,1200)); - await expect(page.locator(".share-discussion")).toContainText("Guest reviewer"); + await page.goto("/v/"+id); + await expect(page.locator(".viewer-grid")).toBeVisible(); + await expect(page.locator(".reply-panel")).toContainText("Talk about this moment."); for(const theme of ["light","dark"]){ await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); for(const width of [320,360,375,390,414,600,768,834,1024,1120,1280,1440,1920]){ @@ -192,4 +189,3 @@ test("temporary share viewer remains contained with long discussion content on m } } }); - From eabeeb6f806572ef2c47468d7b1886c8eed40ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:38:19 +0200 Subject: [PATCH 166/575] fix(ui): contain the shipped share viewer and discussion layout --- rebuild/legacy/public/style.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rebuild/legacy/public/style.css b/rebuild/legacy/public/style.css index 0787972..9f22172 100644 --- a/rebuild/legacy/public/style.css +++ b/rebuild/legacy/public/style.css @@ -134,3 +134,17 @@ table th,table td{overflow-wrap:anywhere;word-break:normal} .capture-actions .button,.record-controls .button{width:100%;grid-column:auto} } @media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} + + +/* Legacy share viewer containment: the shipped /v/:uuid route. */ +.viewer,.viewer-top,.viewer-grid,.viewer-media,.reply-panel,.video-panel,.player-tools,.reactions,.discussion-heading,.discussion-toolbar{min-width:0;max-width:100%} +.viewer-grid{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr)} +.viewer-top{flex-wrap:wrap;align-items:center} +.viewer-top>*{min-width:0;max-width:100%} +.viewer .video-panel video{width:100%;max-width:100%;height:auto} +.reply-panel{overflow-wrap:anywhere} +.discussion-thread,.discussion-thread .comment,.comment-head,.comment-actions,.reply-context{min-width:0;max-width:100%;overflow-wrap:anywhere} +.discussion-thread .thread-reply{min-width:0;max-width:calc(100% - 8px)} +.discussion-heading,.comment-head,.compose-meta{flex-wrap:wrap} +@media(max-width:767px){.viewer-grid{grid-template-columns:minmax(0,1fr)}.viewer-top{gap:12px}.viewer-top>.btn{flex:0 1 auto}.viewer{padding-inline:clamp(12px,4vw,20px)}.reply-panel{max-height:none;overflow:visible}} +@media(max-width:420px){.viewer-top{padding-inline:12px}.viewer-top>.btn{width:auto}.viewer h1{overflow-wrap:anywhere}.reactions .btn{flex:1 1 100%;justify-content:flex-start}.discussion-toolbar>*{min-width:0;max-width:100%}} From 25cd57cc5b69b334ae1a88549426ab9e6758c487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:38:22 +0200 Subject: [PATCH 167/575] fix(ui): contain the shipped share viewer and discussion layout --- rebuild/src/styles.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index 2f125bb..364d4fa 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -131,3 +131,17 @@ table th,table td{overflow-wrap:anywhere;word-break:normal} .capture-actions .button,.record-controls .button{width:100%;grid-column:auto} } @media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} + + +/* Legacy share viewer containment: the shipped /v/:uuid route. */ +.viewer,.viewer-top,.viewer-grid,.viewer-media,.reply-panel,.video-panel,.player-tools,.reactions,.discussion-heading,.discussion-toolbar{min-width:0;max-width:100%} +.viewer-grid{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr)} +.viewer-top{flex-wrap:wrap;align-items:center} +.viewer-top>*{min-width:0;max-width:100%} +.viewer .video-panel video{width:100%;max-width:100%;height:auto} +.reply-panel{overflow-wrap:anywhere} +.discussion-thread,.discussion-thread .comment,.comment-head,.comment-actions,.reply-context{min-width:0;max-width:100%;overflow-wrap:anywhere} +.discussion-thread .thread-reply{min-width:0;max-width:calc(100% - 8px)} +.discussion-heading,.comment-head,.compose-meta{flex-wrap:wrap} +@media(max-width:767px){.viewer-grid{grid-template-columns:minmax(0,1fr)}.viewer-top{gap:12px}.viewer-top>.btn{flex:0 1 auto}.viewer{padding-inline:clamp(12px,4vw,20px)}.reply-panel{max-height:none;overflow:visible}} +@media(max-width:420px){.viewer-top{padding-inline:12px}.viewer-top>.btn{width:auto}.viewer h1{overflow-wrap:anywhere}.reactions .btn{flex:1 1 100%;justify-content:flex-start}.discussion-toolbar>*{min-width:0;max-width:100%}} From 340339876b33b46511bc951b5c9d0da92c8a9274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:38:28 +0200 Subject: [PATCH 168/575] test(ui): include legacy viewer panels in viewport containment assertions --- rebuild/e2e/visual.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 6f45846..0a0d173 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -20,7 +20,7 @@ const viewports = [ async function contained(page: import("@playwright/test").Page, width:number) { const m=await page.evaluate(()=>{ - const selectors=".button,.btn,button,input,select,textarea,.clip-card,.clip-grid,.capture-panel,.share-layout,.share-discussion,.modal,.preview-modal,.publish-modal,[role=dialog]"; + const selectors=".button,.btn,button,input,select,textarea,.clip-card,.clip-grid,.capture-panel,.share-layout,.share-discussion,.viewer,.viewer-top,.viewer-grid,.viewer-media,.reply-panel,.modal,.preview-modal,.publish-modal,[role=dialog]"; const offenders=[...document.querySelectorAll(selectors)].filter(el=>{ const style=getComputedStyle(el),r=el.getBoundingClientRect(); return style.display!=="none"&&style.visibility!=="hidden"&&r.width>0&&(r.left < -1 || r.right > innerWidth+1); From 2370d0921ba0bb165661fcb3a9ec7b6b78d4ccd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:39:33 +0200 Subject: [PATCH 169/575] test(ui): navigate to the shipped privacy screen through its real control --- rebuild/e2e/visual.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 0a0d173..9e07842 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -179,8 +179,9 @@ test("real legacy share viewer and privacy route remain contained across widths await contained(page,width); } } - await page.goto("/privacy"); - await expect(page.getByRole("heading",{name:"Your original stays with you."})).toBeVisible(); + await page.goto("/"); + await page.locator(".footer [data-action=privacy]").click(); + await expect(page.getByRole("heading",{name:"Your screen. Your call."})).toBeVisible(); for(const theme of ["light","dark"]){ await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); for(const width of [320,360,375,390,414,600,768,834,1024,1120,1280,1440,1920]){ From ee98bf23d0b6073749c94b0307ac3d973bc01303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:40:09 +0200 Subject: [PATCH 170/575] fix(content): align privacy notice with Cloudflare storage and cleanup --- rebuild/legacy/public/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/legacy/public/app.js b/rebuild/legacy/public/app.js index e2fb3a8..ce133d4 100644 --- a/rebuild/legacy/public/app.js +++ b/rebuild/legacy/public/app.js @@ -138,7 +138,7 @@ async function startRecording(){if(recording||busy)return;if(emergencyBlob)throw async function publish(){let c=selected?{...selected,title:validTitle($('#recording-title-input')?$('#recording-title-input').value:selected.title)}:null;if(!health||!c?.blob)throw Error('Sharing is not available yet.');const problem=sharingProblem(c);if(problem)throw Error(problem);const {linkDays,password,newIdentity}=shareOptions(c,Number($('#link-days')?.value||c.linkDays||7),$('#share-password')?.value||'');if(newIdentity){c={...c,id:randomId(),owner:secret(),revoked:false,shared:false,cloudDeleted:false,cloudMissing:false,uploadAttempted:false,passwordProtected:!!password};await db.put(c);selected=c;clips=await db.all()}c.linkDays=linkDays;c.passwordProtected=!!password||!!c.passwordProtected;let savedLocally=false;busy=true;uploadController=new AbortController();const button=$('[data-action=publish]');button.disabled=true;try{const input={id:c.id,owner:c.owner,title:c.title,type:c.type,duration:c.duration,width:c.width,height:c.height,size:c.blob.size,start:0,end:c.duration,linkDays,password,captions:c.captions||[],chapters:c.chapters||[],report:c.report||null,reviewStatus:c.reviewStatus||'needs-feedback'};$('#cancel-upload').hidden=false;$('#upload-meter').hidden=false;$('#upload-meter').value=0;$('#upload-progress').textContent='Preparing a private upload…';c.uploadAttempted=true;await db.put(c);selected=c;savedLocally=true;let reservation;try{reservation=await retryTransfer(()=>api('reserve',input),attempt=>$('#upload-progress').textContent=`Sharing service interrupted. Retrying upload setup (${attempt}/3)…`)}catch(e){if(e.status!==409)throw e;const state=await api('manage',{id:c.id,owner:c.owner});if(!['expired','deleted','revoked'].includes(state.status))throw e;c.revoked=true;await db.put(c);busy=false;uploadController=null;return await publish()}const uploaded=new Set(reservation.status==='published'?[]:(await retryTransfer(()=>api('upload-state',{id:c.id,owner:c.owner}))).parts||[]);$('#upload-progress').textContent=uploaded.size?'Resuming saved upload… Your local copy is safe.':'Uploading video… Your local copy is safe.';for(let part=0,offset=0;reservation.status!=='published'&&offset{const reader=new FileReader();reader.onload=()=>resolve(reader.result.split(',')[1]);reader.onerror=()=>reject(Error('Could not read the local video.'));reader.readAsDataURL(chunk)});await retryTransfer(()=>api('upload-chunk',{id:c.id,owner:c.owner,part,data}),attempt=>$('#upload-progress').textContent=`Connection interrupted. Retrying part ${part+1} (${attempt}/3)…`);$('#upload-meter').value=Math.round(Math.min(c.blob.size,offset+CHUNK_BYTES)/c.blob.size*100);$('#upload-progress').textContent=`Uploading ${Math.round(Math.min(c.blob.size,offset+CHUNK_BYTES)/c.blob.size*100)}% · your local copy is safe.`}$('#upload-progress').textContent='Finalizing your video…';const shared=await retryTransfer(()=>api('publish',{id:c.id,owner:c.owner}),attempt=>$('#upload-progress').textContent=`Sharing service interrupted. Retrying finalization (${attempt}/3)…`);c.shared=true;c.uploadPaused=false;c.passwordProtected=shared.passwordProtected;c.expiresAt=shared.expiresAt;await db.put(c);clips=await db.all();busy=false;editor(c);notify('Your link is ready. The local copy is still here.')}catch(e){busy=false;if(savedLocally){if(e.name==='AbortError')c.uploadPaused=true;await db.put(c);editor(c)}throw e}finally{uploadController=null;busy=false;button.disabled=false}} function saveFile(blob,name){const url=URL.createObjectURL(blob),a=document.createElement('a');a.href=url;a.download=name;document.body.append(a);a.click();a.remove();setTimeout(()=>URL.revokeObjectURL(url),60000)} function download(){const a=document.createElement('a');a.href=objectURL||URL.createObjectURL(selected.blob);a.download=selected.title.replace(/[^\p{L}\p{N} _-]/gu,'').slice(0,80)+(selected.type==='video/mp4'?'.mp4':'.webm');document.body.append(a);a.click();a.remove()} -function privacy(){if(recording||busy)return;shell(`
CLEAR BY DEFAULT

Your screen.
Your call.

ScreenNote only uploads a video when you choose Publish. Recording and trimming happen in your browser.

Before you publish

Recordings and recovery chunks are stored in this browser. Download videos you want to keep. Clearing site data, private browsing or losing this device can remove your local library.

After you publish

Older links from the previous storage service may be unavailable. Their videos have not been copied while that service denies access. If you have the original local video, refresh its shared status and publish a replacement link. Keep your original recovery keys.

The whole reviewed video is uploaded to private Supabase storage. An unlisted link lets anyone who has it watch and reply without a ScreenNote account. Do not include passwords or information you do not want the recipient to see. Unlisted does not mean encrypted end to end.

Links expire after 1, 3 or 7 days, as chosen before publication. Optional sharing passwords are verified on the server; issued playback URLs are bearer links with a five-minute lifetime. Captions, chapters and bug-report text you save are shared with viewers. Stop sharing blocks new viewer requests; already issued playback URLs may work for up to five more minutes. Expired uploads and abandoned reservations become eligible for deletion after a further 24 hours. ScreenNote reclaims them when new uploads reach shared capacity; cleanup is demand-driven, not a timed deletion guarantee.

Small, honest first release

Back up your recovery keys to restore management access after changing browsers or clearing site data. Keep them private: they authorize stopping sharing and deleting uploads. Videos are not included.

Clips are limited to ten minutes and 50 MB. Shared uploads use a 1 GB storage budget. Pending uploads reserve space for both chunks and the assembled video. Deleting an uploaded video frees its slot after cleanup succeeds. Old expired uploads are also reclaimed when capacity is full. Local recording and downloads remain usable when sharing is full. Hosting quotas may pause online sharing; no paid upgrade is enabled by this application.

Screen capture needs a supported desktop browser. On phones or browsers without screen capture, record with your device and import MP4 or WebM. Camera, microphone and shared-screen audio require your browser’s permissions. Online sharing uses Supabase private file storage and a database for recording details and feedback. The app is hosted on Vercel. No AI analysis, advertising trackers or per-viewer charges are built in.

Replies and reactions

Replies are visible to everyone with the link. Names are self-entered, not verified identities. You can reply to any comment or reply. New replies reopen resolved threads. Comment authors can edit or remove their comments from the browser that posted them; the video creator can also remove comments and resolve threads. Clearing site data loses anonymous comment controls. Unsent drafts are kept in this tab’s session storage. Optional bubbles preview comments in the inline player; native fullscreen and picture in picture show the video only. Each clip supports 100 total comments and replies, including removed entries. Reactions use an anonymous browser identifier and are not verified unique-person counts.

`,'Privacy')} +function privacy(){if(recording||busy)return;shell(`
CLEAR BY DEFAULT

Your screen.
Your call.

ScreenNote only uploads a video when you choose Publish. Recording and trimming happen in your browser.

Before you publish

Recordings and recovery chunks are stored in this browser. Download videos you want to keep. Clearing site data, private browsing or losing this device can remove your local library.

After you publish

Older links from the previous storage service may be unavailable. Their videos have not been copied while that service denies access. If you have the original local video, refresh its shared status and publish a replacement link. Keep your original recovery keys.

When you publish, a separate video copy is stored in a private Cloudflare R2 bucket. Share metadata and discussion are stored in Cloudflare D1. An unlisted link lets anyone who has it watch and reply without a ScreenNote account. Do not include passwords or information you do not want the recipient to see. Unlisted does not mean encrypted end to end.

Links expire after 1, 3 or 7 days, as chosen before publication. Optional sharing passwords are verified on the server; issued playback URLs are bearer links with a five-minute lifetime. Captions, chapters and bug-report text you save are shared with viewers. Stop sharing blocks new viewer requests; already issued playback URLs may work for up to five more minutes. A scheduled cleanup checks expired shares and abandoned media every 15 minutes. Unreferenced objects are retained for a grace period before deletion. A short cleanup delay may occur after a link expires.

Small, honest first release

Back up your recovery keys to restore management access after changing browsers or clearing site data. Keep them private: they authorize stopping sharing and deleting uploads. Videos are not included.

Clips are limited to ten minutes and 50 MB. Shared uploads use a 1 GB storage budget. Pending uploads reserve space for both chunks and the assembled video. Deleting an uploaded video frees its slot after cleanup succeeds. Old expired uploads are also reclaimed when capacity is full. Local recording and downloads remain usable when sharing is full. Hosting quotas may pause online sharing; no paid upgrade is enabled by this application.

Screen capture needs a supported desktop browser. On phones or browsers without screen capture, record with your device and import MP4 or WebM. Camera, microphone and shared-screen audio require your browser’s permissions. Online sharing uses Supabase private file storage and a database for recording details and feedback. The application is served by Cloudflare Workers. No AI analysis, advertising trackers or per-viewer charges are built in.

Replies and reactions

Replies are visible to everyone with the link. Names are self-entered, not verified identities. You can reply to any comment or reply. New replies reopen resolved threads. Comment authors can edit or remove their comments from the browser that posted them; the video creator can also remove comments and resolve threads. Clearing site data loses anonymous comment controls. Unsent drafts are kept in this tab’s session storage. Optional bubbles preview comments in the inline player; native fullscreen and picture in picture show the video only. Each clip supports 100 total comments and replies, including removed entries. Reactions use an anonymous browser identifier and are not verified unique-person counts.

`,'Privacy')} function recovery(){if(recording||busy)return;shell(`
KEEP CONTROL

Take your keys with you.

A private recovery file restores the ability to stop sharing or delete your uploaded videos from another browser at this same ScreenNote address.

Back up management access

Keep this file private. Anyone with its keys can manage the uploads. It contains no video files: download videos separately.

Restore your keys

Choose a recovery file, or paste its complete JSON below. Keys are checked with the sharing service before saving. Existing local videos remain intact.

`,'Recovery');$('#recovery-file').onchange=e=>run(async()=>{const file=e.target.files[0];if(!file)return;if(file.size>524288)throw Error('Choose a recovery file smaller than 512 KB.');$('#recovery-json').value=await file.text()})} async function restoreKeys(){const keys=recoveryKeys($('#recovery-json').value,location.origin);busy=true;const button=$('[data-action=restore-keys]');button.disabled=true;let restored=0,failed=0,videoFailed=0;try{for(const key of keys){$('#recovery-progress').textContent=`Checking key ${restored+failed+1} of ${keys.length}…`;try{const state=await api('manage',key),current=clips.find(c=>c.id===key.id);if(current&¤t.owner!==key.owner)throw Error('This recording belongs to another key.');const record={...current,...state,...key,shared:state.status==='published',revoked:['revoked','expired','deleted'].includes(state.status),uploadAttempted:true,cloudDeleted:state.cleanupComplete,managementOnly:!current?.blob};await db.put(record);clips=await db.all();if($('#restore-videos').checked&&state.status==='published'&&state.expiresAt>Date.now()&&!record.blob){try{const response=await fetch(await api('restore-media',key).then(v=>v.mediaUrl));if(!response.ok)throw Error('Video download failed.');const file=new File([await response.blob()],record.title+'.'+(record.type==='video/mp4'?'mp4':'webm'),{type:record.type});const media=await importMedia(file),info=await metadata(media.blob);record.blob=media.blob;Object.assign(record,info,{managementOnly:false})}catch{videoFailed++}}await db.put(record);clips=await db.all();restored++}catch{failed++}}$('#recovery-json').value='';$('#recovery-file').value='';$('#recovery-progress').textContent=`Restored ${restored} recording${restored===1?'':'s'}.${failed?' '+failed+' key(s) could not be verified. Keep your file and retry when sharing is available.':''} ${videoFailed?' '+videoFailed+' video download(s) could not finish; management keys were restored. Keep the recovery file to retry.':''} Open My recordings to manage them.`}finally{busy=false;button.disabled=false}} function dialog(title,body,save,label='Save'){ From f23edb633264a3471563e778361ce69bfa9c3a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:40:15 +0200 Subject: [PATCH 171/575] test(content): verify the privacy notice describes the Cloudflare deployment --- rebuild/e2e/visual.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 9e07842..dcf3c90 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -182,6 +182,8 @@ test("real legacy share viewer and privacy route remain contained across widths await page.goto("/"); await page.locator(".footer [data-action=privacy]").click(); await expect(page.getByRole("heading",{name:"Your screen. Your call."})).toBeVisible(); + await expect(page.getByText(/private Cloudflare R2 bucket/)).toBeVisible(); + await expect(page.getByText(/served by Cloudflare Workers/)).toBeVisible(); for(const theme of ["light","dark"]){ await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); for(const width of [320,360,375,390,414,600,768,834,1024,1120,1280,1440,1920]){ From 3d7967b23d4b5d9cfca0387c7ff566025f2f5933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:42:13 +0200 Subject: [PATCH 172/575] ci: serialize Cloudflare development deployments and live acceptance --- .github/workflows/screennote-rebuild.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/screennote-rebuild.yml b/.github/workflows/screennote-rebuild.yml index 9741a21..66ac951 100644 --- a/.github/workflows/screennote-rebuild.yml +++ b/.github/workflows/screennote-rebuild.yml @@ -15,6 +15,10 @@ on: - "rebuild/**" - ".github/workflows/screennote-rebuild.yml" +concurrency: + group: screennote-cloudflare-development + cancel-in-progress: false + permissions: contents: read From bea37844dccdb2457329ebc95ac0128e764429e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:42:32 +0200 Subject: [PATCH 173/575] test(ui): exercise long comments inside the actual share discussion panel --- rebuild/e2e/visual.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index dcf3c90..7e10e5c 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -165,13 +165,14 @@ test("real legacy share viewer and privacy route remain contained across widths id,title:"A very long ScreenNote title that must wrap naturally without forcing the viewer outside the available screen width", reviewStatus:"needs-feedback",width:1280,height:720,start:0,end:95,duration:95, createdAt:Date.now(),expiresAt:Date.now()+86400000,passwordProtected:false, - discussionRevision:0,captions:[],chapters:[],report:null,comments:[], + discussionRevision:0,captions:[],chapters:[],report:null,comments:[{id:"comment-1",name:"Guest reviewer",text:"Please inspect this very long note and its reference https://example.com/".repeat(6),time:12,createdAt:Date.now(),parentId:null,editedAt:null,deleted:false,resolved:false,creator:false}], reactions:{like:0,thanks:0,idea:0},mediaUrl:"/sample.webm" }}); }); await page.goto("/v/"+id); await expect(page.locator(".viewer-grid")).toBeVisible(); await expect(page.locator(".reply-panel")).toContainText("Talk about this moment."); + await expect(page.locator(".reply-panel")).toContainText("Guest reviewer"); for(const theme of ["light","dark"]){ await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); for(const width of [320,360,375,390,414,600,768,834,1024,1120,1280,1440,1920]){ From 6e17686c04887cc6d62936bdc1e74145dd1db73d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:42:41 +0200 Subject: [PATCH 174/575] test(ui): verify backup restore dialog stays inside narrow viewports --- rebuild/e2e/visual.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 7e10e5c..0acc2a5 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -131,6 +131,7 @@ test("appearance, local library and portable backup persist across a fresh brows const restoreOpen=await freshPage.locator("#modal").evaluate((el:any)=>el.open); if(!restoreOpen)throw new Error("Library backup restore failed: "+await freshPage.locator("#error").innerText()+" "+await freshPage.locator("#notice").innerText()); await expect(freshPage.locator("#modal")).toContainText("Restore your ScreenNote library"); + for(const width of [320,375,768]){await freshPage.setViewportSize({width,height:900});await contained(freshPage,width);} await freshPage.getByRole("button",{name:"Restore backup"}).click(); await expect(freshPage.locator(".clip-card")).toHaveCount(1); await freshPage.reload(); From 8ed471eaa26a602485e509a2cc8aa4fefd98e019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:43:13 +0200 Subject: [PATCH 175/575] fix(ui): preserve full-screen modal backdrops on narrow screens --- rebuild/legacy/public/style.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rebuild/legacy/public/style.css b/rebuild/legacy/public/style.css index 9f22172..df4588b 100644 --- a/rebuild/legacy/public/style.css +++ b/rebuild/legacy/public/style.css @@ -148,3 +148,8 @@ table th,table td{overflow-wrap:anywhere;word-break:normal} .discussion-heading,.comment-head,.compose-meta{flex-wrap:wrap} @media(max-width:767px){.viewer-grid{grid-template-columns:minmax(0,1fr)}.viewer-top{gap:12px}.viewer-top>.btn{flex:0 1 auto}.viewer{padding-inline:clamp(12px,4vw,20px)}.reply-panel{max-height:none;overflow:visible}} @media(max-width:420px){.viewer-top{padding-inline:12px}.viewer-top>.btn{width:auto}.viewer h1{overflow-wrap:anywhere}.reactions .btn{flex:1 1 100%;justify-content:flex-start}.discussion-toolbar>*{min-width:0;max-width:100%}} + + +/* Keep full-screen backdrops full-screen; constrain only the dialog surface. */ +.modal-backdrop{width:100vw;max-width:100vw;max-height:100dvh;inset:0} +.modal-backdrop>[role="dialog"],.modal-backdrop .modal,.modal-backdrop .preview-modal,.modal-backdrop .publish-modal{width:min(100%,920px);max-width:calc(100vw - 20px)} From 2deeb1418e45a3672b27f3c99a5a3e65723b57d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:43:15 +0200 Subject: [PATCH 176/575] fix(ui): preserve full-screen modal backdrops on narrow screens --- rebuild/src/styles.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index 364d4fa..37aaa15 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -145,3 +145,8 @@ table th,table td{overflow-wrap:anywhere;word-break:normal} .discussion-heading,.comment-head,.compose-meta{flex-wrap:wrap} @media(max-width:767px){.viewer-grid{grid-template-columns:minmax(0,1fr)}.viewer-top{gap:12px}.viewer-top>.btn{flex:0 1 auto}.viewer{padding-inline:clamp(12px,4vw,20px)}.reply-panel{max-height:none;overflow:visible}} @media(max-width:420px){.viewer-top{padding-inline:12px}.viewer-top>.btn{width:auto}.viewer h1{overflow-wrap:anywhere}.reactions .btn{flex:1 1 100%;justify-content:flex-start}.discussion-toolbar>*{min-width:0;max-width:100%}} + + +/* Keep full-screen backdrops full-screen; constrain only the dialog surface. */ +.modal-backdrop{width:100vw;max-width:100vw;max-height:100dvh;inset:0} +.modal-backdrop>[role="dialog"],.modal-backdrop .modal,.modal-backdrop .preview-modal,.modal-backdrop .publish-modal{width:min(100%,920px);max-width:calc(100vw - 20px)} From 5f5e1f1144dd0fd0566ffe05017a8fd3db3cfb7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:46:22 +0200 Subject: [PATCH 177/575] test(ui): cover help and settings guidance across breakpoints and themes --- rebuild/e2e/visual.spec.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 0acc2a5..bc1c3e8 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -20,7 +20,7 @@ const viewports = [ async function contained(page: import("@playwright/test").Page, width:number) { const m=await page.evaluate(()=>{ - const selectors=".button,.btn,button,input,select,textarea,.clip-card,.clip-grid,.capture-panel,.share-layout,.share-discussion,.viewer,.viewer-top,.viewer-grid,.viewer-media,.reply-panel,.modal,.preview-modal,.publish-modal,[role=dialog]"; + const selectors=".button,.btn,button,input,select,textarea,.clip-card,.clip-grid,.capture-panel,.share-layout,.share-discussion,.viewer,.viewer-top,.viewer-grid,.viewer-media,.reply-panel,.help-grid,.help-grid>.panel,.modal,.preview-modal,.publish-modal,[role=dialog]"; const offenders=[...document.querySelectorAll(selectors)].filter(el=>{ const style=getComputedStyle(el),r=el.getBoundingClientRect(); return style.display!=="none"&&style.visibility!=="hidden"&&r.width>0&&(r.left < -1 || r.right > innerWidth+1); @@ -194,3 +194,22 @@ test("real legacy share viewer and privacy route remain contained across widths } } }); + + +test("help and settings guidance remains readable and contained at every breakpoint",async({page})=>{ + await page.goto("/"); + await page.locator('.top-actions [data-action="help"]').click(); + await expect(page.getByRole("heading",{name:/Show the problem/})).toBeVisible(); + await expect(page.locator(".help-grid")).toBeVisible(); + for(const theme of ["light","dark"]){ + await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); + for(const width of [320,360,375,390,414,600,768,834,1024,1120,1280,1440,1920]){ + await page.setViewportSize({width,height:900}); + await contained(page,width); + } + } + await page.locator('.help-grid [data-action="privacy"]').click(); + await expect(page.getByRole("heading",{name:"Your screen. Your call."})).toBeVisible(); + await expect(page.getByText(/private Cloudflare R2 bucket/)).toBeVisible(); +}); + From f3a2bb8ca8bdb82702365cb24034e2230ecbc465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:51:27 +0200 Subject: [PATCH 178/575] test(a11y): cover landscape, keyboard focus and accessible control names --- rebuild/e2e/visual.spec.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index bc1c3e8..bdf933b 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -213,3 +213,31 @@ test("help and settings guidance remains readable and contained at every breakpo await expect(page.getByText(/private Cloudflare R2 bucket/)).toBeVisible(); }); + + +test("landscape layouts, keyboard access and accessible control names",async({page})=>{ + await page.goto("/"); + for(const theme of ["light","dark"]){ + await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); + for(const viewport of [{width:844,height:390},{width:1024,height:600},{width:1280,height:720}]){ + await page.setViewportSize(viewport); + await expect(page.locator("body")).toBeVisible(); + const metrics=await page.evaluate(()=>({width:document.documentElement.clientWidth,scroll:document.documentElement.scrollWidth,height:document.documentElement.clientHeight})); + expect(metrics.scroll,JSON.stringify({...viewport,...metrics})).toBeLessThanOrEqual(metrics.width+1); + } + } + await page.setViewportSize({width:390,height:844}); + const unnamed=await page.locator("button,[role=button],a[href],input:not([type=hidden]),select,textarea").evaluateAll(nodes=>nodes.filter(el=>{ + const e=el; + if(e.disabled||e.getAttribute("aria-hidden")==="true")return false; + const type=e.getAttribute("type"); + if(type==="file")return !!(e.getAttribute("aria-label")||e.labels?.length); + return !(e.getAttribute("aria-label")||e.getAttribute("aria-labelledby")||e.textContent?.trim()||e.labels?.length||e.title); + }).map(e=>({tag:e.tagName,html:e.outerHTML.slice(0,180)}))); + expect(unnamed,JSON.stringify(unnamed)).toEqual([]); + await page.keyboard.press("Tab"); + const focused=await page.evaluate(()=>({tag:document.activeElement?.tagName,outline:getComputedStyle(document.activeElement).outlineStyle,skip:document.activeElement?.classList.contains("skip")})); + expect(focused.tag).toBeTruthy(); + expect(focused.outline).not.toBe("none"); +}); + From 6044f81fb090fdfe00297977d30e85322832feb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:51:43 +0200 Subject: [PATCH 179/575] style(ui): refine accessible focus, safe areas and responsive sizing --- rebuild/legacy/public/style.css | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/rebuild/legacy/public/style.css b/rebuild/legacy/public/style.css index df4588b..8ed9dcb 100644 --- a/rebuild/legacy/public/style.css +++ b/rebuild/legacy/public/style.css @@ -87,7 +87,7 @@ progress{width:100%;height:12px;margin-top:16px;accent-color:var(--accent)}selec /* ScreenNote containment system — shared by legacy and React surfaces. */ html,body,#root,#app,.app-shell,.main-content,.page-wrap,.share-page{width:100%;max-width:100%;min-width:0} html,body{overflow-x:clip} -*,*::before,*::after{box-sizing:border-box;min-width:0} +*,*::before,*::after{box-sizing:border-box}:where(.shell,.workspace,.content,.heading,.record-grid,.editor-grid,.clip-grid,.viewer-grid,.share-layout,.help-grid,.actions,.top-actions,.field-row,.comment-head,.dialog-actions)>*{min-width:0} img,video,canvas,iframe,svg{max-width:100%} p,h1,h2,h3,h4,h5,h6,small,strong,span,label,a,li,dd,dt,blockquote{overflow-wrap:anywhere;word-break:normal} pre,code,kbd,samp{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word} @@ -153,3 +153,24 @@ table th,table td{overflow-wrap:anywhere;word-break:normal} /* Keep full-screen backdrops full-screen; constrain only the dialog surface. */ .modal-backdrop{width:100vw;max-width:100vw;max-height:100dvh;inset:0} .modal-backdrop>[role="dialog"],.modal-backdrop .modal,.modal-backdrop .preview-modal,.modal-backdrop .publish-modal{width:min(100%,920px);max-width:calc(100vw - 20px)} + + +/* Product-wide interaction, viewport and accessibility refinements. */ +html{scroll-padding-block:16px;scroll-behavior:smooth} +body{min-width:320px;overflow-wrap:normal} +button,a,input,select,textarea,[role="button"]{-webkit-tap-highlight-color:transparent} +a:not(.btn):not(.brand){text-decoration-thickness:1px;text-underline-offset:3px} +button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #a9472b;outline-offset:3px} +:root[data-theme=dark] button:focus-visible,:root[data-theme=dark] a:focus-visible,:root[data-theme=dark] input:focus-visible,:root[data-theme=dark] select:focus-visible,:root[data-theme=dark] textarea:focus-visible,:root[data-theme=dark] summary:focus-visible,:root[data-theme=dark] [tabindex]:focus-visible{outline-color:#ffd0b9} +input,select,textarea{accent-color:var(--accent);color-scheme:inherit} +select{max-width:100%} +button:not(.timestamp),.btn,.icon-button,.nav button,.timestamp{touch-action:manipulation} +:where(.content,.viewer,.privacy,.workspace,.main-content){scroll-margin-top:16px} +:where(.sidebar,.viewer-top,.topbar){padding-top:max(12px,env(safe-area-inset-top))} +#notice{bottom:max(16px,env(safe-area-inset-bottom))} +dialog{overscroll-behavior:contain} +@media(hover:hover) and (pointer:fine){.btn:not(:disabled):hover,.icon-button:not(:disabled):hover{filter:brightness(.94);transform:translateY(-1px)}} +@media(hover:none){.btn:hover,.icon-button:hover{filter:none;transform:none}} +@media(orientation:landscape) and (max-height:520px){.sidebar{padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}.content,.viewer{padding-block:20px}.stage{min-height:240px}.reply-panel{max-height:60vh}} +@media(forced-colors:active){button,a,input,select,textarea,summary,[tabindex]:focus-visible{forced-color-adjust:auto}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid Highlight}} +@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.btn,.icon-button{transform:none!important}} From 68d802c9d9341a5643524c7d312a3489007b7e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:52:28 +0200 Subject: [PATCH 180/575] fix(test): type the browser accessibility assertions correctly --- rebuild/e2e/visual.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index bdf933b..502594c 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -227,7 +227,7 @@ test("landscape layouts, keyboard access and accessible control names",async({pa } } await page.setViewportSize({width:390,height:844}); - const unnamed=await page.locator("button,[role=button],a[href],input:not([type=hidden]),select,textarea").evaluateAll(nodes=>nodes.filter(el=>{ + const unnamed=await page.locator("button,[role=button],a[href],input:not([type=hidden]),select,textarea").evaluateAll(nodes=>(nodes as HTMLElement[]).filter(el=>{ const e=el; if(e.disabled||e.getAttribute("aria-hidden")==="true")return false; const type=e.getAttribute("type"); @@ -236,7 +236,7 @@ test("landscape layouts, keyboard access and accessible control names",async({pa }).map(e=>({tag:e.tagName,html:e.outerHTML.slice(0,180)}))); expect(unnamed,JSON.stringify(unnamed)).toEqual([]); await page.keyboard.press("Tab"); - const focused=await page.evaluate(()=>({tag:document.activeElement?.tagName,outline:getComputedStyle(document.activeElement).outlineStyle,skip:document.activeElement?.classList.contains("skip")})); + const focused=await page.evaluate(()=>{const el=document.activeElement as HTMLElement|null;return {tag:el?.tagName,outline:el?getComputedStyle(el).outlineStyle:"none",skip:el?.classList.contains("skip")};}); expect(focused.tag).toBeTruthy(); expect(focused.outline).not.toBe("none"); }); From c484b8fdb12723dc98d82fecda7e487999bf11c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:54:11 +0200 Subject: [PATCH 181/575] fix(test): use DOM-safe accessible name checks for form controls --- rebuild/e2e/visual.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 502594c..aec9c67 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -229,10 +229,10 @@ test("landscape layouts, keyboard access and accessible control names",async({pa await page.setViewportSize({width:390,height:844}); const unnamed=await page.locator("button,[role=button],a[href],input:not([type=hidden]),select,textarea").evaluateAll(nodes=>(nodes as HTMLElement[]).filter(el=>{ const e=el; - if(e.disabled||e.getAttribute("aria-hidden")==="true")return false; + if(e.hasAttribute("disabled")||e.getAttribute("aria-hidden")==="true")return false; const type=e.getAttribute("type"); if(type==="file")return !!(e.getAttribute("aria-label")||e.labels?.length); - return !(e.getAttribute("aria-label")||e.getAttribute("aria-labelledby")||e.textContent?.trim()||e.labels?.length||e.title); + const labelled=!!(e.getAttribute("aria-label")||e.getAttribute("aria-labelledby")||e.textContent?.trim()||e.getAttribute("title")||e.getAttribute("placeholder")||e.getAttribute("alt")||e.closest("label")?.textContent?.trim()||(e.id&&document.querySelector(`label[for="${CSS.escape(e.id)}"]`)?.textContent?.trim()));return !labelled; }).map(e=>({tag:e.tagName,html:e.outerHTML.slice(0,180)}))); expect(unnamed,JSON.stringify(unnamed)).toEqual([]); await page.keyboard.press("Tab"); From 81915bc95e3e08ba5fd92adba32897d204278d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:57:54 +0200 Subject: [PATCH 182/575] fix(test): type accessible file input label check --- rebuild/e2e/visual.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index aec9c67..c1b9ca8 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -231,7 +231,7 @@ test("landscape layouts, keyboard access and accessible control names",async({pa const e=el; if(e.hasAttribute("disabled")||e.getAttribute("aria-hidden")==="true")return false; const type=e.getAttribute("type"); - if(type==="file")return !!(e.getAttribute("aria-label")||e.labels?.length); + if(type==="file")return !!(e.getAttribute("aria-label")||(e as HTMLInputElement).labels?.length); const labelled=!!(e.getAttribute("aria-label")||e.getAttribute("aria-labelledby")||e.textContent?.trim()||e.getAttribute("title")||e.getAttribute("placeholder")||e.getAttribute("alt")||e.closest("label")?.textContent?.trim()||(e.id&&document.querySelector(`label[for="${CSS.escape(e.id)}"]`)?.textContent?.trim()));return !labelled; }).map(e=>({tag:e.tagName,html:e.outerHTML.slice(0,180)}))); expect(unnamed,JSON.stringify(unnamed)).toEqual([]); From a270c790565475729b59f54572706cb61080a070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:57:56 +0200 Subject: [PATCH 183/575] design(ui): introduce distinct ScreenNote Studio visual system --- rebuild/legacy/public/style.css | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/rebuild/legacy/public/style.css b/rebuild/legacy/public/style.css index 8ed9dcb..157562e 100644 --- a/rebuild/legacy/public/style.css +++ b/rebuild/legacy/public/style.css @@ -174,3 +174,50 @@ dialog{overscroll-behavior:contain} @media(orientation:landscape) and (max-height:520px){.sidebar{padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}.content,.viewer{padding-block:20px}.stage{min-height:240px}.reply-panel{max-height:60vh}} @media(forced-colors:active){button,a,input,select,textarea,summary,[tabindex]:focus-visible{forced-color-adjust:auto}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid Highlight}} @media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.btn,.icon-button{transform:none!important}} + + +/* ScreenNote Studio — a distinct visual identity for the Cloudflare build. */ +:root{--bg:#f4f5f1;--panel:#fff;--soft:#e9ece5;--text:#171d19;--muted:#59645c;--line:#d5ddd4;--accent:#a6d936;--tint:#edf6d9;--dark:#111a15;--light:#f5f8ef;--surface:#fff;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-feature-settings:"ss01" on,"cv11" on} +:root[data-theme=dark]{--bg:#101512;--panel:#18211c;--soft:#222d25;--text:#edf3e9;--muted:#aab6aa;--line:#354239;--accent:#c1f36b;--tint:#293a20;--dark:#080d0a;--light:#eff8e5;--surface:#18211c;color-scheme:dark} +body{background:var(--bg);color:var(--text);font-size:14px;letter-spacing:-.01em} +.shell{grid-template-columns:248px minmax(0,1fr);background:var(--bg)} +.sidebar{width:248px;padding:30px 20px 24px;background:#111a15;color:#eef4e9;border:0} +.sidebar .brand{color:#f4f8ef;font-size:22px;letter-spacing:-1.1px}.sidebar .brand img{width:34px;height:34px} +.sidebar .nav-label{color:#91a095;margin:46px 12px 12px;font-size:9px;letter-spacing:1.8px} +.sidebar .nav{gap:5px}.sidebar .nav button{min-height:46px;border-radius:7px;color:#c7d1c7;padding:12px 13px;font-size:13px;transition:background .18s,color .18s} +.sidebar .nav button:hover{background:#26342b;color:#fff}.sidebar .nav .active{background:#c1f36b;color:#142015;font-weight:750} +.sidebar .side-note{border-color:#354239;color:#aab7aa}.sidebar .side-note strong{color:#f1f5eb} +.workspace{background:var(--bg)}.topbar{height:72px;padding-inline:clamp(20px,3.5vw,52px);border-color:var(--line);background:var(--panel)} +.topbar .tag{font-size:10px;letter-spacing:1.5px;font-weight:700}.content{max-width:1500px;padding:clamp(24px,3.6vw,54px)} +h1{font-size:clamp(34px,4.3vw,56px);font-weight:680;letter-spacing:-2.5px;line-height:1.02}h2{font-size:22px;font-weight:680;letter-spacing:-.9px}h3{font-size:15px;font-weight:700;letter-spacing:-.25px} +.eyebrow{font-size:9px;letter-spacing:2px;font-weight:800;color:#617d36}:root[data-theme=dark] .eyebrow{color:#c1f36b} +.heading{align-items:flex-end;margin-bottom:34px}.heading p{font-size:14px;line-height:1.7;max-width:520px} +.icon-button{border-radius:7px;background:var(--panel);border-color:var(--line)} +.btn{border-radius:6px;min-height:46px;padding:12px 17px;font-size:13px;font-weight:700;letter-spacing:-.01em;border-color:var(--line);box-shadow:0 1px 0 #101a1008} +.btn.primary{background:#b7ed4b;border-color:#b7ed4b;color:#152015}:root[data-theme=dark] .btn.primary{background:#c1f36b;border-color:#c1f36b;color:#111a15} +.btn.dark{background:#111a15;color:#f5f8ef;border-color:#111a15} +.panel{border-radius:8px;padding:25px;background:var(--panel);border-color:var(--line);box-shadow:0 2px 12px #17231908} +:root[data-theme=dark] .panel{box-shadow:0 2px 18px #00000014} +.record-grid{gap:20px}.stage{border-radius:8px;background:#111a15;min-height:360px;color:#eff8e5} +.stage:before{background-image:linear-gradient(#ffffff09 1px,transparent 1px),linear-gradient(90deg,#ffffff09 1px,transparent 1px);background-size:32px 32px} +.stage .screen-symbol{border-radius:5px;border-color:#a7c18a55;background:#1e3024}.stage .play-disc{background:#c1f36b;color:#142015} +.stage h2{font-size:26px;font-weight:700;letter-spacing:-1px}.stage p{color:#b8c7b7;font-size:13px} +.stage-top{border-radius:4px;border-color:#61745f;color:#e5efdf;letter-spacing:1.5px} +.record-options .option{padding:18px 0}.option strong{font-weight:700}.option input{accent-color:#91c62e} +.clip-grid{gap:16px}.clip-card{border-radius:7px;background:var(--panel);border-color:var(--line);box-shadow:0 2px 8px #15201608;animation:none} +.clip-card:hover{border-color:#9ab66d;box-shadow:0 7px 20px #15201612}.clip-art{background:var(--soft)}.clip-body{padding:18px} +.clip-body h3{font-size:14px;line-height:1.45}.empty{grid-column:1/-1;border-radius:7px;background:var(--soft);border-color:#aab9a6;padding:42px 28px} +.field input,.field textarea,.field select,select{border-radius:6px;border-color:var(--line);background:var(--panel)} +.field input:focus,.field textarea:focus,.field select:focus,select:focus{border-color:#8dbb38;box-shadow:0 0 0 3px #a6d9362b;outline:0} +.notice,.beta-note{border-radius:6px;background:var(--soft);border-color:var(--line)}.error-box{border-radius:6px} +.viewer-top{max-width:1320px;padding:22px clamp(18px,3vw,36px)}.viewer{max-width:1320px;padding:38px clamp(18px,3vw,36px)} +.viewer-grid{gap:22px}.viewer h1{font-size:clamp(28px,3.4vw,42px);letter-spacing:-1.7px} +.video-panel{border-radius:7px;background:#080d0a}.reply-panel{border-radius:7px}.comment{padding:18px 0} +.timestamp{background:var(--tint);color:var(--text);border-radius:4px} +.reactions button[aria-pressed=true]{background:var(--tint);border-color:#91c62e} +#notice{border-radius:6px;background:#111a15;color:#f3f8ed;box-shadow:0 8px 28px #0003} +dialog{border-radius:8px;box-shadow:0 22px 80px #0004}.footer{border-color:var(--line)} +:focus-visible{outline-color:#6d9e25!important;outline-offset:3px}:root[data-theme=dark] :focus-visible{outline-color:#c1f36b!important} +@media(max-width:1024px){.shell{grid-template-columns:190px minmax(0,1fr)}.sidebar{width:190px}.content{padding:28px 24px}} +@media(max-width:767px){.topbar{height:66px;padding-inline:18px}.content{padding:28px 18px}.heading{align-items:flex-start;margin-bottom:24px}.heading h1{font-size:clamp(32px,9vw,42px);letter-spacing:-1.7px}.panel{padding:20px}.stage{min-height:270px}.viewer{padding-block:26px}} +@media(max-width:420px){.content{padding-inline:15px}.topbar{padding-inline:15px}.heading h1{font-size:34px}.panel{padding:17px}.stage{min-height:250px}} From 4f27443b8e5d136a1af44f321589a3510c829c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 09:59:25 +0200 Subject: [PATCH 184/575] fix(test): correctly exclude labelled and hidden file inputs --- rebuild/e2e/visual.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index c1b9ca8..5ad2fdd 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -229,9 +229,9 @@ test("landscape layouts, keyboard access and accessible control names",async({pa await page.setViewportSize({width:390,height:844}); const unnamed=await page.locator("button,[role=button],a[href],input:not([type=hidden]),select,textarea").evaluateAll(nodes=>(nodes as HTMLElement[]).filter(el=>{ const e=el; - if(e.hasAttribute("disabled")||e.getAttribute("aria-hidden")==="true")return false; + if(e.hasAttribute("disabled")||e.hidden||e.getAttribute("aria-hidden")==="true")return false; const type=e.getAttribute("type"); - if(type==="file")return !!(e.getAttribute("aria-label")||(e as HTMLInputElement).labels?.length); + if(type==="file")return !(e.getAttribute("aria-label")||(e as HTMLInputElement).labels?.length); const labelled=!!(e.getAttribute("aria-label")||e.getAttribute("aria-labelledby")||e.textContent?.trim()||e.getAttribute("title")||e.getAttribute("placeholder")||e.getAttribute("alt")||e.closest("label")?.textContent?.trim()||(e.id&&document.querySelector(`label[for="${CSS.escape(e.id)}"]`)?.textContent?.trim()));return !labelled; }).map(e=>({tag:e.tagName,html:e.outerHTML.slice(0,180)}))); expect(unnamed,JSON.stringify(unnamed)).toEqual([]); From 797ad4d208a4c1eb1a353e08a594230d88933095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 10:04:05 +0200 Subject: [PATCH 185/575] design(ui): refine actual recording and editor surfaces for Studio --- rebuild/legacy/public/style.css | 77 +++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/rebuild/legacy/public/style.css b/rebuild/legacy/public/style.css index 157562e..7199368 100644 --- a/rebuild/legacy/public/style.css +++ b/rebuild/legacy/public/style.css @@ -221,3 +221,80 @@ dialog{border-radius:8px;box-shadow:0 22px 80px #0004}.footer{border-color:var(- @media(max-width:1024px){.shell{grid-template-columns:190px minmax(0,1fr)}.sidebar{width:190px}.content{padding:28px 24px}} @media(max-width:767px){.topbar{height:66px;padding-inline:18px}.content{padding:28px 18px}.heading{align-items:flex-start;margin-bottom:24px}.heading h1{font-size:clamp(32px,9vw,42px);letter-spacing:-1.7px}.panel{padding:20px}.stage{min-height:270px}.viewer{padding-block:26px}} @media(max-width:420px){.content{padding-inline:15px}.topbar{padding-inline:15px}.heading h1{font-size:34px}.panel{padding:17px}.stage{min-height:250px}} + + +/* Cloudflare Studio surfaces mapped to the actual recording/editor markup. */ +.workspace-summary{padding:13px 0 25px;border-bottom:1px solid var(--line);margin-bottom:22px} +.workspace-summary .status-dot{background:#8cc63f;box-shadow:0 0 0 4px #8cc63f20} +.record-setup{border:1px solid var(--line);border-radius:8px;background:var(--panel);overflow:hidden} +.record-setup>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 21px;min-height:58px;font-size:13px;font-weight:700;cursor:pointer} +.record-setup>summary::-webkit-details-marker{display:none} +.record-setup>summary:after{content:'+';font-size:18px;color:#759d35} +.record-setup[open]>summary:after{content:'−'} +.record-setup[open]>summary{border-bottom:1px solid var(--line)} +.record-setup>.record-grid{padding:22px} +.compact-recorder{grid-template-columns:minmax(0,1.35fr) minmax(250px,.9fr);gap:18px} +.record-options{border:1px solid var(--line);border-radius:7px;background:var(--panel);padding:22px} +.recorder-intro{padding-bottom:16px;border-bottom:1px solid var(--line);margin-bottom:16px} +.recorder-intro>svg{color:#7ba52e} +.record-guide{border:0;border-radius:7px;background:#edf3e6;padding:25px;color:#1b281b} +:root[data-theme=dark] .record-guide{background:#202c23;color:#edf3e9} +.record-guide .guide-icon{border-radius:6px;background:#c1f36b;color:#142015} +.record-guide h2{font-size:24px;letter-spacing:-1px} +.record-guide ol{gap:13px} +.record-guide li strong{font-weight:750} +.record-guide .btn{border-color:#b8c7ac;background:transparent;color:inherit} +.capture-frame{border-radius:7px;border:1px solid #35473a;background:#0c140f;min-height:210px} +.capture-frame video{max-height:60vh} +.capture-frame canvas{border-radius:7px} +.recording{border:1px solid var(--line);border-radius:8px;padding:18px;background:var(--panel)} +.recording .capture-frame{margin-bottom:16px} +.recording .tool-controls{display:flex;flex-wrap:wrap;gap:10px} +.recording .tool-controls .btn{min-height:42px} +.setup-note{max-width:900px;color:var(--muted);font-size:12px} +.countdown{color:var(--text);font-variant-numeric:tabular-nums} +.library-section{padding-top:10px} +.library-heading .eyebrow{color:#718f38} +.clip-card{border-radius:7px} +.clip-art{background:linear-gradient(135deg,#dce6d2,#f0f2ec);color:#52674b} +:root[data-theme=dark] .clip-art{background:linear-gradient(135deg,#25352a,#1a241d);color:#c1f36b} +.clip-card:hover{transform:translateY(-2px);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease} +.clip-badge{border-radius:3px;letter-spacing:.5px} +.card-play{border-radius:5px} +.editor-grid{grid-template-columns:minmax(0,1.45fr) minmax(280px,.8fr)} +.editor-preview,.editor-tools,.trim-panel,.panel.reply-panel{border-radius:7px} +.video-panel{border-radius:7px} +.viewer-top{border-bottom:1px solid var(--line)} +.viewer{padding-top:32px} +.viewer .video-panel{box-shadow:0 12px 34px #07110920} +.reply-panel{border:1px solid var(--line);background:var(--panel)} +.privacy,.help-grid{max-width:880px} +@media(max-width:1024px){ + .compact-recorder{grid-template-columns:minmax(0,1fr) minmax(220px,.8fr)} + .editor-grid{grid-template-columns:minmax(0,1fr) 260px} + .clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))} +} +@media(max-width:767px){ + .record-setup>.record-grid{padding:14px} + .compact-recorder,.editor-grid{grid-template-columns:minmax(0,1fr)} + .record-options,.record-guide{padding:18px} + .recording{padding:12px} + .capture-frame{min-height:160px} + .capture-frame video{max-height:48vh} + .record-guide{order:2} + .workspace-summary{font-size:11px;gap:8px} + .workspace-summary .text-button{margin-left:0} + .clip-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px} + .clip-body{padding:13px} + .viewer-grid{grid-template-columns:minmax(0,1fr)} + .viewer-media{position:static} +} +@media(max-width:420px){ + .clip-grid{grid-template-columns:minmax(0,1fr)} + .record-setup>summary{padding-inline:15px} + .record-setup>.record-grid{padding:10px} + .record-options,.record-guide{padding:15px} + .record-defaults{grid-template-columns:minmax(0,1fr)} + .editor-actions,.dialog-actions{flex-wrap:wrap} +} +@media(prefers-reduced-motion:reduce){.clip-card:hover{transform:none;transition:none}} From de98c8ebb8dcfe56588c286b8ad7964db5846d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 10:11:28 +0200 Subject: [PATCH 186/575] Redesign Cloudflare app into a distinct editorial studio layout --- rebuild/legacy/public/style.css | 76 +++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/rebuild/legacy/public/style.css b/rebuild/legacy/public/style.css index 7199368..b0fed47 100644 --- a/rebuild/legacy/public/style.css +++ b/rebuild/legacy/public/style.css @@ -298,3 +298,79 @@ dialog{border-radius:8px;box-shadow:0 22px 80px #0004}.footer{border-color:var(- .editor-actions,.dialog-actions{flex-wrap:wrap} } @media(prefers-reduced-motion:reduce){.clip-card:hover{transform:none;transition:none}} + +/* ScreenNote Cloudflare redesign v2: horizontal studio shell, editorial dashboard, mobile task dock. */ +:root{--bg:#f7f4ee;--panel:#fffefa;--soft:#eee9df;--text:#201f1b;--muted:#706c63;--line:#ded8cd;--accent:#d34d2f;--tint:#f7e4dc;--dark:#201f1b;--light:#fffefa;--surface:#fffefa;color-scheme:light;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif} +:root[data-theme=dark]{--bg:#171714;--panel:#22221e;--soft:#2b2a25;--text:#f2eee5;--muted:#b7b0a3;--line:#414037;--accent:#ff9678;--tint:#3c2922;--dark:#11110f;--light:#f4eee2;--surface:#22221e;color-scheme:dark} +body{background:var(--bg);color:var(--text);font-size:14px} +.shell{display:block;min-height:100dvh;background:var(--bg)} +.sidebar{position:sticky;inset:0 0 auto;width:100%;height:76px;padding:0 clamp(20px,5vw,72px);border:0;border-bottom:1px solid var(--line);background:var(--panel);color:var(--text);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:28px;overflow:visible;z-index:30} +.sidebar .brand{color:var(--text);font-size:22px;letter-spacing:-1.2px}.sidebar .brand img{width:30px;height:30px} +.sidebar .nav-label,.sidebar .side-note{display:none} +.sidebar .nav{height:100%;display:flex;align-items:center;gap:6px} +.sidebar .nav button{height:100%;padding:0 17px;border:0;border-bottom:2px solid transparent;border-radius:0;background:none;color:var(--muted);font-size:13px;font-weight:600;white-space:nowrap} +.sidebar .nav button.active{background:none;color:var(--text);border-bottom-color:var(--accent)} +.workspace{display:block;min-width:0} +.topbar{height:0;min-height:0;padding:0;border:0;overflow:visible;position:relative;z-index:31} +.topbar .breadcrumb,.topbar .brand{display:none} +.top-actions{position:absolute;right:clamp(20px,5vw,72px);top:-60px;gap:12px} +.top-actions .tag{display:none} +.icon-button{border-radius:3px;background:var(--panel);border-color:var(--line)} +.content{max-width:1440px;padding:34px clamp(20px,5vw,72px) 28px} +h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(42px,6vw,76px);font-weight:400;line-height:.99;letter-spacing:-2.8px} +h2{font-family:Georgia,serif;font-weight:400;letter-spacing:-.5px} +.eyebrow{color:var(--accent);font-size:10px;letter-spacing:2px;font-weight:700} +.heading.library-heading{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,310px);align-items:end;gap:42px;padding:32px 0 36px;border-bottom:1px solid var(--line);margin-bottom:0} +.library-heading>div:first-child{max-width:790px} +.library-heading h1{max-width:780px;font-size:clamp(42px,6vw,76px);margin-bottom:20px} +.library-heading p{font-size:16px;line-height:1.7;color:var(--muted);max-width:610px} +.library-heading .actions{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding-bottom:4px} +.library-heading .actions .btn{width:100%;justify-content:center;min-height:50px;border-radius:3px} +.library-heading .actions .btn.primary,.btn.primary,.record-options .btn.primary{background:var(--accent);border-color:var(--accent);color:#fff} +.library-heading .actions:after{content:"NO ACCOUNT. NO VIEWER SEATS.";text-align:center;color:var(--muted);font-size:9px;letter-spacing:1.4px;margin-top:6px} +.workspace-summary{border:0;padding:14px 0 18px;margin:0;display:flex;align-items:center;gap:9px;color:var(--muted);font-size:12px} +.workspace-summary .status-dot{width:7px;height:7px;border-radius:50%;background:#5e9360;box-shadow:0 0 0 3px #5e93601b} +.workspace-summary .text-button{margin-left:auto} +.library-section{padding-top:22px}.section-head{margin:0 0 20px;padding-bottom:13px;border-bottom:1px solid var(--line)} +.section-head h2{font-size:26px}.library-backup-tools{background:transparent;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;padding:14px 0;margin:0 0 20px} +.library-filters{display:grid;grid-template-columns:minmax(180px,1.5fr) repeat(2,minmax(130px,.65fr));gap:12px;align-items:end;margin:18px 0} +.field label{font-size:11px;color:var(--muted)}.field input,.field textarea,.field select,select{border-radius:3px;background:var(--panel);border-color:var(--line);min-height:46px} +.clip-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.clip-card{border-radius:3px;border:1px solid var(--line);box-shadow:none;background:var(--panel)} +.clip-card:hover{border-color:var(--accent);box-shadow:0 8px 24px #3c28100d;transform:translateY(-2px)} +.clip-art{border-radius:0;background:#e8e2d8;color:#6d6255}:root[data-theme=dark] .clip-art{background:#343129;color:#e5d5bf} +.clip-body{padding:17px}.clip-body h3{font-size:15px;font-weight:650}.card-actions{display:flex;gap:8px}.card-actions .btn{flex:1} +.btn{border-radius:3px;min-height:46px;font-weight:650}.panel{border-radius:3px;box-shadow:none} +.record-setup{margin-top:38px;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;background:transparent} +.record-setup>summary{padding:20px 0;font-family:Georgia,serif;font-size:25px;font-weight:400}.record-setup>summary:after{color:var(--accent)} +.record-setup>.record-grid{padding:24px 0 28px}.compact-recorder{grid-template-columns:minmax(0,1.45fr) minmax(240px,.8fr);gap:22px} +.record-options{background:var(--panel);border:1px solid var(--line);border-radius:3px;padding:26px;box-shadow:none} +.recorder-intro h2{font-size:30px}.record-guide{background:#24231f;color:#f5f0e7;border-radius:3px;padding:28px} +.record-guide h2{font-size:29px;color:#fff}.record-guide li{color:#c9c2b7}.record-guide li strong{color:#fff}.record-guide .btn{border-color:#777065;color:#fff;background:transparent} +.capture-frame,.video-panel{border-radius:3px}.recording{border-radius:3px;background:var(--panel);border:1px solid var(--line)} +.editor-grid{grid-template-columns:minmax(0,1.5fr) minmax(280px,.75fr);gap:24px} +.viewer-top{background:var(--panel)}.privacy h1,.privacy h2{font-family:Georgia,serif;font-weight:400} +.footer{border-color:var(--line)}#notice{border-radius:3px;background:#24231f;color:#fff} +@media(max-width:900px){.sidebar{grid-template-columns:auto 1fr auto;padding-inline:24px;gap:16px}.sidebar .nav{justify-content:center}.sidebar .nav button{padding-inline:11px}.top-actions{right:24px}.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}} +@media(max-width:680px){ +.sidebar{position:fixed;inset:auto 0 0;height:auto;min-height:68px;padding:7px 8px max(8px,env(safe-area-inset-bottom));display:block;background:var(--panel);border:0;border-top:1px solid var(--line);box-shadow:0 -8px 24px #201f1b0b} +.sidebar>.brand,.sidebar .nav-label,.sidebar .side-note{display:none} +.sidebar .nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));height:auto;gap:2px} +.sidebar .nav button{height:auto;min-height:54px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;padding:5px;border:0;border-radius:3px;font-size:10px} +.sidebar .nav button svg{width:19px;height:19px}.sidebar .nav button.active{background:var(--tint);color:var(--accent)} +.topbar{height:64px;position:absolute;top:0;left:0;right:0;overflow:visible;border:0;background:var(--panel)} +.topbar .brand{display:flex;position:absolute;left:18px;top:14px;font-size:20px}.top-actions{top:10px;right:18px} +.content{padding:82px 18px calc(94px + env(safe-area-inset-bottom))} +.heading.library-heading{grid-template-columns:minmax(0,1fr);gap:22px;padding:23px 0 25px} +.library-heading h1{font-size:clamp(40px,11vw,58px);letter-spacing:-1.9px;line-height:1.01;margin-bottom:14px} +.library-heading p{font-size:14px;line-height:1.65}.library-heading .actions{display:grid;grid-template-columns:1fr 1fr;gap:9px} +.library-heading .actions .btn{min-height:48px;padding:10px 9px;font-size:12px}.library-heading .actions:after{grid-column:1/-1} +.workspace-summary{flex-wrap:wrap;font-size:11px;padding:13px 0}.workspace-summary .text-button{margin-left:0} +.library-section{padding-top:14px}.section-head{align-items:center;margin-bottom:15px}.section-head h2{font-size:24px} +.library-filters{grid-template-columns:1fr 1fr;gap:9px}.library-filters .field:first-child{grid-column:1/-1} +.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.clip-body{padding:12px}.clip-body h3{font-size:13px} +.record-setup{margin-top:28px}.record-setup>summary{font-size:22px;padding:17px 0}.record-setup>.record-grid{padding:14px 0} +.compact-recorder,.editor-grid{grid-template-columns:minmax(0,1fr);gap:12px}.record-options,.record-guide{padding:18px}.editor-grid>aside{display:block} +.footer{display:block;margin-top:38px}.footer>span{display:block;margin:8px 0} +} +@media(max-width:390px){.content{padding-inline:14px}.library-heading h1{font-size:40px}.library-heading .actions{grid-template-columns:1fr}.library-heading .actions:after{grid-column:auto}.clip-grid,.library-filters{grid-template-columns:minmax(0,1fr)}.library-filters .field:first-child{grid-column:auto}.record-options{padding:15px}} +@media(prefers-reduced-motion:reduce){.clip-card:hover{transform:none}} From 2c09c4ef5c07367e979931d7ffa31274b8b2fc49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 10:11:44 +0200 Subject: [PATCH 187/575] Fix studio header action placement across desktop breakpoints --- rebuild/legacy/public/style.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rebuild/legacy/public/style.css b/rebuild/legacy/public/style.css index b0fed47..efcafc1 100644 --- a/rebuild/legacy/public/style.css +++ b/rebuild/legacy/public/style.css @@ -374,3 +374,6 @@ h2{font-family:Georgia,serif;font-weight:400;letter-spacing:-.5px} } @media(max-width:390px){.content{padding-inline:14px}.library-heading h1{font-size:40px}.library-heading .actions{grid-template-columns:1fr}.library-heading .actions:after{grid-column:auto}.clip-grid,.library-filters{grid-template-columns:minmax(0,1fr)}.library-filters .field:first-child{grid-column:auto}.record-options{padding:15px}} @media(prefers-reduced-motion:reduce){.clip-card:hover{transform:none}} + +/* Header action placement for the new horizontal shell. */ +@media(min-width:681px){.topbar{position:fixed;top:15px;right:clamp(20px,5vw,72px);width:auto;height:auto;min-height:0;z-index:35}.top-actions{position:static;gap:10px}} From 4cc8c7bd9357185de3f1cc1964362c4a3fe879fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 10:12:40 +0200 Subject: [PATCH 188/575] Replace legacy dashboard hero with new ScreenNote workspace composition --- rebuild/legacy/public/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/legacy/public/app.js b/rebuild/legacy/public/app.js index ce133d4..4c81006 100644 --- a/rebuild/legacy/public/app.js +++ b/rebuild/legacy/public/app.js @@ -43,7 +43,7 @@ function home(){ const canRecord=globalThis.isSecureContext&&!!navigator.mediaDevices?.getDisplayMedia&&!!globalThis.MediaRecorder; selected=null;resetURL(); const returning=clips.length>0; - shell(`
YOUR WORK. CLEARLY EXPLAINED.

${returning?'Your recordings.':'Show it. Send it. Sorted.'}

${returning?'Pick up a conversation, or start a new one.':'Record a walkthrough. Share a link. Get useful feedback.'}

+ shell(`
SCREENNOTE / YOUR WORKSPACE

Show it. Do not explain it twice.

Capture the detail, add context, and share one clear link. Your recordings stay on this device until you decide otherwise.

NO ACCOUNT REQUIRED · PRIVATE BY DEFAULT
`);
Local until you publish · No account needed to watch
${returning?libraryMarkup():''}
${canRecord||window.__ANDROID_APP__?'Record something new':'Import a device recording'}
A LITTLE CONTEXT GOES A LONG WAY

${canRecord?'Ready to record?':'Bring your recording.'}

${canRecord?'Choose your screen next. Review before you share.':'Use your phone’s screen recorder, then import the video here.'}

${icon('screen')}
From 316873fd5721e9be27e3fd1cb437c01470b77304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 10:14:01 +0200 Subject: [PATCH 189/575] Fix dashboard template boundary after workspace redesign --- rebuild/legacy/public/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/legacy/public/app.js b/rebuild/legacy/public/app.js index 4c81006..edd18b6 100644 --- a/rebuild/legacy/public/app.js +++ b/rebuild/legacy/public/app.js @@ -43,7 +43,7 @@ function home(){ const canRecord=globalThis.isSecureContext&&!!navigator.mediaDevices?.getDisplayMedia&&!!globalThis.MediaRecorder; selected=null;resetURL(); const returning=clips.length>0; - shell(`
SCREENNOTE / YOUR WORKSPACE

Show it. Do not explain it twice.

Capture the detail, add context, and share one clear link. Your recordings stay on this device until you decide otherwise.

NO ACCOUNT REQUIRED · PRIVATE BY DEFAULT
`); + shell(`
SCREENNOTE / YOUR WORKSPACE

Show it. Do not explain it twice.

Capture the detail, add context, and share one clear link. Your recordings stay on this device until you decide otherwise.

NO ACCOUNT REQUIRED · PRIVATE BY DEFAULT
Local until you publish · No account needed to watch
${returning?libraryMarkup():''}
${canRecord||window.__ANDROID_APP__?'Record something new':'Import a device recording'}
A LITTLE CONTEXT GOES A LONG WAY

${canRecord?'Ready to record?':'Bring your recording.'}

${canRecord?'Choose your screen next. Review before you share.':'Use your phone’s screen recorder, then import the video here.'}

${icon('screen')}
From 84ffd5f8866c68831620c205a5df2e8e84930943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 10:17:12 +0200 Subject: [PATCH 190/575] Remove redundant hero microcopy and tighten responsive action group --- rebuild/legacy/public/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/legacy/public/app.js b/rebuild/legacy/public/app.js index edd18b6..3775952 100644 --- a/rebuild/legacy/public/app.js +++ b/rebuild/legacy/public/app.js @@ -43,7 +43,7 @@ function home(){ const canRecord=globalThis.isSecureContext&&!!navigator.mediaDevices?.getDisplayMedia&&!!globalThis.MediaRecorder; selected=null;resetURL(); const returning=clips.length>0; - shell(`
SCREENNOTE / YOUR WORKSPACE

Show it. Do not explain it twice.

Capture the detail, add context, and share one clear link. Your recordings stay on this device until you decide otherwise.

NO ACCOUNT REQUIRED · PRIVATE BY DEFAULT
+ shell(`
SCREENNOTE / YOUR WORKSPACE

Show it. Do not explain it twice.

Capture the detail, add context, and share one clear link. Your recordings stay on this device until you decide otherwise.

Local until you publish · No account needed to watch
${returning?libraryMarkup():''}
${canRecord||window.__ANDROID_APP__?'Record something new':'Import a device recording'}
A LITTLE CONTEXT GOES A LONG WAY

${canRecord?'Ready to record?':'Bring your recording.'}

${canRecord?'Choose your screen next. Review before you share.':'Use your phone’s screen recorder, then import the video here.'}

${icon('screen')}
From 7d11913dac327fbcc7d94941b2866d0fb95d3729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 10:17:29 +0200 Subject: [PATCH 191/575] Unify the redesigned warm accent in dark mode --- rebuild/legacy/public/style.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rebuild/legacy/public/style.css b/rebuild/legacy/public/style.css index efcafc1..99bdc50 100644 --- a/rebuild/legacy/public/style.css +++ b/rebuild/legacy/public/style.css @@ -377,3 +377,9 @@ h2{font-family:Georgia,serif;font-weight:400;letter-spacing:-.5px} /* Header action placement for the new horizontal shell. */ @media(min-width:681px){.topbar{position:fixed;top:15px;right:clamp(20px,5vw,72px);width:auto;height:auto;min-height:0;z-index:35}.top-actions{position:static;gap:10px}} + +/* Keep the warm accent coherent in both themes; remove inherited lime-only controls. */ +:root[data-theme=dark] .btn.primary,:root[data-theme=dark] .record-options .btn.primary{background:var(--accent);border-color:var(--accent);color:#211b17} +:root[data-theme=dark] .dashboard-copy .eyebrow,:root[data-theme=dark] .recorder-intro>svg{color:var(--accent)} +:root[data-theme=dark] .record-guide .guide-icon{background:var(--accent);color:#211b17} +:root[data-theme=dark] .record-options input{accent-color:var(--accent)} From dd81c591a540fe3880780c0dc97a52ccbdbf428c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 11:55:32 +0200 Subject: [PATCH 192/575] Expand populated review UI responsive and theme coverage --- rebuild/e2e/visual.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 5ad2fdd..fff1f20 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -75,7 +75,7 @@ test("import, title, captions, chapters and bug-report context persist locally", await page.locator("#export-report").click(); expect((await download).suggestedFilename()).toContain("bug-report"); await expect(page.locator("#recording-title-input")).toHaveValue(savedTitle); - for(const width of [320,375,768]){await page.setViewportSize({width,height:900});await contained(page,width);} + for(const theme of ["light","dark"]){await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme);for(const v of viewports){await page.setViewportSize({width:v.width,height:v.height});await contained(page,v.width);if([320,375,768,1120,1440].includes(v.width))await page.screenshot({path:"test-results/screenshots/review-"+v.width+"-"+theme+".png",fullPage:true});}} }); test("screen capture can pause, resume and save a private local recording",async({page})=>{ From 9de8fe2147b3cc24feee23c390978931302c0693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:45:04 +0200 Subject: [PATCH 193/575] Correct Cloudflare parity ledger against source implementation --- rebuild/FEATURE-PARITY-ACCEPTANCE.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rebuild/FEATURE-PARITY-ACCEPTANCE.md b/rebuild/FEATURE-PARITY-ACCEPTANCE.md index d43953b..5f48a0d 100644 --- a/rebuild/FEATURE-PARITY-ACCEPTANCE.md +++ b/rebuild/FEATURE-PARITY-ACCEPTANCE.md @@ -49,15 +49,15 @@ Status meanings: | Resolve/reopen moderation | Release verdict | Documented | All creator/author permission combinations | | Playback bubbles and timeline markers | Root README | Documented | Seek accuracy, keyboard access, fullscreen/PiP boundaries | | Frame-point annotations | Not established as a named shipped capability in root README | Frame-point annotations documented | Verify actual UI editing, persistence, export and mobile usability | -| Captions SRT/VTT import/export | Technical notes document owner-supplied captions | Not listed in rebuild implementation | Port and test parser, timestamps, malformed files, download | -| Searchable transcript | Technical notes document searchable timestamp transcript | Not listed; rebuild explicitly says no extracted transcript | Port owner-supplied transcript search; do not imply AI transcription | -| Chapters | Technical notes list chapters | Not listed in rebuild README | Port creation, navigation, seek and export | -| Advanced annotation/redaction/mask tools | Technical notes list rectangles, arrows, highlights, opaque masks and blur; marked copies | Not listed as equivalent in rebuild README | Port full editor and rendered-copy pipeline or explicitly remove from parity scope only with owner decision | +| Captions SRT/VTT import/export | Technical notes document owner-supplied captions | Implemented in `legacy/lib/enrichment.js` and `legacy/public/extras-ui.js`; Playwright imports, saves and exports VTT | Verify malformed/edge-case parser coverage and shared persistence on live Worker | +| Searchable transcript | Technical notes document searchable timestamp transcript | Implemented as search over owner-supplied caption cues in `extras-ui.js`; no automatic transcription | Verify cue ordering, empty search, Unicode/case handling and seek behavior; do not imply AI transcription | +| Chapters | Technical notes list chapters | Implemented in `enrichment.js` and `extras-ui.js`; chapter navigation is rendered in viewer | Verify malformed timestamps, ordering, boundary conditions and live persistence | +| Advanced annotation/redaction/mask tools | Technical notes list rectangles, arrows, highlights, opaque masks and blur; marked copies | `markup.js` and editor UI implement rectangle, arrow, highlight, opaque redaction and blur marks; marks are frame-normalized | Verify mark persistence, export/trim rendering, blur/redaction correctness, keyboard/touch usability and output pixel evidence | | Structured coding-agent handoff | Not established in root README | Recursive discussion JSON documented; explicitly lacks extracted transcript/keyframes | Schema compatibility, export/import, escaping, large discussion | -| Bug reports | Technical notes list structured reports and Markdown download | Not listed | Port local report workflow and privacy controls | +| Bug reports | Technical notes list structured reports and Markdown download | Implemented in `enrichment.js` and `extras-ui.js`; owner-supplied fields, optional explicit user-agent inclusion and Markdown export | Verify URL credential rejection, long text, shared visibility warning and live persistence | | Recovery keys | Release verdict confirms management restore (not video backup) | Portable key export/import documented | Restore in a separate browser/profile, wrong key, partial restore and revocation | -| Offline behavior | Release verdict confirms offline banner/publish gate | Not established in rebuild README | Offline local workflows, queue/retry and clear publish gating | -| Upload resume/retry | Release verdict confirms per-part retry and resume | Live upload flow documented; equivalent resume semantics not established | Interrupt network mid-upload and resume without duplicate/corrupt chunks | +| Offline behavior | Release verdict confirms offline banner/publish gate | Offline/online events update the connection banner; service-worker offline library E2E exists | Verify all routes/assets cached, offline editing/import/trim, stale API failures and retry/reconnect behavior | +| Upload resume/retry | Release verdict confirms per-part retry and resume | `app.js` resumes from `upload-state`, skips acknowledged chunks and retries transfers | Verify real interrupted network resume, duplicate part idempotency, expiry/re-reservation and orphan cleanup under live R2/D1 | | Storage/capacity handling | 50 MB per clip; 10 min; 1 GB budget; 100 comments | 100 MB per upload; 10 min; 200 comments; dev R2/D1 | Confirm actual quotas, atomic reservations, concurrency, cleanup and abuse cost | | Accessibility | 44px targets, focus, skip link, aria-live documented for Vercel | Manual keyboard/screen-reader review remains open | WCAG-oriented keyboard, focus, names, contrast, announcements, reduced motion | | Responsive visual QA | 11-viewport re-run explicitly outstanding in Vercel verdict | 320/375/768/1120/1440 visual tests documented | Add missing breakpoints/orientations/heights and verify screenshots on candidate | @@ -67,7 +67,7 @@ Status meanings: ## 3. Immediate parity blockers 1. The Cloudflare candidate README does not claim parity for captions/SRT/VTT, searchable transcripts, chapters, structured bug reports, offline behavior, upload resume, or the full mask/annotation workflow. -2. The candidate explicitly says its agent handoff export lacks extracted transcript and generated keyframes. +2. The candidate does not implement automatic transcript extraction or generated keyframes; transcript search is over owner-supplied captions. Structured agent handoff is not present as a named product workflow and needs a precise scope decision against the reference implementation. 3. True frame-by-frame drawing and native desktop capture are explicitly roadmap items. 4. Recovery-key restore in a separate browser, real elapsed-time expiry, independent security review, manual accessibility, and physical-device QA remain open. 5. Candidate upload/comment limits differ from Vercel. Limits must be intentionally chosen and tested, not treated as automatic improvements. From 45fc98cafbc4f1779ed6de1c204fd66c2cb1deed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:45:18 +0200 Subject: [PATCH 194/575] Add focused video context parser and trim regression tests --- rebuild/tests/enrichment.test.ts | 66 ++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 rebuild/tests/enrichment.test.ts diff --git a/rebuild/tests/enrichment.test.ts b/rebuild/tests/enrichment.test.ts new file mode 100644 index 0000000..9ec2ee8 --- /dev/null +++ b/rebuild/tests/enrichment.test.ts @@ -0,0 +1,66 @@ +import { describe, expect, it } from "vitest"; +import { + captionsVTT, + parseCaptions, + parseChapters, + reportMarkdown, + trimExtras, + validateExtras +} from "../legacy/lib/enrichment.js"; + +describe("owner-supplied video context", () => { + it("parses SRT and WebVTT timestamps and exports valid WebVTT", () => { + const cues = parseCaptions("1\n00:00:01,000 --> 00:00:02,500\nFirst step\n\n2\n00:00:03.000 --> 00:00:04.000\nSecond step", 10); + expect(cues).toEqual([ + { start: 1, end: 2.5, text: "First step" }, + { start: 3, end: 4, text: "Second step" } + ]); + expect(captionsVTT(cues)).toContain("00:00:01.000 --> 00:00:02.500"); + }); + + it("rejects malformed, unordered, out-of-range and oversized caption data", () => { + expect(() => parseCaptions("00:00:02 --> 00:00:03\nLate\n\n00:00:01 --> 00:00:02\nEarly", 10)).toThrow(); + expect(() => parseCaptions("00:00:01 --> 00:00:01\nZero length", 10)).toThrow(); + expect(() => parseCaptions("00:00:01 --> 00:00:12\nToo long", 10)).toThrow(); + expect(() => parseCaptions("x".repeat(20001), 10)).toThrow(); + }); + + it("validates ordered chapters and rejects duplicate or out-of-range timestamps", () => { + expect(parseChapters("0:01 Opening\n0:05 Checkout", 10)).toEqual([ + { time: 1, title: "Opening" }, + { time: 5, title: "Checkout" } + ]); + expect(() => parseChapters("0:05 Later\n0:04 Earlier", 10)).toThrow(); + expect(() => parseChapters("0:10 End", 10)).toThrow(); + }); + + it("trims captions and chapters to a selected interval without mutating the source", () => { + const source = { + captions: [ + { start: 0, end: 2, text: "before and overlap" }, + { start: 3, end: 4, text: "inside" }, + { start: 8, end: 9, text: "after" } + ], + chapters: [{ time: 1, title: "Start" }, { time: 3, title: "Middle" }, { time: 8, title: "End" }], + report: null + }; + const result = trimExtras(source, 1.5, 5); + expect(result.captions).toEqual([ + { start: 0, end: 0.5, text: "before and overlap" }, + { start: 1.5, end: 2.5, text: "inside" } + ]); + expect(result.chapters).toEqual([{ time: 1.5, title: "Middle" }]); + expect(source.captions[0].start).toBe(0); + }); + + it("rejects credentials in bug-report URLs and exports only supplied context", () => { + expect(() => validateExtras({ report: { url: "https://user:secret@example.com/private" } }, 10)).toThrow(); + const markdown = reportMarkdown({ + id: "test-id", title: "Checkout issue", shared: false, + report: { url: "https://example.com/checkout", steps: "Open checkout", expected: "Payment appears", actual: "Payment is missing", environment: "" }, + chapters: [], captions: [] + }, "https://screennote.test"); + expect(markdown).toContain("Open checkout"); + expect(markdown).not.toContain("screennote.test"); + }); +}); From 1d6f158c12a49c6d1ac31326ab8f2dba2777624d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:45:48 +0200 Subject: [PATCH 195/575] Test annotation geometry and privacy-mask rendering --- rebuild/tests/markup.test.ts | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 rebuild/tests/markup.test.ts diff --git a/rebuild/tests/markup.test.ts b/rebuild/tests/markup.test.ts new file mode 100644 index 0000000..9ec2f68 --- /dev/null +++ b/rebuild/tests/markup.test.ts @@ -0,0 +1,54 @@ +import { describe, expect, it } from "vitest"; +import { paintMarkup } from "../legacy/public/markup.js"; + +function context() { + const calls: Array<{ name: string; args: unknown[]; fillStyle?: unknown; strokeStyle?: unknown; filter?: unknown }> = []; + const ctx: any = { + fillStyle: "", strokeStyle: "", lineWidth: 0, filter: "none", + save() { calls.push({ name: "save", args: [] }); }, + restore() { calls.push({ name: "restore", args: [] }); }, + fillRect(...args: unknown[]) { calls.push({ name: "fillRect", args, fillStyle: this.fillStyle }); }, + strokeRect(...args: unknown[]) { calls.push({ name: "strokeRect", args, strokeStyle: this.strokeStyle }); }, + beginPath() { calls.push({ name: "beginPath", args: [] }); }, + moveTo(...args: unknown[]) { calls.push({ name: "moveTo", args }); }, + lineTo(...args: unknown[]) { calls.push({ name: "lineTo", args }); }, + stroke() { calls.push({ name: "stroke", args: [] }); }, + rect(...args: unknown[]) { calls.push({ name: "rect", args }); }, + clip() { calls.push({ name: "clip", args: [] }); }, + drawImage(...args: unknown[]) { calls.push({ name: "drawImage", args }); } + }; + return { ctx, calls }; +} + +describe("frame-normalized annotations", () => { + it("scales normalized coordinates to the output frame", () => { + const { ctx, calls } = context(); + paintMarkup(ctx, 1000, 500, [{ kind: "rectangle", x: .1, y: .2, w: .3, h: .4 }]); + expect(calls.find(x => x.name === "strokeRect")?.args).toEqual([100, 100, 300, 200]); + }); + + it("renders privacy redactions as opaque dark fills, not translucent highlights", () => { + const { ctx, calls } = context(); + paintMarkup(ctx, 800, 450, [{ kind: "redact", x: .25, y: .2, w: .5, h: .3 }]); + const fill = calls.find(x => x.name === "fillRect"); + expect(fill?.args).toEqual([200, 90, 400, 135]); + expect(fill?.fillStyle).toBe("#161a17"); + }); + + it("clips blur effects to the selected region", () => { + const { ctx, calls } = context(); + paintMarkup(ctx, 800, 450, [{ kind: "blur", x: .1, y: .1, w: .2, h: .2 }]); + expect(calls.some(x => x.name === "clip")).toBe(true); + expect(calls.some(x => x.name === "drawImage")).toBe(true); + }); + + it("renders arrows and translucent highlights using distinct drawing paths", () => { + const { ctx, calls } = context(); + paintMarkup(ctx, 640, 360, [ + { kind: "arrow", x: .1, y: .2, w: .3, h: .4 }, + { kind: "highlight", x: .5, y: .5, w: .2, h: .2 } + ]); + expect(calls.filter(x => x.name === "lineTo").length).toBeGreaterThanOrEqual(2); + expect(calls.some(x => x.name === "fillRect" && x.fillStyle === "rgba(255,210,40,.32)")).toBe(true); + }); +}); From bd800df48c854887b87782e9db9d47dcd5449b71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:47:23 +0200 Subject: [PATCH 196/575] Exercise annotation editor interactions in browser acceptance --- rebuild/e2e/visual.spec.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index fff1f20..1f09b6b 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -78,6 +78,35 @@ test("import, title, captions, chapters and bug-report context persist locally", for(const theme of ["light","dark"]){await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme);for(const v of viewports){await page.setViewportSize({width:v.width,height:v.height});await contained(page,v.width);if([320,375,768,1120,1440].includes(v.width))await page.screenshot({path:"test-results/screenshots/review-"+v.width+"-"+theme+".png",fullPage:true});}} }); +test("annotation editor supports drawing, tool switching, undo and clear on an imported recording",async({page})=>{ + await page.goto("/"); + await page.locator("#import-video").setInputFiles(path.resolve("legacy/public/sample.webm")); + await expect(page.getByRole("heading",{name:"Review & share"})).toBeVisible({timeout:20000}); + await page.getByText("Annotate or hide sensitive areas",{exact:true}).click(); + const video=page.locator("#markup-video"); + await expect.poll(()=>video.evaluate((el:HTMLVideoElement)=>el.readyState)).toBeGreaterThanOrEqual(1); + const canvas=page.locator("#markup-canvas"); + await expect(canvas).toBeVisible(); + await page.locator("#markup-tool").selectOption("redact"); + const rect=await canvas.boundingBox(); + if(!rect)throw new Error("Annotation canvas has no measurable bounds."); + await page.mouse.move(rect.x+rect.width*.2,rect.y+rect.height*.2); + await page.mouse.down(); + await page.mouse.move(rect.x+rect.width*.55,rect.y+rect.height*.55,{steps:5}); + await page.mouse.up(); + await expect(page.locator("#markup-count")).toHaveText("1 marks"); + await page.locator("#undo-markup").click(); + await expect(page.locator("#markup-count")).toHaveText("0 marks"); + await page.locator("#markup-tool").selectOption("blur"); + await page.mouse.move(rect.x+rect.width*.3,rect.y+rect.height*.3); + await page.mouse.down(); + await page.mouse.move(rect.x+rect.width*.7,rect.y+rect.height*.7,{steps:5}); + await page.mouse.up(); + await expect(page.locator("#markup-count")).toHaveText("1 marks"); + await page.locator("#clear-markup").click(); + await expect(page.locator("#markup-count")).toHaveText("0 marks"); +}); + test("screen capture can pause, resume and save a private local recording",async({page})=>{ await page.addInitScript(()=>{ const canvas=document.createElement("canvas");canvas.width=640;canvas.height=360; From 3fa02adcfa61903da1d8872b2d76433ba321cf2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:48:18 +0200 Subject: [PATCH 197/575] Fix TypeScript declarations for shared JS regression tests --- rebuild/tests/enrichment.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/rebuild/tests/enrichment.test.ts b/rebuild/tests/enrichment.test.ts index 9ec2ee8..e36fb6e 100644 --- a/rebuild/tests/enrichment.test.ts +++ b/rebuild/tests/enrichment.test.ts @@ -1,4 +1,5 @@ import { describe, expect, it } from "vitest"; +// @ts-expect-error Shared browser-safe JavaScript module has no declaration file. import { captionsVTT, parseCaptions, From a1c0fff0b16d260f9ce1a0b8ea3166077e4fe45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:48:20 +0200 Subject: [PATCH 198/575] Fix TypeScript declarations for shared JS regression tests --- rebuild/tests/markup.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/rebuild/tests/markup.test.ts b/rebuild/tests/markup.test.ts index 9ec2f68..76c3d6b 100644 --- a/rebuild/tests/markup.test.ts +++ b/rebuild/tests/markup.test.ts @@ -1,4 +1,5 @@ import { describe, expect, it } from "vitest"; +// @ts-expect-error Shared browser JavaScript module has no declaration file. import { paintMarkup } from "../legacy/public/markup.js"; function context() { From b920a1074d1619348a038660226e08376516bf22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:49:17 +0200 Subject: [PATCH 199/575] Allow typed tests to import shared legacy JavaScript modules --- rebuild/tests/enrichment.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/rebuild/tests/enrichment.test.ts b/rebuild/tests/enrichment.test.ts index e36fb6e..efb8b2d 100644 --- a/rebuild/tests/enrichment.test.ts +++ b/rebuild/tests/enrichment.test.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { describe, expect, it } from "vitest"; // @ts-expect-error Shared browser-safe JavaScript module has no declaration file. import { From 903e4598f96b73731df49ac798389385eda9dae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:49:20 +0200 Subject: [PATCH 200/575] Allow typed tests to import shared legacy JavaScript modules --- rebuild/tests/markup.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/rebuild/tests/markup.test.ts b/rebuild/tests/markup.test.ts index 76c3d6b..e2e1ef1 100644 --- a/rebuild/tests/markup.test.ts +++ b/rebuild/tests/markup.test.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { describe, expect, it } from "vitest"; // @ts-expect-error Shared browser JavaScript module has no declaration file. import { paintMarkup } from "../legacy/public/markup.js"; From a4e04a718992d61bb0ff2a30d34522e5444ad445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:56:43 +0200 Subject: [PATCH 201/575] Replace inherited styling with independent editorial design system --- rebuild/src/styles.css | 162 +++-------------------------------------- 1 file changed, 11 insertions(+), 151 deletions(-) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index 37aaa15..8c38204 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -1,152 +1,12 @@ -@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap'); - -:root{font-family:"DM Sans",sans-serif;color:#202823;background:#f7f7f4;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;font-optical-sizing:auto;font-weight:400;--bg:#f7f7f4;--surface:#fff;--surface-2:#f0f1ec;--ink:#202823;--muted:#788078;--line:#e5e8e1;--green:#1d5945;--green-dark:#164735;--green-soft:#e8f0e9;--accent:#d9e8d7;--shadow:0 16px 45px rgba(32,48,38,.06)} -:root[data-theme="dark"]{color-scheme:dark;--bg:#141a17;--surface:#1c2420;--surface-2:#252e29;--ink:#edf2ed;--muted:#a3afa6;--line:#303b34;--green:#a4c9ae;--green-dark:#d1e7d4;--green-soft:#283d30;--accent:#30483a;--shadow:0 16px 45px rgba(0,0,0,.18)} -*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--bg);color:var(--ink)}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:248px;padding:27px 18px 18px;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:10px;padding:0 10px;font:800 21px Manrope,sans-serif;letter-spacing:-1.1px}.brand-mark{width:31px;height:31px;border-radius:10px;background:#183d32;color:#f7f7f4;display:grid;place-items:center}.brand-light{font-weight:500;color:var(--muted)}.workspace-label{margin:49px 10px 13px;font-size:10px;letter-spacing:1.4px;font-weight:700;color:var(--muted);display:flex;align-items:center;justify-content:space-between}.local-pill{font-size:9px;letter-spacing:.7px;border:1px solid var(--line);border-radius:20px;padding:4px 7px;color:var(--muted)}.local-pill span,.recording-indicator span{display:inline-block;width:6px;height:6px;border-radius:50%;background:#4e9b70;margin-right:5px}.side-nav{display:grid;gap:5px}.nav-item{display:flex;align-items:center;gap:11px;width:100%;border:0;background:transparent;color:var(--muted);padding:11px 12px;border-radius:9px;text-align:left;font-size:13px;font-weight:500}.nav-item:hover,.nav-item.active{background:var(--surface-2);color:var(--ink)}.nav-item.active{font-weight:700}.nav-count{margin-left:auto;font-size:11px}.sidebar-bottom{margin-top:auto;display:grid;gap:5px}.privacy-card{display:flex;gap:10px;background:var(--green-soft);color:var(--green);padding:13px;border-radius:11px;margin-bottom:12px}.privacy-card svg{flex:none;margin-top:1px}.privacy-card strong{font-size:11px}.privacy-card p{font-size:10px;line-height:1.5;margin:5px 0 0;opacity:.8}.profile-row{border-top:1px solid var(--line);margin-top:12px;padding:16px 4px 0;display:flex;align-items:center;gap:10px}.profile-row>div:nth-child(2){display:grid;gap:3px;flex:1}.profile-row strong{font-size:11px}.profile-row span{font-size:10px;color:var(--muted)}.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#dfe8dc;color:#355642;font-size:12px;font-weight:700;border:0}.avatar.small{width:29px;height:29px}.main-content{margin-left:248px;min-height:100vh}.topbar{height:67px;padding:0 48px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--bg)}.breadcrumb{font-size:12px;color:var(--muted)}.breadcrumb span{margin:0 8px;color:var(--line)}.top-actions{display:flex;align-items:center;gap:17px}.secure-label{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px}.icon-button{width:34px;height:34px;display:grid;place-items:center;border:1px solid transparent;background:transparent;color:var(--muted);border-radius:8px}.icon-button:hover{background:var(--surface-2);color:var(--ink)}.page-wrap{max-width:1250px;margin:0 auto;padding:44px 48px 24px}.welcome-row{display:flex;align-items:center;justify-content:space-between;gap:35px;margin-bottom:35px}.eyebrow{font-size:9px;letter-spacing:1.65px;font-weight:700;color:var(--green);margin-bottom:12px}.welcome-row h1{font:800 clamp(34px,4vw,49px)/1.08 Manrope,sans-serif;letter-spacing:-2.5px;margin:0}.welcome-row h1 span{color:var(--green)}.intro{font-size:14px;color:var(--muted);margin:14px 0 0;line-height:1.6;max-width:470px}.welcome-art{width:240px;flex:none;position:relative;padding:13px 10px 20px}.art-window{height:133px;border-radius:13px;border:1px solid #dce4d9;background:#fff;box-shadow:0 14px 35px rgba(42,68,48,.11);overflow:hidden;transform:rotate(2deg)}.art-bar{height:19px;background:#f2f4ef;display:flex;align-items:center;gap:4px;padding:0 8px}.art-bar i{width:5px;height:5px;border-radius:50%;background:#c3cec2}.art-screen{height:114px;display:flex;position:relative}.art-sidebar{width:30px;background:#edf2eb}.art-content{padding:13px 11px;display:grid;gap:6px;flex:1;align-content:start}.art-content div{height:9px;border-radius:4px;background:#e8eee6}.art-content div:first-child{width:55%;background:#cbdcca}.art-content div:nth-child(2){width:85%}.art-content div:nth-child(3){width:69%}.art-content div:nth-child(4){width:77%}.art-cursor{position:absolute;width:17px;height:22px;background:#244c3b;clip-path:polygon(0 0,100% 70%,59% 74%,77% 100%,62% 100%,45% 76%,23% 100%);left:135px;top:47px}.art-play{position:absolute;right:30px;bottom:37px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#1e5944;color:white;box-shadow:0 6px 18px #1e594455}.art-caption{position:absolute;bottom:0;right:5px;font-size:9px;color:var(--muted);letter-spacing:.3px}.capture-panel{border:1px solid var(--line);background:var(--surface);border-radius:14px;padding:21px 23px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:var(--shadow)}.capture-copy{display:flex;align-items:center;gap:14px;min-width:0}.capture-icon{width:43px;height:43px;flex:none;border-radius:12px;display:grid;place-items:center;background:var(--green-soft);color:var(--green)}.capture-copy h2{font:700 15px Manrope,sans-serif;margin:0 0 5px}.capture-copy p{font-size:11px;color:var(--muted);margin:0;line-height:1.5}.capture-actions,.record-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.toggle-option{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px;white-space:nowrap}.toggle-option input{accent-color:var(--green)}.button{border:1px solid var(--line);border-radius:8px;min-height:38px;padding:0 13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:11px;font-weight:700;white-space:nowrap;transition:transform .15s ease,background .15s ease,border-color .15s ease}.button:active{transform:translateY(1px)}.button:disabled{opacity:.55;cursor:wait}.button.primary{background:#1d5945;color:white;border-color:#1d5945}.button.primary:hover{background:#164735}.button.secondary{background:var(--surface);color:var(--ink)}.button.secondary:hover{background:var(--surface-2)}.button.danger{background:#a3423b;color:white;border-color:#a3423b}.record-dot{width:8px;height:8px;border-radius:50%;background:#fff;box-shadow:0 0 0 3px #ffffff35}.recording-indicator{font:700 11px ui-monospace,monospace;color:#b44c43;letter-spacing:.4px}.recording-indicator span{background:#c64e45;animation:pulse 1.2s infinite}.notice{margin-top:15px;border:1px solid #c8ddcb;background:var(--green-soft);color:var(--green);padding:11px 13px;border-radius:9px;font-size:11px;display:flex;align-items:center;gap:8px}.notice button{margin-left:auto;border:0;background:transparent;color:inherit;display:grid;place-items:center}.library-section{margin-top:43px}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:17px}.section-heading .eyebrow{margin-bottom:7px}.section-heading h2{font:700 20px Manrope,sans-serif;letter-spacing:-.6px;margin:0}.count-badge{font:600 10px "DM Sans",sans-serif;color:var(--muted);background:var(--surface-2);padding:4px 7px;border-radius:20px;vertical-align:middle;margin-left:5px}.library-tools{display:flex;align-items:center;gap:9px}.search-box{width:205px;height:36px;display:flex;align-items:center;gap:7px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--muted)}.search-box input{border:0;outline:0;background:transparent;color:var(--ink);width:100%;min-width:0;font-size:11px}.search-box input::placeholder{color:var(--muted)}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.clip-card{border:1px solid var(--line);border-radius:11px;overflow:hidden;background:var(--surface);min-width:0;transition:transform .2s ease,box-shadow .2s ease}.clip-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.clip-thumb{height:145px;position:relative;display:grid;place-items:center;background:linear-gradient(140deg,#e9eee7,#dce6dc 60%,#d1dfd3);overflow:hidden}.thumb-lines{width:60%;display:grid;gap:7px}.thumb-lines span{height:9px;border-radius:4px;background:#c0d1c1}.thumb-lines span:first-child{width:60%;height:13px;background:#9db99f}.thumb-lines span:nth-child(2){width:90%}.thumb-lines span:nth-child(3){width:72%}.thumb-play{position:absolute;inset:0;margin:auto;width:39px;height:39px;border:1px solid #ffffffaa;border-radius:50%;display:grid;place-items:center;background:#fff;color:#214b37;box-shadow:0 5px 20px #203d2a25}.duration{position:absolute;right:9px;bottom:8px;padding:4px 6px;border-radius:4px;background:#18251fbb;color:white;font-size:9px}.clip-info{padding:12px;display:flex;align-items:center;justify-content:space-between;gap:7px;min-width:0}.clip-info>div{min-width:0}.clip-info h3{font-size:11px;font-weight:700;margin:0 0 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clip-info p{font-size:9px;color:var(--muted);margin:0;display:flex;align-items:center;gap:5px}.clip-info .icon-button{flex:none}.empty-state{min-height:260px;border:1px dashed #cfd8ce;border-radius:13px;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px 18px}.empty-icon{width:51px;height:51px;border-radius:15px;background:var(--green-soft);color:var(--green);display:grid;place-items:center;margin-bottom:14px}.empty-state h3{font:700 15px Manrope,sans-serif;margin:0 0 7px}.empty-state p{font-size:11px;line-height:1.6;color:var(--muted);max-width:390px;margin:0}.empty-actions{display:flex;gap:8px;margin-top:18px;flex-wrap:wrap;justify-content:center}.bottom-note{margin-top:31px;padding:15px 17px;display:flex;align-items:center;gap:12px;background:var(--surface-2);border-radius:10px}.note-icon{width:31px;height:31px;border-radius:9px;background:var(--surface);color:var(--green);display:grid;place-items:center;flex:none}.bottom-note>div:nth-child(2){min-width:0;flex:1}.bottom-note strong{font-size:11px}.bottom-note p{font-size:10px;color:var(--muted);line-height:1.5;margin:4px 0 0}.build-label{font-size:8px;letter-spacing:.8px;color:var(--muted);display:flex;align-items:center;gap:5px;white-space:nowrap}footer{display:flex;gap:18px;justify-content:flex-end;padding:24px 2px 5px;color:var(--muted);font-size:9px}footer span:first-child{margin-right:auto}.record-controls{justify-content:flex-end}.capture-panel:has(.record-controls){border-color:#e5c7c3}.local-pill{display:inline-flex;align-items:center}.local-pill span{background:#5d9c70} -@keyframes pulse{50%{box-shadow:0 0 0 5px #c64e4522;opacity:.55}} -@media(max-width:1100px){.sidebar{width:215px}.main-content{margin-left:215px}.page-wrap{padding:35px 30px 22px}.topbar{padding:0 30px}.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.capture-panel{align-items:flex-start;flex-direction:column}.capture-actions,.record-controls{width:100%;justify-content:flex-start}} -@media(max-width:760px){.sidebar{position:relative;width:auto;height:auto;inset:auto;padding:15px 18px;border-right:0;border-bottom:1px solid var(--line)}.brand{font-size:19px}.workspace-label,.side-nav,.sidebar-bottom{display:none}.main-content{margin-left:0}.topbar{height:49px;padding:0 18px}.secure-label{display:none}.page-wrap{padding:28px 18px 20px}.welcome-row{margin-bottom:25px}.welcome-art{width:160px;transform:scale(.86);transform-origin:right center;margin-left:-20px}.welcome-row h1{font-size:36px;letter-spacing:-1.8px}.intro{font-size:12px}.capture-panel{padding:17px}.capture-actions{gap:10px}.capture-actions .button{margin-left:auto}.section-heading{align-items:flex-start;flex-direction:column}.library-tools{width:100%}.search-box{flex:1;width:auto}.clip-grid{gap:10px}.clip-thumb{height:120px}.bottom-note{align-items:flex-start}.build-label{display:none}} -@media(max-width:480px){.page-wrap{padding:23px 14px 16px}.welcome-row{gap:0}.welcome-art{width:112px;margin-left:-28px;transform:scale(.76)}.welcome-row h1{font-size:31px;letter-spacing:-1.5px}.intro{max-width:245px;font-size:11px}.capture-copy{align-items:flex-start}.capture-copy p{max-width:240px}.capture-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.capture-actions .button{grid-column:1/-1;margin:2px 0 0;width:100%}.record-controls{display:grid;grid-template-columns:1fr 1fr;width:100%}.recording-indicator{grid-column:1/-1}.record-controls .button{width:100%}.clip-grid{grid-template-columns:1fr 1fr;gap:9px}.clip-thumb{height:100px}.clip-info{padding:9px}.clip-info h3{font-size:10px}.clip-info p{font-size:8px;flex-wrap:wrap}.clip-info .icon-button{width:27px;height:27px}.import-button{padding:0 10px}.bottom-note{padding:12px}.bottom-note p{font-size:9px}footer{gap:12px;font-size:8px}.top-actions{gap:8px}} +@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap'); +:root{font-family:'Source Sans 3',sans-serif;color:#20211e;background:#f1f0eb;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;--paper:#f1f0eb;--panel:#faf9f5;--white:#fffefa;--ink:#20211e;--muted:#74756e;--line:#d9d8d0;--acid:#d8f36a;--acid-ink:#252b10;--rust:#bd4c32;--shadow:0 18px 55px rgba(32,33,30,.08);color-scheme:light} +:root[data-theme="dark"]{color-scheme:dark;--paper:#171916;--panel:#20231e;--white:#272b25;--ink:#f1f0e9;--muted:#a9aa9f;--line:#383c33;--acid:#d8f36a;--acid-ink:#20250f;--rust:#ef8a6e;--shadow:0 18px 55px rgba(0,0,0,.22)} +*{box-sizing:border-box}html,body,#root{margin:0;width:100%;min-width:320px;min-height:100%;background:var(--paper);color:var(--ink)}body{font-family:'Source Sans 3',sans-serif}button,input,select,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--rust);outline-offset:3px} +.app-shell{min-height:100vh;background:var(--paper)}.sidebar{display:none!important}.main-content{margin:0!important;width:100%;min-width:0}.topbar{height:76px;padding:0 clamp(18px,5vw,76px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--paper)}.breadcrumb{font:600 18px 'Space Grotesk',sans-serif;letter-spacing:-.7px}.breadcrumb span{color:var(--rust);padding:0 8px}.top-actions{display:flex;align-items:center;gap:16px}.secure-label{font:500 11px 'DM Mono',monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.secure-label svg{color:#778b35;vertical-align:-3px}.avatar{display:none!important}.icon-button{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:50%;width:42px;height:42px;display:inline-grid;place-items:center}.page-wrap{width:min(1180px,calc(100% - 48px));margin:0 auto;padding:56px 0 70px}.welcome-row{display:flex;align-items:flex-end;justify-content:space-between;gap:32px;padding:0 0 42px;border-bottom:1px solid var(--line)}.eyebrow{font:500 10px 'DM Mono',monospace;letter-spacing:.14em;color:var(--rust);text-transform:uppercase}.welcome-row h1{font:600 clamp(42px,6vw,76px)/.98 'Space Grotesk',sans-serif;letter-spacing:-.075em;margin:17px 0 18px;max-width:760px}.welcome-row h1 span{color:var(--muted)}.intro{font-size:17px;color:var(--muted);max-width:500px;margin:0;line-height:1.55}.welcome-art{width:230px;min-width:230px;padding:0;transform:rotate(2deg)}.art-window{height:150px;background:var(--acid);border:1px solid var(--ink);border-radius:3px;box-shadow:8px 8px 0 var(--ink);overflow:hidden}.art-bar{height:20px;border-bottom:1px solid var(--ink);display:flex;gap:5px;align-items:center;padding:0 8px}.art-bar i{width:5px;height:5px;border:1px solid var(--ink);border-radius:50%}.art-screen{height:129px;display:flex;position:relative}.art-sidebar{width:27px;border-right:1px solid var(--ink)}.art-content{padding:17px 13px;flex:1;display:grid;gap:8px;align-content:start}.art-content div{height:7px;background:var(--ink);opacity:.75;width:90%}.art-content div:nth-child(2){width:63%}.art-content div:nth-child(3){width:77%}.art-content div:nth-child(4){width:43%}.art-cursor{position:absolute;right:45px;top:34px;width:0;height:0;border-left:10px solid var(--rust);border-top:16px solid transparent;filter:drop-shadow(1px 1px var(--ink))}.art-play{position:absolute;right:17px;bottom:15px;width:34px;height:34px;background:var(--ink);color:var(--acid);display:grid;place-items:center;border-radius:50%}.art-caption{display:none} +.capture-panel{margin:34px 0 64px;background:var(--ink);color:#f5f3e9;border-radius:3px;padding:26px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0}.capture-copy{display:flex;align-items:center;gap:16px}.capture-icon{width:48px;height:48px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink);border-radius:2px;flex:none}.capture-copy h2{font:600 20px 'Space Grotesk',sans-serif;margin:0 0 4px;letter-spacing:-.5px}.capture-copy p{font-size:14px;color:#b9bbb0;margin:0}.capture-actions,.record-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.toggle-option{font-size:13px;color:#d2d2c9;display:flex;align-items:center;gap:7px;white-space:nowrap}.toggle-option input{accent-color:var(--acid);width:15px;height:15px}.button{border:1px solid transparent;border-radius:2px;min-height:44px;padding:0 17px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .16s ease,background .16s ease}.button:hover{transform:translateY(-2px)}.button.primary{background:var(--acid);color:var(--acid-ink)}.button.secondary{background:transparent;border-color:var(--line);color:var(--ink)}.capture-panel .button.secondary{border-color:#676a60;color:#fff}.button.danger{background:var(--rust);color:#fff}.recording-indicator{font:500 11px 'DM Mono',monospace;color:var(--acid);letter-spacing:.08em}.recording-indicator span,.record-dot{display:inline-block;width:8px;height:8px;background:#e36b50;border-radius:50%;margin-right:7px} +.notice{margin:16px 0;padding:14px 17px;background:var(--acid);color:var(--acid-ink);border-left:4px solid var(--rust);display:flex;align-items:center;justify-content:space-between;gap:14px}.recovery-copy,.recovery-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.library-section{min-width:0}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.section-heading h2{font:600 32px 'Space Grotesk',sans-serif;letter-spacing:-1.4px;margin:8px 0 0}.count-badge{font:500 12px 'DM Mono',monospace;color:var(--rust);vertical-align:middle}.library-tools{display:flex;align-items:center;gap:10px}.search-box{display:flex;align-items:center;gap:9px;border-bottom:1px solid var(--ink);padding:9px 2px;min-width:220px;color:var(--muted)}.search-box input{border:0;background:transparent;color:var(--ink);outline:none;width:100%;min-width:0}.search-box input:focus-visible{outline:none}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.clip-card{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:3px;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}.clip-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.clip-thumb{height:178px;background:#d9d8d0;position:relative;display:grid;place-items:center;overflow:hidden}.clip-thumb:before{content:'';position:absolute;inset:0;background:linear-gradient(135deg,#d8f36a 0 48%,#e8e5dc 48% 100%)}.thumb-lines{position:relative;width:52%;display:grid;gap:9px}.thumb-lines span{height:8px;background:#292b24;opacity:.75}.thumb-lines span:nth-child(2){width:70%}.thumb-lines span:nth-child(3){width:85%}.thumb-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:46px;height:46px;border:0;border-radius:50%;background:var(--ink);color:var(--acid);display:grid;place-items:center}.duration{position:absolute;bottom:10px;right:10px;background:var(--ink);color:#fff;padding:4px 7px;font:11px 'DM Mono',monospace}.clip-info{padding:15px;display:flex;align-items:center;justify-content:space-between;gap:10px}.clip-info>div:first-child{min-width:0}.clip-info h3{font:600 16px 'Space Grotesk',sans-serif;margin:0 0 5px;overflow-wrap:anywhere}.clip-info p{font:11px 'DM Mono',monospace;color:var(--muted);margin:0;display:flex;align-items:center;gap:5px;flex-wrap:wrap}.clip-actions{display:flex;gap:4px;flex:none}.clip-actions .icon-button{width:34px;height:34px}.empty-state{padding:65px 22px;text-align:center;border:1px dashed var(--line);background:var(--panel)}.empty-icon{width:54px;height:54px;margin:0 auto 16px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink)}.empty-state h3{font:600 24px 'Space Grotesk',sans-serif;margin:0 0 8px}.empty-state p{color:var(--muted);max-width:420px;margin:0 auto 20px;line-height:1.5}.empty-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.bottom-note{margin-top:54px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:15px}.note-icon{color:var(--rust)}.bottom-note strong{font:600 15px 'Space Grotesk',sans-serif}.bottom-note p{margin:4px 0 0;color:var(--muted);font-size:13px}.build-label{margin-left:auto;font:10px 'DM Mono',monospace;color:var(--muted);letter-spacing:.08em}footer{padding:24px 0 0;color:var(--muted);font:11px 'DM Mono',monospace;display:flex;gap:24px;flex-wrap:wrap}footer a{color:var(--rust)} +.modal-backdrop{position:fixed;inset:0;z-index:30;background:rgba(13,15,12,.72);display:grid;place-items:center;padding:16px;overflow:auto}.preview-modal,.publish-modal{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:3px;width:min(850px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;box-shadow:var(--shadow)}.publish-modal{width:min(480px,100%)}.preview-header,.publish-modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.preview-header h2,.publish-modal h2{font:600 25px 'Space Grotesk',sans-serif;margin:0}.preview-header p,.publish-modal p{color:var(--muted);margin:5px 0 18px}.preview-video{display:block;width:100%;max-height:52vh;background:#090a08;margin:12px 0}.trim-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:18px 0}.trim-tools label,.field-label{display:grid;gap:6px;font-size:13px;color:var(--muted)}.trim-tools input,.field-label input,.field-label select{background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:2px;padding:10px;min-width:0}.preview-actions{display:flex;gap:9px;flex-wrap:wrap}.field-label{margin:16px 0}.field-label input,.field-label select{width:100%}.optional-label{font:10px 'DM Mono',monospace}.privacy-explainer{display:flex;gap:10px;padding:14px;background:var(--paper);color:var(--muted);font-size:13px;line-height:1.5}.publish-submit{width:100%;margin-top:18px}.share-link-toast{position:fixed;z-index:40;bottom:18px;left:50%;transform:translateX(-50%);width:min(650px,calc(100% - 24px));padding:14px;background:var(--ink);color:#fff;display:flex;align-items:center;gap:12px;box-shadow:var(--shadow)}.share-link-toast>div{min-width:0;flex:1;display:grid;gap:3px}.share-link-toast span{font:11px 'DM Mono',monospace;overflow-wrap:anywhere;color:#d0d2c8}.share-link-toast .button.secondary{color:#fff;border-color:#666} +.capture-panel,.page-wrap,.topbar,.clip-card,.preview-modal,.publish-modal{min-width:0;max-width:100%}p,h1,h2,h3,span,label,a{overflow-wrap:anywhere}img,video,canvas,svg{max-width:100%}input,select,textarea{min-width:0;max-width:100%} +@media(max-width:900px){.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.capture-panel{align-items:flex-start;flex-direction:column}.capture-actions,.record-controls{justify-content:flex-start}.welcome-art{width:180px;min-width:180px}.welcome-row h1{font-size:clamp(40px,7vw,62px)}} +@media(max-width:600px){.topbar{height:62px;padding-inline:18px}.secure-label{font-size:0}.secure-label svg{width:18px;height:18px}.page-wrap{width:calc(100% - 32px);padding:35px 0 48px}.welcome-row{align-items:flex-start;padding-bottom:28px}.welcome-row h1{font-size:clamp(38px,11vw,54px);letter-spacing:-.07em}.intro{font-size:15px}.welcome-art{display:none}.capture-panel{margin:24px 0 42px;padding:19px}.capture-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.capture-actions .button{grid-column:1/-1}.section-heading{align-items:flex-start;flex-direction:column}.section-heading h2{font-size:27px}.library-tools{width:100%}.search-box{flex:1;min-width:0}.clip-grid{grid-template-columns:1fr}.clip-thumb{height:190px}.clip-info h3{font-size:15px}.build-label{margin:0 0 0 auto}.bottom-note{align-items:flex-start}.bottom-note p{max-width:100%}.share-link-toast{flex-wrap:wrap}.share-link-toast>div{flex-basis:100%}.preview-modal,.publish-modal{padding:17px}.preview-actions .button{flex:1 1 100%}} @media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} - -.recovery-notice{justify-content:space-between;gap:14px;align-items:center;margin-top:14px;flex-wrap:wrap}.recovery-copy{display:grid;gap:3px;min-width:0}.recovery-copy strong{font-size:11px}.recovery-copy span{font-size:10px;opacity:.82;overflow-wrap:anywhere}.recovery-actions{display:flex;gap:7px;flex-wrap:wrap}.recovery-actions .button{min-height:32px;padding:0 10px} - -.modal-backdrop{position:fixed;inset:0;z-index:20;background:rgba(12,20,15,.68);backdrop-filter:blur(7px);display:grid;place-items:center;padding:22px}.preview-modal{width:min(920px,100%);max-height:min(90vh,820px);overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:15px;box-shadow:0 24px 80px rgba(0,0,0,.28);padding:17px}.preview-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:2px 1px 14px}.preview-header h2{font:700 15px Manrope,sans-serif;margin:0 0 5px;overflow-wrap:anywhere}.preview-header p{font-size:10px;color:var(--muted);margin:0}.preview-video{display:block;width:100%;max-height:68vh;aspect-ratio:16/9;object-fit:contain;background:#080b09;border-radius:9px}.preview-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:13px}@media(max-width:480px){.modal-backdrop{padding:10px}.preview-modal{padding:12px;border-radius:12px}.preview-video{max-height:60vh}.preview-actions .button{flex:1}} - -/* Temporary sharing and discussion */ -.clip-actions{display:flex;gap:4px;flex-shrink:0}.publish-modal{width:min(520px,calc(100vw - 32px));padding:28px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);display:grid;gap:18px}.publish-modal-head{display:flex;justify-content:space-between;gap:18px}.publish-modal-head h2{font:800 24px Manrope,sans-serif;margin:7px 0}.publish-modal-head p{margin:0;color:var(--muted);line-height:1.5}.field-label{display:grid;gap:8px;font-weight:700;font-size:13px}.field-label input,.field-label select{width:100%;min-width:0;padding:12px 13px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);color:var(--ink)}.optional-label{font-weight:400;color:var(--muted)}.privacy-explainer{display:flex;gap:10px;padding:13px;background:var(--green-soft);border-radius:10px;color:var(--green-dark);font-size:13px;line-height:1.5}.privacy-explainer svg{flex:none}.publish-submit{width:100%;justify-content:center}.share-link-toast{position:fixed;z-index:30;bottom:22px;left:50%;transform:translateX(-50%);width:min(620px,calc(100vw - 28px));padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow);display:flex;align-items:center;gap:12px}.share-link-toast>div{min-width:0;flex:1;display:grid;gap:4px}.share-link-toast span{font-size:12px;color:var(--muted);overflow-wrap:anywhere}.share-page{min-height:100vh;background:var(--bg);color:var(--ink);padding:0 28px}.share-topbar{height:72px;max-width:1280px;margin:auto;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.share-brand{display:flex;align-items:center;gap:9px;font:800 19px Manrope,sans-serif}.share-brand>span:last-child{margin-left:-8px;color:var(--muted)}.temporary-label,.share-footer span{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:13px}.share-layout{max-width:1280px;margin:42px auto 70px;display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,.85fr);gap:34px;align-items:start}.share-main{min-width:0}.share-heading{margin-bottom:22px}.share-heading h1,.password-gate h1,.share-ended h1{font:800 clamp(25px,4vw,36px) Manrope,sans-serif;letter-spacing:-.04em;margin:8px 0}.share-heading p,.password-gate p,.share-ended p{color:var(--muted);line-height:1.6;margin:0}.share-video-wrap{position:relative;overflow:hidden;border-radius:15px;background:#111;aspect-ratio:16/9}.share-video-wrap video{width:100%;height:100%;object-fit:contain;display:block}.playback-bubble{position:absolute;left:16px;max-width:min(78%,420px);display:flex;align-items:center;gap:8px;border:1px solid rgba(255,255,255,.3);border-radius:12px;padding:10px 13px;background:rgba(18,25,21,.9);color:white;text-align:left;font-size:13px;box-shadow:0 8px 24px #0005;overflow-wrap:anywhere}.share-video-meta{display:flex;justify-content:space-between;gap:12px;padding:12px 2px;color:var(--muted);font-size:12px}.share-comment-form{margin-top:20px;padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.comment-composer-title{display:flex;justify-content:space-between;gap:8px;font-weight:700;font-size:13px;margin-bottom:12px}.comment-composer-title span{color:var(--muted);font-weight:500}.share-comment-form textarea{width:100%;resize:vertical;min-height:86px;padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--bg);color:var(--ink);font:inherit}.comment-composer-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:10px}.share-discussion{min-width:0;border:1px solid var(--line);border-radius:15px;background:var(--surface);overflow:hidden}.discussion-title{padding:20px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.discussion-title h2{font:800 20px Manrope,sans-serif;margin:6px 0 0}.discussion-mark{width:36px;height:36px;border-radius:10px;background:var(--green-soft);color:var(--green);display:grid;place-items:center}.discussion-list{padding:8px 18px;max-height:760px;overflow:auto}.share-comment{padding:15px 0;border-bottom:1px solid var(--line);min-width:0}.share-comment.reply{margin:8px 0 0 18px;padding:12px 0 0 13px;border-bottom:0;border-left:2px solid var(--line)}.share-comment-meta{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:12px}.share-comment-meta span{color:var(--muted)}.share-comment p{margin:9px 0;color:var(--ink);font-size:14px;line-height:1.55;overflow-wrap:anywhere}.timestamp-link,.text-action{border:0;background:none;padding:0;color:var(--green);font-weight:700;font-size:12px}.text-action{margin-right:14px}.resolved-tag{display:inline-flex;align-items:center;gap:4px;color:var(--muted);font-size:11px}.discussion-empty{padding:48px 16px;text-align:center;color:var(--muted);display:grid;justify-items:center;gap:9px}.discussion-empty strong{color:var(--ink)}.discussion-empty p{margin:0;font-size:13px;line-height:1.5}.share-footer{max-width:1280px;margin:0 auto;padding:18px 0 28px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:12px}.password-gate,.share-ended{width:min(430px,100%);margin:12vh auto;padding:32px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow);display:grid;gap:16px}.share-lock{width:48px;height:48px;border-radius:14px;background:var(--green-soft);color:var(--green);display:grid;place-items:center}.password-gate label{display:grid;gap:8px;font-size:13px;font-weight:700}.password-gate input{padding:13px;border:1px solid var(--line);border-radius:9px;background:var(--bg);color:var(--ink)}.share-error{color:#b34b3e!important;font-size:13px}.share-ended{text-align:center;justify-items:center;color:var(--muted)}.share-loading{min-height:70vh;display:grid;place-items:center;color:var(--muted)}@media(max-width:900px){.share-layout{grid-template-columns:minmax(0,1fr);max-width:760px;margin-top:28px}.discussion-list{max-height:none}.share-page{padding:0 18px}}@media(max-width:520px){.share-page{padding:0 12px}.share-topbar{height:62px}.share-layout{margin:22px auto 40px;gap:20px}.share-video-meta{flex-direction:column;gap:4px}.publish-modal{padding:20px}.share-link-toast{flex-wrap:wrap;bottom:10px}.share-link-toast>div{flex-basis:100%}.share-footer{flex-direction:column}} - -.privacy-document{width:min(760px,100%);margin:48px auto 80px;padding:0 8px}.privacy-document h1{font:800 clamp(32px,5vw,48px) Manrope,sans-serif;letter-spacing:-.05em;margin:12px 0}.privacy-document h2{font:800 19px Manrope,sans-serif;margin:28px 0 8px}.privacy-document p{color:var(--muted);font-size:15px;line-height:1.75;margin:0}.privacy-document .privacy-lead{font-size:18px;color:var(--ink);line-height:1.65;margin:12px 0 30px}.privacy-updated{margin-top:32px!important;font-size:12px!important} - -.trim-tools{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:14px 0}.trim-tools label{display:grid;gap:5px;font-size:11px;font-weight:700;color:var(--muted);min-width:90px;flex:1}.trim-tools input{min-width:0;width:100%;padding:9px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);color:var(--ink)}@media(max-width:480px){.trim-tools{align-items:stretch}.trim-tools button{width:100%;justify-content:center}} -.share-header-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:flex-end}.share-topbar{gap:12px}@media(max-width:520px){.share-header-actions{gap:8px}.share-topbar{height:auto;min-height:62px;flex-wrap:wrap;padding:10px 0}} -.annotate-mode .annotation-layer{position:absolute;z-index:5;inset:0 0 48px;width:100%;height:calc(100% - 48px);border:0;background:transparent;cursor:crosshair}.frame-annotation-pin,.pending-annotation-pin{position:absolute;z-index:4;transform:translate(-50%,-50%);width:20px;height:20px;border:3px solid #fff;border-radius:50%;background:var(--green);box-shadow:0 2px 10px #0008}.pending-annotation-pin{z-index:6;background:#d18b35;pointer-events:none}.annotation-controls{display:flex;align-items:center;gap:12px;margin-bottom:10px}.annotation-controls span{font-size:12px;color:var(--green);font-weight:700}.text-action.active{color:#d18b35} - -/* Final accessibility and compact-screen fit pass */ -:where(a,button,input,select,textarea,[tabindex]):focus-visible{outline:3px solid var(--green);outline-offset:3px} -button:disabled{cursor:not-allowed} -@media(max-width:480px){ - .welcome-row{align-items:flex-start} - .welcome-row>div:first-child{min-width:0;flex:1} - .welcome-art{width:88px;min-width:88px;margin:7px 0 0 10px;padding:0;transform:none} - .art-window{height:91px;transform:none} - .art-screen{height:72px} - .art-caption{display:none} - .art-play{right:5px;bottom:9px;width:27px;height:27px} - .art-cursor{left:61px;top:29px} - .welcome-row h1{font-size:clamp(27px,8.4vw,31px);letter-spacing:-1.2px;line-height:1.1;overflow-wrap:normal} - .intro{font-size:12px;line-height:1.55;max-width:100%} - .button{min-height:44px;font-size:12px;padding-inline:12px} - .icon-button{min-width:40px;min-height:40px} - .clip-actions .icon-button{min-width:34px;min-height:34px} - .clip-info h3{font-size:11px} - .clip-info p{font-size:10px;line-height:1.45} - .toggle-option{font-size:12px;white-space:normal;line-height:1.35} - .capture-panel{padding:16px} - .capture-copy p{font-size:12px;line-height:1.5} - .capture-actions{gap:9px} -} - -/* Readability pass: maintain hierarchy without tiny interface copy */ -@media(min-width:1024px){ - .workspace-label{font-size:11px} - .local-pill{font-size:10px} - .privacy-card strong{font-size:12px} - .privacy-card p{font-size:11px} - .profile-row strong{font-size:12px} - .profile-row span{font-size:11px} - .nav-item{font-size:14px} - .nav-count{font-size:12px} - .capture-copy p{font-size:13px;line-height:1.55} - .toggle-option{font-size:12px} - .intro{font-size:14px;line-height:1.6} - .section-heading h2{font-size:21px} - .clip-info h3{font-size:14px} - .clip-info p{font-size:12px;line-height:1.5} - .empty-state p{font-size:14px;line-height:1.6} - .bottom-note p{font-size:13px;line-height:1.55} - footer{font-size:11px} -} -@media(max-width:480px){ - .intro{font-size:13px;line-height:1.55} - .capture-copy p{font-size:13px;line-height:1.5} - .toggle-option{font-size:13px} - .empty-state p{font-size:13px;line-height:1.55} -} - -@media(max-width:480px){ - .toggle-option{min-height:44px;display:flex;align-items:center;gap:8px;padding-block:4px} - .icon-button{min-width:44px;min-height:44px} - .clip-actions .icon-button{min-width:40px;min-height:40px} -} - - -/* ScreenNote containment system — shared by legacy and React surfaces. */ -html,body,#root,#app,.app-shell,.main-content,.page-wrap,.share-page{width:100%;max-width:100%;min-width:0} -html,body{overflow-x:clip} -*,*::before,*::after{box-sizing:border-box;min-width:0} -img,video,canvas,iframe,svg{max-width:100%} -p,h1,h2,h3,h4,h5,h6,small,strong,span,label,a,li,dd,dt,blockquote{overflow-wrap:anywhere;word-break:normal} -pre,code,kbd,samp{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word} -button,.button,.btn,[role="button"]{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.35;text-align:center} -input,select,textarea{max-width:100%;min-width:0} -textarea{resize:vertical;overflow-wrap:anywhere} -fieldset{min-width:0;max-width:100%} -table{width:100%;max-width:100%;border-collapse:collapse} -.table-wrap,.table-scroll,.table-container,[data-table-scroll]{display:block;width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch} -table th,table td{overflow-wrap:anywhere;word-break:normal} -.flex,.row,.toolbar,.actions,.button-row,.form-row,.header-actions,.share-header-actions,.comment-composer-actions,.preview-actions,.capture-actions,.record-controls{min-width:0;max-width:100%;flex-wrap:wrap} -.grid,.clip-grid,.share-layout,.share-discussion,.share-main{min-width:0} -.grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr))} -.clip-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))} -.clip-card,.clip-info,.clip-info>div,.capture-copy,.capture-panel,.section-heading,.welcome-row,.topbar,.top-actions,.share-topbar,.share-layout,.share-main,.share-discussion,.discussion-list,.share-comment-form,.comment-composer-actions{min-width:0;max-width:100%} -.clip-info h3,.clip-info p,.share-heading h1,.share-heading p,.discussion-title,.share-comment-meta,.share-comment-meta strong,.share-comment p,.privacy-document,.privacy-document p,.privacy-document li{overflow-wrap:anywhere;word-break:normal} -.modal-backdrop,[role="dialog"],dialog,.modal,.preview-modal,.publish-modal{box-sizing:border-box;min-width:0;max-width:calc(100vw - 20px)} -.modal-backdrop{overflow-y:auto;overscroll-behavior:contain} -[role="dialog"],dialog,.modal,.preview-modal,.publish-modal{max-height:calc(100dvh - 20px);overflow:auto;overscroll-behavior:contain} -.share-layout{grid-template-columns:minmax(0,1.65fr) minmax(0,.85fr)} -.share-discussion{overflow-wrap:anywhere} -.share-video-wrap{min-width:0;max-width:100%} -.share-video-wrap video{max-width:100%} -.share-link-toast{max-width:calc(100vw - 24px);min-width:0} -.toast,.notice,.recovery-notice,.library-backup-tools,.bottom-note{min-width:0;max-width:100%;flex-wrap:wrap} -:focus-visible{outline-offset:3px} -@media(max-width:760px){ -.share-page{padding-inline:clamp(12px,4vw,20px)}.share-layout{grid-template-columns:minmax(0,1fr);gap:24px;margin-top:24px} -.share-topbar{height:auto;min-height:60px;flex-wrap:wrap;gap:10px;padding-block:12px} -.share-header-actions{display:flex;flex-wrap:wrap;gap:8px;min-width:0}.share-header-actions>*{max-width:100%} -.share-discussion{width:100%}.page-wrap{padding-inline:clamp(12px,4vw,24px)}.topbar{padding-inline:clamp(12px,4vw,24px)} -.capture-panel,.capture-actions,.record-controls{width:100%;min-width:0}.capture-actions>*{max-width:100%} -.library-tools{width:100%;min-width:0;flex-wrap:wrap}.search-box{min-width:0;max-width:100%} -.preview-actions,.comment-composer-actions{flex-wrap:wrap} -} -@media(max-width:420px){ -.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.clip-info{gap:4px}.clip-actions{min-width:0;flex-wrap:wrap} -.button,.btn{padding-inline:10px}.share-comment-form textarea{width:100%;max-width:100%} -.share-video-meta{display:flex;flex-wrap:wrap;gap:6px 12px} -} -@media(max-width:340px){ -.clip-grid{grid-template-columns:minmax(0,1fr)}.welcome-row{flex-wrap:wrap}.welcome-art{max-width:42%;min-width:0} -.capture-actions,.record-controls{grid-template-columns:minmax(0,1fr)} -.capture-actions .button,.record-controls .button{width:100%;grid-column:auto} -} -@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} - - -/* Legacy share viewer containment: the shipped /v/:uuid route. */ -.viewer,.viewer-top,.viewer-grid,.viewer-media,.reply-panel,.video-panel,.player-tools,.reactions,.discussion-heading,.discussion-toolbar{min-width:0;max-width:100%} -.viewer-grid{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr)} -.viewer-top{flex-wrap:wrap;align-items:center} -.viewer-top>*{min-width:0;max-width:100%} -.viewer .video-panel video{width:100%;max-width:100%;height:auto} -.reply-panel{overflow-wrap:anywhere} -.discussion-thread,.discussion-thread .comment,.comment-head,.comment-actions,.reply-context{min-width:0;max-width:100%;overflow-wrap:anywhere} -.discussion-thread .thread-reply{min-width:0;max-width:calc(100% - 8px)} -.discussion-heading,.comment-head,.compose-meta{flex-wrap:wrap} -@media(max-width:767px){.viewer-grid{grid-template-columns:minmax(0,1fr)}.viewer-top{gap:12px}.viewer-top>.btn{flex:0 1 auto}.viewer{padding-inline:clamp(12px,4vw,20px)}.reply-panel{max-height:none;overflow:visible}} -@media(max-width:420px){.viewer-top{padding-inline:12px}.viewer-top>.btn{width:auto}.viewer h1{overflow-wrap:anywhere}.reactions .btn{flex:1 1 100%;justify-content:flex-start}.discussion-toolbar>*{min-width:0;max-width:100%}} - - -/* Keep full-screen backdrops full-screen; constrain only the dialog surface. */ -.modal-backdrop{width:100vw;max-width:100vw;max-height:100dvh;inset:0} -.modal-backdrop>[role="dialog"],.modal-backdrop .modal,.modal-backdrop .preview-modal,.modal-backdrop .publish-modal{width:min(100%,920px);max-width:calc(100vw - 20px)} From 91eb27ce072fa369764080050c446312e1d32189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:56:51 +0200 Subject: [PATCH 202/575] Serve independent React application entrypoint --- rebuild/index.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/rebuild/index.html b/rebuild/index.html index e085c4e..72de4eb 100644 --- a/rebuild/index.html +++ b/rebuild/index.html @@ -1 +1,15 @@ -ScreenNote · Show what you mean.

Opening ScreenNote…

\ No newline at end of file + + + + + + + + + ScreenNote — Make it clear. + + +

Opening your workspace…

+ + + From 84d7a381834ed29bfab2df5869714a11d7526d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:56:53 +0200 Subject: [PATCH 203/575] Stop bundling legacy Vercel UI into Cloudflare assets --- rebuild/scripts/build-legacy.mjs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/rebuild/scripts/build-legacy.mjs b/rebuild/scripts/build-legacy.mjs index fa7b862..4c56a1d 100644 --- a/rebuild/scripts/build-legacy.mjs +++ b/rebuild/scripts/build-legacy.mjs @@ -1,6 +1,13 @@ import { build } from "esbuild"; import { mkdir, cp, rm } from "node:fs/promises"; -const source="legacy/public",output="legacy/dist"; -await rm(output,{recursive:true,force:true});await mkdir(output,{recursive:true});await cp(source,output,{recursive:true}); -await build({entryPoints:[source+"/app.js"],bundle:true,format:"esm",target:"es2022",outfile:output+"/app.js",minify:true}); -console.log("Built complete ScreenNote 0.5.0 browser app for Cloudflare assets."); + +// Only copy the offline shell worker and app icon. The legacy HTML, CSS and JS +// are deliberately excluded: Cloudflare ships the independent React application. +const source = "legacy/public"; +const output = "public"; +await rm(output, { recursive: true, force: true }); +await mkdir(output, { recursive: true }); +for (const file of ["sw.js", "icon.svg"]) { + try { await cp(`${source}/${file}`, `${output}/${file}`); } catch { /* optional static asset */ } +} +console.log("Prepared Cloudflare-only public assets; legacy UI bundle is excluded."); From 4efe798abcca385262935ea1567e2615f0e70bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:56:56 +0200 Subject: [PATCH 204/575] Build Cloudflare app from React entrypoint and isolated public assets --- rebuild/vite.config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rebuild/vite.config.ts b/rebuild/vite.config.ts index d3b3b53..a5e533b 100644 --- a/rebuild/vite.config.ts +++ b/rebuild/vite.config.ts @@ -1,4 +1,8 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import { cloudflare } from "@cloudflare/vite-plugin"; -export default defineConfig({ plugins:[react(),cloudflare()], publicDir:"legacy/dist", build:{target:"es2022",sourcemap:true} }); +export default defineConfig({ + plugins: [react(), cloudflare()], + publicDir: "public", + build: { target: "es2022", sourcemap: true } +}); From de53f6b85ec1f14ba637722a9e5ca925b6387771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:57:35 +0200 Subject: [PATCH 205/575] Document independent Cloudflare React frontend and remaining backend bridge --- rebuild/README.md | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/rebuild/README.md b/rebuild/README.md index 1552175..8b0d89c 100644 --- a/rebuild/README.md +++ b/rebuild/README.md @@ -1,14 +1,21 @@ -# ScreenNote Cloudflare rebuild +# ScreenNote — Cloudflare application -This branch is being executed as a **full replacement**, not a reduced rewrite. +This branch is a separately implemented Cloudflare-first product. It is not a visual clone or a repackaged copy of the Vercel frontend. -## Current implementation state +## Application boundary -- The complete ScreenNote 0.5.0 browser app from `main` is restored under `legacy/public` and `legacy/lib`, including its original capture, local IndexedDB library, import/trim/annotation tools, captions and transcript search, chapters, bug-report context, threaded discussions, reactions, review status, recovery keys, offline safeguards, upload retry/resume and all original user journeys. -- The Cloudflare Worker serves the rebuilt original browser bundle and retains the isolated D1/R2 candidate API. -- **Temporary parity bridge:** `/api/clip` currently proxies to the verified Vercel production API so the restored original UI does not lose the mature API contract during the native backend migration. Therefore this deployment is not yet independent of Vercel. Do not call it a completed Cloudflare-native replacement. -- The bridge must be replaced by the Cloudflare D1/R2 implementation only after black-box API parity tests pass for every operation. Existing production data is not copied or mutated by migration tests. -- Vercel production remains unchanged and is the rollback reference. +- **Frontend:** React 19 + TypeScript + Vite. The deployed entrypoint is `rebuild/index.html` and `rebuild/src/main.tsx`. +- **Design system:** independent editorial interface: Space Grotesk / Source Sans 3 / DM Mono, warm mineral paper, near-black recording surface and acid-lime action colour. It does not load the Vercel stylesheet or Vercel HTML/JS. +- **Build assets:** `scripts/build-legacy.mjs` now copies only the offline service worker and app icon. It does not bundle or copy the legacy browser app. +- **Backend:** Cloudflare Worker with D1 metadata and R2 media storage. +- **Local-first data:** IndexedDB stores original recordings on the user's device; publishing is explicit. +- **Legacy source:** `legacy/` remains in this branch as a behavior/feature reference and migration source only. It is not the deployed UI. + +## Important backend limitation + +The Worker still has a temporary `/api/clip` compatibility proxy to the Vercel API for older 0.5.0 clients and data contracts. The new frontend is independent of the Vercel frontend, but the entire service is not yet independent of Vercel. Do not describe the API layer as fully Cloudflare-native until the proxy is removed after contract-parity tests and an explicit legacy-link migration plan. + +Vercel production remains unchanged. ## Build and test @@ -20,8 +27,8 @@ npm run build npm run e2e ``` -The build first bundles the original browser app from `legacy/public/app.js` into `legacy/dist`, then packages it as Cloudflare Worker static assets. `/api/clip` is Worker-first. +The build emits the Vite/React app. Legacy HTML, CSS and browser JavaScript are deliberately excluded from the Worker asset bundle. ## Release gates -See `FEATURE-PARITY-ACCEPTANCE.md`. Current verdict: **full browser feature set restored; Cloudflare-native backend parity and production cutover are still in progress**. Never infer complete acceptance from candidate-only tests. +See `FEATURE-PARITY-ACCEPTANCE.md`. The independent frontend is a new implementation; feature parity, Worker/API independence, visual acceptance, security review, accessibility review, and physical-device checks remain separate release gates. From 7cc8017ac02092f3c43aebecdc486fd7ca202ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:57:38 +0200 Subject: [PATCH 206/575] Retain PWA manifest without copying legacy interface --- rebuild/scripts/build-legacy.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/scripts/build-legacy.mjs b/rebuild/scripts/build-legacy.mjs index 4c56a1d..8ec9aa0 100644 --- a/rebuild/scripts/build-legacy.mjs +++ b/rebuild/scripts/build-legacy.mjs @@ -7,7 +7,7 @@ const source = "legacy/public"; const output = "public"; await rm(output, { recursive: true, force: true }); await mkdir(output, { recursive: true }); -for (const file of ["sw.js", "icon.svg"]) { +for (const file of ["sw.js", "icon.svg", "manifest.webmanifest"]) { try { await cp(`${source}/${file}`, `${output}/${file}`); } catch { /* optional static asset */ } } console.log("Prepared Cloudflare-only public assets; legacy UI bundle is excluded."); From 8b5feacad50f62646fc1610c30c245caddc7e212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:57:57 +0200 Subject: [PATCH 207/575] Test the independent React frontend instead of the retired legacy UI --- rebuild/e2e/visual.spec.ts | 244 ++++--------------------------------- 1 file changed, 25 insertions(+), 219 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 1f09b6b..96a551a 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -20,7 +20,7 @@ const viewports = [ async function contained(page: import("@playwright/test").Page, width:number) { const m=await page.evaluate(()=>{ - const selectors=".button,.btn,button,input,select,textarea,.clip-card,.clip-grid,.capture-panel,.share-layout,.share-discussion,.viewer,.viewer-top,.viewer-grid,.viewer-media,.reply-panel,.help-grid,.help-grid>.panel,.modal,.preview-modal,.publish-modal,[role=dialog]"; + const selectors="button,input,select,textarea,.clip-card,.clip-grid,.capture-panel,.preview-modal,.publish-modal,[role=dialog]"; const offenders=[...document.querySelectorAll(selectors)].filter(el=>{ const style=getComputedStyle(el),r=el.getBoundingClientRect(); return style.display!=="none"&&style.visibility!=="hidden"&&r.width>0&&(r.left < -1 || r.right > innerWidth+1); @@ -29,20 +29,22 @@ async function contained(page: import("@playwright/test").Page, width:number) { }); expect(m.doc, `document horizontal overflow at ${width}px: ${JSON.stringify(m)}`).toBeLessThanOrEqual(width+1); expect(m.body, `body horizontal overflow at ${width}px: ${JSON.stringify(m)}`).toBeLessThanOrEqual(width+1); - expect(m.offenders, `visible controls or content panels escape the viewport at ${width}px`).toEqual([]); + expect(m.offenders, `visible controls or content panels escape viewport at ${width}px`).toEqual([]); } test.beforeAll(async()=>{await mkdir("test-results/screenshots",{recursive:true});}); -test("original ScreenNote layout stays contained at 13 widths in light and dark",async({page})=>{ +test("independent React workspace is contained at 13 widths in light and dark",async({page})=>{ await page.goto("/"); - await expect(page.getByRole("heading",{level:1})).toBeVisible(); + await expect(page.getByRole("heading",{level:1,name:/Make it clear/i})).toBeVisible(); + await expect(page.locator('script[type="module"][src="/src/main.tsx"]')).toHaveCount(1); + await expect(page.locator("#app")).toHaveCount(0); for(const v of viewports){ await page.setViewportSize({width:v.width,height:v.height}); await contained(page,v.width); if([320,375,768,1120,1440].includes(v.width))await page.screenshot({path:`test-results/screenshots/${v.name}-light.png`,fullPage:true}); } - await page.getByRole("button",{name:"Toggle light or dark mode"}).click(); + await page.getByRole("button",{name:"Toggle appearance"}).click(); await expect(page.locator("html")).toHaveAttribute("data-theme","dark"); for(const v of viewports){ await page.setViewportSize({width:v.width,height:v.height}); @@ -51,222 +53,26 @@ test("original ScreenNote layout stays contained at 13 widths in light and dark" } }); -test("import, title, captions, chapters and bug-report context persist locally",async({page})=>{ +test("imported recording can be previewed, trimmed and shared from the new workspace",async({page})=>{ await page.goto("/"); - await page.locator("#import-video").setInputFiles(path.resolve("legacy/public/sample.webm")); - await expect(page.getByRole("heading",{name:"Review & share"})).toBeVisible({timeout:20000}); - await expect(page.locator("#player")).toBeVisible(); - const title="A very long but valid walkthrough title that should wrap without pushing the review screen outside the viewport"; - const savedTitle=title.slice(0,100); - await page.locator("#recording-title-input").fill(title); - await page.getByRole("button",{name:"Save title"}).click(); - await expect(page.locator("#title-status")).toHaveText("Title saved."); - await page.getByText("Captions, chapters & bug report",{exact:true}).click(); - await page.locator("#captions-text").fill("WEBVTT\n\n00:00:00.000 --> 00:00:01.500\nReview this step."); - await page.locator("#chapters-text").fill("0:01 Opening"); - await page.locator("#report-url").fill("https://example.com/checkout/with/a/very/long/path/that/should-wrap-cleanly/".repeat(4)); - await page.locator("#report-steps").fill("Open the checkout and select the payment method. ".repeat(8)+" unbroken-token-".repeat(35)); - await page.locator("#report-expected").fill("The payment option remains visible."); - await page.locator("#report-actual").fill("The payment option disappears."); - await page.locator("#extras-form button[type=submit]").click(); - await expect(page.locator("#extras-status")).toHaveText("Video context saved."); - await expect(page.locator("#export-captions")).toBeEnabled(); - const download=page.waitForEvent("download"); - await page.locator("#export-report").click(); - expect((await download).suggestedFilename()).toContain("bug-report"); - await expect(page.locator("#recording-title-input")).toHaveValue(savedTitle); - for(const theme of ["light","dark"]){await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme);for(const v of viewports){await page.setViewportSize({width:v.width,height:v.height});await contained(page,v.width);if([320,375,768,1120,1440].includes(v.width))await page.screenshot({path:"test-results/screenshots/review-"+v.width+"-"+theme+".png",fullPage:true});}} + await page.locator('input[type="file"]').first().setInputFiles(path.resolve("legacy/public/sample.webm")); + await expect(page.getByRole("heading",{name:"sample"})).toBeVisible({timeout:15000}); + await page.getByRole("button",{name:/Play sample/i}).click(); + await expect(page.getByRole("dialog",{name:/sample/i})).toBeVisible(); + await expect(page.locator("video.preview-video")).toBeVisible(); + await page.getByRole("button",{name:/Share temporarily/i}).click(); + await expect(page.getByRole("heading",{name:"Make a temporary link"})).toBeVisible(); + await expect(page.getByText(/Only this shared copy is uploaded/i)).toBeVisible(); + await page.getByRole("button",{name:"Close share settings"}).click(); + await page.getByRole("button",{name:"Close preview"}).click(); }); -test("annotation editor supports drawing, tool switching, undo and clear on an imported recording",async({page})=>{ - await page.goto("/"); - await page.locator("#import-video").setInputFiles(path.resolve("legacy/public/sample.webm")); - await expect(page.getByRole("heading",{name:"Review & share"})).toBeVisible({timeout:20000}); - await page.getByText("Annotate or hide sensitive areas",{exact:true}).click(); - const video=page.locator("#markup-video"); - await expect.poll(()=>video.evaluate((el:HTMLVideoElement)=>el.readyState)).toBeGreaterThanOrEqual(1); - const canvas=page.locator("#markup-canvas"); - await expect(canvas).toBeVisible(); - await page.locator("#markup-tool").selectOption("redact"); - const rect=await canvas.boundingBox(); - if(!rect)throw new Error("Annotation canvas has no measurable bounds."); - await page.mouse.move(rect.x+rect.width*.2,rect.y+rect.height*.2); - await page.mouse.down(); - await page.mouse.move(rect.x+rect.width*.55,rect.y+rect.height*.55,{steps:5}); - await page.mouse.up(); - await expect(page.locator("#markup-count")).toHaveText("1 marks"); - await page.locator("#undo-markup").click(); - await expect(page.locator("#markup-count")).toHaveText("0 marks"); - await page.locator("#markup-tool").selectOption("blur"); - await page.mouse.move(rect.x+rect.width*.3,rect.y+rect.height*.3); - await page.mouse.down(); - await page.mouse.move(rect.x+rect.width*.7,rect.y+rect.height*.7,{steps:5}); - await page.mouse.up(); - await expect(page.locator("#markup-count")).toHaveText("1 marks"); - await page.locator("#clear-markup").click(); - await expect(page.locator("#markup-count")).toHaveText("0 marks"); -}); - -test("screen capture can pause, resume and save a private local recording",async({page})=>{ - await page.addInitScript(()=>{ - const canvas=document.createElement("canvas");canvas.width=640;canvas.height=360; - const ctx=canvas.getContext("2d");if(!ctx||!canvas.captureStream)throw Error("Canvas capture not supported"); - let frame=0;const paint=()=>{ctx.fillStyle=frame%2?"#e7efe8":"#f7f6f2";ctx.fillRect(0,0,640,360);ctx.fillStyle="#235a45";ctx.font="bold 30px sans-serif";ctx.fillText("ScreenNote capture "+frame,32,72);frame++;requestAnimationFrame(paint)};paint(); - const stream=canvas.captureStream(15); - Object.defineProperty(navigator.mediaDevices,"getDisplayMedia",{configurable:true,value:async()=>stream}); - }); +test("new frontend contains no legacy stylesheet or legacy app script requests",async({page})=>{ + const requested:string[]=[]; + page.on("request",request=>requested.push(new URL(request.url()).pathname)); await page.goto("/"); - for(const id of ["mic","camera","system"]){const el=page.locator("#"+id);if(await el.isChecked())await el.uncheck();} - await page.locator('[data-action="record"]').click(); - await expect(page.getByRole("heading",{name:"Prepare your recording."})).toBeVisible({timeout:10000}); - await page.getByRole("button",{name:/Begin recording/}).click(); - await expect(page.locator("#live-actions")).toBeVisible({timeout:10000}); - await page.waitForTimeout(1200); - await page.locator("#pause-button").click(); - await expect(page.locator("#recording-status")).toContainText("PAUSED"); - await page.waitForTimeout(250); - await page.locator("#pause-button").click(); - await expect(page.locator("#recording-status")).toContainText("RECORDING"); - await page.waitForTimeout(1200); - await page.locator('[data-action="stop"]').click(); - await expect(page.getByRole("heading",{name:"Review & share"})).toBeVisible({timeout:20000}); - await expect(page.locator("#player")).toBeVisible(); - await expect(page.locator("#recording-title-input")).toBeVisible(); -}); - -test("appearance, local library and portable backup persist across a fresh browser",async({page,browser})=>{ - await page.goto("/"); - await page.getByRole("button",{name:"Toggle light or dark mode"}).click(); - await expect(page.locator("html")).toHaveAttribute("data-theme","dark"); - await page.reload(); - await expect(page.locator("html")).toHaveAttribute("data-theme","dark"); - await page.getByRole("button",{name:"Toggle light or dark mode"}).click(); - await page.reload(); - await expect(page.locator("html")).toHaveAttribute("data-theme","light"); - await page.locator("#import-video").setInputFiles(path.resolve("legacy/public/sample.webm")); - await expect(page.getByRole("heading",{name:"Review & share"})).toBeVisible({timeout:20000}); - await page.locator("#main").getByRole("button",{name:"My recordings"}).click(); - await expect(page.locator(".clip-card")).toHaveCount(1); - await page.reload(); - await expect(page.locator(".clip-card")).toHaveCount(1); - const downloadPromise=page.waitForEvent("download"); - await page.getByRole("button",{name:"Back up library"}).click(); - const backup=await downloadPromise;expect(backup.suggestedFilename()).toMatch(/\.snbackup$/); - const backupPath=await backup.path();expect(backupPath).toBeTruthy(); - const freshContext=await browser.newContext(),freshPage=await freshContext.newPage(); - await freshPage.goto("/"); - await freshPage.locator("#restore-library-backup").setInputFiles(backupPath!); - await freshPage.waitForTimeout(300); - const restoreOpen=await freshPage.locator("#modal").evaluate((el:any)=>el.open); - if(!restoreOpen)throw new Error("Library backup restore failed: "+await freshPage.locator("#error").innerText()+" "+await freshPage.locator("#notice").innerText()); - await expect(freshPage.locator("#modal")).toContainText("Restore your ScreenNote library"); - for(const width of [320,375,768]){await freshPage.setViewportSize({width,height:900});await contained(freshPage,width);} - await freshPage.getByRole("button",{name:"Restore backup"}).click(); - await expect(freshPage.locator(".clip-card")).toHaveCount(1); - await freshPage.reload(); - await expect(freshPage.locator(".clip-card")).toHaveCount(1); - await freshContext.close(); -}); - -test("installable app shell keeps the local library usable offline",async({page,context})=>{ - await page.goto("/"); - await page.locator("#import-video").setInputFiles(path.resolve("legacy/public/sample.webm")); - await expect(page.getByRole("heading",{name:"Review & share"})).toBeVisible({timeout:20000}); - await page.locator("#main").getByRole("button",{name:"My recordings"}).click(); - await expect(page.locator(".clip-card")).toHaveCount(1); - await page.evaluate(async()=>{await navigator.serviceWorker.ready;}); - await page.reload(); - await page.evaluate(async()=>{if(navigator.serviceWorker.controller)return;await new Promise(resolve=>navigator.serviceWorker.addEventListener("controllerchange",()=>resolve(),{once:true}));}); - await context.setOffline(true); - await page.reload(); - await expect(page.getByRole("heading",{name:/Your recordings|Show it/})).toBeVisible({timeout:10000}); - await expect(page.locator(".clip-card")).toHaveCount(1); - await expect(page.locator("#import-video")).toBeAttached(); - await context.setOffline(false); -}); - - -test("real legacy share viewer and privacy route remain contained across widths and themes",async({page})=>{ - const id="123e4567-e89b-12d3-a456-426614174000"; - await page.route(/\/api\/clip\?op=view/,async route=>{ - const url=new URL(route.request().url()); - if(url.searchParams.get("id")!==id){await route.continue();return;} - await route.fulfill({json:{ - id,title:"A very long ScreenNote title that must wrap naturally without forcing the viewer outside the available screen width", - reviewStatus:"needs-feedback",width:1280,height:720,start:0,end:95,duration:95, - createdAt:Date.now(),expiresAt:Date.now()+86400000,passwordProtected:false, - discussionRevision:0,captions:[],chapters:[],report:null,comments:[{id:"comment-1",name:"Guest reviewer",text:"Please inspect this very long note and its reference https://example.com/".repeat(6),time:12,createdAt:Date.now(),parentId:null,editedAt:null,deleted:false,resolved:false,creator:false}], - reactions:{like:0,thanks:0,idea:0},mediaUrl:"/sample.webm" - }}); - }); - await page.goto("/v/"+id); - await expect(page.locator(".viewer-grid")).toBeVisible(); - await expect(page.locator(".reply-panel")).toContainText("Talk about this moment."); - await expect(page.locator(".reply-panel")).toContainText("Guest reviewer"); - for(const theme of ["light","dark"]){ - await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); - for(const width of [320,360,375,390,414,600,768,834,1024,1120,1280,1440,1920]){ - await page.setViewportSize({width,height:900}); - await contained(page,width); - } - } - await page.goto("/"); - await page.locator(".footer [data-action=privacy]").click(); - await expect(page.getByRole("heading",{name:"Your screen. Your call."})).toBeVisible(); - await expect(page.getByText(/private Cloudflare R2 bucket/)).toBeVisible(); - await expect(page.getByText(/served by Cloudflare Workers/)).toBeVisible(); - for(const theme of ["light","dark"]){ - await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); - for(const width of [320,360,375,390,414,600,768,834,1024,1120,1280,1440,1920]){ - await page.setViewportSize({width,height:900}); - await contained(page,width); - } - } -}); - - -test("help and settings guidance remains readable and contained at every breakpoint",async({page})=>{ - await page.goto("/"); - await page.locator('.top-actions [data-action="help"]').click(); - await expect(page.getByRole("heading",{name:/Show the problem/})).toBeVisible(); - await expect(page.locator(".help-grid")).toBeVisible(); - for(const theme of ["light","dark"]){ - await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); - for(const width of [320,360,375,390,414,600,768,834,1024,1120,1280,1440,1920]){ - await page.setViewportSize({width,height:900}); - await contained(page,width); - } - } - await page.locator('.help-grid [data-action="privacy"]').click(); - await expect(page.getByRole("heading",{name:"Your screen. Your call."})).toBeVisible(); - await expect(page.getByText(/private Cloudflare R2 bucket/)).toBeVisible(); -}); - - - -test("landscape layouts, keyboard access and accessible control names",async({page})=>{ - await page.goto("/"); - for(const theme of ["light","dark"]){ - await page.evaluate(value=>document.documentElement.setAttribute("data-theme",value),theme); - for(const viewport of [{width:844,height:390},{width:1024,height:600},{width:1280,height:720}]){ - await page.setViewportSize(viewport); - await expect(page.locator("body")).toBeVisible(); - const metrics=await page.evaluate(()=>({width:document.documentElement.clientWidth,scroll:document.documentElement.scrollWidth,height:document.documentElement.clientHeight})); - expect(metrics.scroll,JSON.stringify({...viewport,...metrics})).toBeLessThanOrEqual(metrics.width+1); - } - } - await page.setViewportSize({width:390,height:844}); - const unnamed=await page.locator("button,[role=button],a[href],input:not([type=hidden]),select,textarea").evaluateAll(nodes=>(nodes as HTMLElement[]).filter(el=>{ - const e=el; - if(e.hasAttribute("disabled")||e.hidden||e.getAttribute("aria-hidden")==="true")return false; - const type=e.getAttribute("type"); - if(type==="file")return !(e.getAttribute("aria-label")||(e as HTMLInputElement).labels?.length); - const labelled=!!(e.getAttribute("aria-label")||e.getAttribute("aria-labelledby")||e.textContent?.trim()||e.getAttribute("title")||e.getAttribute("placeholder")||e.getAttribute("alt")||e.closest("label")?.textContent?.trim()||(e.id&&document.querySelector(`label[for="${CSS.escape(e.id)}"]`)?.textContent?.trim()));return !labelled; - }).map(e=>({tag:e.tagName,html:e.outerHTML.slice(0,180)}))); - expect(unnamed,JSON.stringify(unnamed)).toEqual([]); - await page.keyboard.press("Tab"); - const focused=await page.evaluate(()=>{const el=document.activeElement as HTMLElement|null;return {tag:el?.tagName,outline:el?getComputedStyle(el).outlineStyle:"none",skip:el?.classList.contains("skip")};}); - expect(focused.tag).toBeTruthy(); - expect(focused.outline).not.toBe("none"); + await expect(page.getByRole("heading",{level:1})).toBeVisible(); + expect(requested).not.toContain("/style.css"); + expect(requested).not.toContain("/app.js"); + expect(requested).toContain("/src/main.tsx"); }); - From 1641807c98ee1d0c67ea99aeb3cc5243dbc11c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:58:31 +0200 Subject: [PATCH 208/575] Remove unused Vercel Blob SDK from Cloudflare app dependencies --- rebuild/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/rebuild/package.json b/rebuild/package.json index de0c54a..28cb3de 100644 --- a/rebuild/package.json +++ b/rebuild/package.json @@ -15,7 +15,6 @@ "lucide-react": "^0.468.0", "react": "^19.1.0", "react-dom": "^19.1.0", - "@vercel/blob": "2.8.2", "fix-webm-duration": "1.0.6", "mediabunny": "1.62.1", "fflate": "0.8.2" From 940e9fad7fa01525cd5b17c4ed1749b46046bd08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:58:54 +0200 Subject: [PATCH 209/575] Preserve Cloudflare asset headers in clean build output --- rebuild/scripts/build-legacy.mjs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/rebuild/scripts/build-legacy.mjs b/rebuild/scripts/build-legacy.mjs index 8ec9aa0..678a67d 100644 --- a/rebuild/scripts/build-legacy.mjs +++ b/rebuild/scripts/build-legacy.mjs @@ -1,13 +1,17 @@ -import { build } from "esbuild"; -import { mkdir, cp, rm } from "node:fs/promises"; +import { mkdir, cp, rm, writeFile } from "node:fs/promises"; -// Only copy the offline shell worker and app icon. The legacy HTML, CSS and JS -// are deliberately excluded: Cloudflare ships the independent React application. +// Keep only static assets needed by the new React app. Never copy legacy UI files. const source = "legacy/public"; const output = "public"; await rm(output, { recursive: true, force: true }); await mkdir(output, { recursive: true }); +await writeFile(`${output}/_headers`, `/index.html + Cache-Control: no-cache + +/sw.js + Cache-Control: no-cache +`); for (const file of ["sw.js", "icon.svg", "manifest.webmanifest"]) { try { await cp(`${source}/${file}`, `${output}/${file}`); } catch { /* optional static asset */ } } -console.log("Prepared Cloudflare-only public assets; legacy UI bundle is excluded."); +console.log("Prepared isolated Cloudflare public assets; legacy HTML, CSS and JS are excluded."); From b96e6e8eda819f310435f86959976033a35d55e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:59:05 +0200 Subject: [PATCH 210/575] Align offline shell cache with the new React application --- rebuild/legacy/public/sw.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebuild/legacy/public/sw.js b/rebuild/legacy/public/sw.js index 50a9c0e..4d4d549 100644 --- a/rebuild/legacy/public/sw.js +++ b/rebuild/legacy/public/sw.js @@ -1,5 +1,5 @@ -const CACHE_NAME = "screennote-shell-v3"; -const APP_SHELL = ["/", "/manifest.webmanifest", "/icon.svg", "/app.js", "/style.css", "/privacy.html"]; +const CACHE_NAME = "screennote-react-shell-v4"; +const APP_SHELL = ["/", "/manifest.webmanifest", "/icon.svg"]; self.addEventListener("install", (event) => { event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL)).then(() => self.skipWaiting())); From aceaf0d3b568f13da71e59aac4ea6b373fb197fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 12:59:50 +0200 Subject: [PATCH 211/575] Include WebM acceptance fixture for Cloudflare API parity smoke --- rebuild/scripts/build-legacy.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/scripts/build-legacy.mjs b/rebuild/scripts/build-legacy.mjs index 678a67d..3cdb74e 100644 --- a/rebuild/scripts/build-legacy.mjs +++ b/rebuild/scripts/build-legacy.mjs @@ -11,7 +11,7 @@ await writeFile(`${output}/_headers`, `/index.html /sw.js Cache-Control: no-cache `); -for (const file of ["sw.js", "icon.svg", "manifest.webmanifest"]) { +for (const file of ["sw.js", "icon.svg", "manifest.webmanifest", "sample.webm"]) { try { await cp(`${source}/${file}`, `${output}/${file}`); } catch { /* optional static asset */ } } console.log("Prepared isolated Cloudflare public assets; legacy HTML, CSS and JS are excluded."); From f41f07acb1433c9f606645b1b4e2bc760a6b13ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:00:58 +0200 Subject: [PATCH 212/575] Fix narrow-screen footer metadata wrapping --- rebuild/src/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index 8c38204..911887e 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -8,5 +8,5 @@ .modal-backdrop{position:fixed;inset:0;z-index:30;background:rgba(13,15,12,.72);display:grid;place-items:center;padding:16px;overflow:auto}.preview-modal,.publish-modal{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:3px;width:min(850px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;box-shadow:var(--shadow)}.publish-modal{width:min(480px,100%)}.preview-header,.publish-modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.preview-header h2,.publish-modal h2{font:600 25px 'Space Grotesk',sans-serif;margin:0}.preview-header p,.publish-modal p{color:var(--muted);margin:5px 0 18px}.preview-video{display:block;width:100%;max-height:52vh;background:#090a08;margin:12px 0}.trim-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:18px 0}.trim-tools label,.field-label{display:grid;gap:6px;font-size:13px;color:var(--muted)}.trim-tools input,.field-label input,.field-label select{background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:2px;padding:10px;min-width:0}.preview-actions{display:flex;gap:9px;flex-wrap:wrap}.field-label{margin:16px 0}.field-label input,.field-label select{width:100%}.optional-label{font:10px 'DM Mono',monospace}.privacy-explainer{display:flex;gap:10px;padding:14px;background:var(--paper);color:var(--muted);font-size:13px;line-height:1.5}.publish-submit{width:100%;margin-top:18px}.share-link-toast{position:fixed;z-index:40;bottom:18px;left:50%;transform:translateX(-50%);width:min(650px,calc(100% - 24px));padding:14px;background:var(--ink);color:#fff;display:flex;align-items:center;gap:12px;box-shadow:var(--shadow)}.share-link-toast>div{min-width:0;flex:1;display:grid;gap:3px}.share-link-toast span{font:11px 'DM Mono',monospace;overflow-wrap:anywhere;color:#d0d2c8}.share-link-toast .button.secondary{color:#fff;border-color:#666} .capture-panel,.page-wrap,.topbar,.clip-card,.preview-modal,.publish-modal{min-width:0;max-width:100%}p,h1,h2,h3,span,label,a{overflow-wrap:anywhere}img,video,canvas,svg{max-width:100%}input,select,textarea{min-width:0;max-width:100%} @media(max-width:900px){.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.capture-panel{align-items:flex-start;flex-direction:column}.capture-actions,.record-controls{justify-content:flex-start}.welcome-art{width:180px;min-width:180px}.welcome-row h1{font-size:clamp(40px,7vw,62px)}} -@media(max-width:600px){.topbar{height:62px;padding-inline:18px}.secure-label{font-size:0}.secure-label svg{width:18px;height:18px}.page-wrap{width:calc(100% - 32px);padding:35px 0 48px}.welcome-row{align-items:flex-start;padding-bottom:28px}.welcome-row h1{font-size:clamp(38px,11vw,54px);letter-spacing:-.07em}.intro{font-size:15px}.welcome-art{display:none}.capture-panel{margin:24px 0 42px;padding:19px}.capture-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.capture-actions .button{grid-column:1/-1}.section-heading{align-items:flex-start;flex-direction:column}.section-heading h2{font-size:27px}.library-tools{width:100%}.search-box{flex:1;min-width:0}.clip-grid{grid-template-columns:1fr}.clip-thumb{height:190px}.clip-info h3{font-size:15px}.build-label{margin:0 0 0 auto}.bottom-note{align-items:flex-start}.bottom-note p{max-width:100%}.share-link-toast{flex-wrap:wrap}.share-link-toast>div{flex-basis:100%}.preview-modal,.publish-modal{padding:17px}.preview-actions .button{flex:1 1 100%}} +@media(max-width:600px){.bottom-note{flex-wrap:wrap}.build-label{margin:7px 0 0;flex-basis:100%}.topbar{height:62px;padding-inline:18px}.secure-label{font-size:0}.secure-label svg{width:18px;height:18px}.page-wrap{width:calc(100% - 32px);padding:35px 0 48px}.welcome-row{align-items:flex-start;padding-bottom:28px}.welcome-row h1{font-size:clamp(38px,11vw,54px);letter-spacing:-.07em}.intro{font-size:15px}.welcome-art{display:none}.capture-panel{margin:24px 0 42px;padding:19px}.capture-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.capture-actions .button{grid-column:1/-1}.section-heading{align-items:flex-start;flex-direction:column}.section-heading h2{font-size:27px}.library-tools{width:100%}.search-box{flex:1;min-width:0}.clip-grid{grid-template-columns:1fr}.clip-thumb{height:190px}.clip-info h3{font-size:15px}.build-label{margin:0 0 0 auto}.bottom-note{align-items:flex-start}.bottom-note p{max-width:100%}.share-link-toast{flex-wrap:wrap}.share-link-toast>div{flex-basis:100%}.preview-modal,.publish-modal{padding:17px}.preview-actions .button{flex:1 1 100%}} @media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} From 9aa7bccef6e7da0cc132569391ad08d832bed38e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:01:34 +0200 Subject: [PATCH 213/575] Keep recording control surface dark and legible in both themes --- rebuild/src/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index 911887e..208b652 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -3,7 +3,7 @@ :root[data-theme="dark"]{color-scheme:dark;--paper:#171916;--panel:#20231e;--white:#272b25;--ink:#f1f0e9;--muted:#a9aa9f;--line:#383c33;--acid:#d8f36a;--acid-ink:#20250f;--rust:#ef8a6e;--shadow:0 18px 55px rgba(0,0,0,.22)} *{box-sizing:border-box}html,body,#root{margin:0;width:100%;min-width:320px;min-height:100%;background:var(--paper);color:var(--ink)}body{font-family:'Source Sans 3',sans-serif}button,input,select,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--rust);outline-offset:3px} .app-shell{min-height:100vh;background:var(--paper)}.sidebar{display:none!important}.main-content{margin:0!important;width:100%;min-width:0}.topbar{height:76px;padding:0 clamp(18px,5vw,76px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--paper)}.breadcrumb{font:600 18px 'Space Grotesk',sans-serif;letter-spacing:-.7px}.breadcrumb span{color:var(--rust);padding:0 8px}.top-actions{display:flex;align-items:center;gap:16px}.secure-label{font:500 11px 'DM Mono',monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.secure-label svg{color:#778b35;vertical-align:-3px}.avatar{display:none!important}.icon-button{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:50%;width:42px;height:42px;display:inline-grid;place-items:center}.page-wrap{width:min(1180px,calc(100% - 48px));margin:0 auto;padding:56px 0 70px}.welcome-row{display:flex;align-items:flex-end;justify-content:space-between;gap:32px;padding:0 0 42px;border-bottom:1px solid var(--line)}.eyebrow{font:500 10px 'DM Mono',monospace;letter-spacing:.14em;color:var(--rust);text-transform:uppercase}.welcome-row h1{font:600 clamp(42px,6vw,76px)/.98 'Space Grotesk',sans-serif;letter-spacing:-.075em;margin:17px 0 18px;max-width:760px}.welcome-row h1 span{color:var(--muted)}.intro{font-size:17px;color:var(--muted);max-width:500px;margin:0;line-height:1.55}.welcome-art{width:230px;min-width:230px;padding:0;transform:rotate(2deg)}.art-window{height:150px;background:var(--acid);border:1px solid var(--ink);border-radius:3px;box-shadow:8px 8px 0 var(--ink);overflow:hidden}.art-bar{height:20px;border-bottom:1px solid var(--ink);display:flex;gap:5px;align-items:center;padding:0 8px}.art-bar i{width:5px;height:5px;border:1px solid var(--ink);border-radius:50%}.art-screen{height:129px;display:flex;position:relative}.art-sidebar{width:27px;border-right:1px solid var(--ink)}.art-content{padding:17px 13px;flex:1;display:grid;gap:8px;align-content:start}.art-content div{height:7px;background:var(--ink);opacity:.75;width:90%}.art-content div:nth-child(2){width:63%}.art-content div:nth-child(3){width:77%}.art-content div:nth-child(4){width:43%}.art-cursor{position:absolute;right:45px;top:34px;width:0;height:0;border-left:10px solid var(--rust);border-top:16px solid transparent;filter:drop-shadow(1px 1px var(--ink))}.art-play{position:absolute;right:17px;bottom:15px;width:34px;height:34px;background:var(--ink);color:var(--acid);display:grid;place-items:center;border-radius:50%}.art-caption{display:none} -.capture-panel{margin:34px 0 64px;background:var(--ink);color:#f5f3e9;border-radius:3px;padding:26px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0}.capture-copy{display:flex;align-items:center;gap:16px}.capture-icon{width:48px;height:48px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink);border-radius:2px;flex:none}.capture-copy h2{font:600 20px 'Space Grotesk',sans-serif;margin:0 0 4px;letter-spacing:-.5px}.capture-copy p{font-size:14px;color:#b9bbb0;margin:0}.capture-actions,.record-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.toggle-option{font-size:13px;color:#d2d2c9;display:flex;align-items:center;gap:7px;white-space:nowrap}.toggle-option input{accent-color:var(--acid);width:15px;height:15px}.button{border:1px solid transparent;border-radius:2px;min-height:44px;padding:0 17px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .16s ease,background .16s ease}.button:hover{transform:translateY(-2px)}.button.primary{background:var(--acid);color:var(--acid-ink)}.button.secondary{background:transparent;border-color:var(--line);color:var(--ink)}.capture-panel .button.secondary{border-color:#676a60;color:#fff}.button.danger{background:var(--rust);color:#fff}.recording-indicator{font:500 11px 'DM Mono',monospace;color:var(--acid);letter-spacing:.08em}.recording-indicator span,.record-dot{display:inline-block;width:8px;height:8px;background:#e36b50;border-radius:50%;margin-right:7px} +.capture-panel{margin:34px 0 64px;background:#20211e;color:#f5f3e9;border-radius:3px;padding:26px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0}.capture-copy{display:flex;align-items:center;gap:16px}.capture-icon{width:48px;height:48px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink);border-radius:2px;flex:none}.capture-copy h2{font:600 20px 'Space Grotesk',sans-serif;margin:0 0 4px;letter-spacing:-.5px}.capture-copy p{font-size:14px;color:#b9bbb0;margin:0}.capture-actions,.record-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.toggle-option{font-size:13px;color:#d2d2c9;display:flex;align-items:center;gap:7px;white-space:nowrap}.toggle-option input{accent-color:var(--acid);width:15px;height:15px}.button{border:1px solid transparent;border-radius:2px;min-height:44px;padding:0 17px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .16s ease,background .16s ease}.button:hover{transform:translateY(-2px)}.button.primary{background:var(--acid);color:var(--acid-ink)}.button.secondary{background:transparent;border-color:var(--line);color:var(--ink)}.capture-panel .button.secondary{border-color:#676a60;color:#fff}.button.danger{background:var(--rust);color:#fff}.recording-indicator{font:500 11px 'DM Mono',monospace;color:var(--acid);letter-spacing:.08em}.recording-indicator span,.record-dot{display:inline-block;width:8px;height:8px;background:#e36b50;border-radius:50%;margin-right:7px} .notice{margin:16px 0;padding:14px 17px;background:var(--acid);color:var(--acid-ink);border-left:4px solid var(--rust);display:flex;align-items:center;justify-content:space-between;gap:14px}.recovery-copy,.recovery-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.library-section{min-width:0}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.section-heading h2{font:600 32px 'Space Grotesk',sans-serif;letter-spacing:-1.4px;margin:8px 0 0}.count-badge{font:500 12px 'DM Mono',monospace;color:var(--rust);vertical-align:middle}.library-tools{display:flex;align-items:center;gap:10px}.search-box{display:flex;align-items:center;gap:9px;border-bottom:1px solid var(--ink);padding:9px 2px;min-width:220px;color:var(--muted)}.search-box input{border:0;background:transparent;color:var(--ink);outline:none;width:100%;min-width:0}.search-box input:focus-visible{outline:none}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.clip-card{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:3px;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}.clip-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.clip-thumb{height:178px;background:#d9d8d0;position:relative;display:grid;place-items:center;overflow:hidden}.clip-thumb:before{content:'';position:absolute;inset:0;background:linear-gradient(135deg,#d8f36a 0 48%,#e8e5dc 48% 100%)}.thumb-lines{position:relative;width:52%;display:grid;gap:9px}.thumb-lines span{height:8px;background:#292b24;opacity:.75}.thumb-lines span:nth-child(2){width:70%}.thumb-lines span:nth-child(3){width:85%}.thumb-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:46px;height:46px;border:0;border-radius:50%;background:var(--ink);color:var(--acid);display:grid;place-items:center}.duration{position:absolute;bottom:10px;right:10px;background:var(--ink);color:#fff;padding:4px 7px;font:11px 'DM Mono',monospace}.clip-info{padding:15px;display:flex;align-items:center;justify-content:space-between;gap:10px}.clip-info>div:first-child{min-width:0}.clip-info h3{font:600 16px 'Space Grotesk',sans-serif;margin:0 0 5px;overflow-wrap:anywhere}.clip-info p{font:11px 'DM Mono',monospace;color:var(--muted);margin:0;display:flex;align-items:center;gap:5px;flex-wrap:wrap}.clip-actions{display:flex;gap:4px;flex:none}.clip-actions .icon-button{width:34px;height:34px}.empty-state{padding:65px 22px;text-align:center;border:1px dashed var(--line);background:var(--panel)}.empty-icon{width:54px;height:54px;margin:0 auto 16px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink)}.empty-state h3{font:600 24px 'Space Grotesk',sans-serif;margin:0 0 8px}.empty-state p{color:var(--muted);max-width:420px;margin:0 auto 20px;line-height:1.5}.empty-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.bottom-note{margin-top:54px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:15px}.note-icon{color:var(--rust)}.bottom-note strong{font:600 15px 'Space Grotesk',sans-serif}.bottom-note p{margin:4px 0 0;color:var(--muted);font-size:13px}.build-label{margin-left:auto;font:10px 'DM Mono',monospace;color:var(--muted);letter-spacing:.08em}footer{padding:24px 0 0;color:var(--muted);font:11px 'DM Mono',monospace;display:flex;gap:24px;flex-wrap:wrap}footer a{color:var(--rust)} .modal-backdrop{position:fixed;inset:0;z-index:30;background:rgba(13,15,12,.72);display:grid;place-items:center;padding:16px;overflow:auto}.preview-modal,.publish-modal{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:3px;width:min(850px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;box-shadow:var(--shadow)}.publish-modal{width:min(480px,100%)}.preview-header,.publish-modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.preview-header h2,.publish-modal h2{font:600 25px 'Space Grotesk',sans-serif;margin:0}.preview-header p,.publish-modal p{color:var(--muted);margin:5px 0 18px}.preview-video{display:block;width:100%;max-height:52vh;background:#090a08;margin:12px 0}.trim-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:18px 0}.trim-tools label,.field-label{display:grid;gap:6px;font-size:13px;color:var(--muted)}.trim-tools input,.field-label input,.field-label select{background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:2px;padding:10px;min-width:0}.preview-actions{display:flex;gap:9px;flex-wrap:wrap}.field-label{margin:16px 0}.field-label input,.field-label select{width:100%}.optional-label{font:10px 'DM Mono',monospace}.privacy-explainer{display:flex;gap:10px;padding:14px;background:var(--paper);color:var(--muted);font-size:13px;line-height:1.5}.publish-submit{width:100%;margin-top:18px}.share-link-toast{position:fixed;z-index:40;bottom:18px;left:50%;transform:translateX(-50%);width:min(650px,calc(100% - 24px));padding:14px;background:var(--ink);color:#fff;display:flex;align-items:center;gap:12px;box-shadow:var(--shadow)}.share-link-toast>div{min-width:0;flex:1;display:grid;gap:3px}.share-link-toast span{font:11px 'DM Mono',monospace;overflow-wrap:anywhere;color:#d0d2c8}.share-link-toast .button.secondary{color:#fff;border-color:#666} .capture-panel,.page-wrap,.topbar,.clip-card,.preview-modal,.publish-modal{min-width:0;max-width:100%}p,h1,h2,h3,span,label,a{overflow-wrap:anywhere}img,video,canvas,svg{max-width:100%}input,select,textarea{min-width:0;max-width:100%} From bd86d3510b3c305d3f895e07cd91d01e69dac329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:01:42 +0200 Subject: [PATCH 214/575] Assert recording panel contrast remains dark in dark theme --- rebuild/e2e/visual.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 96a551a..9de9b5d 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -46,6 +46,7 @@ test("independent React workspace is contained at 13 widths in light and dark",a } await page.getByRole("button",{name:"Toggle appearance"}).click(); await expect(page.locator("html")).toHaveAttribute("data-theme","dark"); + await expect(page.locator(".capture-panel")).toHaveCSS("background-color","rgb(32, 33, 30)"); for(const v of viewports){ await page.setViewportSize({width:v.width,height:v.height}); await contained(page,v.width); From 8c8abac0d1672ec4c825e8355ba00532ff4a7cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:02:46 +0200 Subject: [PATCH 215/575] Record independent React frontend acceptance and remaining UI parity gaps --- rebuild/FEATURE-PARITY-ACCEPTANCE.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/rebuild/FEATURE-PARITY-ACCEPTANCE.md b/rebuild/FEATURE-PARITY-ACCEPTANCE.md index 5f48a0d..2808f93 100644 --- a/rebuild/FEATURE-PARITY-ACCEPTANCE.md +++ b/rebuild/FEATURE-PARITY-ACCEPTANCE.md @@ -64,16 +64,29 @@ Status meanings: | Physical Android/iOS | Explicitly unverified in Vercel verdict | Explicitly outstanding | External device acceptance; no false certification | | Security review | Existing CSP, IDOR/storage gateway tests; remaining P2 items listed | Independent security review explicitly outstanding | Threat model, authz, CSRF/CORS, upload validation, abuse/rate limits, secrets, data deletion | -## 3. Immediate parity blockers +## 3. Independent frontend acceptance -1. The Cloudflare candidate README does not claim parity for captions/SRT/VTT, searchable transcripts, chapters, structured bug reports, offline behavior, upload resume, or the full mask/annotation workflow. +The Cloudflare application now has its own React 19 + TypeScript + Vite entrypoint and an independent design system. The build no longer bundles or serves the legacy Vercel HTML, CSS or browser JavaScript. The legacy source is retained only as a migration/reference corpus. + +Verified by the rebuild workflow: +- React entrypoint is served from `/src/main.tsx` in development and the Vite-generated asset bundle in production. +- The legacy `/app.js` and `/style.css` requests are absent from the new frontend. +- Independent warm-paper / near-black / acid-lime visual language, Space Grotesk / Source Sans 3 / DM Mono typography, and custom recording/library composition. +- Playwright responsive checks at 13 viewport widths, light and dark themes, import/preview/share journey, and no horizontal viewport overflow. +- Build and deployed live API acceptance run separately; the existing Vercel production deployment is not modified. + +The frontend is independent; the service is not yet fully Vercel-independent. A compatibility fallback remains for the old `/api/clip` contract so existing legacy shares are not silently abandoned. The new React frontend uses Cloudflare's Worker API for new sharing flows. + +## 4. Immediate parity blockers + +1. The new React frontend currently exposes the primary capture, local library, import, preview, trim and temporary-share flows. Advanced legacy enrichment and review capabilities (captions/SRT/VTT, searchable owner-supplied transcript, chapters, structured bug reports, detailed annotations/redaction, and some recovery/offline workflows) still need to be surfaced and reimplemented in the new UI; keeping their source in `legacy/` is not feature parity. 2. The candidate does not implement automatic transcript extraction or generated keyframes; transcript search is over owner-supplied captions. Structured agent handoff is not present as a named product workflow and needs a precise scope decision against the reference implementation. 3. True frame-by-frame drawing and native desktop capture are explicitly roadmap items. 4. Recovery-key restore in a separate browser, real elapsed-time expiry, independent security review, manual accessibility, and physical-device QA remain open. 5. Candidate upload/comment limits differ from Vercel. Limits must be intentionally chosen and tested, not treated as automatic improvements. 6. Existing production data must not be copied, migrated, deleted, or invalidated as part of development smoke tests. -## 4. Required engineering sequence +## 5. Required engineering sequence ### Gate A — source inventory Enumerate every route, screen, state, browser capability, API operation, data model, migration, background task, and user-visible promise in both implementations. Map each item to exact source files and tests. This ledger is a starting point, not a substitute for source-level inventory. From 53d7f1352d274e31fac26c0889f5002f3a5aa95e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:04:43 +0200 Subject: [PATCH 216/575] Design independent share viewer and privacy page surfaces --- rebuild/src/styles.css | 68 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index 208b652..5ca4f52 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -10,3 +10,71 @@ @media(max-width:900px){.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.capture-panel{align-items:flex-start;flex-direction:column}.capture-actions,.record-controls{justify-content:flex-start}.welcome-art{width:180px;min-width:180px}.welcome-row h1{font-size:clamp(40px,7vw,62px)}} @media(max-width:600px){.bottom-note{flex-wrap:wrap}.build-label{margin:7px 0 0;flex-basis:100%}.topbar{height:62px;padding-inline:18px}.secure-label{font-size:0}.secure-label svg{width:18px;height:18px}.page-wrap{width:calc(100% - 32px);padding:35px 0 48px}.welcome-row{align-items:flex-start;padding-bottom:28px}.welcome-row h1{font-size:clamp(38px,11vw,54px);letter-spacing:-.07em}.intro{font-size:15px}.welcome-art{display:none}.capture-panel{margin:24px 0 42px;padding:19px}.capture-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.capture-actions .button{grid-column:1/-1}.section-heading{align-items:flex-start;flex-direction:column}.section-heading h2{font-size:27px}.library-tools{width:100%}.search-box{flex:1;min-width:0}.clip-grid{grid-template-columns:1fr}.clip-thumb{height:190px}.clip-info h3{font-size:15px}.build-label{margin:0 0 0 auto}.bottom-note{align-items:flex-start}.bottom-note p{max-width:100%}.share-link-toast{flex-wrap:wrap}.share-link-toast>div{flex-basis:100%}.preview-modal,.publish-modal{padding:17px}.preview-actions .button{flex:1 1 100%}} @media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} + + +/* Independent share-viewer and privacy surfaces */ +.share-page{min-height:100vh;background:var(--paper);padding:0 clamp(16px,4vw,64px);color:var(--ink)} +.share-topbar{width:min(1440px,100%);min-height:74px;margin:0 auto;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:20px;flex-wrap:wrap} +.share-brand{display:inline-flex;align-items:center;gap:9px;font:700 19px 'Space Grotesk',sans-serif;letter-spacing:-.8px} +.share-brand>span:last-child{color:var(--muted);font-weight:400} +.brand-mark{width:30px;height:30px;display:inline-grid;place-items:center;background:var(--acid);color:var(--acid-ink);border-radius:2px} +.temporary-label{display:inline-flex;align-items:center;gap:7px;font:10px 'DM Mono',monospace;letter-spacing:.08em;text-transform:uppercase;color:var(--rust)} +.share-header-actions{margin-left:auto;display:flex;align-items:center;gap:16px;flex-wrap:wrap} +.text-action{display:inline-flex;align-items:center;gap:6px;padding:7px 0;border:0;background:transparent;color:var(--muted);font-size:12px;font-weight:700;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:4px} +.text-action:hover,.text-action.active{color:var(--rust);text-decoration-color:currentColor} +.share-layout{width:min(1440px,100%);margin:42px auto 58px;display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,.8fr);gap:34px;align-items:start} +.share-main,.share-discussion{min-width:0} +.share-heading{margin:0 0 20px} +.share-heading h1{font:600 clamp(30px,4vw,48px)/1.05 'Space Grotesk',sans-serif;letter-spacing:-.055em;margin:10px 0} +.share-heading p{color:var(--muted);margin:0;font-size:15px} +.share-video-wrap{position:relative;background:#080907;overflow:hidden;min-width:0;aspect-ratio:16/9} +.share-video-wrap video{display:block;width:100%;height:100%;max-height:70vh;object-fit:contain} +.frame-annotation-pin,.pending-annotation-pin{position:absolute;z-index:3;width:16px;height:16px;border:3px solid #fff;border-radius:50%;background:var(--rust);transform:translate(-50%,-50%);box-shadow:0 0 0 2px #171916} +.pending-annotation-pin{background:var(--acid)} +.annotation-layer{position:absolute;inset:0;width:100%;height:100%;border:0;background:transparent;cursor:crosshair} +.playback-bubble{position:absolute;left:12px;max-width:min(80%,480px);padding:9px 12px;border:0;border-radius:2px;background:var(--acid);color:var(--acid-ink);display:flex;align-items:center;gap:8px;text-align:left;font-size:12px;box-shadow:0 5px 20px #0004} +.share-video-meta{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid var(--line);color:var(--muted);font:10px 'DM Mono',monospace} +.share-comment-form{margin-top:22px;padding:20px;background:var(--panel);border:1px solid var(--line);display:grid;gap:12px} +.comment-composer-title{font:600 16px 'Space Grotesk',sans-serif} +.comment-composer-title span{font:11px 'DM Mono',monospace;color:var(--rust);margin-left:8px} +.annotation-controls,.comment-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap} +.annotation-controls span{font:10px 'DM Mono',monospace;color:var(--rust)} +.share-comment-form textarea{width:100%;min-height:88px;padding:12px;border:1px solid var(--line);border-radius:2px;background:var(--white);color:var(--ink);resize:vertical} +.comment-composer-actions{justify-content:flex-end} +.share-discussion{background:var(--panel);border:1px solid var(--line);padding:20px} +.discussion-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:16px;border-bottom:1px solid var(--line)} +.discussion-title h2{font:600 22px 'Space Grotesk',sans-serif;letter-spacing:-.7px;margin:7px 0 0} +.discussion-mark{width:36px;height:36px;background:var(--acid);color:var(--acid-ink);display:grid;place-items:center} +.discussion-list{display:grid;gap:16px;padding-top:17px;max-height:720px;overflow:auto;overscroll-behavior:contain} +.discussion-empty{text-align:center;padding:38px 10px;color:var(--muted)} +.discussion-empty svg{color:var(--rust);margin-bottom:12px} +.discussion-empty strong{display:block;color:var(--ink);font:600 15px 'Space Grotesk',sans-serif} +.discussion-empty p{font-size:13px;line-height:1.5} +.share-comment{min-width:0;padding:13px 0 0 13px;border-left:2px solid var(--line);overflow-wrap:anywhere} +.share-comment.reply{margin:10px 0 0 10px;border-left-color:var(--acid)} +.share-comment-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font:10px 'DM Mono',monospace;color:var(--muted)} +.share-comment-meta strong{font:600 12px 'Space Grotesk',sans-serif;color:var(--ink)} +.timestamp-link{border:0;background:var(--acid);color:var(--acid-ink);padding:3px 6px;font:10px 'DM Mono',monospace} +.share-comment p{font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere} +.resolved-tag{display:inline-flex;align-items:center;gap:4px;margin-left:8px;color:#788b39;font:10px 'DM Mono',monospace} +.share-footer{width:min(1440px,100%);margin:0 auto;padding:16px 0 25px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;color:var(--muted);font:10px 'DM Mono',monospace} +.share-footer span:first-child{display:inline-flex;align-items:center;gap:6px} +.share-error{padding:10px 12px;background:#f8e5df;color:#8f3424;border-left:3px solid var(--rust);font-size:13px} +.share-loading,.share-ended,.password-gate{width:min(460px,100%);margin:12vh auto;padding:34px;background:var(--panel);border:1px solid var(--line);text-align:center} +.share-ended svg,.share-lock{color:var(--rust)} +.share-ended h1,.password-gate h1{font:600 28px 'Space Grotesk',sans-serif;letter-spacing:-1px} +.share-ended p,.password-gate p{color:var(--muted);line-height:1.55} +.share-ended span{font:10px 'DM Mono',monospace;color:var(--rust);text-transform:uppercase;letter-spacing:.08em} +.password-gate{display:grid;justify-items:center;gap:14px} +.password-gate label{width:100%;display:grid;gap:7px;text-align:left;color:var(--muted);font-size:13px} +.password-gate input{width:100%;padding:12px;background:var(--white);border:1px solid var(--line);color:var(--ink)} +.password-gate .button{width:100%} +.privacy-document{width:min(780px,100%);margin:46px auto 80px;padding:clamp(22px,5vw,52px);background:var(--panel);border:1px solid var(--line)} +.privacy-document>.text-action{margin-bottom:34px} +.privacy-document h1{font:600 clamp(36px,6vw,58px)/1 'Space Grotesk',sans-serif;letter-spacing:-.06em;margin:16px 0} +.privacy-document h2{font:600 21px 'Space Grotesk',sans-serif;letter-spacing:-.5px;margin:30px 0 8px} +.privacy-document p{font-size:15px;line-height:1.7;color:var(--muted)} +.privacy-document .privacy-lead{font-size:18px;color:var(--ink)} +.privacy-document .privacy-updated{margin-top:38px;padding-top:18px;border-top:1px solid var(--line);font:10px 'DM Mono',monospace} +@media(max-width:760px){.share-page{padding-inline:14px}.share-topbar{padding:13px 0;gap:12px}.share-header-actions{margin-left:0;width:100%;gap:14px}.share-layout{grid-template-columns:minmax(0,1fr);gap:24px;margin:26px auto 36px}.share-discussion{padding:16px}.discussion-list{max-height:none}.share-video-meta{font-size:9px}.share-footer{font-size:9px}.privacy-document{margin:25px auto 45px;padding:22px}} +@media(max-width:420px){.share-header-actions{gap:10px}.share-header-actions .text-action{font-size:11px}.share-heading h1{font-size:32px}.share-comment-form{padding:14px}.share-footer{flex-direction:column}} From 698794f6f76673802398d54d6926478c6517fd2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:04:52 +0200 Subject: [PATCH 217/575] Add responsive acceptance for the new share viewer and privacy routes --- rebuild/e2e/visual.spec.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 9de9b5d..daad5a6 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -77,3 +77,23 @@ test("new frontend contains no legacy stylesheet or legacy app script requests", expect(requested).not.toContain("/app.js"); expect(requested).toContain("/src/main.tsx"); }); + + +test("temporary share viewer and privacy route use the independent responsive design",async({page})=>{ + const token="a".repeat(40); + await page.route(`**/api/share/${token}`,route=>route.fulfill({status:200,contentType:"application/json",body:JSON.stringify({title:"A product walkthrough",mimeType:"video/webm",size:2048,duration:38,expiresAt:Math.floor(Date.now()/1000)+86400,passwordRequired:false})})); + await page.route(`**/api/share/${token}/comments`,route=>route.fulfill({status:200,contentType:"application/json",body:JSON.stringify({comments:[]})})); + await page.goto("/s/"+token); + await expect(page.getByRole("heading",{name:"A product walkthrough"})).toBeVisible(); + await expect(page.locator(".share-video-wrap")).toBeVisible(); + await expect(page.locator(".share-discussion")).toBeVisible(); + for(const width of [320,375,768,1120,1440]){ + await page.setViewportSize({width,height:900}); + const dimensions=await page.evaluate(()=>({body:document.body.scrollWidth,doc:document.documentElement.scrollWidth,viewport:innerWidth})); + expect(dimensions.body).toBeLessThanOrEqual(width+1); + expect(dimensions.doc).toBeLessThanOrEqual(width+1); + } + await page.goto("/privacy"); + await expect(page.getByRole("heading",{name:"Your original stays with you."})).toBeVisible(); + await expect(page.locator(".privacy-document")).toBeVisible(); +}); From 39fb19cb8b0c9e7434e87c333c1164e95b0bcdcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:05:06 +0200 Subject: [PATCH 218/575] Rename Cloudflare asset preparation script --- rebuild/scripts/prepare-public.mjs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 rebuild/scripts/prepare-public.mjs diff --git a/rebuild/scripts/prepare-public.mjs b/rebuild/scripts/prepare-public.mjs new file mode 100644 index 0000000..3cdb74e --- /dev/null +++ b/rebuild/scripts/prepare-public.mjs @@ -0,0 +1,17 @@ +import { mkdir, cp, rm, writeFile } from "node:fs/promises"; + +// Keep only static assets needed by the new React app. Never copy legacy UI files. +const source = "legacy/public"; +const output = "public"; +await rm(output, { recursive: true, force: true }); +await mkdir(output, { recursive: true }); +await writeFile(`${output}/_headers`, `/index.html + Cache-Control: no-cache + +/sw.js + Cache-Control: no-cache +`); +for (const file of ["sw.js", "icon.svg", "manifest.webmanifest", "sample.webm"]) { + try { await cp(`${source}/${file}`, `${output}/${file}`); } catch { /* optional static asset */ } +} +console.log("Prepared isolated Cloudflare public assets; legacy HTML, CSS and JS are excluded."); From b437746c8f4682f434cb68dcac877436d54b0b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:05:09 +0200 Subject: [PATCH 219/575] Use neutral Cloudflare public asset build script --- rebuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/package.json b/rebuild/package.json index 28cb3de..bc282bb 100644 --- a/rebuild/package.json +++ b/rebuild/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite --host 0.0.0.0", - "build": "node scripts/build-legacy.mjs && cf build", + "build": "node scripts/prepare-public.mjs && cf build", "typecheck": "tsc --noEmit", "test": "vitest run tests", "deploy": "cf deploy", From b9c8e13889e12155610c9777aa653eb223a6457b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:05:11 +0200 Subject: [PATCH 220/575] Remove obsolete legacy-named build script --- rebuild/scripts/build-legacy.mjs | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 rebuild/scripts/build-legacy.mjs diff --git a/rebuild/scripts/build-legacy.mjs b/rebuild/scripts/build-legacy.mjs deleted file mode 100644 index 3cdb74e..0000000 --- a/rebuild/scripts/build-legacy.mjs +++ /dev/null @@ -1,17 +0,0 @@ -import { mkdir, cp, rm, writeFile } from "node:fs/promises"; - -// Keep only static assets needed by the new React app. Never copy legacy UI files. -const source = "legacy/public"; -const output = "public"; -await rm(output, { recursive: true, force: true }); -await mkdir(output, { recursive: true }); -await writeFile(`${output}/_headers`, `/index.html - Cache-Control: no-cache - -/sw.js - Cache-Control: no-cache -`); -for (const file of ["sw.js", "icon.svg", "manifest.webmanifest", "sample.webm"]) { - try { await cp(`${source}/${file}`, `${output}/${file}`); } catch { /* optional static asset */ } -} -console.log("Prepared isolated Cloudflare public assets; legacy HTML, CSS and JS are excluded."); From 5cb2b50679e791228f242c5610ab897c8b60a420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:05:16 +0200 Subject: [PATCH 221/575] Update asset build script reference --- rebuild/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/README.md b/rebuild/README.md index 8b0d89c..ef72cea 100644 --- a/rebuild/README.md +++ b/rebuild/README.md @@ -6,7 +6,7 @@ This branch is a separately implemented Cloudflare-first product. It is not a vi - **Frontend:** React 19 + TypeScript + Vite. The deployed entrypoint is `rebuild/index.html` and `rebuild/src/main.tsx`. - **Design system:** independent editorial interface: Space Grotesk / Source Sans 3 / DM Mono, warm mineral paper, near-black recording surface and acid-lime action colour. It does not load the Vercel stylesheet or Vercel HTML/JS. -- **Build assets:** `scripts/build-legacy.mjs` now copies only the offline service worker and app icon. It does not bundle or copy the legacy browser app. +- **Build assets:** `scripts/prepare-public.mjs` now copies only the offline service worker and app icon. It does not bundle or copy the legacy browser app. - **Backend:** Cloudflare Worker with D1 metadata and R2 media storage. - **Local-first data:** IndexedDB stores original recordings on the user's device; publishing is explicit. - **Legacy source:** `legacy/` remains in this branch as a behavior/feature reference and migration source only. It is not the deployed UI. From 089bc0bf212a7f70fad1eb1637eb1cddbef7ea7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:07:50 +0200 Subject: [PATCH 222/575] Capture visual evidence for share viewer at mobile and desktop sizes --- rebuild/e2e/visual.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index daad5a6..316ed06 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -92,6 +92,7 @@ test("temporary share viewer and privacy route use the independent responsive de const dimensions=await page.evaluate(()=>({body:document.body.scrollWidth,doc:document.documentElement.scrollWidth,viewport:innerWidth})); expect(dimensions.body).toBeLessThanOrEqual(width+1); expect(dimensions.doc).toBeLessThanOrEqual(width+1); + if([320,1440].includes(width))await page.screenshot({path:`test-results/screenshots/share-${width}.png`,fullPage:true}); } await page.goto("/privacy"); await expect(page.getByRole("heading",{name:"Your original stays with you."})).toBeVisible(); From a2ba246ee18523f1ef014dad99def78a3ae8abb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:09:48 +0200 Subject: [PATCH 223/575] Capture privacy page visual evidence on mobile and desktop --- rebuild/e2e/visual.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 316ed06..f48c6cd 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -97,4 +97,5 @@ test("temporary share viewer and privacy route use the independent responsive de await page.goto("/privacy"); await expect(page.getByRole("heading",{name:"Your original stays with you."})).toBeVisible(); await expect(page.locator(".privacy-document")).toBeVisible(); + for(const width of [320,1440]){await page.setViewportSize({width,height:900});await page.screenshot({path:`test-results/screenshots/privacy-${width}.png`,fullPage:true});} }); From 3a1ade874f25b1ec194b18c12a12fbf9ff3da432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:11:30 +0200 Subject: [PATCH 224/575] Fix privacy page breadcrumb and section-label overlap --- rebuild/src/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index 5ca4f52..82260f3 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -70,7 +70,7 @@ .password-gate input{width:100%;padding:12px;background:var(--white);border:1px solid var(--line);color:var(--ink)} .password-gate .button{width:100%} .privacy-document{width:min(780px,100%);margin:46px auto 80px;padding:clamp(22px,5vw,52px);background:var(--panel);border:1px solid var(--line)} -.privacy-document>.text-action{margin-bottom:34px} +.privacy-document>.text-action{display:flex;width:max-content;max-width:100%;margin-bottom:30px}.privacy-document>.eyebrow{display:block;margin-bottom:12px} .privacy-document h1{font:600 clamp(36px,6vw,58px)/1 'Space Grotesk',sans-serif;letter-spacing:-.06em;margin:16px 0} .privacy-document h2{font:600 21px 'Space Grotesk',sans-serif;letter-spacing:-.5px;margin:30px 0 8px} .privacy-document p{font-size:15px;line-height:1.7;color:var(--muted)} From e15fc84bef9233d3c28a67988f96e53c8d476e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:54:07 +0200 Subject: [PATCH 225/575] Add durable local editing metadata to clips --- rebuild/src/library.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rebuild/src/library.ts b/rebuild/src/library.ts index ec3e423..d01b055 100644 --- a/rebuild/src/library.ts +++ b/rebuild/src/library.ts @@ -7,8 +7,17 @@ export type Clip = { mimeType: string; blob: Blob; share?: { recordingId: string; token: string; url: string; ownerKey: string; expiresAt: number }; + annotations?: Annotation[]; + captions?: CaptionCue[]; + chapters?: Chapter[]; + report?: BugReport | null; }; +export type Annotation = { kind: "rectangle" | "arrow" | "highlight" | "blur" | "redact"; x: number; y: number; w: number; h: number }; +export type CaptionCue = { start: number; end: number; text: string }; +export type Chapter = { time: number; title: string }; +export type BugReport = { url: string; steps: string; expected: string; actual: string; environment: string }; + export type RecoverySession = { id: string; title: string; From 60cbf6ae1c286e14ab1bb6feb6aa3b31faa98b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Wed, 25 Nov 2026 13:54:48 +0200 Subject: [PATCH 226/575] Build a full local video editing workspace --- rebuild/src/EditorWorkspace.tsx | 72 +++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 rebuild/src/EditorWorkspace.tsx diff --git a/rebuild/src/EditorWorkspace.tsx b/rebuild/src/EditorWorkspace.tsx new file mode 100644 index 0000000..6136e51 --- /dev/null +++ b/rebuild/src/EditorWorkspace.tsx @@ -0,0 +1,72 @@ +import React, { useEffect, useMemo, useRef, useState } from "react"; +import { ArrowDownToLine, ArrowLeft, ArrowRight, ArrowUpRight, Check, Download, Eraser, Highlighter, LockKeyhole, MessageSquareText, Pause, Play, RectangleHorizontal, Scissors, Share2, Trash2, Type, Undo2, X } from "lucide-react"; +import { saveClip, type Annotation, type BugReport, type CaptionCue, type Chapter, type Clip } from "./library"; +import { clampTrimRange, trimVideoElement } from "./trim"; +import { captionsVTT, parseCaptions, parseChapters, reportMarkdown, validateExtras } from "../legacy/lib/enrichment.js"; + +type Props = { + clip: Clip; + url: string; + onClose: () => void; + onUpdated: () => void; + onShare: () => void; + onDownload: () => void; + onDelete: () => void; +}; +const stamp=(n:number)=>{const m=Math.floor(n/60),s=Math.floor(n%60);return m+":"+String(s).padStart(2,"0")}; +const initialReport=():BugReport=>({url:"",steps:"",expected:"",actual:"",environment:""}); +const kinds: {kind:Annotation["kind"];label:string;icon:React.ReactNode}[]=[ + {kind:"rectangle",label:"Box",icon:}, + {kind:"arrow",label:"Arrow",icon:}, + {kind:"highlight",label:"Highlight",icon:}, + {kind:"blur",label:"Blur",icon:}, + {kind:"redact",label:"Redact",icon:} +]; +function paint(ctx:CanvasRenderingContext2D,w:number,h:number,items:Annotation[]){ + for(const a of items){const x=a.x*w,y=a.y*h,bw=a.w*w,bh=a.h*h;ctx.save();ctx.lineWidth=Math.max(2,w/320);ctx.strokeStyle="#ff6b35";ctx.fillStyle="rgba(255,210,40,.34)"; + if(a.kind==="redact"){ctx.fillStyle="#161a17";ctx.fillRect(x,y,bw,bh)} + else if(a.kind==="blur"){ctx.save();ctx.beginPath();ctx.rect(x,y,bw,bh);ctx.clip();ctx.filter="blur(18px)";ctx.drawImage(ctx.canvas,0,0);ctx.restore();ctx.fillStyle="rgba(20,25,20,.22)";ctx.fillRect(x,y,bw,bh)} + else if(a.kind==="highlight")ctx.fillRect(x,y,bw,bh); + else if(a.kind==="arrow"){ctx.beginPath();ctx.moveTo(x,y);ctx.lineTo(x+bw,y+bh);const angle=Math.atan2(bh,bw),s=Math.max(12,w*.018);ctx.moveTo(x+bw-s*Math.cos(angle-.5),y+bh-s*Math.sin(angle-.5));ctx.lineTo(x+bw,y+bh);ctx.lineTo(x+bw-s*Math.cos(angle+.5),y+bh-s*Math.sin(angle+.5));ctx.stroke()} + else ctx.strokeRect(x,y,bw,bh);ctx.restore(); + } +} +function EditorWorkspace({clip,url,onClose,onUpdated,onShare,onDownload,onDelete}:Props){ + const video=useRef(null),overlay=useRef(null),file=useRef(null); + const [title,setTitle]=useState(clip.title),[activeTool,setActiveTool]=useState("rectangle"); + const [marks,setMarks]=useState(clip.annotations||[]),[drawing,setDrawing]=useState(null),[tab,setTab]=useState<"edit"|"context">("edit"); + const [start,setStart]=useState(0),[end,setEnd]=useState(clip.duration),[busy,setBusy]=useState(false),[status,setStatus]=useState(""); + const [captionsText,setCaptionsText]=useState(()=>clip.captions?.length?captionsVTT(clip.captions):""); + const [chaptersText,setChaptersText]=useState(()=>clip.chapters?.map(c=>stamp(c.time)+" "+c.title).join("\n")||""); + const [report,setReport]=useState(clip.report||initialReport()); + const [captionSearch,setCaptionSearch]=useState(""); + const [currentTime,setCurrentTime]=useState(0); + const [trimPreview,setTrimPreview]=useState(false); + const [titleEditing,setTitleEditing]=useState(false); + const [playing,setPlaying]=useState(false); + const [exportProgress,setExportProgress]=useState(0); + const [showReport,setShowReport]=useState(false); + const canvasFrame=useRef(0); + const visibleCues=useMemo(()=> (clip.captions||[]).filter(c=>c.text.toLocaleLowerCase().includes(captionSearch.toLocaleLowerCase())),[clip.captions,captionSearch]); + + useEffect(()=>{const el=video.current,canvas=overlay.current;if(!el||!canvas)return; + const render=()=>{const rect=canvas.getBoundingClientRect();const dpr=Math.min(window.devicePixelRatio||1,2);const w=Math.max(1,Math.round(rect.width*dpr)),h=Math.max(1,Math.round(rect.height*dpr));if(canvas.width!==w||canvas.height!==h){canvas.width=w;canvas.height=h;}const ctx=canvas.getContext("2d");if(ctx){ctx.clearRect(0,0,w,h);paint(ctx,w,h,[...marks,...(drawing?[drawing]:[])]);}canvasFrame.current=requestAnimationFrame(render)}; + canvasFrame.current=requestAnimationFrame(render);return()=>cancelAnimationFrame(canvasFrame.current); + },[marks,drawing]); + useEffect(()=>{const el=video.current;if(!el)return;const update=()=>setCurrentTime(el.currentTime);const play=()=>setPlaying(true),pause=()=>setPlaying(false);el.addEventListener("timeupdate",update);el.addEventListener("play",play);el.addEventListener("pause",pause);return()=>{el.removeEventListener("timeupdate",update);el.removeEventListener("play",play);el.removeEventListener("pause",pause)}},[]); + function point(e:React.PointerEvent){const r=e.currentTarget.getBoundingClientRect();return{x:Math.max(0,Math.min(1,(e.clientX-r.left)/r.width)),y:Math.max(0,Math.min(1,(e.clientY-r.top)/r.height))}} + function beginMark(e:React.PointerEvent){if(e.button!==0)return;const p=point(e);setDrawing({kind:activeTool,x:p.x,y:p.y,w:0,h:0});e.currentTarget.setPointerCapture(e.pointerId)} + function moveMark(e:React.PointerEvent){if(!drawing)return;const p=point(e);setDrawing(d=>d?{...d,w:Math.abs(p.x-d.x),h:Math.abs(p.y-d.y),x:d.kind==="arrow"?d.x:Math.min(d.x,p.x),y:d.kind==="arrow"?d.y:Math.min(d.y,p.y)}:null)} + function endMark(e:React.PointerEvent){if(!drawing)return;const p=point(e);const next={...drawing,w:Math.abs(p.x-drawing.x),h:Math.abs(p.y-drawing.y),x:drawing.kind==="arrow"?drawing.x:Math.min(drawing.x,p.x),y:drawing.kind==="arrow"?drawing.y:Math.min(drawing.y,p.y)};if(next.w>.004||next.h>.004){setMarks(old=>old.length<40?[...old,next]:old);setStatus("Annotation added. Save changes to keep it.")}setDrawing(null)} + async function saveContext(){setBusy(true);setStatus("");try{const duration=clip.duration||video.current?.duration||0;const extras=validateExtras({captions:captionsText.trim()?parseCaptions(captionsText,duration):[],chapters:parseChapters(chaptersText,duration),report},duration);const next={...clip,title:title.trim()||"Untitled recording",annotations:marks,...extras};await saveClip(next);onUpdated();setStatus("Changes saved privately on this device.")}catch(e){setStatus(e instanceof Error?e.message:"Could not save your changes.")}finally{setBusy(false)}} + async function saveTrim(){if(!video.current)return;setBusy(true);setStatus("Creating a trimmed copy…");try{const range=clampTrimRange(start,end,clip.duration);const blob=await trimVideoElement(video.current,range);const next:Clip={...clip,id:crypto.randomUUID(),title:(title.trim()||clip.title)+" — trimmed",createdAt:Date.now(),duration:Math.round(range.duration),size:blob.size,mimeType:blob.type,blob,annotations:[],captions:[],chapters:[],report:null};await saveClip(next);onUpdated();setStatus("Trimmed copy saved. The original is unchanged.")}catch(e){setStatus(e instanceof Error?e.message:"Trim failed. Your original is unchanged.")}finally{setBusy(false)}} + async function saveMarkedCopy(){const source=video.current;if(!source||!marks.length)return;setBusy(true);setExportProgress(0);setStatus("Preparing annotated copy…");let raf=0;let stream:MediaStream|undefined;let recorder:MediaRecorder|undefined;try{const canvas=document.createElement("canvas");const width=Math.min(source.videoWidth||1280,1920),height=Math.round(width*(source.videoHeight||720)/(source.videoWidth||1280));canvas.width=width;canvas.height=height;const ctx=canvas.getContext("2d");if(!ctx)throw Error("Video rendering is unavailable.");const capture=source.captureStream?.()||source.mozCaptureStream?.();if(!capture)throw Error("This browser cannot export an annotated video. Download the original and keep the annotations in your local project.");const audio=capture.getAudioTracks();stream=canvas.captureStream(30);for(const track of audio)stream.addTrack(track);const mime=["video/webm;codecs=vp9,opus","video/webm;codecs=vp8,opus","video/webm"].find(t=>MediaRecorder.isTypeSupported(t));recorder=new MediaRecorder(stream,mime?{mimeType:mime}:undefined);const chunks:Blob[]=[];recorder.ondataavailable=e=>{if(e.data.size)chunks.push(e.data)};const done=new Promise((resolve,reject)=>{recorder!.onstop=()=>resolve(new Blob(chunks,{type:recorder!.mimeType}));recorder!.onerror=()=>reject(Error("Annotated export failed."))});source.pause();source.currentTime=0;await new Promise((resolve,reject)=>{source.onseeked=()=>resolve();source.onerror=()=>reject(Error("Could not seek the source video."))});recorder.start(250);const draw=()=>{if(!ctx||!source)return;ctx.drawImage(source,0,0,width,height);paint(ctx,width,height,marks);setExportProgress(source.duration?Math.min(1,source.currentTime/source.duration):0);if(!source.paused&&!source.ended)raf=requestAnimationFrame(draw)};source.onended=()=>{if(recorder?.state!=="inactive")recorder?.stop()};raf=requestAnimationFrame(draw);await source.play();const blob=await done;const next:Clip={...clip,id:crypto.randomUUID(),title:(title.trim()||clip.title)+" — annotated",createdAt:Date.now(),size:blob.size,mimeType:blob.type,blob,annotations:marks};await saveClip(next);onUpdated();setStatus("Annotated copy saved. The original remains unchanged.")}catch(e){setStatus(e instanceof Error?e.message:"Could not export annotations.")}finally{cancelAnimationFrame(raf);stream?.getTracks().forEach(t=>t.stop());setBusy(false);setExportProgress(0);if(video.current)video.current.pause()}} + function downloadReport(){const markdown=reportMarkdown({...clip,title,report,chapters:clip.chapters||[],shared:false},location.origin);const a=document.createElement("a"),blob=new Blob([markdown],{type:"text/markdown"}),href=URL.createObjectURL(blob);a.href=href;a.download="screennote-bug-report.md";a.click();URL.revokeObjectURL(href)} + return
+
{titleEditing?setTitle(e.target.value)} onBlur={()=>setTitleEditing(false)} onKeyDown={e=>{if(e.key==="Enter")setTitleEditing(false)}} autoFocus/>:}{stamp(clip.duration)} · {(clip.size/1048576).toFixed(1)} MB · stored locally
+
+ {tab==="edit"?
{stamp(currentTime)}{if(video.current)video.current.currentTime=Number(e.target.value)}}/>{stamp(clip.duration)}
MARK UP{kinds.map(k=>)}

Draw directly over the video. Redaction is opaque; blur and highlights are applied to the exported copy.

:
OWNER-SUPPLIED CAPTIONS

Make every moment understandable.

Import an SRT or WebVTT file, or paste caption text. Automatic transcription is not enabled.

{const f=e.target.files?.[0];if(!f)return;if(f.size>20000){setStatus("Caption files must be 20 KB or smaller.");return}try{const raw=await f.text();parseCaptions(raw,clip.duration);setCaptionsText(raw);setStatus("Captions loaded. Save changes to apply them.")}catch(err){setStatus(err instanceof Error?err.message:"Invalid captions.")}finally{e.currentTarget.value=""}}}/> + + +
+
Max 500 steps · No background capture · You choose what to export
+ + + \ No newline at end of file From 5883b0859f4b73852966f334a5f9ccb4ed356cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:06:26 +0200 Subject: [PATCH 508/575] Style Repro Capsule popup --- rebuild/extension/popup.css | 1 + 1 file changed, 1 insertion(+) create mode 100644 rebuild/extension/popup.css diff --git a/rebuild/extension/popup.css b/rebuild/extension/popup.css new file mode 100644 index 0000000..c03322a --- /dev/null +++ b/rebuild/extension/popup.css @@ -0,0 +1 @@ +:root{color-scheme:light;font:14px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#f4f2ec;color:#202a24}*{box-sizing:border-box}body{margin:0;padding:18px;width:360px;max-width:100vw}header{display:flex;align-items:center;gap:12px;padding-bottom:14px;border-bottom:1px solid #d9ddd4}.mark{width:38px;height:38px;display:grid;place-items:center;background:#315b45;color:#fffdf8;font-size:12px;font-weight:800;letter-spacing:-.05em;border-radius:7px}.eyebrow{margin:0;color:#626c63;font:600 10px/1.4 ui-monospace,monospace;letter-spacing:.12em}h1{margin:2px 0 0;font-size:21px;line-height:1.2;letter-spacing:-.04em}.intro{color:#626c63;line-height:1.6;margin:14px 0}.privacy{padding:12px;border:1px solid #d9ddd4;background:#fbfaf6;border-radius:7px}.privacy strong{font-size:12px}.privacy p{margin:5px 0 0;color:#626c63;font-size:12px;line-height:1.55}#status{min-height:42px;margin:14px 0;color:#315b45;font-size:12px}button{width:100%;min-height:44px;border-radius:7px;border:1px solid #315b45;padding:10px 14px;font:650 13px system-ui,sans-serif;cursor:pointer;margin:5px 0}button:focus-visible,textarea:focus-visible{outline:3px solid #315b45;outline-offset:3px}.primary{background:#315b45;color:#fffdf8}.secondary{background:transparent;color:#202a24;border-color:#bcc5b9}section{margin-top:14px}label{display:block;font-size:12px;font-weight:650;margin-bottom:7px}textarea{width:100%;min-width:0;border:1px solid #bcc5b9;border-radius:7px;background:#fffefa;color:#202a24;padding:10px;font:11px/1.5 ui-monospace,monospace;resize:vertical;overflow-wrap:anywhere}footer{border-top:1px solid #d9ddd4;margin-top:14px;padding-top:10px;color:#626c63;font:10px/1.5 ui-monospace,monospace} [hidden]{display:none!important} \ No newline at end of file From f5fbd124b9e1e4635450fa4d049b978f2b08399d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:06:29 +0200 Subject: [PATCH 509/575] Implement local Repro Capsule capture controls --- rebuild/extension/popup.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 rebuild/extension/popup.js diff --git a/rebuild/extension/popup.js b/rebuild/extension/popup.js new file mode 100644 index 0000000..f5f0a70 --- /dev/null +++ b/rebuild/extension/popup.js @@ -0,0 +1,11 @@ +const $=id=>document.getElementById(id); +const status=$("status"),start=$("start"),stop=$("stop"),review=$("review"),packetField=$("packet"),download=$("download"),clear=$("clear"); +let tabId=null; +async function activeTab(){const tabs=await chrome.tabs.query({active:true,currentWindow:true});if(!tabs[0]?.id)throw new Error("Open a normal web page first.");tabId=tabs[0].id;return tabs[0];} +async function activeCapture(){if(tabId===null)return false;try{const r=await chrome.scripting.executeScript({target:{tabId},func:()=>Boolean(window.__screennoteReproCapsule?.isActive?.())});return Boolean(r[0]?.result)}catch{return false}} +async function sync(){try{await activeTab();const active=await activeCapture();start.hidden=active;stop.hidden=!active;status.textContent=active?"Capture is active in this tab. Reopen this popup to stop and review.":"Ready. Start only when you intend to capture this tab."}catch(e){start.disabled=true;status.textContent=e.message}} +start.addEventListener("click",async()=>{try{await activeTab();await chrome.scripting.executeScript({target:{tabId},files:["capture.js"]});const r=await chrome.scripting.executeScript({target:{tabId},func:()=>window.__screennoteReproCapsule?.start?.()});if(!r[0]?.result?.started)throw new Error("Could not start capture in this tab.");start.hidden=true;stop.hidden=false;status.textContent="Capturing clicks and navigation keys locally. Reopen this popup and choose Stop & review when finished."}catch(e){status.textContent=e.message||"Capture could not start. This page may not allow extension injection."}}); +stop.addEventListener("click",async()=>{try{await activeTab();const r=await chrome.scripting.executeScript({target:{tabId},func:()=>window.__screennoteReproCapsule?.stop?.()});const data=r[0]?.result;if(!data)throw new Error("No capture was found in this tab.");packetField.value=JSON.stringify(data,null,2);review.hidden=false;start.hidden=true;stop.hidden=true;status.textContent="Stopped. Review and redact the capsule JSON before downloading. Nothing has been uploaded."}catch(e){status.textContent=e.message||"Could not stop capture in this tab."}}); +download.addEventListener("click",()=>{try{const parsed=JSON.parse(packetField.value);if(parsed.schema!=="screennote.repro-capsule"||parsed.version!==1)throw new Error("Unsupported capsule schema.");const blob=new Blob([JSON.stringify(parsed,null,2)],{type:"application/json"});const url=URL.createObjectURL(blob);const a=document.createElement("a");a.href=url;a.download="screennote-repro-capsule.json";a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);status.textContent="Capsule exported. Import it in ScreenNote's Bug Report panel and review it again before sharing."}catch(e){status.textContent=e.message||"Fix the JSON before export."}}); +clear.addEventListener("click",()=>{packetField.value="";review.hidden=true;status.textContent="Capsule discarded from this popup. No file was exported."}); +void sync(); \ No newline at end of file From a10f14af3a3cf3d1051a264461123dc03e6a9601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:06:31 +0200 Subject: [PATCH 510/575] Capture user-approved interaction outline locally --- rebuild/extension/capture.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 rebuild/extension/capture.js diff --git a/rebuild/extension/capture.js b/rebuild/extension/capture.js new file mode 100644 index 0000000..320df42 --- /dev/null +++ b/rebuild/extension/capture.js @@ -0,0 +1,20 @@ +(()=> { + if(window.__screennoteReproCapsule)return; + let active=false,startedAt=0,packet=null; + const allowedKeys=new Set(["Enter","Escape","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "]); + function safePageUrl(){try{const u=new URL(location.href);u.username="";u.password="";u.search="";u.hash="";return u.href}catch{return location.origin}} + function targetInfo(node){ + const el=node instanceof Element?node:null;if(!el)return{tag:"UNKNOWN"}; + const tag=el.tagName.toUpperCase(),role=(el.getAttribute("role")||"").slice(0,64); + const isControl=/^(BUTTON|A)$/.test(tag)||role==="button"||role==="link"; + const label=(el.getAttribute("aria-label")||el.getAttribute("title")||(isControl?el.textContent:"")||"").replace(/\\s+/g," ").trim().slice(0,80); + return{tag,role,label}; + } + function ignoreTarget(node){const el=node instanceof Element?node:null;return !el||Boolean(el.closest("input,textarea,select,[contenteditable=true],[contenteditable='']"))} + function push(step){if(packet&&packet.steps.length<500)packet.steps.push(step)} + function click(event){if(!active||ignoreTarget(event.target))return;const el=event.target instanceof Element?event.target.closest("button,a,[role=button],[role=link],input,select,textarea,[tabindex]")||event.target:event.target;push({atMs:Math.max(0,Math.round(performance.now()-startedAt)),action:"click",target:targetInfo(el)})} + function key(event){if(!active||event.repeat||ignoreTarget(event.target))return;const key=event.key===" "?"Space":event.key;if(!allowedKeys.has(event.key))return;push({atMs:Math.max(0,Math.round(performance.now()-startedAt)),action:"key",key,target:targetInfo(event.target)})} + function start(){if(active)return{started:false};packet={schema:"screennote.repro-capsule",version:1,createdAt:new Date().toISOString(),durationMs:0,page:{url:safePageUrl(),title:(document.title||"").slice(0,200),userAgent:navigator.userAgent.slice(0,300),viewport:{width:innerWidth,height:innerHeight}},steps:[]};startedAt=performance.now();active=true;document.addEventListener("click",click,true);document.addEventListener("keydown",key,true);return{started:true}} + function stop(){if(!packet)return null;if(active){active=false;document.removeEventListener("click",click,true);document.removeEventListener("keydown",key,true);packet.durationMs=Math.max(0,Math.round(performance.now()-startedAt))}return packet} + window.__screennoteReproCapsule={start,stop,isActive:()=>active}; +})(); \ No newline at end of file From ea367adf6a2c9e898c76b58386fbee7f52327434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:06:34 +0200 Subject: [PATCH 511/575] Document Repro Capsule install and privacy --- rebuild/extension/README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 rebuild/extension/README.md diff --git a/rebuild/extension/README.md b/rebuild/extension/README.md new file mode 100644 index 0000000..7637efd --- /dev/null +++ b/rebuild/extension/README.md @@ -0,0 +1,32 @@ +# ScreenNote Repro Capsule (Chrome / Edge) + +A small Manifest V3 extension that captures an explicit, local interaction outline for a ScreenNote bug report. + +## Install + +1. Open `chrome://extensions` in Chrome or `edge://extensions` in Edge. +2. Enable **Developer mode**. +3. Choose **Load unpacked** and select this `rebuild/extension` directory. +4. Open the web page you want to reproduce. +5. Click the extension, choose **Start capture**, perform the steps, then reopen the extension and choose **Stop & review**. +6. Review/edit the JSON, remove anything sensitive, and download it. +7. In ScreenNote, open a recording → **Edit** → **Captions & context** → **Bug report** → **Import Repro Capsule**. Review the imported URL, steps and environment, then save context only when you choose. + +## Exactly what it captures + +- The page URL with username/password, query string and fragment removed. +- Page title, browser user-agent string and viewport dimensions. +- Up to 500 click outlines (interactive target tag/role and a short accessible/button label). +- Navigation keys only: Enter, Escape, Tab, arrows and Space. No typed characters or field values. +- Relative timestamps and capture duration. + +## Privacy and limitations + +- Capture starts only after the user clicks **Start capture** and stops only after **Stop & review**. +- The extension has no host permissions, background listeners, analytics or network code. It uses the temporary `activeTab` permission and injected listeners in the selected tab. +- It does not capture screenshots, page body text, cookies, form values, clipboard, network requests, console logs or credentials. +- A clicked button/link label or the URL path can still contain personal information. Review and redact the JSON before export; ScreenNote removes URL credentials/query/hash again on import. +- The JSON is not uploaded by the extension. Importing into ScreenNote fills the local bug-report editor; publishing the share sends the saved context to the temporary share and makes it visible to link viewers. +- This is a user-approved interaction outline, not a complete automated reproduction or telemetry trace. It cannot observe server state or reproduce every browser/device condition. + +No dependencies or paid services are required. From ff2ff305c34d104cde18f7859e13834bea11596f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:07:14 +0200 Subject: [PATCH 512/575] Fix Repro Capsule import formatting and environment newline --- rebuild/src/EditorWorkspace.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rebuild/src/EditorWorkspace.tsx b/rebuild/src/EditorWorkspace.tsx index 144785a..c0eeafb 100644 --- a/rebuild/src/EditorWorkspace.tsx +++ b/rebuild/src/EditorWorkspace.tsx @@ -4,7 +4,8 @@ import { saveClip, type Annotation, type BugReport, type CaptionCue, type Chapte import { clampTrimRange, trimVideoElement } from "./trim"; import { createVideoThumbnail } from "./media"; import { trimAnnotations, visibleAnnotations } from "./annotationTiming"; -import { useDialogFocus } from "./useDialogFocus";\nimport { formatReproCapsuleSteps, parseReproCapsule } from "./reproCapsule"; +import { useDialogFocus } from "./useDialogFocus"; +import { formatReproCapsuleSteps, parseReproCapsule } from "./reproCapsule"; // @ts-expect-error Shared browser-safe JavaScript enrichment module has no declaration file. import { captionsVTT, parseCaptions, parseChapters, reportMarkdown, trimExtras, validateExtras } from "../legacy/lib/enrichment.js"; @@ -69,7 +70,7 @@ function EditorWorkspace({clip,url,onClose,onUpdated,onShare,onDownload,onDelete if(file.size>256*1024){setStatus("Repro Capsules must be 256 KB or smaller.");return} try{ const capsule=parseReproCapsule(JSON.parse(await file.text())); - const environment=[capsule.page.userAgent,capsule.page.viewport.width+"×"+capsule.page.viewport.height+" viewport"].filter(Boolean).join("\\n"); + const environment=[capsule.page.userAgent,capsule.page.viewport.width+"×"+capsule.page.viewport.height+" viewport"].filter(Boolean).join("\n"); setReport(old=>({...old,url:capsule.page.url,steps:formatReproCapsuleSteps(capsule),environment})); setStatus("Repro Capsule imported locally. Review the URL, steps and environment; remove anything sensitive before saving or publishing."); }catch(error){setStatus(error instanceof Error?error.message:"This Repro Capsule could not be imported.");} From eaf4ab6b2d1f188113508b3dde358a19cf17ba29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:07:32 +0200 Subject: [PATCH 513/575] Exercise Repro Capsule import in editor E2E --- rebuild/e2e/visual.spec.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index e8e4872..20a034b 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -131,6 +131,14 @@ test("imported recording opens the full editor with preview, annotations, captio const editorTitleWidth=await page.locator(".editor-title-wrap").evaluate(node=>node.getBoundingClientRect().width);expect(editorTitleWidth).toBeLessThanOrEqual(621); await page.getByRole("button",{name:/Captions & context/i}).click(); await expect(page.getByText(/OWNER-SUPPLIED CAPTIONS/i)).toBeVisible(); + const capsule={schema:"screennote.repro-capsule",version:1,createdAt:"2026-11-26T12:00:00.000Z",durationMs:1200,page:{url:"https://user:secret@example.com/checkout?session=private#payment",title:"Checkout",userAgent:"Playwright test browser",viewport:{width:390,height:844}},steps:[{atMs:250,action:"click",target:{tag:"button",role:"button",label:"Continue to payment"}},{atMs:900,action:"key",key:"Enter",target:{tag:"button",role:"button",label:"Pay"}}]}; + await page.locator('input[accept=".json,application/json"]').setInputFiles({name:"repro-capsule.json",mimeType:"application/json",buffer:Buffer.from(JSON.stringify(capsule))}); + await expect(page.getByRole("status")).toContainText(/Repro Capsule imported locally/i); + await expect(page.locator(".context-editor label").filter({hasText:"Page URL"}).locator("input")).toHaveValue("https://example.com/checkout"); + await expect(page.getByLabel("Reproduction steps")).toHaveValue(/Continue to payment/); + await expect(page.getByLabel("Reproduction steps")).toHaveValue(/Press Enter/); + await expect(page.getByLabel("Environment (optional)")).toHaveValue(/390×844 viewport/); + await page.locator(".context-editor textarea").first().fill("WEBVTT\n\n00:00:00.100 --> 00:00:00.500\nOpening frame"); await page.getByRole("button",{name:/Save context/i}).click(); await expect(page.getByRole("status").filter({hasText:/Changes saved/i})).toBeVisible(); From 7782e0af644cfdf18c052600f7f571b540322495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:07:40 +0200 Subject: [PATCH 514/575] Test Repro Capsule extension permission and privacy boundaries --- rebuild/tests/reproCapsuleExtension.test.ts | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 rebuild/tests/reproCapsuleExtension.test.ts diff --git a/rebuild/tests/reproCapsuleExtension.test.ts b/rebuild/tests/reproCapsuleExtension.test.ts new file mode 100644 index 0000000..86f7930 --- /dev/null +++ b/rebuild/tests/reproCapsuleExtension.test.ts @@ -0,0 +1,32 @@ +import { describe,expect,it } from "vitest"; +import { readFile } from "node:fs/promises"; +const base=new URL("../extension/",import.meta.url); +const read=(name:string)=>readFile(new URL(name,base),"utf8"); +describe("Repro Capsule extension privacy boundary",()=>{ + it("uses only the temporary active-tab and scripting permissions",async()=>{ + const manifest=JSON.parse(await read("manifest.json")); + expect(manifest.manifest_version).toBe(3); + expect(manifest.permissions.sort()).toEqual(["activeTab","scripting"]); + expect(manifest.host_permissions).toBeUndefined(); + }); + it("does not transmit data and ignores form fields and typed values",async()=>{ + const capture=await read("capture.js"); + expect(capture).toContain('document.addEventListener("click",click,true)'); + expect(capture).toContain('document.addEventListener("keydown",key,true)'); + expect(capture).toContain('input,textarea,select,[contenteditable=true]'); + expect(capture).not.toMatch(/fetch\s*\(|XMLHttpRequest|sendBeacon|chrome\.storage/); + expect(capture).not.toContain("event.target.value"); + expect(capture).toContain('u.search="";u.hash=""'); + expect(capture).toContain("packet.steps.length<500"); + }); + it("requires explicit start/stop and exposes review-before-export copy",async()=>{ + const capture=await read("capture.js"),popup=await read("popup.html"),logic=await read("popup.js"); + expect(capture).toContain("function start()"); + expect(capture).toContain("function stop()"); + expect(popup).toContain("Start capture"); + expect(popup).toContain("Stop & review"); + expect(popup).toContain("Review and redact the capsule JSON"); + expect(logic).toContain("Review and redact the capsule JSON"); + expect(logic).toContain("Nothing has been uploaded"); + }); +}); From 1ef0aa1be7a767d3abb759fa8af085b68da93e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:09:24 +0200 Subject: [PATCH 515/575] Repair theme contrast regression test fixture --- rebuild/e2e/visual.spec.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 20a034b..362450b 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -429,16 +429,26 @@ test("light and dark text tokens meet WCAG AA contrast",async({page})=>{ test("transient share and alert surfaces keep readable contrast in both themes",async({page})=>{ await page.goto("/"); await page.evaluate(()=>{ - const toast=document.createElement("div");toast.className="share-link-toast";toast.innerHTML='
Share link readyhttps://example.test/share
';document.body.append(toast); - const error=document.createElement("p");error.className="share-error";error.textContent="The share could not be published.";document.body.append(error);\n const status=document.createElement("span");status.className="shared-review-status changes-requested";status.textContent="Changes requested";document.body.append(status);\n const selected=document.createElement("div");selected.className="review-decision-options";selected.innerHTML="";document.body.append(selected);\n const editorStatus=document.createElement("div");editorStatus.className="editor-status";editorStatus.textContent="Saved";document.body.append(editorStatus); + const toast=document.createElement("div");toast.className="share-link-toast"; + const content=document.createElement("div"),strong=document.createElement("strong"),span=document.createElement("span"),copy=document.createElement("button"); + strong.textContent="Share link ready";span.textContent="https://example.test/share";content.append(strong,span); + copy.className="button secondary";copy.textContent="Copy link";toast.append(content,copy);document.body.append(toast); + const error=document.createElement("p");error.className="share-error";error.textContent="The share could not be published.";document.body.append(error); + const status=document.createElement("span");status.className="shared-review-status changes-requested";status.textContent="Changes requested";document.body.append(status); + const selected=document.createElement("div");selected.className="review-decision-options";const selectedButton=document.createElement("button");selectedButton.setAttribute("aria-pressed","true");selectedButton.textContent="Selected review";selected.append(selectedButton);document.body.append(selected); + const editorStatus=document.createElement("div");editorStatus.className="editor-status";editorStatus.textContent="Saved";document.body.append(editorStatus); }); const contrast=async(selector:string)=>page.locator(selector).evaluate(el=>{ - const rgb=(value:string)=>value.match(/[\\d.]+/g)!.slice(0,3).map(Number).map(v=>{v/=255;return v<=.04045?v/12.92:((v+.055)/1.055)**2.4}); + const rgb=(value:string)=>value.match(/[\d.]+/g)!.slice(0,3).map(Number).map(v=>{v/=255;return v<=.04045?v/12.92:((v+.055)/1.055)**2.4}); const lum=(v:number[])=>.2126*v[0]+.7152*v[1]+.0722*v[2]; - const style=getComputedStyle(el),fg=lum(rgb(style.color));let bgColor=style.backgroundColor;if(bgColor==="transparent"||bgColor==="rgba(0, 0, 0, 0)")bgColor=getComputedStyle(el.closest(".share-link-toast")||document.body).backgroundColor;const bg=lum(rgb(bgColor));return (Math.max(fg,bg)+.05)/(Math.min(fg,bg)+.05); + const style=getComputedStyle(el),fg=lum(rgb(style.color));let bgColor=style.backgroundColor; + if(bgColor==="transparent"||bgColor==="rgba(0, 0, 0, 0)")bgColor=getComputedStyle(el.closest(".share-link-toast")||document.body).backgroundColor; + const bg=lum(rgb(bgColor));return (Math.max(fg,bg)+.05)/(Math.min(fg,bg)+.05); }); for(const theme of ["light","dark"]){ if(theme==="dark")await page.getByRole("button",{name:"Toggle appearance"}).click(); - for(const selector of [".share-link-toast",".share-link-toast span",".share-link-toast button",".share-error",".shared-review-status.changes-requested",".review-decision-options button[aria-pressed=true]",".editor-status"]){expect(await contrast(selector),selector+" contrast in "+theme).toBeGreaterThanOrEqual(4.5);} + for(const selector of [".share-link-toast",".share-link-toast span",".share-link-toast button",".share-error",".shared-review-status.changes-requested",".review-decision-options button[aria-pressed=true]",".editor-status"]){ + expect(await contrast(selector),selector+" contrast in "+theme).toBeGreaterThanOrEqual(4.5); + } } }); From 037f1dc32bbf8f695384d0c51cce195ffa41348a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:09:46 +0200 Subject: [PATCH 516/575] Document review packet and Repro Capsule workflows --- rebuild/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rebuild/README.md b/rebuild/README.md index ef72cea..c890e3b 100644 --- a/rebuild/README.md +++ b/rebuild/README.md @@ -32,3 +32,12 @@ The build emits the Vite/React app. Legacy HTML, CSS and browser JavaScript are ## Release gates See `FEATURE-PARITY-ACCEPTANCE.md`. The independent frontend is a new implementation; feature parity, Worker/API independence, visual acceptance, security review, accessibility review, and physical-device checks remain separate release gates. + + +## Review handoff and Repro Capsule + +The temporary share viewer can export a versioned review packet in JSON or Markdown. It includes the share/video URLs, expiry and password state, review brief/status, guest decisions, timestamped discussion, frame points, owner annotations, captions, chapters and bug-report context. Deleted comment bodies are redacted. Guest labels are unverified and the export is a handoff artifact, not an authenticated identity record. + +The optional Chrome/Edge Manifest V3 extension is in [extension/](extension/README.md). It starts only after a user click, captures a short click/navigation-key outline in the active tab, has no host permissions or network code, and asks the user to review/edit the JSON before download. Import it from the editor's **Captions & context → Bug report → Import Repro Capsule** action. ScreenNote sanitizes URL credentials, query and fragment again on import. Imported context remains local until the creator explicitly saves/publishes it; publishing makes saved context visible to share-link viewers. + +The extension does not collect screenshots, form values, typed characters, cookies, network requests or console logs. It is an interaction outline, not automatic full telemetry or a guaranteed reproduction. From 3ec982a74f6b41eddc9cc87d956d1eb13f90c61a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:10:00 +0200 Subject: [PATCH 517/575] Correct design-system completion status and record migration --- rebuild/DESIGN-SYSTEM.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rebuild/DESIGN-SYSTEM.md b/rebuild/DESIGN-SYSTEM.md index 6240542..d4f6c5d 100644 --- a/rebuild/DESIGN-SYSTEM.md +++ b/rebuild/DESIGN-SYSTEM.md @@ -1,6 +1,6 @@ # ScreenNote design system — Field Notes -**Status:** implemented in `rebuild/src/styles.css` +**Status:** semantic token foundation exists in `rebuild/src/styles.css`; full legacy selector migration and light/dark acceptance remain in progress. Do not treat the token table as proof that every component is already compliant. **Font policy:** retain the existing system font stack; no remote font or subscription dependency. ## Brand direction @@ -82,3 +82,8 @@ Shadows are layered and restrained: ## Performance guardrails These are product targets, not measured field results: p75 LCP <= 1.8s, INP <= 150ms, CLS <= 0.05. Measure separately on mobile and desktop; never state competitor superiority without matched-device/network tests. + + +## 26 November execution note + +The base legacy root palette declarations were removed in favor of the semantic token layer. The UI stack now uses `--sn-font-ui`, and shared line-height tokens are applied to the main reading surfaces and headings. Theme-specific toast/error contrast and review-status surfaces were corrected. This is an incremental migration; remaining hard-coded component colors and all real-device/theme-state evidence still require full audit. From 796d85f422148439d151ff4ecb7b708b2619549d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:10:03 +0200 Subject: [PATCH 518/575] Record Repro Capsule and review packet implementation status --- rebuild/PRODUCT-DIFFERENTIATION-2026-11-25.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rebuild/PRODUCT-DIFFERENTIATION-2026-11-25.md b/rebuild/PRODUCT-DIFFERENTIATION-2026-11-25.md index 32fdf3d..a554a2e 100644 --- a/rebuild/PRODUCT-DIFFERENTIATION-2026-11-25.md +++ b/rebuild/PRODUCT-DIFFERENTIATION-2026-11-25.md @@ -186,3 +186,11 @@ Do not charge merely to remove arbitrary friction from the free local workflow. A release is not accepted until a fresh guest can open a share without an account, understand the brief, watch and seek, leave timestamped feedback, choose a review decision, refresh without losing it, and the owner can see the decision, resolve it, publish a revised version, and export an accurate issue packet. Test password-protected, expired and revoked links; 320px mobile; keyboard-only; both themes; concurrent reviewer submissions; and failed/offline states. This document is the product direction and acceptance definition. It does not claim these proposed features have already been implemented or deployed. + + +## 26 November implementation update + +- The guest share now offers a JSON review packet and a Markdown review handoff, including guest decisions and complete review context. Deleted comment bodies are redacted from both formats. +- The optional Chrome/Edge Repro Capsule extension and editor import path are implemented on the isolated rebuild branch. Capture is explicit, local-only, permission-limited, and excludes typed values/form data/network/console/screenshot capture. The import parser validates schema, caps step count and size, strips URL credentials/query/fragment, and formats a reviewable reproduction outline. +- Automated unit, extension-boundary and editor-import tests have been added. They are not a substitute for manual installation/testing in actual Chrome and Edge. +- Version-aware media review remains unimplemented: current comments are not safely migrated across different media versions. Do not claim that feature is shipped. From 5d950d10d29129a366bbe2be1d002ed87858fb0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:10:06 +0200 Subject: [PATCH 519/575] Update full-scope execution ledger with current code and CI state --- rebuild/EXECUTION-AUDIT-2026-11-26.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rebuild/EXECUTION-AUDIT-2026-11-26.md b/rebuild/EXECUTION-AUDIT-2026-11-26.md index d43fc81..f75c758 100644 --- a/rebuild/EXECUTION-AUDIT-2026-11-26.md +++ b/rebuild/EXECUTION-AUDIT-2026-11-26.md @@ -73,3 +73,13 @@ Take over the isolated Cloudflare rebuild and make the whole product substantial ## Acceptance rule Do not mark this rebuild complete because a workflow is green, the Worker is deployed, or one screen looks polished. Close every applicable ledger item with implementation and evidence, disclose external gates, and keep production isolated until the user explicitly authorizes cutover. + + +## Addendum — current execution batch + +- Semantic root palette cleanup and typography/line-height token application are committed. +- Review status chip surfaces now use semantic accent/alert tokens. +- Guest share review packet now exports JSON and Markdown, uses absolute share/media URLs, includes guest decisions, and redacts deleted comment text. +- Repro Capsule extension, parser, editor import, unit tests, extension privacy-boundary tests and E2E import/export assertions are committed. +- Latest observed workflow for commit `1ef0aa1be7a767d3abb759fa8af085b68da93e0a` is running; do not report the current batch as green until its E2E and isolated deployment/live browser jobs complete. +- The previous 7782 commit Cloudflare workflow failed typecheck due a malformed regression-test fixture; that fixture was corrected in commit `1ef0aa1...` and is being rerun. The failure was in the test source, not in the application code. From 7a6434c069e09199415e0d8f30ee6084171aaa44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:11:59 +0200 Subject: [PATCH 520/575] Migrate remaining legacy UI colors to semantic theme tokens --- rebuild/src/styles.css | 82 +++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index 8104739..ec6e856 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -1,7 +1,7 @@ :root{font-family:var(--sn-font-ui);color:var(--sn-ink);background:var(--sn-paper);font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color-scheme:light} :root[data-theme="dark"]{color-scheme:dark} *{box-sizing:border-box}html,body,#root{margin:0;width:100%;min-width:320px;min-height:100%;background:var(--paper);color:var(--ink)}body{font-family:var(--sn-font-ui)}button,input,select,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--rust);outline-offset:3px} -.app-shell{min-height:100vh;background:var(--paper)}.sidebar{display:none!important}.main-content{margin:0!important;width:100%;min-width:0}.topbar{height:76px;padding:0 clamp(18px,5vw,76px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--paper)}.breadcrumb{font:600 18px var(--sn-font-ui);letter-spacing:-.7px}.breadcrumb span{color:var(--rust);padding:0 8px}.top-actions{display:flex;align-items:center;gap:16px}.secure-label{font:500 11px ui-monospace,monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.secure-label svg{color:#778b35;vertical-align:-3px}.avatar{display:none!important}.icon-button{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:50%;width:42px;height:42px;display:inline-grid;place-items:center}.page-wrap{width:min(1180px,calc(100% - 48px));margin:0 auto;padding:56px 0 70px}.welcome-row{display:flex;align-items:flex-end;justify-content:space-between;gap:32px;padding:0 0 42px;border-bottom:1px solid var(--line)}.eyebrow{font:500 10px ui-monospace,monospace;letter-spacing:.14em;color:var(--rust);text-transform:uppercase}.welcome-row h1{font:600 clamp(42px,6vw,76px)/.98 var(--sn-font-ui);letter-spacing:-.075em;margin:17px 0 18px;max-width:760px}.welcome-row h1 span{color:var(--muted)}.intro{font-size:17px;color:var(--muted);max-width:500px;margin:0;line-height:1.55}.welcome-art{width:230px;min-width:230px;padding:0;transform:rotate(2deg)}.art-window{height:150px;background:var(--acid);border:1px solid var(--ink);border-radius:3px;box-shadow:8px 8px 0 var(--ink);overflow:hidden}.art-bar{height:20px;border-bottom:1px solid var(--ink);display:flex;gap:5px;align-items:center;padding:0 8px}.art-bar i{width:5px;height:5px;border:1px solid var(--ink);border-radius:50%}.art-screen{height:129px;display:flex;position:relative}.art-sidebar{width:27px;border-right:1px solid var(--ink)}.art-content{padding:17px 13px;flex:1;display:grid;gap:8px;align-content:start}.art-content div{height:7px;background:var(--ink);opacity:.75;width:90%}.art-content div:nth-child(2){width:63%}.art-content div:nth-child(3){width:77%}.art-content div:nth-child(4){width:43%}.art-cursor{position:absolute;right:45px;top:34px;width:0;height:0;border-left:10px solid var(--rust);border-top:16px solid transparent;filter:drop-shadow(1px 1px var(--ink))}.art-play{position:absolute;right:17px;bottom:15px;width:34px;height:34px;background:var(--ink);color:var(--acid);display:grid;place-items:center;border-radius:50%}.art-caption{display:none} +.app-shell{min-height:100vh;background:var(--paper)}.sidebar{display:none!important}.main-content{margin:0!important;width:100%;min-width:0}.topbar{height:76px;padding:0 clamp(18px,5vw,76px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--paper)}.breadcrumb{font:600 18px var(--sn-font-ui);letter-spacing:-.7px}.breadcrumb span{color:var(--rust);padding:0 8px}.top-actions{display:flex;align-items:center;gap:16px}.secure-label{font:500 11px ui-monospace,monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.secure-label svg{color:var(--sn-accent);vertical-align:-3px}.avatar{display:none!important}.icon-button{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:50%;width:42px;height:42px;display:inline-grid;place-items:center}.page-wrap{width:min(1180px,calc(100% - 48px));margin:0 auto;padding:56px 0 70px}.welcome-row{display:flex;align-items:flex-end;justify-content:space-between;gap:32px;padding:0 0 42px;border-bottom:1px solid var(--line)}.eyebrow{font:500 10px ui-monospace,monospace;letter-spacing:.14em;color:var(--rust);text-transform:uppercase}.welcome-row h1{font:600 clamp(42px,6vw,76px)/.98 var(--sn-font-ui);letter-spacing:-.075em;margin:17px 0 18px;max-width:760px}.welcome-row h1 span{color:var(--muted)}.intro{font-size:17px;color:var(--muted);max-width:500px;margin:0;line-height:1.55}.welcome-art{width:230px;min-width:230px;padding:0;transform:rotate(2deg)}.art-window{height:150px;background:var(--acid);border:1px solid var(--ink);border-radius:3px;box-shadow:8px 8px 0 var(--ink);overflow:hidden}.art-bar{height:20px;border-bottom:1px solid var(--ink);display:flex;gap:5px;align-items:center;padding:0 8px}.art-bar i{width:5px;height:5px;border:1px solid var(--ink);border-radius:50%}.art-screen{height:129px;display:flex;position:relative}.art-sidebar{width:27px;border-right:1px solid var(--ink)}.art-content{padding:17px 13px;flex:1;display:grid;gap:8px;align-content:start}.art-content div{height:7px;background:var(--ink);opacity:.75;width:90%}.art-content div:nth-child(2){width:63%}.art-content div:nth-child(3){width:77%}.art-content div:nth-child(4){width:43%}.art-cursor{position:absolute;right:45px;top:34px;width:0;height:0;border-left:10px solid var(--rust);border-top:16px solid transparent;filter:drop-shadow(1px 1px var(--ink))}.art-play{position:absolute;right:17px;bottom:15px;width:34px;height:34px;background:var(--ink);color:var(--acid);display:grid;place-items:center;border-radius:50%}.art-caption{display:none} .capture-panel{margin:34px 0 64px;background:#20211e;color:#f5f3e9;border-radius:3px;padding:26px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0}.capture-copy{display:flex;align-items:center;gap:16px}.capture-icon{width:48px;height:48px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink);border-radius:2px;flex:none}.capture-copy h2{font:600 20px var(--sn-font-ui);margin:0 0 4px;letter-spacing:-.5px}.capture-copy p{font-size:14px;color:#b9bbb0;margin:0}.capture-actions,.record-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.toggle-option{font-size:13px;color:#d2d2c9;display:flex;align-items:center;gap:7px;white-space:nowrap}.toggle-option input{accent-color:var(--acid);width:15px;height:15px}.button{border:1px solid transparent;border-radius:2px;min-height:44px;padding:0 17px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .16s ease,background .16s ease}.button:hover{transform:translateY(-2px)}.button.primary{background:var(--acid);color:var(--acid-ink)}.button.secondary{background:transparent;border-color:var(--line);color:var(--ink)}.capture-panel .button.secondary{border-color:#676a60;color:#fff}.button.danger{background:var(--rust);color:#fff}.recording-indicator{font:500 11px ui-monospace,monospace;color:var(--acid);letter-spacing:.08em}.recording-indicator span,.record-dot{display:inline-block;width:8px;height:8px;background:#e36b50;border-radius:50%;margin-right:7px} .notice{margin:16px 0;padding:14px 17px;background:var(--acid);color:var(--acid-ink);border-left:4px solid var(--rust);display:flex;align-items:center;justify-content:space-between;gap:14px}.recovery-copy,.recovery-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.library-section{min-width:0}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.section-heading h2{font:600 32px var(--sn-font-ui);letter-spacing:-1.4px;margin:8px 0 0}.count-badge{font:500 12px ui-monospace,monospace;color:var(--rust);vertical-align:middle}.library-tools{display:flex;align-items:center;gap:10px}.search-box{display:flex;align-items:center;gap:9px;border-bottom:1px solid var(--ink);padding:9px 2px;min-width:220px;color:var(--muted)}.search-box input{border:0;background:transparent;color:var(--ink);outline:none;width:100%;min-width:0}.search-box input:focus-visible{outline:none}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.clip-card{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:3px;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}.clip-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.clip-thumb{height:178px;background:#d9d8d0;position:relative;display:grid;place-items:center;overflow:hidden}.clip-thumb:before{content:'';position:absolute;inset:0;background:linear-gradient(135deg,#d8f36a 0 48%,#e8e5dc 48% 100%)}.thumb-lines{position:relative;width:52%;display:grid;gap:9px}.thumb-lines span{height:8px;background:#292b24;opacity:.75}.thumb-lines span:nth-child(2){width:70%}.thumb-lines span:nth-child(3){width:85%}.thumb-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:46px;height:46px;border:0;border-radius:50%;background:var(--ink);color:var(--acid);display:grid;place-items:center}.duration{position:absolute;bottom:10px;right:10px;background:var(--ink);color:#fff;padding:4px 7px;font:11px ui-monospace,monospace}.clip-info{padding:15px;display:flex;align-items:center;justify-content:space-between;gap:10px}.clip-info>div:first-child{min-width:0}.clip-info h3{font:600 16px var(--sn-font-ui);margin:0 0 5px;overflow-wrap:anywhere}.clip-info p{font:11px ui-monospace,monospace;color:var(--muted);margin:0;display:flex;align-items:center;gap:5px;flex-wrap:wrap}.clip-actions{display:flex;gap:4px;flex:none}.clip-actions .icon-button{width:34px;height:34px}.empty-state{padding:65px 22px;text-align:center;border:1px dashed var(--line);background:var(--panel)}.empty-icon{width:54px;height:54px;margin:0 auto 16px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink)}.empty-state h3{font:600 24px var(--sn-font-ui);margin:0 0 8px}.empty-state p{color:var(--muted);max-width:420px;margin:0 auto 20px;line-height:1.5}.empty-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.bottom-note{margin-top:54px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:15px}.note-icon{color:var(--rust)}.bottom-note strong{font:600 15px var(--sn-font-ui)}.bottom-note p{margin:4px 0 0;color:var(--muted);font-size:13px}.build-label{margin-left:auto;font:10px ui-monospace,monospace;color:var(--muted);letter-spacing:.08em}footer{padding:24px 0 0;color:var(--muted);font:11px ui-monospace,monospace;display:flex;gap:24px;flex-wrap:wrap}footer a{color:var(--rust)} .modal-backdrop{position:fixed;inset:0;z-index:100;background:rgba(13,15,12,.72);display:grid;place-items:center;padding:16px;overflow:auto}.preview-modal,.publish-modal{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:3px;width:min(850px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;box-shadow:var(--shadow)}.publish-modal{width:min(480px,100%)}.preview-header,.publish-modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.preview-header h2,.publish-modal h2{font:600 25px var(--sn-font-ui);margin:0}.preview-header p,.publish-modal p{color:var(--muted);margin:5px 0 18px}.preview-video{display:block;width:100%;max-height:52vh;background:#090a08;margin:12px 0}.trim-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:18px 0}.trim-tools label,.field-label{display:grid;gap:6px;font-size:13px;color:var(--muted)}.trim-tools input,.field-label input,.field-label select{background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:2px;padding:10px;min-width:0}.preview-actions{display:flex;gap:9px;flex-wrap:wrap}.field-label{margin:16px 0}.field-label input,.field-label select{width:100%}.optional-label{font:10px ui-monospace,monospace}.privacy-explainer{display:flex;gap:10px;padding:14px;background:var(--paper);color:var(--muted);font-size:13px;line-height:1.5}.publish-submit{width:100%;margin-top:18px} .share-link-toast{position:fixed;z-index:110;bottom:18px;left:50%;transform:translateX(-50%);width:min(650px,calc(100% - 24px));padding:14px;background:var(--ink);color:#fff;display:flex;align-items:center;gap:12px;box-shadow:var(--shadow)}.share-link-toast>div{min-width:0;flex:1;display:grid;gap:3px}.share-link-toast span{font:11px ui-monospace,monospace;overflow-wrap:anywhere;color:#d0d2c8}.share-link-toast .button.secondary{color:#fff;border-color:#666} @@ -116,11 +116,11 @@ .editor-card label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:650} .editor-card input,.editor-card textarea,.context-editor input,.context-editor textarea{width:100%;min-width:0;max-width:100%;border:1px solid var(--line,#d9d8cf);border-radius:7px;background:var(--paper,#f3f1e9);color:inherit;padding:10px;font:13px inherit} .editor-card textarea,.context-editor textarea{resize:vertical;line-height:1.5;overflow-wrap:anywhere} -.editor-primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:8px;background:#b8d23e;color:#20231f;padding:11px 13px;font-weight:750;font-size:12px;cursor:pointer} +.editor-primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:8px;background:var(--sn-accent);color:var(--sn-accent-ink);padding:11px 13px;font-weight:750;font-size:12px;cursor:pointer} .editor-primary:disabled{opacity:.45;cursor:not-allowed} .editor-actions-card button{display:flex;align-items:center;gap:8px;text-align:left;border:0;border-top:1px solid var(--line,#d9d8cf);background:transparent;color:inherit;padding:11px 0;font:600 12px inherit;cursor:pointer} .editor-actions-card button:first-child{border-top:0} -.editor-actions-card button.danger{color:#b44b37} +.editor-actions-card button.danger{color:var(--sn-alert)} .context-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:clamp(14px,3vw,32px);max-width:1200px;width:100%;margin:0 auto;min-width:0} .context-editor .editor-card{min-width:0} .context-editor .editor-card:nth-child(3){grid-column:1/-1} @@ -131,15 +131,15 @@ .caption-results button{display:flex;gap:12px;align-items:flex-start;text-align:left;border:0;border-radius:6px;padding:8px;background:var(--paper,#f3f1e9);color:inherit;font-size:12px;cursor:pointer} .caption-results button span{font:11px ui-monospace,monospace;color:var(--muted,#73776f);white-space:nowrap} .editor-inline-actions{display:flex;gap:8px;flex-wrap:wrap} -.editor-inline-actions button:last-child{background:#b8d23e;color:#20231f;border-color:#b8d23e} -.editor-status{position:sticky;bottom:0;padding:12px 18px;background:var(--ink,#20231f);color:#fff;font-size:12px;line-height:1.4} +.editor-inline-actions button:last-child{background:var(--sn-accent);color:var(--sn-accent-ink);border-color:var(--sn-accent)} +.editor-status{position:sticky;bottom:0;padding:12px 18px;background:var(--sn-ink);color:var(--sn-paper);font-size:12px;line-height:1.4} .editor-workspace progress{width:100%;accent-color:#b8d23e} -[data-theme="dark"] .editor-workspace{background:#191d19;color:#f1f0e8} -[data-theme="dark"] .editor-topline,[data-theme="dark"] .editor-tabs{background:#191d19;border-color:#343a32} -[data-theme="dark"] .editor-card,[data-theme="dark"] .editor-toolbar{background:#222821;border-color:#343a32} -[data-theme="dark"] .editor-card input,[data-theme="dark"] .editor-card textarea,[data-theme="dark"] .context-editor input,[data-theme="dark"] .context-editor textarea,[data-theme="dark"] .caption-results button{background:#171c17;border-color:#41483e;color:#f1f0e8} -[data-theme="dark"] .editor-toolbar button,[data-theme="dark"] .editor-tabs button{border-color:#41483e} -[data-theme="dark"] .editor-tabs button.active,[data-theme="dark"] .editor-toolbar button.selected{background:#e8eddf;color:#20231f;border-color:#e8eddf} +[data-theme="dark"] .editor-workspace{background:var(--sn-paper);color:var(--sn-ink)} +[data-theme="dark"] .editor-topline,[data-theme="dark"] .editor-tabs{background:var(--sn-paper);border-color:var(--sn-line)} +[data-theme="dark"] .editor-card,[data-theme="dark"] .editor-toolbar{background:var(--sn-surface);border-color:var(--sn-line)} +[data-theme="dark"] .editor-card input,[data-theme="dark"] .editor-card textarea,[data-theme="dark"] .context-editor input,[data-theme="dark"] .context-editor textarea,[data-theme="dark"] .caption-results button{background:var(--sn-raised);border-color:var(--sn-line-strong);color:var(--sn-ink)} +[data-theme="dark"] .editor-toolbar button,[data-theme="dark"] .editor-tabs button{border-color:var(--sn-line-strong)} +[data-theme="dark"] .editor-tabs button.active,[data-theme="dark"] .editor-toolbar button.selected{background:var(--sn-accent);color:var(--sn-accent-ink);border-color:var(--sn-accent)} @media(max-width:900px){.editor-body{grid-template-columns:minmax(0,1fr);}.editor-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}.editor-actions-card{grid-column:1/-1}} @media(max-width:600px){.editor-topline{gap:8px;padding:11px 12px}.editor-title-button{font-size:14px}.editor-title-wrap span{font-size:10px}.editor-body{padding:12px;gap:14px}.editor-side{grid-template-columns:minmax(0,1fr)}.editor-actions-card{grid-column:auto}.editor-toolbar{gap:5px;padding:8px}.editor-toolbar button{padding:8px;font-size:10px}.toolbar-label{width:100%}.context-editor{grid-template-columns:minmax(0,1fr);padding:12px}.context-editor .editor-card:nth-child(3),.context-editor .editor-card:nth-child(4){grid-column:auto}.editor-tabs{padding:9px 12px}.editor-tabs button{padding:8px 10px;font-size:11px}.editor-video-wrap{border-radius:8px}} @@ -162,12 +162,12 @@ .preview-workspace-content aside h3{font-size:20px;line-height:1.2;margin:0} .preview-workspace-content aside p{font-size:13px;line-height:1.55;color:var(--muted,#73776f);margin:0 0 6px} .preview-workspace-content aside button{display:flex;align-items:center;justify-content:center;gap:8px;padding:11px;border:1px solid var(--line,#d9d8cf);border-radius:8px;background:transparent;color:inherit;font-weight:650;font-size:12px;cursor:pointer} -.preview-workspace-content aside .preview-primary{background:#b8d23e;color:#20231f;border-color:#b8d23e} -.preview-workspace-content aside .preview-delete{color:#b44b37} -[data-theme="dark"] .preview-workspace{background:#191d19;color:#f1f0e8} -[data-theme="dark"] .preview-workspace>header{border-color:#343a32} -[data-theme="dark"] .preview-workspace-content aside{background:#222821;border-color:#343a32} -[data-theme="dark"] .preview-workspace-content aside button{border-color:#41483e} +.preview-workspace-content aside .preview-primary{background:var(--sn-accent);color:var(--sn-accent-ink);border-color:var(--sn-accent)} +.preview-workspace-content aside .preview-delete{color:var(--sn-alert)} +[data-theme="dark"] .preview-workspace{background:var(--sn-paper);color:var(--sn-ink)} +[data-theme="dark"] .preview-workspace>header{border-color:var(--sn-line)} +[data-theme="dark"] .preview-workspace-content aside{background:var(--sn-surface);border-color:var(--sn-line)} +[data-theme="dark"] .preview-workspace-content aside button{border-color:var(--sn-line-strong)} @media(max-width:850px){.preview-workspace-content{grid-template-columns:minmax(0,1fr)}.preview-workspace-content video{max-height:none}.preview-workspace-content aside{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.preview-workspace-content aside .eyebrow,.preview-workspace-content aside h3,.preview-workspace-content aside p{grid-column:1/-1}} @media(max-width:520px){.preview-workspace>header{gap:8px;padding:12px}.preview-workspace>header h2{font-size:14px}.preview-workspace-content{padding:12px;gap:14px}.preview-workspace-content aside{grid-template-columns:minmax(0,1fr);padding:15px}} @@ -182,8 +182,8 @@ .shared-report{border-top:1px solid var(--line,#d9d8cf);padding-top:12px} .shared-report p{font-size:12px;line-height:1.55;overflow-wrap:anywhere;white-space:pre-wrap} .shared-report strong{font-weight:700} -[data-theme="dark"] .shared-context{background:#222821;border-color:#343a32} -[data-theme="dark"] .shared-context input,[data-theme="dark"] .shared-chapters button,[data-theme="dark"] .shared-transcript button{background:#171c17;border-color:#41483e;color:#f1f0e8} +[data-theme="dark"] .shared-context{background:var(--sn-surface);border-color:var(--sn-line)} +[data-theme="dark"] .shared-context input,[data-theme="dark"] .shared-chapters button,[data-theme="dark"] .shared-transcript button{background:var(--sn-raised);border-color:var(--sn-line-strong);color:var(--sn-ink)} .shared-annotation-overlay{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;overflow:visible} @@ -204,8 +204,8 @@ .settings-actions{display:flex;gap:8px;flex-wrap:wrap} .settings-modal .button{display:inline-flex;align-items:center;justify-content:center;gap:7px} .settings-footnote{display:flex;align-items:flex-start;gap:8px;padding-top:16px;font-size:11px;line-height:1.5;color:var(--muted,#73776f)} -[data-theme="dark"] .settings-modal{background:#222821;color:#f1f0e8;border-color:#343a32} -[data-theme="dark"] .settings-modal>header,[data-theme="dark"] .settings-section{border-color:#343a32} +[data-theme="dark"] .settings-modal{background:var(--sn-surface);color:var(--sn-ink);border-color:var(--sn-line)} +[data-theme="dark"] .settings-modal>header,[data-theme="dark"] .settings-section{border-color:var(--sn-line)} @media(max-width:480px){.settings-modal{padding:16px}.settings-modal>header h2{font-size:19px}.settings-actions{flex-direction:column;align-items:stretch}.settings-actions .button{width:100%}} @@ -218,21 +218,21 @@ .capture-settings-grid input[type="range"]{width:100%;accent-color:#a8c52f} .capture-settings-grid>.button{align-self:end;justify-self:start} .record-countdown{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:12px 0} -.record-countdown strong{font:700 38px var(--sn-font-ui);color:#a8c52f;min-width:42px} +.record-countdown strong{font:700 38px var(--sn-font-ui);color:var(--sn-accent);min-width:42px} .record-countdown span{flex:1;min-width:160px;font-size:13px;color:var(--muted,#73776f)} -[data-theme="dark"] .capture-settings-grid select{background:#171c17;border-color:#41483e;color:#f1f0e8} +[data-theme="dark"] .capture-settings-grid select{background:var(--sn-raised);border-color:var(--sn-line-strong);color:var(--sn-ink)} @media(max-width:620px){.capture-settings-grid{grid-template-columns:minmax(0,1fr)}.capture-settings-grid>.button{justify-self:stretch}.record-countdown{gap:10px}.record-countdown strong{font-size:30px}} .editor-card select{width:100%;min-width:0;max-width:100%;padding:10px;border:1px solid var(--line,#d9d8cf);border-radius:7px;background:var(--paper,#f3f1e9);color:inherit;font:13px inherit} -[data-theme="dark"] .editor-card select{background:#171c17;border-color:#41483e;color:#f1f0e8} -.shared-review-status{display:inline-flex;align-self:flex-start;margin:8px 0;padding:5px 9px;border-radius:999px;background:rgba(168,197,47,.16);color:inherit;font-size:10px;font-weight:750;letter-spacing:.04em} -.shared-review-status.changes-requested{background:rgba(222,133,82,.16)} -.shared-review-status.needs-feedback{background:rgba(135,143,133,.16)} +[data-theme="dark"] .editor-card select{background:var(--sn-raised);border-color:var(--sn-line-strong);color:var(--sn-ink)} +.shared-review-status{display:inline-flex;align-self:flex-start;margin:8px 0;padding:5px 9px;border-radius:999px;background:color-mix(in srgb,var(--sn-accent) 12%,var(--sn-surface));color:inherit;font-size:10px;font-weight:750;letter-spacing:.04em} +.shared-review-status.changes-requested{background:var(--sn-alert-soft)} +.shared-review-status.needs-feedback{background:var(--sn-surface)} -.offline-banner{display:flex;align-items:center;gap:9px;padding:10px clamp(14px,3vw,34px);background:#f4e4cb;color:#634b2b;border-bottom:1px solid #e3c99d;font-size:12px;line-height:1.45} -[data-theme="dark"] .offline-banner{background:#3a3021;color:#f0d9b5;border-color:#57452b} +.offline-banner{display:flex;align-items:center;gap:9px;padding:10px clamp(14px,3vw,34px);background:var(--sn-warning-soft);color:var(--sn-warning);border-bottom:1px solid #e3c99d;font-size:12px;line-height:1.45} +[data-theme="dark"] .offline-banner{background:var(--sn-warning-soft);color:var(--sn-warning);border-color:var(--sn-warning)} .upload-resume-note{margin:0;color:var(--muted,#73776f);font-size:11px;line-height:1.5} @@ -240,8 +240,8 @@ .publish-progress>div{display:flex;justify-content:space-between;gap:10px;font-size:11px} .publish-progress strong{font-variant-numeric:tabular-nums} .publish-progress progress{width:100%;height:8px;accent-color:#a8c52f} -.publish-status{margin:0;padding:10px;border-radius:7px;background:rgba(185,91,62,.1);color:inherit;font-size:12px;line-height:1.5;overflow-wrap:anywhere} -[data-theme="dark"] .publish-progress{background:#171c17;border-color:#41483e} +.publish-status{margin:0;padding:10px;border-radius:7px;background:color-mix(in srgb,var(--sn-alert) 10%,var(--sn-surface));color:inherit;font-size:12px;line-height:1.5;overflow-wrap:anywhere} +[data-theme="dark"] .publish-progress{background:var(--sn-raised);border-color:var(--sn-line-strong)} /* Keep annotation coordinates aligned to the actual source frame, including portrait and 4:3 media. */ @@ -258,13 +258,13 @@ .share-reactions>div{display:flex;gap:8px;flex-wrap:wrap} .share-reactions button{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid var(--line,#d9d8cf);border-radius:999px;background:var(--surface,#fffefa);color:inherit;font-size:11px;font-weight:650;cursor:pointer} .share-reactions button b{font:11px ui-monospace,monospace;color:var(--muted,#73776f)} -.share-reactions button.active{background:rgba(168,197,47,.18);border-color:#a8c52f} -[data-theme="dark"] .share-reactions{border-color:#343a32} -[data-theme="dark"] .share-reactions button{background:#222821;border-color:#41483e} -[data-theme="dark"] .share-reactions button.active{background:rgba(168,197,47,.18);border-color:#a8c52f} +.share-reactions button.active{background:color-mix(in srgb,var(--sn-accent) 18%,var(--sn-surface));border-color:var(--sn-accent)} +[data-theme="dark"] .share-reactions{border-color:var(--sn-line)} +[data-theme="dark"] .share-reactions button{background:var(--sn-surface);border-color:var(--sn-line-strong)} +[data-theme="dark"] .share-reactions button.active{background:color-mix(in srgb,var(--sn-accent) 18%,var(--sn-surface));border-color:var(--sn-accent)} -.capture-unavailable{margin:0;padding:10px 12px;border-left:3px solid #b87a3e;background:rgba(184,122,62,.1);font-size:11px;line-height:1.5;color:var(--muted,#73776f)} +.capture-unavailable{margin:0;padding:10px 12px;border-left:3px solid #b87a3e;background:color-mix(in srgb,var(--sn-warning) 10%,var(--sn-surface));font-size:11px;line-height:1.5;color:var(--muted,#73776f)} .clip-thumbnail-image{display:block;width:100%;height:100%;object-fit:cover;position:absolute;inset:0} @@ -278,9 +278,9 @@ .storage-meter strong{font:11px ui-monospace,monospace} .storage-meter progress{width:100%;height:7px;accent-color:#a8c52f} .storage-protected,.storage-status{display:flex;align-items:center;gap:7px;margin:0;font-size:11px;color:var(--muted,#73776f);line-height:1.5} -.storage-protected{color:#718b32} -[data-theme="dark"] .storage-meter{background:#171c17;border-color:#41483e} -[data-theme="dark"] .storage-protected{color:#b5d36c} +.storage-protected{color:var(--sn-accent)} +[data-theme="dark"] .storage-meter{background:var(--sn-raised);border-color:var(--sn-line-strong)} +[data-theme="dark"] .storage-protected{color:var(--sn-accent)} .bubble-position-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0} @@ -339,7 +339,7 @@ --sn-accent-ink:#fffdf8; --sn-highlight:#d9dfc7; --sn-alert:#963f2d; - --sn-alert-soft:#f3e5df; + --sn-alert-soft:#f3e5df;\n --sn-warning:#634b2b;\n --sn-warning-soft:#f4e4cb; --sn-shadow-sm:0 1px 2px rgba(27,39,30,.05); --sn-shadow-md:0 12px 32px rgba(27,39,30,.08); --sn-shadow-lg:0 24px 64px rgba(27,39,30,.12); @@ -404,7 +404,7 @@ --sn-accent-ink:#172019; --sn-highlight:#435343; --sn-alert:#e1a08a; - --sn-alert-soft:#3c2b27; + --sn-alert-soft:#3c2b27;\n --sn-warning:var(--sn-warning);\n --sn-warning-soft:var(--sn-warning-soft); --sn-shadow-sm:0 1px 2px rgba(0,0,0,.18); --sn-shadow-md:0 12px 32px rgba(0,0,0,.24); --sn-shadow-lg:0 24px 64px rgba(0,0,0,.34); From 1310cc09f26227f02a742c831d3179dd61b9c2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:12:32 +0200 Subject: [PATCH 521/575] Correct warning tokens in both semantic themes From d6d4b7ef10344281d6d751d26943b51a77ef5664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:12:46 +0200 Subject: [PATCH 522/575] Correct warning tokens in both semantic themes --- rebuild/src/styles.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index ec6e856..bb1c457 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -339,7 +339,9 @@ --sn-accent-ink:#fffdf8; --sn-highlight:#d9dfc7; --sn-alert:#963f2d; - --sn-alert-soft:#f3e5df;\n --sn-warning:#634b2b;\n --sn-warning-soft:#f4e4cb; + --sn-alert-soft:#f3e5df; + --sn-warning:#634b2b; + --sn-warning-soft:#f4e4cb; --sn-shadow-sm:0 1px 2px rgba(27,39,30,.05); --sn-shadow-md:0 12px 32px rgba(27,39,30,.08); --sn-shadow-lg:0 24px 64px rgba(27,39,30,.12); @@ -404,7 +406,9 @@ --sn-accent-ink:#172019; --sn-highlight:#435343; --sn-alert:#e1a08a; - --sn-alert-soft:#3c2b27;\n --sn-warning:var(--sn-warning);\n --sn-warning-soft:var(--sn-warning-soft); + --sn-alert-soft:#3c2b27; + --sn-warning:#f0d9b5; + --sn-warning-soft:#3a3021; --sn-shadow-sm:0 1px 2px rgba(0,0,0,.18); --sn-shadow-md:0 12px 32px rgba(0,0,0,.24); --sn-shadow-lg:0 24px 64px rgba(0,0,0,.34); From d1bc5794a3c997c1aeaf4e1f53c5e3d732dafde9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:13:00 +0200 Subject: [PATCH 523/575] Strip query and fragment from exported share URL --- rebuild/src/ShareViewer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/src/ShareViewer.tsx b/rebuild/src/ShareViewer.tsx index 48d9f63..41c3086 100644 --- a/rebuild/src/ShareViewer.tsx +++ b/rebuild/src/ShareViewer.tsx @@ -148,7 +148,7 @@ function ShareViewer({token}:{token:string}) { version:1, product:"ScreenNote", title:share.title, - shareUrl:window.location.href, + shareUrl:new URL(window.location.pathname,window.location.origin).href, media:{url:new URL("/api/share/"+token+"/media",window.location.origin).href,mimeType:share.mimeType,sizeBytes:share.size,durationSeconds:share.duration}, share:{expiresAt:new Date(share.expiresAt*1000).toISOString(),passwordProtected:share.passwordRequired}, reviewStatus:details.reviewStatus||"needs-feedback", From 2f84180a61b413673f826fb510668bbf0908c17b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:13:04 +0200 Subject: [PATCH 524/575] Verify review packet excludes share URL query and fragment --- rebuild/e2e/visual.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 362450b..b632fd0 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -298,7 +298,7 @@ test("temporary share viewer and privacy route use the independent responsive de if(route.request().method()==="PUT"){currentDetails=route.request().postDataJSON().details;await route.fulfill({status:200,contentType:"application/json",body:JSON.stringify({saved:true})});return;} await route.fulfill({status:200,contentType:"application/json",body:JSON.stringify({details:currentDetails})}); }); - await page.goto("/s/"+token); + await page.goto("/s/"+token+"?campaign=private#review"); await expect(page.getByRole("heading",{name:"A product walkthrough"})).toBeVisible(); await assertNamedControls(page); await expect(page.getByText("Approved",{exact:true})).toBeVisible(); @@ -329,7 +329,7 @@ test("temporary share viewer and privacy route use the independent responsive de const jsonPath=await jsonDownload.path();if(!jsonPath)throw new Error("Review packet JSON download did not produce a file."); const packet=JSON.parse(await readFile(jsonPath,"utf8")); expect(packet.schema).toBe("screennote.review-packet"); - expect(packet.shareUrl).toContain("/s/"+token); + expect(packet.shareUrl).toContain("/s/"+token);\n expect(packet.shareUrl).not.toContain("campaign=private");\n expect(packet.shareUrl).not.toContain("#review"); expect(packet.guestDecisions).toContainEqual(expect.objectContaining({decision:"changes-requested",comment:"Please adjust the payment state.",reviewerLabel:"Luke"})); expect(packet.discussion).toContainEqual(expect.objectContaining({id:"visual-comment-deleted",text:"[Comment deleted]",deleted:true})); expect(JSON.stringify(packet)).not.toContain("deleted private feedback must not leak"); From 8267482ca85724bc8b13ab02b36122d08fcc66fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:13:19 +0200 Subject: [PATCH 525/575] Fix review packet URL privacy assertions formatting From c5a7a6428debf64211368f7aed47d72f00589de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:13:29 +0200 Subject: [PATCH 526/575] Fix review packet URL privacy assertions formatting From f18e25161b9288d6676fe85db6ae791f36d7b7e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:13:39 +0200 Subject: [PATCH 527/575] Fix review packet URL privacy assertions formatting --- rebuild/e2e/visual.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index b632fd0..b612f14 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -329,7 +329,9 @@ test("temporary share viewer and privacy route use the independent responsive de const jsonPath=await jsonDownload.path();if(!jsonPath)throw new Error("Review packet JSON download did not produce a file."); const packet=JSON.parse(await readFile(jsonPath,"utf8")); expect(packet.schema).toBe("screennote.review-packet"); - expect(packet.shareUrl).toContain("/s/"+token);\n expect(packet.shareUrl).not.toContain("campaign=private");\n expect(packet.shareUrl).not.toContain("#review"); + expect(packet.shareUrl).toContain("/s/"+token); + expect(packet.shareUrl).not.toContain("campaign=private"); + expect(packet.shareUrl).not.toContain("#review"); expect(packet.guestDecisions).toContainEqual(expect.objectContaining({decision:"changes-requested",comment:"Please adjust the payment state.",reviewerLabel:"Luke"})); expect(packet.discussion).toContainEqual(expect.objectContaining({id:"visual-comment-deleted",text:"[Comment deleted]",deleted:true})); expect(JSON.stringify(packet)).not.toContain("deleted private feedback must not leak"); From 62020db7c11f5ea586418c24a9b25e1cbbc61702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:13:52 +0200 Subject: [PATCH 528/575] Test warning and capture-unavailable contrast in both themes --- rebuild/e2e/visual.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index b612f14..4efd068 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -438,7 +438,7 @@ test("transient share and alert surfaces keep readable contrast in both themes", const error=document.createElement("p");error.className="share-error";error.textContent="The share could not be published.";document.body.append(error); const status=document.createElement("span");status.className="shared-review-status changes-requested";status.textContent="Changes requested";document.body.append(status); const selected=document.createElement("div");selected.className="review-decision-options";const selectedButton=document.createElement("button");selectedButton.setAttribute("aria-pressed","true");selectedButton.textContent="Selected review";selected.append(selectedButton);document.body.append(selected); - const editorStatus=document.createElement("div");editorStatus.className="editor-status";editorStatus.textContent="Saved";document.body.append(editorStatus); + const editorStatus=document.createElement("div");editorStatus.className="editor-status";editorStatus.textContent="Saved";document.body.append(editorStatus);\n const offline=document.createElement("div");offline.className="offline-banner";offline.textContent="Offline";document.body.append(offline);\n const unavailable=document.createElement("div");unavailable.className="capture-unavailable";unavailable.textContent="Capture unavailable";document.body.append(unavailable); }); const contrast=async(selector:string)=>page.locator(selector).evaluate(el=>{ const rgb=(value:string)=>value.match(/[\d.]+/g)!.slice(0,3).map(Number).map(v=>{v/=255;return v<=.04045?v/12.92:((v+.055)/1.055)**2.4}); @@ -449,7 +449,7 @@ test("transient share and alert surfaces keep readable contrast in both themes", }); for(const theme of ["light","dark"]){ if(theme==="dark")await page.getByRole("button",{name:"Toggle appearance"}).click(); - for(const selector of [".share-link-toast",".share-link-toast span",".share-link-toast button",".share-error",".shared-review-status.changes-requested",".review-decision-options button[aria-pressed=true]",".editor-status"]){ + for(const selector of [".share-link-toast",".share-link-toast span",".share-link-toast button",".share-error",".shared-review-status.changes-requested",".review-decision-options button[aria-pressed=true]",".editor-status",".offline-banner",".capture-unavailable"]){ expect(await contrast(selector),selector+" contrast in "+theme).toBeGreaterThanOrEqual(4.5); } } From 897bc5de2a2f04976c25aa335624048191a26b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:14:04 +0200 Subject: [PATCH 529/575] Fix warning contrast fixture line breaks --- rebuild/e2e/visual.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 4efd068..fc6b821 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -438,7 +438,9 @@ test("transient share and alert surfaces keep readable contrast in both themes", const error=document.createElement("p");error.className="share-error";error.textContent="The share could not be published.";document.body.append(error); const status=document.createElement("span");status.className="shared-review-status changes-requested";status.textContent="Changes requested";document.body.append(status); const selected=document.createElement("div");selected.className="review-decision-options";const selectedButton=document.createElement("button");selectedButton.setAttribute("aria-pressed","true");selectedButton.textContent="Selected review";selected.append(selectedButton);document.body.append(selected); - const editorStatus=document.createElement("div");editorStatus.className="editor-status";editorStatus.textContent="Saved";document.body.append(editorStatus);\n const offline=document.createElement("div");offline.className="offline-banner";offline.textContent="Offline";document.body.append(offline);\n const unavailable=document.createElement("div");unavailable.className="capture-unavailable";unavailable.textContent="Capture unavailable";document.body.append(unavailable); + const editorStatus=document.createElement("div");editorStatus.className="editor-status";editorStatus.textContent="Saved";document.body.append(editorStatus); + const offline=document.createElement("div");offline.className="offline-banner";offline.textContent="Offline";document.body.append(offline); + const unavailable=document.createElement("div");unavailable.className="capture-unavailable";unavailable.textContent="Capture unavailable";document.body.append(unavailable); }); const contrast=async(selector:string)=>page.locator(selector).evaluate(el=>{ const rgb=(value:string)=>value.match(/[\d.]+/g)!.slice(0,3).map(Number).map(v=>{v/=255;return v<=.04045?v/12.92:((v+.055)/1.055)**2.4}); From bda28344b651f15b92be7d4fb3d936b62fa49f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:14:36 +0200 Subject: [PATCH 530/575] Fix inverted danger and duration label contrast --- rebuild/src/styles.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index bb1c457..7b2c5e7 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -663,3 +663,8 @@ body{font-family:var(--sn-font-ui)!important;line-height:var(--sn-leading-body)} .share-heading h1{line-height:var(--sn-leading-heading)!important;text-wrap:balance} .section-heading h2,.privacy-document h2,.preview-header h2,.publish-modal h2{line-height:var(--sn-leading-heading)} .intro,.empty-state p,.bottom-note p,.share-comment p,.editor-hint,.privacy-document p{line-height:var(--sn-leading-relaxed)} + + +/* Contrast-safe inverted utility surfaces across light and dark themes. */ +.button.danger{color:var(--sn-accent-ink)!important} +.duration{color:var(--sn-paper)!important} From 32ae917c67b2b453b3e9fdd0b95b163d7c5fc7b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:14:48 +0200 Subject: [PATCH 531/575] Fix danger and duration contrast regression fixture --- rebuild/e2e/visual.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index fc6b821..8be4fdb 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -451,7 +451,7 @@ test("transient share and alert surfaces keep readable contrast in both themes", }); for(const theme of ["light","dark"]){ if(theme==="dark")await page.getByRole("button",{name:"Toggle appearance"}).click(); - for(const selector of [".share-link-toast",".share-link-toast span",".share-link-toast button",".share-error",".shared-review-status.changes-requested",".review-decision-options button[aria-pressed=true]",".editor-status",".offline-banner",".capture-unavailable"]){ + for(const selector of [".share-link-toast",".share-link-toast span",".share-link-toast button",".share-error",".shared-review-status.changes-requested",".review-decision-options button[aria-pressed=true]",".editor-status",".offline-banner",".capture-unavailable",".button.danger",".duration"]){ expect(await contrast(selector),selector+" contrast in "+theme).toBeGreaterThanOrEqual(4.5); } } From ebd35ec3480340e95c1b4f630a211f6e0cd5d228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:15:02 +0200 Subject: [PATCH 532/575] Cover inverted danger and duration text contrast --- rebuild/e2e/visual.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 8be4fdb..94eb2df 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -441,6 +441,8 @@ test("transient share and alert surfaces keep readable contrast in both themes", const editorStatus=document.createElement("div");editorStatus.className="editor-status";editorStatus.textContent="Saved";document.body.append(editorStatus); const offline=document.createElement("div");offline.className="offline-banner";offline.textContent="Offline";document.body.append(offline); const unavailable=document.createElement("div");unavailable.className="capture-unavailable";unavailable.textContent="Capture unavailable";document.body.append(unavailable); + const danger=document.createElement("button");danger.className="button danger";danger.textContent="Delete";document.body.append(danger); + const duration=document.createElement("span");duration.className="duration";duration.textContent="0:45";document.body.append(duration); }); const contrast=async(selector:string)=>page.locator(selector).evaluate(el=>{ const rgb=(value:string)=>value.match(/[\d.]+/g)!.slice(0,3).map(Number).map(v=>{v/=255;return v<=.04045?v/12.92:((v+.055)/1.055)**2.4}); @@ -451,7 +453,7 @@ test("transient share and alert surfaces keep readable contrast in both themes", }); for(const theme of ["light","dark"]){ if(theme==="dark")await page.getByRole("button",{name:"Toggle appearance"}).click(); - for(const selector of [".share-link-toast",".share-link-toast span",".share-link-toast button",".share-error",".shared-review-status.changes-requested",".review-decision-options button[aria-pressed=true]",".editor-status",".offline-banner",".capture-unavailable",".button.danger",".duration"]){ + for(const selector of [".share-link-toast",".share-link-toast span",".share-link-toast button",".share-error",".shared-review-status.changes-requested",".review-decision-options button[aria-pressed=true]",".editor-status",".offline-banner",".capture-unavailable",".button.danger",".duration",".button.danger",".duration"]){ expect(await contrast(selector),selector+" contrast in "+theme).toBeGreaterThanOrEqual(4.5); } } From 9779012cd356e743dd4d17301592f947cf3cb346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:15:27 +0200 Subject: [PATCH 533/575] Move theme-safe toast and error colors into their source rules --- rebuild/src/styles.css | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index 7b2c5e7..732b4b8 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -4,7 +4,7 @@ .app-shell{min-height:100vh;background:var(--paper)}.sidebar{display:none!important}.main-content{margin:0!important;width:100%;min-width:0}.topbar{height:76px;padding:0 clamp(18px,5vw,76px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--paper)}.breadcrumb{font:600 18px var(--sn-font-ui);letter-spacing:-.7px}.breadcrumb span{color:var(--rust);padding:0 8px}.top-actions{display:flex;align-items:center;gap:16px}.secure-label{font:500 11px ui-monospace,monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.secure-label svg{color:var(--sn-accent);vertical-align:-3px}.avatar{display:none!important}.icon-button{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:50%;width:42px;height:42px;display:inline-grid;place-items:center}.page-wrap{width:min(1180px,calc(100% - 48px));margin:0 auto;padding:56px 0 70px}.welcome-row{display:flex;align-items:flex-end;justify-content:space-between;gap:32px;padding:0 0 42px;border-bottom:1px solid var(--line)}.eyebrow{font:500 10px ui-monospace,monospace;letter-spacing:.14em;color:var(--rust);text-transform:uppercase}.welcome-row h1{font:600 clamp(42px,6vw,76px)/.98 var(--sn-font-ui);letter-spacing:-.075em;margin:17px 0 18px;max-width:760px}.welcome-row h1 span{color:var(--muted)}.intro{font-size:17px;color:var(--muted);max-width:500px;margin:0;line-height:1.55}.welcome-art{width:230px;min-width:230px;padding:0;transform:rotate(2deg)}.art-window{height:150px;background:var(--acid);border:1px solid var(--ink);border-radius:3px;box-shadow:8px 8px 0 var(--ink);overflow:hidden}.art-bar{height:20px;border-bottom:1px solid var(--ink);display:flex;gap:5px;align-items:center;padding:0 8px}.art-bar i{width:5px;height:5px;border:1px solid var(--ink);border-radius:50%}.art-screen{height:129px;display:flex;position:relative}.art-sidebar{width:27px;border-right:1px solid var(--ink)}.art-content{padding:17px 13px;flex:1;display:grid;gap:8px;align-content:start}.art-content div{height:7px;background:var(--ink);opacity:.75;width:90%}.art-content div:nth-child(2){width:63%}.art-content div:nth-child(3){width:77%}.art-content div:nth-child(4){width:43%}.art-cursor{position:absolute;right:45px;top:34px;width:0;height:0;border-left:10px solid var(--rust);border-top:16px solid transparent;filter:drop-shadow(1px 1px var(--ink))}.art-play{position:absolute;right:17px;bottom:15px;width:34px;height:34px;background:var(--ink);color:var(--acid);display:grid;place-items:center;border-radius:50%}.art-caption{display:none} .capture-panel{margin:34px 0 64px;background:#20211e;color:#f5f3e9;border-radius:3px;padding:26px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0}.capture-copy{display:flex;align-items:center;gap:16px}.capture-icon{width:48px;height:48px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink);border-radius:2px;flex:none}.capture-copy h2{font:600 20px var(--sn-font-ui);margin:0 0 4px;letter-spacing:-.5px}.capture-copy p{font-size:14px;color:#b9bbb0;margin:0}.capture-actions,.record-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.toggle-option{font-size:13px;color:#d2d2c9;display:flex;align-items:center;gap:7px;white-space:nowrap}.toggle-option input{accent-color:var(--acid);width:15px;height:15px}.button{border:1px solid transparent;border-radius:2px;min-height:44px;padding:0 17px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .16s ease,background .16s ease}.button:hover{transform:translateY(-2px)}.button.primary{background:var(--acid);color:var(--acid-ink)}.button.secondary{background:transparent;border-color:var(--line);color:var(--ink)}.capture-panel .button.secondary{border-color:#676a60;color:#fff}.button.danger{background:var(--rust);color:#fff}.recording-indicator{font:500 11px ui-monospace,monospace;color:var(--acid);letter-spacing:.08em}.recording-indicator span,.record-dot{display:inline-block;width:8px;height:8px;background:#e36b50;border-radius:50%;margin-right:7px} .notice{margin:16px 0;padding:14px 17px;background:var(--acid);color:var(--acid-ink);border-left:4px solid var(--rust);display:flex;align-items:center;justify-content:space-between;gap:14px}.recovery-copy,.recovery-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.library-section{min-width:0}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.section-heading h2{font:600 32px var(--sn-font-ui);letter-spacing:-1.4px;margin:8px 0 0}.count-badge{font:500 12px ui-monospace,monospace;color:var(--rust);vertical-align:middle}.library-tools{display:flex;align-items:center;gap:10px}.search-box{display:flex;align-items:center;gap:9px;border-bottom:1px solid var(--ink);padding:9px 2px;min-width:220px;color:var(--muted)}.search-box input{border:0;background:transparent;color:var(--ink);outline:none;width:100%;min-width:0}.search-box input:focus-visible{outline:none}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.clip-card{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:3px;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}.clip-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.clip-thumb{height:178px;background:#d9d8d0;position:relative;display:grid;place-items:center;overflow:hidden}.clip-thumb:before{content:'';position:absolute;inset:0;background:linear-gradient(135deg,#d8f36a 0 48%,#e8e5dc 48% 100%)}.thumb-lines{position:relative;width:52%;display:grid;gap:9px}.thumb-lines span{height:8px;background:#292b24;opacity:.75}.thumb-lines span:nth-child(2){width:70%}.thumb-lines span:nth-child(3){width:85%}.thumb-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:46px;height:46px;border:0;border-radius:50%;background:var(--ink);color:var(--acid);display:grid;place-items:center}.duration{position:absolute;bottom:10px;right:10px;background:var(--ink);color:#fff;padding:4px 7px;font:11px ui-monospace,monospace}.clip-info{padding:15px;display:flex;align-items:center;justify-content:space-between;gap:10px}.clip-info>div:first-child{min-width:0}.clip-info h3{font:600 16px var(--sn-font-ui);margin:0 0 5px;overflow-wrap:anywhere}.clip-info p{font:11px ui-monospace,monospace;color:var(--muted);margin:0;display:flex;align-items:center;gap:5px;flex-wrap:wrap}.clip-actions{display:flex;gap:4px;flex:none}.clip-actions .icon-button{width:34px;height:34px}.empty-state{padding:65px 22px;text-align:center;border:1px dashed var(--line);background:var(--panel)}.empty-icon{width:54px;height:54px;margin:0 auto 16px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink)}.empty-state h3{font:600 24px var(--sn-font-ui);margin:0 0 8px}.empty-state p{color:var(--muted);max-width:420px;margin:0 auto 20px;line-height:1.5}.empty-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.bottom-note{margin-top:54px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:15px}.note-icon{color:var(--rust)}.bottom-note strong{font:600 15px var(--sn-font-ui)}.bottom-note p{margin:4px 0 0;color:var(--muted);font-size:13px}.build-label{margin-left:auto;font:10px ui-monospace,monospace;color:var(--muted);letter-spacing:.08em}footer{padding:24px 0 0;color:var(--muted);font:11px ui-monospace,monospace;display:flex;gap:24px;flex-wrap:wrap}footer a{color:var(--rust)} - .modal-backdrop{position:fixed;inset:0;z-index:100;background:rgba(13,15,12,.72);display:grid;place-items:center;padding:16px;overflow:auto}.preview-modal,.publish-modal{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:3px;width:min(850px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;box-shadow:var(--shadow)}.publish-modal{width:min(480px,100%)}.preview-header,.publish-modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.preview-header h2,.publish-modal h2{font:600 25px var(--sn-font-ui);margin:0}.preview-header p,.publish-modal p{color:var(--muted);margin:5px 0 18px}.preview-video{display:block;width:100%;max-height:52vh;background:#090a08;margin:12px 0}.trim-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:18px 0}.trim-tools label,.field-label{display:grid;gap:6px;font-size:13px;color:var(--muted)}.trim-tools input,.field-label input,.field-label select{background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:2px;padding:10px;min-width:0}.preview-actions{display:flex;gap:9px;flex-wrap:wrap}.field-label{margin:16px 0}.field-label input,.field-label select{width:100%}.optional-label{font:10px ui-monospace,monospace}.privacy-explainer{display:flex;gap:10px;padding:14px;background:var(--paper);color:var(--muted);font-size:13px;line-height:1.5}.publish-submit{width:100%;margin-top:18px} .share-link-toast{position:fixed;z-index:110;bottom:18px;left:50%;transform:translateX(-50%);width:min(650px,calc(100% - 24px));padding:14px;background:var(--ink);color:#fff;display:flex;align-items:center;gap:12px;box-shadow:var(--shadow)}.share-link-toast>div{min-width:0;flex:1;display:grid;gap:3px}.share-link-toast span{font:11px ui-monospace,monospace;overflow-wrap:anywhere;color:#d0d2c8}.share-link-toast .button.secondary{color:#fff;border-color:#666} + .modal-backdrop{position:fixed;inset:0;z-index:100;background:rgba(13,15,12,.72);display:grid;place-items:center;padding:16px;overflow:auto}.preview-modal,.publish-modal{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:3px;width:min(850px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;box-shadow:var(--shadow)}.publish-modal{width:min(480px,100%)}.preview-header,.publish-modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.preview-header h2,.publish-modal h2{font:600 25px var(--sn-font-ui);margin:0}.preview-header p,.publish-modal p{color:var(--muted);margin:5px 0 18px}.preview-video{display:block;width:100%;max-height:52vh;background:#090a08;margin:12px 0}.trim-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:18px 0}.trim-tools label,.field-label{display:grid;gap:6px;font-size:13px;color:var(--muted)}.trim-tools input,.field-label input,.field-label select{background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:2px;padding:10px;min-width:0}.preview-actions{display:flex;gap:9px;flex-wrap:wrap}.field-label{margin:16px 0}.field-label input,.field-label select{width:100%}.optional-label{font:10px ui-monospace,monospace}.privacy-explainer{display:flex;gap:10px;padding:14px;background:var(--paper);color:var(--muted);font-size:13px;line-height:1.5}.publish-submit{width:100%;margin-top:18px} .share-link-toast{position:fixed;z-index:110;bottom:18px;left:50%;transform:translateX(-50%);width:min(650px,calc(100% - 24px));padding:14px;background:var(--sn-raised);color:var(--sn-ink);border:1px solid var(--sn-line);display:flex;align-items:center;gap:12px;box-shadow:var(--sn-shadow-md)}.share-link-toast>div{min-width:0;flex:1;display:grid;gap:3px}.share-link-toast span{font:11px ui-monospace,monospace;overflow-wrap:anywhere;color:var(--sn-muted)}.share-link-toast .button.secondary{background:transparent;color:var(--sn-ink);border-color:var(--sn-line-strong)} .capture-panel,.page-wrap,.topbar,.clip-card,.preview-modal,.publish-modal{min-width:0;max-width:100%}p,h1,h2,h3,span,label,a{overflow-wrap:anywhere}img,video,canvas,svg{max-width:100%}input,select,textarea{min-width:0;max-width:100%} @media(max-width:900px){.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.capture-panel{align-items:flex-start;flex-direction:column}.capture-actions,.record-controls{justify-content:flex-start}.welcome-art{width:180px;min-width:180px}.welcome-row h1{font-size:clamp(40px,7vw,62px)}} @media(max-width:600px){.bottom-note{flex-wrap:wrap}.build-label{margin:7px 0 0;flex-basis:100%}.topbar{height:62px;padding-inline:18px}.secure-label{font-size:0}.secure-label svg{width:18px;height:18px}.page-wrap{width:calc(100% - 32px);padding:35px 0 48px}.welcome-row{align-items:flex-start;padding-bottom:28px}.welcome-row h1{font-size:clamp(38px,11vw,54px);letter-spacing:-.07em}.intro{font-size:15px}.welcome-art{display:none}.capture-panel{margin:24px 0 42px;padding:19px}.capture-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.capture-actions .button{grid-column:1/-1}.section-heading{align-items:flex-start;flex-direction:column}.section-heading h2{font-size:27px}.library-tools{width:100%}.search-box{flex:1;min-width:0}.clip-grid{grid-template-columns:1fr}.clip-thumb{height:190px}.clip-info h3{font-size:15px}.build-label{margin:0 0 0 auto}.bottom-note{align-items:flex-start}.bottom-note p{max-width:100%}.share-link-toast{flex-wrap:wrap}.share-link-toast>div{flex-basis:100%}.preview-modal,.publish-modal{padding:17px}.preview-actions .button{flex:1 1 100%}} @@ -61,7 +61,7 @@ .resolved-tag{display:inline-flex;align-items:center;gap:4px;margin-left:8px;color:#788b39;font:10px ui-monospace,monospace} .share-footer{width:min(1440px,100%);margin:0 auto;padding:16px 0 25px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;color:var(--muted);font:10px ui-monospace,monospace} .share-footer span:first-child{display:inline-flex;align-items:center;gap:6px} -.share-error{padding:10px 12px;background:#f8e5df;color:#8f3424;border-left:3px solid var(--rust);font-size:13px} +.share-error{padding:10px 12px;background:var(--sn-alert-soft);color:var(--sn-alert);border-left:3px solid var(--sn-alert);font-size:13px} .share-loading,.share-ended,.password-gate{width:min(460px,100%);margin:12vh auto;padding:34px;background:var(--panel);border:1px solid var(--line);text-align:center} .share-ended svg,.share-lock{color:var(--rust)} .share-ended h1,.password-gate h1{font:600 28px var(--sn-font-ui);letter-spacing:-1px} @@ -644,13 +644,6 @@ footer a{color:var(--sn-accent)} button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--sn-accent)!important;outline-offset:3px} -/* Theme contrast regression fix: transient share and error surfaces must invert with the semantic theme. */ -.share-link-toast{background:var(--sn-raised)!important;color:var(--sn-ink)!important;border:1px solid var(--sn-line)!important} -.share-link-toast span{color:var(--sn-muted)!important} -.share-link-toast .button.secondary{background:transparent!important;color:var(--sn-ink)!important;border-color:var(--sn-line-strong)!important} -.share-error{background:var(--sn-alert-soft)!important;color:var(--sn-alert)!important;border-left-color:var(--sn-alert)!important} - - /* Review status chips use theme-aware semantic surfaces, never the legacy lime palette. */ .shared-review-status{background:color-mix(in srgb,var(--sn-accent) 12%,var(--sn-surface))!important;color:var(--sn-ink)!important;border:1px solid var(--sn-line)!important} .shared-review-status.changes-requested{background:var(--sn-alert-soft)!important;color:var(--sn-alert)!important;border-color:var(--sn-alert)!important} From 9a3f487b50996be85a8912ce19edce300f643794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:15:42 +0200 Subject: [PATCH 534/575] Use semantic contrast tokens in danger buttons and duration labels --- rebuild/src/styles.css | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index 732b4b8..dbda96d 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -2,8 +2,8 @@ :root[data-theme="dark"]{color-scheme:dark} *{box-sizing:border-box}html,body,#root{margin:0;width:100%;min-width:320px;min-height:100%;background:var(--paper);color:var(--ink)}body{font-family:var(--sn-font-ui)}button,input,select,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--rust);outline-offset:3px} .app-shell{min-height:100vh;background:var(--paper)}.sidebar{display:none!important}.main-content{margin:0!important;width:100%;min-width:0}.topbar{height:76px;padding:0 clamp(18px,5vw,76px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--paper)}.breadcrumb{font:600 18px var(--sn-font-ui);letter-spacing:-.7px}.breadcrumb span{color:var(--rust);padding:0 8px}.top-actions{display:flex;align-items:center;gap:16px}.secure-label{font:500 11px ui-monospace,monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.secure-label svg{color:var(--sn-accent);vertical-align:-3px}.avatar{display:none!important}.icon-button{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:50%;width:42px;height:42px;display:inline-grid;place-items:center}.page-wrap{width:min(1180px,calc(100% - 48px));margin:0 auto;padding:56px 0 70px}.welcome-row{display:flex;align-items:flex-end;justify-content:space-between;gap:32px;padding:0 0 42px;border-bottom:1px solid var(--line)}.eyebrow{font:500 10px ui-monospace,monospace;letter-spacing:.14em;color:var(--rust);text-transform:uppercase}.welcome-row h1{font:600 clamp(42px,6vw,76px)/.98 var(--sn-font-ui);letter-spacing:-.075em;margin:17px 0 18px;max-width:760px}.welcome-row h1 span{color:var(--muted)}.intro{font-size:17px;color:var(--muted);max-width:500px;margin:0;line-height:1.55}.welcome-art{width:230px;min-width:230px;padding:0;transform:rotate(2deg)}.art-window{height:150px;background:var(--acid);border:1px solid var(--ink);border-radius:3px;box-shadow:8px 8px 0 var(--ink);overflow:hidden}.art-bar{height:20px;border-bottom:1px solid var(--ink);display:flex;gap:5px;align-items:center;padding:0 8px}.art-bar i{width:5px;height:5px;border:1px solid var(--ink);border-radius:50%}.art-screen{height:129px;display:flex;position:relative}.art-sidebar{width:27px;border-right:1px solid var(--ink)}.art-content{padding:17px 13px;flex:1;display:grid;gap:8px;align-content:start}.art-content div{height:7px;background:var(--ink);opacity:.75;width:90%}.art-content div:nth-child(2){width:63%}.art-content div:nth-child(3){width:77%}.art-content div:nth-child(4){width:43%}.art-cursor{position:absolute;right:45px;top:34px;width:0;height:0;border-left:10px solid var(--rust);border-top:16px solid transparent;filter:drop-shadow(1px 1px var(--ink))}.art-play{position:absolute;right:17px;bottom:15px;width:34px;height:34px;background:var(--ink);color:var(--acid);display:grid;place-items:center;border-radius:50%}.art-caption{display:none} -.capture-panel{margin:34px 0 64px;background:#20211e;color:#f5f3e9;border-radius:3px;padding:26px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0}.capture-copy{display:flex;align-items:center;gap:16px}.capture-icon{width:48px;height:48px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink);border-radius:2px;flex:none}.capture-copy h2{font:600 20px var(--sn-font-ui);margin:0 0 4px;letter-spacing:-.5px}.capture-copy p{font-size:14px;color:#b9bbb0;margin:0}.capture-actions,.record-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.toggle-option{font-size:13px;color:#d2d2c9;display:flex;align-items:center;gap:7px;white-space:nowrap}.toggle-option input{accent-color:var(--acid);width:15px;height:15px}.button{border:1px solid transparent;border-radius:2px;min-height:44px;padding:0 17px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .16s ease,background .16s ease}.button:hover{transform:translateY(-2px)}.button.primary{background:var(--acid);color:var(--acid-ink)}.button.secondary{background:transparent;border-color:var(--line);color:var(--ink)}.capture-panel .button.secondary{border-color:#676a60;color:#fff}.button.danger{background:var(--rust);color:#fff}.recording-indicator{font:500 11px ui-monospace,monospace;color:var(--acid);letter-spacing:.08em}.recording-indicator span,.record-dot{display:inline-block;width:8px;height:8px;background:#e36b50;border-radius:50%;margin-right:7px} -.notice{margin:16px 0;padding:14px 17px;background:var(--acid);color:var(--acid-ink);border-left:4px solid var(--rust);display:flex;align-items:center;justify-content:space-between;gap:14px}.recovery-copy,.recovery-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.library-section{min-width:0}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.section-heading h2{font:600 32px var(--sn-font-ui);letter-spacing:-1.4px;margin:8px 0 0}.count-badge{font:500 12px ui-monospace,monospace;color:var(--rust);vertical-align:middle}.library-tools{display:flex;align-items:center;gap:10px}.search-box{display:flex;align-items:center;gap:9px;border-bottom:1px solid var(--ink);padding:9px 2px;min-width:220px;color:var(--muted)}.search-box input{border:0;background:transparent;color:var(--ink);outline:none;width:100%;min-width:0}.search-box input:focus-visible{outline:none}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.clip-card{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:3px;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}.clip-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.clip-thumb{height:178px;background:#d9d8d0;position:relative;display:grid;place-items:center;overflow:hidden}.clip-thumb:before{content:'';position:absolute;inset:0;background:linear-gradient(135deg,#d8f36a 0 48%,#e8e5dc 48% 100%)}.thumb-lines{position:relative;width:52%;display:grid;gap:9px}.thumb-lines span{height:8px;background:#292b24;opacity:.75}.thumb-lines span:nth-child(2){width:70%}.thumb-lines span:nth-child(3){width:85%}.thumb-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:46px;height:46px;border:0;border-radius:50%;background:var(--ink);color:var(--acid);display:grid;place-items:center}.duration{position:absolute;bottom:10px;right:10px;background:var(--ink);color:#fff;padding:4px 7px;font:11px ui-monospace,monospace}.clip-info{padding:15px;display:flex;align-items:center;justify-content:space-between;gap:10px}.clip-info>div:first-child{min-width:0}.clip-info h3{font:600 16px var(--sn-font-ui);margin:0 0 5px;overflow-wrap:anywhere}.clip-info p{font:11px ui-monospace,monospace;color:var(--muted);margin:0;display:flex;align-items:center;gap:5px;flex-wrap:wrap}.clip-actions{display:flex;gap:4px;flex:none}.clip-actions .icon-button{width:34px;height:34px}.empty-state{padding:65px 22px;text-align:center;border:1px dashed var(--line);background:var(--panel)}.empty-icon{width:54px;height:54px;margin:0 auto 16px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink)}.empty-state h3{font:600 24px var(--sn-font-ui);margin:0 0 8px}.empty-state p{color:var(--muted);max-width:420px;margin:0 auto 20px;line-height:1.5}.empty-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.bottom-note{margin-top:54px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:15px}.note-icon{color:var(--rust)}.bottom-note strong{font:600 15px var(--sn-font-ui)}.bottom-note p{margin:4px 0 0;color:var(--muted);font-size:13px}.build-label{margin-left:auto;font:10px ui-monospace,monospace;color:var(--muted);letter-spacing:.08em}footer{padding:24px 0 0;color:var(--muted);font:11px ui-monospace,monospace;display:flex;gap:24px;flex-wrap:wrap}footer a{color:var(--rust)} +.capture-panel{margin:34px 0 64px;background:#20211e;color:#f5f3e9;border-radius:3px;padding:26px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0}.capture-copy{display:flex;align-items:center;gap:16px}.capture-icon{width:48px;height:48px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink);border-radius:2px;flex:none}.capture-copy h2{font:600 20px var(--sn-font-ui);margin:0 0 4px;letter-spacing:-.5px}.capture-copy p{font-size:14px;color:#b9bbb0;margin:0}.capture-actions,.record-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.toggle-option{font-size:13px;color:#d2d2c9;display:flex;align-items:center;gap:7px;white-space:nowrap}.toggle-option input{accent-color:var(--acid);width:15px;height:15px}.button{border:1px solid transparent;border-radius:2px;min-height:44px;padding:0 17px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .16s ease,background .16s ease}.button:hover{transform:translateY(-2px)}.button.primary{background:var(--acid);color:var(--acid-ink)}.button.secondary{background:transparent;border-color:var(--line);color:var(--ink)}.capture-panel .button.secondary{border-color:#676a60;color:#fff}.button.danger{background:var(--sn-alert);color:var(--sn-accent-ink)}.recording-indicator{font:500 11px ui-monospace,monospace;color:var(--acid);letter-spacing:.08em}.recording-indicator span,.record-dot{display:inline-block;width:8px;height:8px;background:#e36b50;border-radius:50%;margin-right:7px} +.notice{margin:16px 0;padding:14px 17px;background:var(--acid);color:var(--acid-ink);border-left:4px solid var(--rust);display:flex;align-items:center;justify-content:space-between;gap:14px}.recovery-copy,.recovery-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.library-section{min-width:0}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.section-heading h2{font:600 32px var(--sn-font-ui);letter-spacing:-1.4px;margin:8px 0 0}.count-badge{font:500 12px ui-monospace,monospace;color:var(--rust);vertical-align:middle}.library-tools{display:flex;align-items:center;gap:10px}.search-box{display:flex;align-items:center;gap:9px;border-bottom:1px solid var(--ink);padding:9px 2px;min-width:220px;color:var(--muted)}.search-box input{border:0;background:transparent;color:var(--ink);outline:none;width:100%;min-width:0}.search-box input:focus-visible{outline:none}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.clip-card{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:3px;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}.clip-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.clip-thumb{height:178px;background:#d9d8d0;position:relative;display:grid;place-items:center;overflow:hidden}.clip-thumb:before{content:'';position:absolute;inset:0;background:linear-gradient(135deg,#d8f36a 0 48%,#e8e5dc 48% 100%)}.thumb-lines{position:relative;width:52%;display:grid;gap:9px}.thumb-lines span{height:8px;background:#292b24;opacity:.75}.thumb-lines span:nth-child(2){width:70%}.thumb-lines span:nth-child(3){width:85%}.thumb-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:46px;height:46px;border:0;border-radius:50%;background:var(--ink);color:var(--acid);display:grid;place-items:center}.duration{position:absolute;bottom:10px;right:10px;background:var(--sn-ink);color:var(--sn-paper);padding:4px 7px;font:11px ui-monospace,monospace}.clip-info{padding:15px;display:flex;align-items:center;justify-content:space-between;gap:10px}.clip-info>div:first-child{min-width:0}.clip-info h3{font:600 16px var(--sn-font-ui);margin:0 0 5px;overflow-wrap:anywhere}.clip-info p{font:11px ui-monospace,monospace;color:var(--muted);margin:0;display:flex;align-items:center;gap:5px;flex-wrap:wrap}.clip-actions{display:flex;gap:4px;flex:none}.clip-actions .icon-button{width:34px;height:34px}.empty-state{padding:65px 22px;text-align:center;border:1px dashed var(--line);background:var(--panel)}.empty-icon{width:54px;height:54px;margin:0 auto 16px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink)}.empty-state h3{font:600 24px var(--sn-font-ui);margin:0 0 8px}.empty-state p{color:var(--muted);max-width:420px;margin:0 auto 20px;line-height:1.5}.empty-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.bottom-note{margin-top:54px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:15px}.note-icon{color:var(--rust)}.bottom-note strong{font:600 15px var(--sn-font-ui)}.bottom-note p{margin:4px 0 0;color:var(--muted);font-size:13px}.build-label{margin-left:auto;font:10px ui-monospace,monospace;color:var(--muted);letter-spacing:.08em}footer{padding:24px 0 0;color:var(--muted);font:11px ui-monospace,monospace;display:flex;gap:24px;flex-wrap:wrap}footer a{color:var(--rust)} .modal-backdrop{position:fixed;inset:0;z-index:100;background:rgba(13,15,12,.72);display:grid;place-items:center;padding:16px;overflow:auto}.preview-modal,.publish-modal{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:3px;width:min(850px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;box-shadow:var(--shadow)}.publish-modal{width:min(480px,100%)}.preview-header,.publish-modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.preview-header h2,.publish-modal h2{font:600 25px var(--sn-font-ui);margin:0}.preview-header p,.publish-modal p{color:var(--muted);margin:5px 0 18px}.preview-video{display:block;width:100%;max-height:52vh;background:#090a08;margin:12px 0}.trim-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:18px 0}.trim-tools label,.field-label{display:grid;gap:6px;font-size:13px;color:var(--muted)}.trim-tools input,.field-label input,.field-label select{background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:2px;padding:10px;min-width:0}.preview-actions{display:flex;gap:9px;flex-wrap:wrap}.field-label{margin:16px 0}.field-label input,.field-label select{width:100%}.optional-label{font:10px ui-monospace,monospace}.privacy-explainer{display:flex;gap:10px;padding:14px;background:var(--paper);color:var(--muted);font-size:13px;line-height:1.5}.publish-submit{width:100%;margin-top:18px} .share-link-toast{position:fixed;z-index:110;bottom:18px;left:50%;transform:translateX(-50%);width:min(650px,calc(100% - 24px));padding:14px;background:var(--sn-raised);color:var(--sn-ink);border:1px solid var(--sn-line);display:flex;align-items:center;gap:12px;box-shadow:var(--sn-shadow-md)}.share-link-toast>div{min-width:0;flex:1;display:grid;gap:3px}.share-link-toast span{font:11px ui-monospace,monospace;overflow-wrap:anywhere;color:var(--sn-muted)}.share-link-toast .button.secondary{background:transparent;color:var(--sn-ink);border-color:var(--sn-line-strong)} .capture-panel,.page-wrap,.topbar,.clip-card,.preview-modal,.publish-modal{min-width:0;max-width:100%}p,h1,h2,h3,span,label,a{overflow-wrap:anywhere}img,video,canvas,svg{max-width:100%}input,select,textarea{min-width:0;max-width:100%} @media(max-width:900px){.clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.capture-panel{align-items:flex-start;flex-direction:column}.capture-actions,.record-controls{justify-content:flex-start}.welcome-art{width:180px;min-width:180px}.welcome-row h1{font-size:clamp(40px,7vw,62px)}} @@ -658,6 +658,3 @@ body{font-family:var(--sn-font-ui)!important;line-height:var(--sn-leading-body)} .intro,.empty-state p,.bottom-note p,.share-comment p,.editor-hint,.privacy-document p{line-height:var(--sn-leading-relaxed)} -/* Contrast-safe inverted utility surfaces across light and dark themes. */ -.button.danger{color:var(--sn-accent-ink)!important} -.duration{color:var(--sn-paper)!important} From 3f3ca9fc059201d5aae0407b47ac767d6929c20d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:16:22 +0200 Subject: [PATCH 535/575] Tokenize capture panel and remaining progress accents --- rebuild/src/styles.css | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index dbda96d..9c94ec3 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -2,7 +2,7 @@ :root[data-theme="dark"]{color-scheme:dark} *{box-sizing:border-box}html,body,#root{margin:0;width:100%;min-width:320px;min-height:100%;background:var(--paper);color:var(--ink)}body{font-family:var(--sn-font-ui)}button,input,select,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--rust);outline-offset:3px} .app-shell{min-height:100vh;background:var(--paper)}.sidebar{display:none!important}.main-content{margin:0!important;width:100%;min-width:0}.topbar{height:76px;padding:0 clamp(18px,5vw,76px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--paper)}.breadcrumb{font:600 18px var(--sn-font-ui);letter-spacing:-.7px}.breadcrumb span{color:var(--rust);padding:0 8px}.top-actions{display:flex;align-items:center;gap:16px}.secure-label{font:500 11px ui-monospace,monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.secure-label svg{color:var(--sn-accent);vertical-align:-3px}.avatar{display:none!important}.icon-button{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:50%;width:42px;height:42px;display:inline-grid;place-items:center}.page-wrap{width:min(1180px,calc(100% - 48px));margin:0 auto;padding:56px 0 70px}.welcome-row{display:flex;align-items:flex-end;justify-content:space-between;gap:32px;padding:0 0 42px;border-bottom:1px solid var(--line)}.eyebrow{font:500 10px ui-monospace,monospace;letter-spacing:.14em;color:var(--rust);text-transform:uppercase}.welcome-row h1{font:600 clamp(42px,6vw,76px)/.98 var(--sn-font-ui);letter-spacing:-.075em;margin:17px 0 18px;max-width:760px}.welcome-row h1 span{color:var(--muted)}.intro{font-size:17px;color:var(--muted);max-width:500px;margin:0;line-height:1.55}.welcome-art{width:230px;min-width:230px;padding:0;transform:rotate(2deg)}.art-window{height:150px;background:var(--acid);border:1px solid var(--ink);border-radius:3px;box-shadow:8px 8px 0 var(--ink);overflow:hidden}.art-bar{height:20px;border-bottom:1px solid var(--ink);display:flex;gap:5px;align-items:center;padding:0 8px}.art-bar i{width:5px;height:5px;border:1px solid var(--ink);border-radius:50%}.art-screen{height:129px;display:flex;position:relative}.art-sidebar{width:27px;border-right:1px solid var(--ink)}.art-content{padding:17px 13px;flex:1;display:grid;gap:8px;align-content:start}.art-content div{height:7px;background:var(--ink);opacity:.75;width:90%}.art-content div:nth-child(2){width:63%}.art-content div:nth-child(3){width:77%}.art-content div:nth-child(4){width:43%}.art-cursor{position:absolute;right:45px;top:34px;width:0;height:0;border-left:10px solid var(--rust);border-top:16px solid transparent;filter:drop-shadow(1px 1px var(--ink))}.art-play{position:absolute;right:17px;bottom:15px;width:34px;height:34px;background:var(--ink);color:var(--acid);display:grid;place-items:center;border-radius:50%}.art-caption{display:none} -.capture-panel{margin:34px 0 64px;background:#20211e;color:#f5f3e9;border-radius:3px;padding:26px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0}.capture-copy{display:flex;align-items:center;gap:16px}.capture-icon{width:48px;height:48px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink);border-radius:2px;flex:none}.capture-copy h2{font:600 20px var(--sn-font-ui);margin:0 0 4px;letter-spacing:-.5px}.capture-copy p{font-size:14px;color:#b9bbb0;margin:0}.capture-actions,.record-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.toggle-option{font-size:13px;color:#d2d2c9;display:flex;align-items:center;gap:7px;white-space:nowrap}.toggle-option input{accent-color:var(--acid);width:15px;height:15px}.button{border:1px solid transparent;border-radius:2px;min-height:44px;padding:0 17px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .16s ease,background .16s ease}.button:hover{transform:translateY(-2px)}.button.primary{background:var(--acid);color:var(--acid-ink)}.button.secondary{background:transparent;border-color:var(--line);color:var(--ink)}.capture-panel .button.secondary{border-color:#676a60;color:#fff}.button.danger{background:var(--sn-alert);color:var(--sn-accent-ink)}.recording-indicator{font:500 11px ui-monospace,monospace;color:var(--acid);letter-spacing:.08em}.recording-indicator span,.record-dot{display:inline-block;width:8px;height:8px;background:#e36b50;border-radius:50%;margin-right:7px} +.capture-panel{margin:34px 0 64px;background:#20211e;color:#f5f3e9;border-radius:3px;padding:26px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0}.capture-copy{display:flex;align-items:center;gap:16px}.capture-icon{width:48px;height:48px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink);border-radius:2px;flex:none}.capture-copy h2{font:600 20px var(--sn-font-ui);margin:0 0 4px;letter-spacing:-.5px}.capture-copy p{font-size:14px;color:#b9bbb0;margin:0}.capture-actions,.record-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.toggle-option{font-size:13px;color:#d2d2c9;display:flex;align-items:center;gap:7px;white-space:nowrap}.toggle-option input{accent-color:var(--acid);width:15px;height:15px}.button{border:1px solid transparent;border-radius:2px;min-height:44px;padding:0 17px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .16s ease,background .16s ease}.button:hover{transform:translateY(-2px)}.button.primary{background:var(--acid);color:var(--acid-ink)}.button.secondary{background:transparent;border-color:var(--line);color:var(--ink)}.capture-panel .button.secondary{border-color:var(--sn-capture-outline);color:var(--sn-capture-ink)}.button.danger{background:var(--sn-alert);color:var(--sn-accent-ink)}.recording-indicator{font:500 11px ui-monospace,monospace;color:var(--acid);letter-spacing:.08em}.recording-indicator span,.record-dot{display:inline-block;width:8px;height:8px;background:var(--sn-alert);border-radius:50%;margin-right:7px} .notice{margin:16px 0;padding:14px 17px;background:var(--acid);color:var(--acid-ink);border-left:4px solid var(--rust);display:flex;align-items:center;justify-content:space-between;gap:14px}.recovery-copy,.recovery-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.library-section{min-width:0}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.section-heading h2{font:600 32px var(--sn-font-ui);letter-spacing:-1.4px;margin:8px 0 0}.count-badge{font:500 12px ui-monospace,monospace;color:var(--rust);vertical-align:middle}.library-tools{display:flex;align-items:center;gap:10px}.search-box{display:flex;align-items:center;gap:9px;border-bottom:1px solid var(--ink);padding:9px 2px;min-width:220px;color:var(--muted)}.search-box input{border:0;background:transparent;color:var(--ink);outline:none;width:100%;min-width:0}.search-box input:focus-visible{outline:none}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.clip-card{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:3px;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}.clip-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.clip-thumb{height:178px;background:#d9d8d0;position:relative;display:grid;place-items:center;overflow:hidden}.clip-thumb:before{content:'';position:absolute;inset:0;background:linear-gradient(135deg,#d8f36a 0 48%,#e8e5dc 48% 100%)}.thumb-lines{position:relative;width:52%;display:grid;gap:9px}.thumb-lines span{height:8px;background:#292b24;opacity:.75}.thumb-lines span:nth-child(2){width:70%}.thumb-lines span:nth-child(3){width:85%}.thumb-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:46px;height:46px;border:0;border-radius:50%;background:var(--ink);color:var(--acid);display:grid;place-items:center}.duration{position:absolute;bottom:10px;right:10px;background:var(--sn-ink);color:var(--sn-paper);padding:4px 7px;font:11px ui-monospace,monospace}.clip-info{padding:15px;display:flex;align-items:center;justify-content:space-between;gap:10px}.clip-info>div:first-child{min-width:0}.clip-info h3{font:600 16px var(--sn-font-ui);margin:0 0 5px;overflow-wrap:anywhere}.clip-info p{font:11px ui-monospace,monospace;color:var(--muted);margin:0;display:flex;align-items:center;gap:5px;flex-wrap:wrap}.clip-actions{display:flex;gap:4px;flex:none}.clip-actions .icon-button{width:34px;height:34px}.empty-state{padding:65px 22px;text-align:center;border:1px dashed var(--line);background:var(--panel)}.empty-icon{width:54px;height:54px;margin:0 auto 16px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink)}.empty-state h3{font:600 24px var(--sn-font-ui);margin:0 0 8px}.empty-state p{color:var(--muted);max-width:420px;margin:0 auto 20px;line-height:1.5}.empty-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.bottom-note{margin-top:54px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:15px}.note-icon{color:var(--rust)}.bottom-note strong{font:600 15px var(--sn-font-ui)}.bottom-note p{margin:4px 0 0;color:var(--muted);font-size:13px}.build-label{margin-left:auto;font:10px ui-monospace,monospace;color:var(--muted);letter-spacing:.08em}footer{padding:24px 0 0;color:var(--muted);font:11px ui-monospace,monospace;display:flex;gap:24px;flex-wrap:wrap}footer a{color:var(--rust)} .modal-backdrop{position:fixed;inset:0;z-index:100;background:rgba(13,15,12,.72);display:grid;place-items:center;padding:16px;overflow:auto}.preview-modal,.publish-modal{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:3px;width:min(850px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;box-shadow:var(--shadow)}.publish-modal{width:min(480px,100%)}.preview-header,.publish-modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.preview-header h2,.publish-modal h2{font:600 25px var(--sn-font-ui);margin:0}.preview-header p,.publish-modal p{color:var(--muted);margin:5px 0 18px}.preview-video{display:block;width:100%;max-height:52vh;background:#090a08;margin:12px 0}.trim-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:18px 0}.trim-tools label,.field-label{display:grid;gap:6px;font-size:13px;color:var(--muted)}.trim-tools input,.field-label input,.field-label select{background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:2px;padding:10px;min-width:0}.preview-actions{display:flex;gap:9px;flex-wrap:wrap}.field-label{margin:16px 0}.field-label input,.field-label select{width:100%}.optional-label{font:10px ui-monospace,monospace}.privacy-explainer{display:flex;gap:10px;padding:14px;background:var(--paper);color:var(--muted);font-size:13px;line-height:1.5}.publish-submit{width:100%;margin-top:18px} .share-link-toast{position:fixed;z-index:110;bottom:18px;left:50%;transform:translateX(-50%);width:min(650px,calc(100% - 24px));padding:14px;background:var(--sn-raised);color:var(--sn-ink);border:1px solid var(--sn-line);display:flex;align-items:center;gap:12px;box-shadow:var(--sn-shadow-md)}.share-link-toast>div{min-width:0;flex:1;display:grid;gap:3px}.share-link-toast span{font:11px ui-monospace,monospace;overflow-wrap:anywhere;color:var(--sn-muted)}.share-link-toast .button.secondary{background:transparent;color:var(--sn-ink);border-color:var(--sn-line-strong)} .capture-panel,.page-wrap,.topbar,.clip-card,.preview-modal,.publish-modal{min-width:0;max-width:100%}p,h1,h2,h3,span,label,a{overflow-wrap:anywhere}img,video,canvas,svg{max-width:100%}input,select,textarea{min-width:0;max-width:100%} @@ -101,7 +101,7 @@ .editor-video-wrap video{display:block;width:100%;height:100%;object-fit:contain} .annotation-overlay{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair} .editor-timeline{display:flex;align-items:center;gap:12px;padding:12px 0;font:11px ui-monospace,monospace;color:var(--muted,#73776f)} -.editor-timeline input{flex:1;min-width:0;accent-color:#a8c52f} +.editor-timeline input{flex:1;min-width:0;accent-color:var(--sn-accent)} .editor-toolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:12px;border:1px solid var(--line,#d9d8cf);border-radius:10px;background:var(--surface,#fffefa)} .editor-toolbar button{padding:8px 10px;font-size:11px} .editor-toolbar button:disabled{opacity:.35;cursor:not-allowed} @@ -133,7 +133,7 @@ .editor-inline-actions{display:flex;gap:8px;flex-wrap:wrap} .editor-inline-actions button:last-child{background:var(--sn-accent);color:var(--sn-accent-ink);border-color:var(--sn-accent)} .editor-status{position:sticky;bottom:0;padding:12px 18px;background:var(--sn-ink);color:var(--sn-paper);font-size:12px;line-height:1.4} -.editor-workspace progress{width:100%;accent-color:#b8d23e} +.editor-workspace progress{width:100%;accent-color:var(--sn-accent)} [data-theme="dark"] .editor-workspace{background:var(--sn-paper);color:var(--sn-ink)} [data-theme="dark"] .editor-topline,[data-theme="dark"] .editor-tabs{background:var(--sn-paper);border-color:var(--sn-line)} [data-theme="dark"] .editor-card,[data-theme="dark"] .editor-toolbar{background:var(--sn-surface);border-color:var(--sn-line)} @@ -341,7 +341,7 @@ --sn-alert:#963f2d; --sn-alert-soft:#f3e5df; --sn-warning:#634b2b; - --sn-warning-soft:#f4e4cb; + --sn-warning-soft:#f4e4cb;\n --sn-capture-surface:#24372b;\n --sn-capture-ink:#f4f3ec;\n --sn-capture-muted:#c8d1c6;\n --sn-capture-action:#dce5d4;\n --sn-capture-action-ink:#24372b;\n --sn-capture-action-hover:#e8eee1;\n --sn-capture-outline:#676a60; --sn-shadow-sm:0 1px 2px rgba(27,39,30,.05); --sn-shadow-md:0 12px 32px rgba(27,39,30,.08); --sn-shadow-lg:0 24px 64px rgba(27,39,30,.12); @@ -408,7 +408,7 @@ --sn-alert:#e1a08a; --sn-alert-soft:#3c2b27; --sn-warning:#f0d9b5; - --sn-warning-soft:#3a3021; + --sn-warning-soft:#3a3021;\n --sn-capture-surface:#293b2e;\n --sn-capture-ink:#f4f3ec;\n --sn-capture-muted:#c8d1c6;\n --sn-capture-action:#dce5d4;\n --sn-capture-action-ink:#24372b;\n --sn-capture-action-hover:#e8eee1;\n --sn-capture-outline:#676a60; --sn-shadow-sm:0 1px 2px rgba(0,0,0,.18); --sn-shadow-md:0 12px 32px rgba(0,0,0,.24); --sn-shadow-lg:0 24px 64px rgba(0,0,0,.34); @@ -457,8 +457,8 @@ button{font-weight:600} .button:hover{transform:translateY(-1px)} .button.primary{background:var(--sn-accent);color:var(--sn-accent-ink);box-shadow:var(--sn-shadow-sm)} .button.primary:hover{background:var(--sn-accent-hover)} -.capture-panel .button.primary{background:#dce5d4;color:#24372b} -.capture-panel .button.primary:hover{background:#e8eee1} +.capture-panel .button.primary{background:var(--sn-capture-action);color:var(--sn-capture-action-ink)} +.capture-panel .button.primary:hover{background:var(--sn-capture-action-hover)} .button.secondary{background:var(--sn-surface);border-color:var(--sn-line);color:var(--sn-ink)} .button.secondary:hover{border-color:var(--sn-line-strong);background:var(--sn-raised)} .icon-button{border-radius:var(--sn-radius-sm);background:var(--sn-surface);border-color:var(--sn-line);color:var(--sn-ink);transition:background .15s ease,border-color .15s ease} @@ -621,8 +621,8 @@ footer a{color:var(--sn-accent)} /* 320px polish: keep the utility bar single-line and make empty states feel finished. */ .empty-state{border-style:solid!important;box-shadow:var(--sn-shadow-sm)} -.capture-panel .capture-advanced summary{color:#c8d1c6} -.capture-panel .capture-advanced summary:hover{color:#fff} +.capture-panel .capture-advanced summary{color:var(--sn-capture-muted)} +.capture-panel .capture-advanced summary:hover{color:var(--sn-capture-ink)} @media(max-width:680px){.capture-actions{gap:8px}.empty-state{padding:28px 16px}} @media(max-width:380px){ .topbar{padding-inline:12px;gap:8px} From fe2ad0061138d971e92fc2aac58ad188ca71b8a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:16:38 +0200 Subject: [PATCH 536/575] Fix capture design token declaration formatting --- rebuild/src/styles.css | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index 9c94ec3..e5e7a12 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -341,7 +341,14 @@ --sn-alert:#963f2d; --sn-alert-soft:#f3e5df; --sn-warning:#634b2b; - --sn-warning-soft:#f4e4cb;\n --sn-capture-surface:#24372b;\n --sn-capture-ink:#f4f3ec;\n --sn-capture-muted:#c8d1c6;\n --sn-capture-action:#dce5d4;\n --sn-capture-action-ink:#24372b;\n --sn-capture-action-hover:#e8eee1;\n --sn-capture-outline:#676a60; + --sn-warning-soft:#f4e4cb; + --sn-capture-surface:#24372b; + --sn-capture-ink:#f4f3ec; + --sn-capture-muted:#c8d1c6; + --sn-capture-action:#dce5d4; + --sn-capture-action-ink:#24372b; + --sn-capture-action-hover:#e8eee1; + --sn-capture-outline:#676a60; --sn-shadow-sm:0 1px 2px rgba(27,39,30,.05); --sn-shadow-md:0 12px 32px rgba(27,39,30,.08); --sn-shadow-lg:0 24px 64px rgba(27,39,30,.12); @@ -408,7 +415,14 @@ --sn-alert:#e1a08a; --sn-alert-soft:#3c2b27; --sn-warning:#f0d9b5; - --sn-warning-soft:#3a3021;\n --sn-capture-surface:#293b2e;\n --sn-capture-ink:#f4f3ec;\n --sn-capture-muted:#c8d1c6;\n --sn-capture-action:#dce5d4;\n --sn-capture-action-ink:#24372b;\n --sn-capture-action-hover:#e8eee1;\n --sn-capture-outline:#676a60; + --sn-warning-soft:#3a3021; + --sn-capture-surface:#293b2e; + --sn-capture-ink:#f4f3ec; + --sn-capture-muted:#c8d1c6; + --sn-capture-action:#dce5d4; + --sn-capture-action-ink:#24372b; + --sn-capture-action-hover:#e8eee1; + --sn-capture-outline:#676a60; --sn-shadow-sm:0 1px 2px rgba(0,0,0,.18); --sn-shadow-md:0 12px 32px rgba(0,0,0,.24); --sn-shadow-lg:0 24px 64px rgba(0,0,0,.34); From 83b9c0cdb17b613dd79eeea3d9eee0d4c6087951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:17:13 +0200 Subject: [PATCH 537/575] Finish semantic capture surface and muted text migration --- rebuild/src/styles.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rebuild/src/styles.css b/rebuild/src/styles.css index e5e7a12..a2fef7a 100644 --- a/rebuild/src/styles.css +++ b/rebuild/src/styles.css @@ -2,7 +2,7 @@ :root[data-theme="dark"]{color-scheme:dark} *{box-sizing:border-box}html,body,#root{margin:0;width:100%;min-width:320px;min-height:100%;background:var(--paper);color:var(--ink)}body{font-family:var(--sn-font-ui)}button,input,select,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--rust);outline-offset:3px} .app-shell{min-height:100vh;background:var(--paper)}.sidebar{display:none!important}.main-content{margin:0!important;width:100%;min-width:0}.topbar{height:76px;padding:0 clamp(18px,5vw,76px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--paper)}.breadcrumb{font:600 18px var(--sn-font-ui);letter-spacing:-.7px}.breadcrumb span{color:var(--rust);padding:0 8px}.top-actions{display:flex;align-items:center;gap:16px}.secure-label{font:500 11px ui-monospace,monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.secure-label svg{color:var(--sn-accent);vertical-align:-3px}.avatar{display:none!important}.icon-button{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:50%;width:42px;height:42px;display:inline-grid;place-items:center}.page-wrap{width:min(1180px,calc(100% - 48px));margin:0 auto;padding:56px 0 70px}.welcome-row{display:flex;align-items:flex-end;justify-content:space-between;gap:32px;padding:0 0 42px;border-bottom:1px solid var(--line)}.eyebrow{font:500 10px ui-monospace,monospace;letter-spacing:.14em;color:var(--rust);text-transform:uppercase}.welcome-row h1{font:600 clamp(42px,6vw,76px)/.98 var(--sn-font-ui);letter-spacing:-.075em;margin:17px 0 18px;max-width:760px}.welcome-row h1 span{color:var(--muted)}.intro{font-size:17px;color:var(--muted);max-width:500px;margin:0;line-height:1.55}.welcome-art{width:230px;min-width:230px;padding:0;transform:rotate(2deg)}.art-window{height:150px;background:var(--acid);border:1px solid var(--ink);border-radius:3px;box-shadow:8px 8px 0 var(--ink);overflow:hidden}.art-bar{height:20px;border-bottom:1px solid var(--ink);display:flex;gap:5px;align-items:center;padding:0 8px}.art-bar i{width:5px;height:5px;border:1px solid var(--ink);border-radius:50%}.art-screen{height:129px;display:flex;position:relative}.art-sidebar{width:27px;border-right:1px solid var(--ink)}.art-content{padding:17px 13px;flex:1;display:grid;gap:8px;align-content:start}.art-content div{height:7px;background:var(--ink);opacity:.75;width:90%}.art-content div:nth-child(2){width:63%}.art-content div:nth-child(3){width:77%}.art-content div:nth-child(4){width:43%}.art-cursor{position:absolute;right:45px;top:34px;width:0;height:0;border-left:10px solid var(--rust);border-top:16px solid transparent;filter:drop-shadow(1px 1px var(--ink))}.art-play{position:absolute;right:17px;bottom:15px;width:34px;height:34px;background:var(--ink);color:var(--acid);display:grid;place-items:center;border-radius:50%}.art-caption{display:none} -.capture-panel{margin:34px 0 64px;background:#20211e;color:#f5f3e9;border-radius:3px;padding:26px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0}.capture-copy{display:flex;align-items:center;gap:16px}.capture-icon{width:48px;height:48px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink);border-radius:2px;flex:none}.capture-copy h2{font:600 20px var(--sn-font-ui);margin:0 0 4px;letter-spacing:-.5px}.capture-copy p{font-size:14px;color:#b9bbb0;margin:0}.capture-actions,.record-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.toggle-option{font-size:13px;color:#d2d2c9;display:flex;align-items:center;gap:7px;white-space:nowrap}.toggle-option input{accent-color:var(--acid);width:15px;height:15px}.button{border:1px solid transparent;border-radius:2px;min-height:44px;padding:0 17px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .16s ease,background .16s ease}.button:hover{transform:translateY(-2px)}.button.primary{background:var(--acid);color:var(--acid-ink)}.button.secondary{background:transparent;border-color:var(--line);color:var(--ink)}.capture-panel .button.secondary{border-color:var(--sn-capture-outline);color:var(--sn-capture-ink)}.button.danger{background:var(--sn-alert);color:var(--sn-accent-ink)}.recording-indicator{font:500 11px ui-monospace,monospace;color:var(--acid);letter-spacing:.08em}.recording-indicator span,.record-dot{display:inline-block;width:8px;height:8px;background:var(--sn-alert);border-radius:50%;margin-right:7px} +.capture-panel{margin:34px 0 64px;background:var(--sn-capture-surface);color:var(--sn-capture-ink);border-radius:3px;padding:26px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0}.capture-copy{display:flex;align-items:center;gap:16px}.capture-icon{width:48px;height:48px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink);border-radius:2px;flex:none}.capture-copy h2{font:600 20px var(--sn-font-ui);margin:0 0 4px;letter-spacing:-.5px}.capture-copy p{font-size:14px;color:var(--sn-capture-muted);margin:0}.capture-actions,.record-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.toggle-option{font-size:13px;color:var(--sn-capture-muted);display:flex;align-items:center;gap:7px;white-space:nowrap}.toggle-option input{accent-color:var(--acid);width:15px;height:15px}.button{border:1px solid transparent;border-radius:2px;min-height:44px;padding:0 17px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .16s ease,background .16s ease}.button:hover{transform:translateY(-2px)}.button.primary{background:var(--acid);color:var(--acid-ink)}.button.secondary{background:transparent;border-color:var(--line);color:var(--ink)}.capture-panel .button.secondary{border-color:var(--sn-capture-outline);color:var(--sn-capture-ink)}.button.danger{background:var(--sn-alert);color:var(--sn-accent-ink)}.recording-indicator{font:500 11px ui-monospace,monospace;color:var(--acid);letter-spacing:.08em}.recording-indicator span,.record-dot{display:inline-block;width:8px;height:8px;background:var(--sn-alert);border-radius:50%;margin-right:7px} .notice{margin:16px 0;padding:14px 17px;background:var(--acid);color:var(--acid-ink);border-left:4px solid var(--rust);display:flex;align-items:center;justify-content:space-between;gap:14px}.recovery-copy,.recovery-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.library-section{min-width:0}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.section-heading h2{font:600 32px var(--sn-font-ui);letter-spacing:-1.4px;margin:8px 0 0}.count-badge{font:500 12px ui-monospace,monospace;color:var(--rust);vertical-align:middle}.library-tools{display:flex;align-items:center;gap:10px}.search-box{display:flex;align-items:center;gap:9px;border-bottom:1px solid var(--ink);padding:9px 2px;min-width:220px;color:var(--muted)}.search-box input{border:0;background:transparent;color:var(--ink);outline:none;width:100%;min-width:0}.search-box input:focus-visible{outline:none}.clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.clip-card{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:3px;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}.clip-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.clip-thumb{height:178px;background:#d9d8d0;position:relative;display:grid;place-items:center;overflow:hidden}.clip-thumb:before{content:'';position:absolute;inset:0;background:linear-gradient(135deg,#d8f36a 0 48%,#e8e5dc 48% 100%)}.thumb-lines{position:relative;width:52%;display:grid;gap:9px}.thumb-lines span{height:8px;background:#292b24;opacity:.75}.thumb-lines span:nth-child(2){width:70%}.thumb-lines span:nth-child(3){width:85%}.thumb-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:46px;height:46px;border:0;border-radius:50%;background:var(--ink);color:var(--acid);display:grid;place-items:center}.duration{position:absolute;bottom:10px;right:10px;background:var(--sn-ink);color:var(--sn-paper);padding:4px 7px;font:11px ui-monospace,monospace}.clip-info{padding:15px;display:flex;align-items:center;justify-content:space-between;gap:10px}.clip-info>div:first-child{min-width:0}.clip-info h3{font:600 16px var(--sn-font-ui);margin:0 0 5px;overflow-wrap:anywhere}.clip-info p{font:11px ui-monospace,monospace;color:var(--muted);margin:0;display:flex;align-items:center;gap:5px;flex-wrap:wrap}.clip-actions{display:flex;gap:4px;flex:none}.clip-actions .icon-button{width:34px;height:34px}.empty-state{padding:65px 22px;text-align:center;border:1px dashed var(--line);background:var(--panel)}.empty-icon{width:54px;height:54px;margin:0 auto 16px;display:grid;place-items:center;background:var(--acid);color:var(--acid-ink)}.empty-state h3{font:600 24px var(--sn-font-ui);margin:0 0 8px}.empty-state p{color:var(--muted);max-width:420px;margin:0 auto 20px;line-height:1.5}.empty-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.bottom-note{margin-top:54px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:15px}.note-icon{color:var(--rust)}.bottom-note strong{font:600 15px var(--sn-font-ui)}.bottom-note p{margin:4px 0 0;color:var(--muted);font-size:13px}.build-label{margin-left:auto;font:10px ui-monospace,monospace;color:var(--muted);letter-spacing:.08em}footer{padding:24px 0 0;color:var(--muted);font:11px ui-monospace,monospace;display:flex;gap:24px;flex-wrap:wrap}footer a{color:var(--rust)} .modal-backdrop{position:fixed;inset:0;z-index:100;background:rgba(13,15,12,.72);display:grid;place-items:center;padding:16px;overflow:auto}.preview-modal,.publish-modal{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:3px;width:min(850px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;box-shadow:var(--shadow)}.publish-modal{width:min(480px,100%)}.preview-header,.publish-modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.preview-header h2,.publish-modal h2{font:600 25px var(--sn-font-ui);margin:0}.preview-header p,.publish-modal p{color:var(--muted);margin:5px 0 18px}.preview-video{display:block;width:100%;max-height:52vh;background:#090a08;margin:12px 0}.trim-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:18px 0}.trim-tools label,.field-label{display:grid;gap:6px;font-size:13px;color:var(--muted)}.trim-tools input,.field-label input,.field-label select{background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:2px;padding:10px;min-width:0}.preview-actions{display:flex;gap:9px;flex-wrap:wrap}.field-label{margin:16px 0}.field-label input,.field-label select{width:100%}.optional-label{font:10px ui-monospace,monospace}.privacy-explainer{display:flex;gap:10px;padding:14px;background:var(--paper);color:var(--muted);font-size:13px;line-height:1.5}.publish-submit{width:100%;margin-top:18px} .share-link-toast{position:fixed;z-index:110;bottom:18px;left:50%;transform:translateX(-50%);width:min(650px,calc(100% - 24px));padding:14px;background:var(--sn-raised);color:var(--sn-ink);border:1px solid var(--sn-line);display:flex;align-items:center;gap:12px;box-shadow:var(--sn-shadow-md)}.share-link-toast>div{min-width:0;flex:1;display:grid;gap:3px}.share-link-toast span{font:11px ui-monospace,monospace;overflow-wrap:anywhere;color:var(--sn-muted)}.share-link-toast .button.secondary{background:transparent;color:var(--sn-ink);border-color:var(--sn-line-strong)} .capture-panel,.page-wrap,.topbar,.clip-card,.preview-modal,.publish-modal{min-width:0;max-width:100%}p,h1,h2,h3,span,label,a{overflow-wrap:anywhere}img,video,canvas,svg{max-width:100%}input,select,textarea{min-width:0;max-width:100%} @@ -461,12 +461,12 @@ button{font-weight:600} .intro{font-size:clamp(15px,1.35vw,17px);line-height:var(--sn-leading-relaxed);max-width:490px;color:var(--sn-muted)} .welcome-art{width:210px;min-width:190px;opacity:.94} .art-window{background:var(--sn-highlight);border-color:var(--sn-ink);box-shadow:6px 6px 0 var(--sn-ink)} -.capture-panel{margin:32px 0 56px;padding:clamp(20px,3vw,30px);gap:20px;background:#24372b;color:#f4f3ec;border-radius:var(--sn-radius-md);box-shadow:var(--sn-shadow-md)} -:root[data-theme="dark"] .capture-panel{background:#293b2e;border:1px solid #3d5141} +.capture-panel{margin:32px 0 56px;padding:clamp(20px,3vw,30px);gap:20px;background:var(--sn-capture-surface);color:var(--sn-capture-ink);border-radius:var(--sn-radius-md);box-shadow:var(--sn-shadow-md)} +:root[data-theme="dark"] .capture-panel{background:var(--sn-capture-surface);border:1px solid var(--sn-line-strong)} .capture-copy{gap:14px} .capture-icon{width:44px;height:44px;background:#dce5d4;color:#24372b;border-radius:var(--sn-radius-sm)} .capture-copy h2{font:650 19px/1.25 var(--sn-font-ui);letter-spacing:-.035em} -.capture-copy p{font-size:13px;line-height:1.5;color:#c8d1c6} +.capture-copy p{font-size:13px;line-height:1.5;color:var(--sn-capture-muted)} .button{min-height:44px;padding-inline:17px;border-radius:var(--sn-radius-sm);font-size:13px;font-weight:650;letter-spacing:-.01em;transition:background .16s ease,border-color .16s ease,transform .16s ease,box-shadow .16s ease} .button:hover{transform:translateY(-1px)} .button.primary{background:var(--sn-accent);color:var(--sn-accent-ink);box-shadow:var(--sn-shadow-sm)} From 0a3a3cf86a9ad5e77840fcfadd56225e6bec1bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:17:26 +0200 Subject: [PATCH 538/575] Measure capture-panel contrast against its actual inherited surface --- rebuild/e2e/visual.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 94eb2df..598a638 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -448,12 +448,12 @@ test("transient share and alert surfaces keep readable contrast in both themes", const rgb=(value:string)=>value.match(/[\d.]+/g)!.slice(0,3).map(Number).map(v=>{v/=255;return v<=.04045?v/12.92:((v+.055)/1.055)**2.4}); const lum=(v:number[])=>.2126*v[0]+.7152*v[1]+.0722*v[2]; const style=getComputedStyle(el),fg=lum(rgb(style.color));let bgColor=style.backgroundColor; - if(bgColor==="transparent"||bgColor==="rgba(0, 0, 0, 0)")bgColor=getComputedStyle(el.closest(".share-link-toast")||document.body).backgroundColor; + if(bgColor==="transparent"||bgColor==="rgba(0, 0, 0, 0)"){let parent=el.parentElement;while(parent){const candidate=getComputedStyle(parent).backgroundColor;if(candidate!=="transparent"&&candidate!=="rgba(0, 0, 0, 0)"){bgColor=candidate;break;}parent=parent.parentElement;}} const bg=lum(rgb(bgColor));return (Math.max(fg,bg)+.05)/(Math.min(fg,bg)+.05); }); for(const theme of ["light","dark"]){ if(theme==="dark")await page.getByRole("button",{name:"Toggle appearance"}).click(); - for(const selector of [".share-link-toast",".share-link-toast span",".share-link-toast button",".share-error",".shared-review-status.changes-requested",".review-decision-options button[aria-pressed=true]",".editor-status",".offline-banner",".capture-unavailable",".button.danger",".duration",".button.danger",".duration"]){ + for(const selector of [".share-link-toast",".share-link-toast span",".share-link-toast button",".share-error",".shared-review-status.changes-requested",".review-decision-options button[aria-pressed=true]",".editor-status",".offline-banner",".capture-unavailable",".button.danger",".duration",".capture-panel",".capture-panel .button.primary",".capture-panel .capture-advanced summary",".toggle-option",".button.danger",".duration"]){ expect(await contrast(selector),selector+" contrast in "+theme).toBeGreaterThanOrEqual(4.5); } } From 5dd7af898c0d118763cdebf970f6f290536f5a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:18:08 +0200 Subject: [PATCH 539/575] Add full visible-text contrast audits across workspace editor preview and guest share --- rebuild/e2e/visual.spec.ts | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/rebuild/e2e/visual.spec.ts b/rebuild/e2e/visual.spec.ts index 598a638..22e4158 100644 --- a/rebuild/e2e/visual.spec.ts +++ b/rebuild/e2e/visual.spec.ts @@ -47,11 +47,39 @@ async function assertNamedControls(page:import("@playwright/test").Page){ expect(missing, "visible controls must expose an accessible name").toEqual([]); } +async function assertTextContrast(page:import("@playwright/test").Page,label:string){ + const violations=await page.evaluate(()=>{ + const parse=(value:string)=>{const numbers=value.match(/[\d.]+/g)?.map(Number)||[];return numbers.length>=3?{r:numbers[0],g:numbers[1],b:numbers[2],a:numbers.length>3?numbers[3]:1}:null}; + const linear=(v:number)=>{v/=255;return v<=.04045?v/12.92:((v+.055)/1.055)**2.4}; + const luminance=(v:{r:number;g:number;b:number})=>.2126*linear(v.r)+.7152*linear(v.g)+.0722*linear(v.b); + const ratio=(a:{r:number;g:number;b:number},b:{r:number;g:number;b:number})=>{const values=[luminance(a),luminance(b)].sort((x,y)=>y-x);return(values[0]+.05)/(values[1]+.05)}; + const nodes=[...document.querySelectorAll("body *")]; + const failures:string[]=[]; + for(const el of nodes){ + const own=getComputedStyle(el),rect=el.getBoundingClientRect(); + if(own.display==="none"||own.visibility==="hidden"||!rect.width||!rect.height||el.closest('[aria-hidden="true"]'))continue; + const text=Array.from(el.childNodes).filter(n=>n.nodeType===Node.TEXT_NODE).map(n=>n.textContent||"").join(" ").trim(); + if(!text)continue; + const foreground=parse(own.color);if(!foreground)continue; + let background={r:255,g:255,b:255}; + const chain:HTMLElement[]=[];let parent:HTMLElement|null=el;while(parent){chain.unshift(parent);parent=parent.parentElement;} + for(const ancestor of chain){const color=parse(getComputedStyle(ancestor).backgroundColor);if(color&&color.a>0){background={r:color.r*color.a+background.r*(1-color.a),g:color.g*color.a+background.g*(1-color.a),b:color.b*color.a+background.b*(1-color.a)};}} + const fg={r:foreground.r*foreground.a+background.r*(1-foreground.a),g:foreground.g*foreground.a+background.g*(1-foreground.a),b:foreground.b*foreground.a+background.b*(1-foreground.a)}; + const size=parseFloat(own.fontSize)||16,weight=parseInt(own.fontWeight)||400,minimum=size>=24||(size>=18.66&&weight>=700)?3:4.5; + const value=ratio(fg,background); + if(value+0.01{await mkdir("test-results/screenshots",{recursive:true});}); test("independent React workspace is contained at 13 widths, short landscape heights and light/dark",async({page})=>{ await page.goto("/"); await expect(page.getByRole("heading",{level:1,name:/Make it clear/i})).toBeVisible(); + await assertTextContrast(page,"workspace light"); await page.setViewportSize({width:320,height:780}); const mobileHeader=await page.evaluate(()=>({topbar:document.querySelector(".topbar")?.getBoundingClientRect().height,breadcrumb:document.querySelector(".breadcrumb")?.getBoundingClientRect().height,secure:document.querySelector(".secure-label")?.getBoundingClientRect().width})); expect(mobileHeader.topbar, "mobile utility bar should remain compact").toBeLessThanOrEqual(64); @@ -67,6 +95,7 @@ test("independent React workspace is contained at 13 widths, short landscape hei } await page.getByRole("button",{name:"Toggle appearance"}).click(); await expect(page.locator("html")).toHaveAttribute("data-theme","dark"); + await assertTextContrast(page,"workspace dark"); await expect(page.locator('meta[name="theme-color"]')).toHaveAttribute("content","#171d19"); await expect(page.locator(".capture-panel")).toHaveCSS("background-color","rgb(41, 59, 46)"); for(const v of viewports){ @@ -112,6 +141,10 @@ test("imported recording opens the full editor with preview, annotations, captio await page.setViewportSize({width:1280,height:900}); await page.getByRole("button",{name:/Preview/i}).click(); await expect(page.locator(".preview-workspace")).toBeVisible(); + await assertTextContrast(page,"preview light"); + await page.evaluate(()=>document.documentElement.setAttribute("data-theme","dark")); + await assertTextContrast(page,"preview dark"); + await page.evaluate(()=>document.documentElement.setAttribute("data-theme","light")); await expect(page.locator(".preview-workspace video")).toBeVisible(); await assertNamedControls(page); const previewDialog=page.locator(".preview-workspace"),previewButtons=previewDialog.locator("button"); @@ -120,6 +153,10 @@ test("imported recording opens the full editor with preview, annotations, captio for(const width of [320,375,768,1120,1440]){await page.setViewportSize({width,height:900});await contained(page,width);if([320,1440].includes(width)){await page.screenshot({path:`test-results/screenshots/preview-${width}.png`,fullPage:true});await page.screenshot({path:`test-results/screenshots/preview-viewport-${width}.png`});}} await page.getByRole("button",{name:/Open editor/i}).click(); await expect(page.locator(".editor-workspace")).toBeVisible(); + await assertTextContrast(page,"editor light"); + await page.evaluate(()=>document.documentElement.setAttribute("data-theme","dark")); + await assertTextContrast(page,"editor dark"); + await page.evaluate(()=>document.documentElement.setAttribute("data-theme","light")); await assertNamedControls(page); await expect(page.locator(".editor-video-wrap video")).toBeVisible(); await page.locator(".editor-title-button").click(); @@ -300,6 +337,10 @@ test("temporary share viewer and privacy route use the independent responsive de }); await page.goto("/s/"+token+"?campaign=private#review"); await expect(page.getByRole("heading",{name:"A product walkthrough"})).toBeVisible(); + await assertTextContrast(page,"guest share light"); + await page.evaluate(()=>document.documentElement.setAttribute("data-theme","dark")); + await assertTextContrast(page,"guest share dark"); + await page.evaluate(()=>document.documentElement.setAttribute("data-theme","light")); await assertNamedControls(page); await expect(page.getByText("Approved",{exact:true})).toBeVisible(); await expect(page.getByRole("region",{name:"Review brief"})).toContainText("Review the checkout flow"); From 34bb113f434e6dba5b5f88ea05c933f6c1f1a1e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:20:24 +0200 Subject: [PATCH 540/575] Add local share version history metadata --- rebuild/src/library.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rebuild/src/library.ts b/rebuild/src/library.ts index 7032fa8..e53779e 100644 --- a/rebuild/src/library.ts +++ b/rebuild/src/library.ts @@ -1,5 +1,7 @@ export type ReviewBrief = { purpose: string; focus: string; expectedOutcome: string; requestedAction: "review" | "approve" | "reproduce" | "fix" }; +export type ShareVersion = { version:number; recordingId:string; token:string; url:string; ownerKey:string; expiresAt:number; publishedAt:number; title:string }; + export type Clip = { id: string; title: string; @@ -9,7 +11,8 @@ export type Clip = { mimeType: string; blob: Blob; thumbnail?: Blob; - share?: { recordingId: string; token: string; url: string; ownerKey: string; expiresAt: number }; + share?: { recordingId: string; token: string; url: string; ownerKey: string; expiresAt: number; version?:number; publishedAt?:number }; + shareHistory?: ShareVersion[]; annotations?: Annotation[]; captions?: CaptionCue[]; chapters?: Chapter[]; From 4bfc1fb6d6611eb5c05d53ecf7a270bbcf5b9cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:20:26 +0200 Subject: [PATCH 541/575] Plan safe version publishing without a database migration --- rebuild/src/shareVersions.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 rebuild/src/shareVersions.ts diff --git a/rebuild/src/shareVersions.ts b/rebuild/src/shareVersions.ts new file mode 100644 index 0000000..194d639 --- /dev/null +++ b/rebuild/src/shareVersions.ts @@ -0,0 +1,12 @@ +import type { ShareVersion } from "./library"; +export type CurrentShare = { recordingId:string; token:string; url:string; ownerKey:string; expiresAt:number; version?:number; publishedAt?:number }; +export function planShareVersion(current:CurrentShare|undefined,history:ShareVersion[],keepPrevious:boolean,now:number,title:string){ + const currentVersion=current?(current.version??1):0; + const maxVersion=Math.max(currentVersion,...history.map(item=>item.version),0); + const version=maxVersion+1; + const canKeep=Boolean(current&¤t.expiresAt*1000>now); + const previous:ShareVersion|null=current&&canKeep?{...current,version:current.version??currentVersion,publishedAt:current.publishedAt??now,title}:null; + const previousKept=Boolean(previous&&keepPrevious); + const nextHistory=previousKept&&previous?[previous,...history.filter(item=>item.token!==previous.token).sort((a,b)=>b.version-a.version)].slice(0,10):history; + return{version,history:nextHistory,previousToRevoke:current&&!previousKept?current:null,previousKept:previousKept?previous:null}; +} From 8aa97c6d05b0a8937ba2c2c2a1a1a7a7482b0416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:20:29 +0200 Subject: [PATCH 542/575] Test share version retention and expiry rules --- rebuild/tests/shareVersions.test.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 rebuild/tests/shareVersions.test.ts diff --git a/rebuild/tests/shareVersions.test.ts b/rebuild/tests/shareVersions.test.ts new file mode 100644 index 0000000..c54e250 --- /dev/null +++ b/rebuild/tests/shareVersions.test.ts @@ -0,0 +1,22 @@ +import {describe,expect,it} from "vitest"; +import {planShareVersion} from "../src/shareVersions"; +import type {ShareVersion} from "../src/library"; +const current={recordingId:"r1",token:"current-token",url:"https://example.test/s/current",ownerKey:"a".repeat(64),expiresAt:2000}; +const prior=(version:number,token:string):ShareVersion=>({...current,version,token,publishedAt:1000,title:"Walkthrough"}); +describe("safe share version publishing",()=>{ + it("starts at version one and increments without losing existing history",()=>{ + expect(planShareVersion(undefined,[],false,1000,"Clip")).toMatchObject({version:1,history:[],previousToRevoke:null}); + expect(planShareVersion({...current,version:2},[prior(1,"v1")],false,1000,"Clip")).toMatchObject({version:3,history:[prior(1,"v1")],previousToRevoke:current}); + }); + it("keeps an active previous link only when explicitly requested",()=>{ + const plan=planShareVersion({...current,version:1},[],true,1000,"Clip"); + expect(plan.version).toBe(2);expect(plan.previousToRevoke).toBeNull();expect(plan.previousKept).toMatchObject({version:1,token:"current-token",title:"Clip"});expect(plan.history).toHaveLength(1); + expect(planShareVersion({...current,version:1},[],false,1000,"Clip").previousToRevoke).toEqual({...current,version:1}); + }); + it("never preserves expired links and caps history at ten unique versions",()=>{ + expect(planShareVersion({...current,expiresAt:900},[],true,1000,"Clip").previousToRevoke).toBeTruthy(); + const history=Array.from({length:10},(_,i)=>prior(10-i,"v"+(10-i))); + const plan=planShareVersion({...current,version:11},history,true,1000,"Clip"); + expect(plan.history).toHaveLength(10);expect(new Set(plan.history.map(v=>v.token)).size).toBe(10);expect(plan.history[0].version).toBe(11); + }); +}); From 478cadfdd370d5385c6df29932c67a94fb678778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:20:56 +0200 Subject: [PATCH 543/575] Add opt-in safe publishing of previous share versions --- rebuild/src/main.tsx | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/rebuild/src/main.tsx b/rebuild/src/main.tsx index 6425538..3c01156 100644 --- a/rebuild/src/main.tsx +++ b/rebuild/src/main.tsx @@ -1,12 +1,12 @@ import React, { useEffect, useMemo, useRef, useState } from "react"; import { createRoot } from "react-dom/client"; import { Activity, ArrowDownToLine, ArrowUpRight, Check, ChevronDown, CircleHelp, Download, Camera, Clapperboard, Clock3, FileVideo2, FolderOpen, LayoutGrid, Mic, Moon, MoreHorizontal, Pause, Play, Plus, Scissors, Search, Settings2, Share2, ShieldCheck, Sparkles, Sun, Trash2, Video, WifiOff, X } from "lucide-react"; -import { appendRecordingChunk, beginRecordingSession, deleteClip, deleteRecordingSession, finalizeRecordingSession, getClip, listClips, listFullClips, listRecoverableSessions, restoreRecordingSession, saveClip, type Clip, type RecoverySession } from "./library"; +import { appendRecordingChunk, beginRecordingSession, deleteClip, deleteRecordingSession, finalizeRecordingSession, getClip, listClips, listFullClips, listRecoverableSessions, restoreRecordingSession, saveClip, type Clip, type RecoverySession, type ShareVersion } from "./library"; // @ts-expect-error Shared browser-safe backup helper has no declaration file. import { makeLibraryBackup, readLibraryBackup } from "../legacy/lib/library-backup.js"; import { ScreenRecorder, cameraBubbleFootprint, supportedMimeType, type RecordingResult, type QualityPreset } from "./recorder"; import CameraBubblePosition from "./CameraBubblePosition"; -import { newOwnerKey, publishRecording } from "./sharing"; +import { newOwnerKey, publishRecording } from "./sharing";\nimport { planShareVersion } from "./shareVersions"; import { clampTrimRange, trimVideoElement } from "./trim"; import ShareViewer from "./ShareViewer"; import PrivacyPage from "./PrivacyPage"; @@ -78,7 +78,7 @@ function App() { const [backupBusy, setBackupBusy] = useState(false); const [publishId, setPublishId] = useState(null); const [expiryDays, setExpiryDays] = useState(3); - const [sharePassword, setSharePassword] = useState(""); + const [sharePassword, setSharePassword] = useState("");\n const [keepPreviousShare,setKeepPreviousShare]=useState(false); const [reviewPurpose, setReviewPurpose] = useState(""); const [reviewFocus, setReviewFocus] = useState(""); const [reviewExpected, setReviewExpected] = useState(""); @@ -337,18 +337,19 @@ function App() { a.click(); window.setTimeout(() => URL.revokeObjectURL(url), 1500); } - async function shareClip(id: string) { + async function shareClip(id:string,forceNew=false) { if (!online) { setMessage("Sharing needs an internet connection. Your local recording is still available to preview, edit and download."); return; } const clip = await getClip(id); setReviewPurpose(clip?.reviewBrief?.purpose || ""); setReviewFocus(clip?.reviewBrief?.focus || ""); setReviewExpected(clip?.reviewBrief?.expectedOutcome || ""); setReviewAction(clip?.reviewBrief?.requestedAction || "review"); - if (clip?.share && clip.share.expiresAt * 1000 > Date.now()) { + if (clip?.share && clip.share.expiresAt * 1000 > Date.now() && !forceNew) { const url = new URL(clip.share.url, location.origin).toString(); setShareLink(url); await navigator.clipboard?.writeText(url).catch(() => undefined); return; } + setKeepPreviousShare(false); setPublishId(id); } @@ -361,30 +362,33 @@ function App() { if (!clip) throw new Error("This local recording is no longer available."); if (!clip.duration || clip.duration > 600) throw new Error("This clip needs a valid duration of 10 minutes or less before it can be shared."); const previousShare = clip.share; + const publishTimestamp=Date.now(); + const versionPlan=planShareVersion(previousShare,clip.shareHistory||[],keepPreviousShare,publishTimestamp,clip.title); const brief = { purpose: reviewPurpose.trim().slice(0,160), focus: reviewFocus.trim().slice(0,400), expectedOutcome: reviewExpected.trim().slice(0,400), requestedAction: reviewAction }; const hasBrief = Boolean(brief.purpose || brief.focus || brief.expectedOutcome); const ownerKey = newOwnerKey(); setUploadProgress(0); const result = await publishRecording(clip, expiryDays, sharePassword, ownerKey, setUploadProgress); const resolvedOwnerKey = result.ownerKey || ownerKey; - const detailsResponse = await fetch("/api/share/" + result.token + "/details", { method: "PUT", credentials: "same-origin", headers: { "content-type": "application/json" }, body: JSON.stringify({ ownerKey: resolvedOwnerKey, details: { annotations: clip.annotations || [], captions: clip.captions || [], chapters: clip.chapters || [], report: clip.report || null, reviewStatus: clip.reviewStatus || "needs-feedback", reviewBrief: hasBrief ? brief : null } }) }); + const detailsResponse = await fetch("/api/share/" + result.token + "/details", { method: "PUT", credentials: "same-origin", headers: { "content-type": "application/json" }, body: JSON.stringify({ ownerKey: resolvedOwnerKey, details: { annotations: clip.annotations || [], captions: clip.captions || [], chapters: clip.chapters || [], report: clip.report || null, reviewStatus: clip.reviewStatus || "needs-feedback", reviewBrief: hasBrief ? brief : null, reviewVersion:{number:versionPlan.version,publishedAt:publishTimestamp} } }) }); if (!detailsResponse.ok) { await fetch("/api/share/" + result.token + "/manage", { method: "DELETE", credentials: "same-origin", headers: { "content-type": "application/json" }, body: JSON.stringify({ ownerKey: resolvedOwnerKey }) }).catch(() => undefined); throw new Error("The video uploaded, but its review context could not be saved. The incomplete share was rolled back; your local original is safe."); } - const next = { ...clip, reviewBrief: hasBrief ? brief : undefined, share: { recordingId: result.id, token: result.token, url: result.url, ownerKey: resolvedOwnerKey, expiresAt: result.expiresAt } }; + const next = { ...clip, reviewBrief: hasBrief ? brief : undefined, shareHistory:versionPlan.history, share: { recordingId: result.id, token: result.token, url: result.url, ownerKey: resolvedOwnerKey, expiresAt: result.expiresAt, version:versionPlan.version, publishedAt:publishTimestamp } }; await saveClip(next); await refresh(); let previousShareWarning = ""; - if (previousShare && previousShare.token !== result.token) { + if (versionPlan.previousToRevoke && previousShare && previousShare.token !== result.token) { const stopped = await fetch("/api/share/" + previousShare.token + "/manage", { method: "DELETE", credentials: "same-origin", headers: { "content-type": "application/json" }, body: JSON.stringify({ ownerKey: previousShare.ownerKey }) }).catch(() => null); if (stopped && !stopped.ok && stopped.status !== 404) previousShareWarning = " The previous link could not be revoked and may remain active until it expires."; } + if(versionPlan.previousKept)previousShareWarning=" Previous version "+versionPlan.previousKept.version+" remains available in local version history; its feedback stays attached to that version."; const fullUrl = new URL(result.url, location.origin).toString(); setShareLink(fullUrl); - setRecoveryData(JSON.stringify({ format: "screennote-share-recovery", version: 1, shareToken: result.token, ownerKey: resolvedOwnerKey, recordingId: result.id, expiresAt: result.expiresAt }, null, 2)); + setRecoveryData(JSON.stringify({ format: "screennote-share-recovery", version: 1, shareToken: result.token, ownerKey: resolvedOwnerKey, recordingId: result.id, expiresAt: result.expiresAt, reviewVersion:versionPlan.version }, null, 2)); await navigator.clipboard?.writeText(fullUrl).catch(() => undefined); - setPublishId(null); setSharePassword(""); - setMessage("Your temporary link is ready. The link has been copied if clipboard access is available."+previousShareWarning); + setPublishId(null); setSharePassword("");setKeepPreviousShare(false); + setMessage("Version "+versionPlan.version+" is ready. The link has been copied if clipboard access is available."+previousShareWarning); } catch (error) { setMessage(error instanceof Error ? error.message : "Couldn't publish this recording."); } finally { setPublishing(false); setUploadProgress(0); } } From b70f6cf26360b57777c683026982c649ff9bfe9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:21:08 +0200 Subject: [PATCH 544/575] Fix share version helper import --- rebuild/src/main.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rebuild/src/main.tsx b/rebuild/src/main.tsx index 3c01156..574fd5d 100644 --- a/rebuild/src/main.tsx +++ b/rebuild/src/main.tsx @@ -6,7 +6,8 @@ import { appendRecordingChunk, beginRecordingSession, deleteClip, deleteRecordin import { makeLibraryBackup, readLibraryBackup } from "../legacy/lib/library-backup.js"; import { ScreenRecorder, cameraBubbleFootprint, supportedMimeType, type RecordingResult, type QualityPreset } from "./recorder"; import CameraBubblePosition from "./CameraBubblePosition"; -import { newOwnerKey, publishRecording } from "./sharing";\nimport { planShareVersion } from "./shareVersions"; +import { newOwnerKey, publishRecording } from "./sharing"; +import { planShareVersion } from "./shareVersions"; import { clampTrimRange, trimVideoElement } from "./trim"; import ShareViewer from "./ShareViewer"; import PrivacyPage from "./PrivacyPage"; From 6918a607541d8e2c3cc386531d5c7e161e18688c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:21:26 +0200 Subject: [PATCH 545/575] Revoke every retained share version on stop or delete --- rebuild/src/main.tsx | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/rebuild/src/main.tsx b/rebuild/src/main.tsx index 574fd5d..ad3281b 100644 --- a/rebuild/src/main.tsx +++ b/rebuild/src/main.tsx @@ -432,14 +432,28 @@ function App() { finally { if (recoveryFileRef.current) recoveryFileRef.current.value = ""; } } + async function revokeRemoteShare(share:{token:string;ownerKey:string}) { + const response=await fetch("/api/share/"+share.token+"/manage",{method:"DELETE",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({ownerKey:share.ownerKey})}); + if(!response.ok&&response.status!==404)throw new Error("A shared version could not be revoked. Keep its recovery key and try again."); + } + async function revokeShareVersion(id:string,version:ShareVersion) { + if(!window.confirm("Revoke share version "+version.version+"? Its link and discussion will be deleted."))return; + try{ + await revokeRemoteShare(version); + const clip=await getClip(id);if(!clip)return; + await saveClip({...clip,shareHistory:(clip.shareHistory||[]).filter(item=>item.token!==version.token)}); + await refresh();setMessage("Share version "+version.version+" was revoked."); + }catch(error){setMessage(error instanceof Error?error.message:"Could not revoke this share version.");} + } async function stopSharing(id: string) { const clip = await getClip(id); - if (!clip?.share) return; + if (!clip || (!clip.share && !clip.shareHistory?.length)) return; try { - const response = await fetch("/api/share/" + clip.share.token + "/manage", { method: "DELETE", credentials: "same-origin", headers: { "content-type": "application/json" }, body: JSON.stringify({ ownerKey: clip.share.ownerKey }) }); - if (!response.ok && response.status !== 404) throw new Error("The shared copy could not be removed. Try again."); - const next = { ...clip }; delete next.share; await saveClip(next); await refresh(); - setMessage("Sharing stopped. The shared video and its discussion have been deleted. Your local original is still here."); + const shares=[...(clip.share?[clip.share]:[]),...(clip.shareHistory||[])]; + for(const share of shares)await revokeRemoteShare(share); + const next={...clip};delete next.share;delete next.shareHistory; + await saveClip(next);await refresh(); + setMessage("All shared versions and their discussions have been deleted. Your local original is still here."); } catch (error) { setMessage(error instanceof Error ? error.message : "Couldn't stop sharing."); } } @@ -447,14 +461,14 @@ function App() { if (!window.confirm("Delete this recording from this device? This cannot be undone.")) return; try { const clip = await getClip(id); - if (clip?.share) { - const stopped = await fetch("/api/share/" + clip.share.token + "/manage", { method: "DELETE", credentials: "same-origin", headers: { "content-type": "application/json" }, body: JSON.stringify({ ownerKey: clip.share.ownerKey }) }); - if (!stopped.ok && stopped.status !== 404) throw new Error("The shared copy could not be removed. Your local recording and recovery key have been kept."); + if(clip){ + const shares=[...(clip.share?[clip.share]:[]),...(clip.shareHistory||[])]; + for(const share of shares)await revokeRemoteShare(share); } await deleteClip(id); try { localStorage.removeItem("screennote-pending-upload-"+id); } catch { /* storage may be restricted */ } await refresh(); - setMessage("Recording deleted from this device."); + setMessage("Recording and all of its shared versions deleted from this device."); } catch (error) { setMessage(error instanceof Error ? error.message : "Couldn't delete this recording. Your local copy is still here."); } From ab3598eebe2f5fa75da2ed53bb5fb794b4ac42af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:21:48 +0200 Subject: [PATCH 546/575] Add local version history and safe republish actions --- rebuild/src/PreviewWorkspace.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rebuild/src/PreviewWorkspace.tsx b/rebuild/src/PreviewWorkspace.tsx index b9ba70c..2d410a3 100644 --- a/rebuild/src/PreviewWorkspace.tsx +++ b/rebuild/src/PreviewWorkspace.tsx @@ -1,12 +1,12 @@ import React, { useEffect } from "react"; -import { ArrowLeft, ArrowUpRight, Download, Scissors, Share2, X } from "lucide-react"; -import type { Clip } from "./library"; +import { ArrowLeft, ArrowUpRight, Download, Scissors, Share2, X, History } from "lucide-react"; +import type { Clip, ShareVersion } from "./library"; import { useDialogFocus } from "./useDialogFocus"; -type Props={clip:Clip;url:string;onClose:()=>void;onEdit:()=>void;onShare:()=>void;onDownload:()=>void;onDelete:()=>void}; -export default function PreviewWorkspace({clip,url,onClose,onEdit,onShare,onDownload,onDelete}:Props){ +type Props={clip:Clip;url:string;onClose:()=>void;onEdit:()=>void;onShare:()=>void;onNewVersion:()=>void;onRevokeVersion:(version:ShareVersion)=>void;onDownload:()=>void;onDelete:()=>void}; +export default function PreviewWorkspace({clip,url,onClose,onEdit,onShare,onNewVersion,onRevokeVersion,onDownload,onDelete}:Props){ const dialogRef=React.useRef(null);useDialogFocus(dialogRef,true,onClose); return

{clip.title}

{Math.floor(clip.duration/60)}:{String(Math.floor(clip.duration%60)).padStart(2,"0")} · {(clip.size/1048576).toFixed(1)} MB · Private on this device

-
+
} \ No newline at end of file From ffbae9520c953071ef1b15f457b0d2af91502d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rama=20=E2=80=94=20Buttercode=20Systems?= Date: Thu, 26 Nov 2026 19:21:56 +0200 Subject: [PATCH 547/575] Label editor sharing as a new version when applicable --- rebuild/src/EditorWorkspace.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rebuild/src/EditorWorkspace.tsx b/rebuild/src/EditorWorkspace.tsx index c0eeafb..069544e 100644 --- a/rebuild/src/EditorWorkspace.tsx +++ b/rebuild/src/EditorWorkspace.tsx @@ -14,7 +14,7 @@ type Props = { url: string; onClose: () => void; onUpdated: () => void; - onShare: () => void; + onShare: () => void;\n shareLabel?:string; onDownload: () => void; onDelete: () => void; }; @@ -36,7 +36,7 @@ function paint(ctx:CanvasRenderingContext2D,w:number,h:number,items:Annotation[] else ctx.strokeRect(x,y,bw,bh);ctx.restore(); } } -function EditorWorkspace({clip,url,onClose,onUpdated,onShare,onDownload,onDelete}:Props){ +function EditorWorkspace({clip,url,onClose,onUpdated,onShare,shareLabel,onDownload,onDelete}:Props){ const video=useRef(null),overlay=useRef(null),file=useRef(null),capsuleFile=useRef(null); const [title,setTitle]=useState(clip.title),[activeTool,setActiveTool]=useState("rectangle"),[drawMode,setDrawMode]=useState(false); const [marks,setMarks]=useState(clip.annotations||[]),[drawing,setDrawing]=useState(null),[tab,setTab]=useState<"edit"|"context">("edit"); @@ -151,7 +151,7 @@ function EditorWorkspace({clip,url,onClose,onUpdated,onShare,onDownload,onDelete return
{titleEditing?setTitle(e.target.value)} onBlur={()=>setTitleEditing(false)} onKeyDown={e=>{if(e.key==="Enter")setTitleEditing(false)}} autoFocus/>:}{stamp(clip.duration)} · {(clip.size/1048576).toFixed(1)} MB · stored locally
- {tab==="edit"?
{stamp(currentTime)}{if(video.current)video.current.currentTime=Number(e.target.value)}}/>{stamp(clip.duration)}
MARK UP{kinds.map(k=>)}

Draw at the current playhead. New marks appear for up to 4 seconds, then disappear; older untimed marks remain throughout. Redaction is opaque.

:
OWNER-SUPPLIED CAPTIONS

Make every moment understandable.

Import an SRT or WebVTT file, or paste caption text. Automatic transcription is not enabled.

{const f=e.target.files?.[0];if(!f)return;if(f.size>20000){setStatus("Caption files must be 20 KB or smaller.");return}try{const raw=await f.text();parseCaptions(raw,clip.duration);setCaptionsText(raw);setStatus("Captions loaded. Save changes to apply them.")}catch(err){setStatus(err instanceof Error?err.message:"Invalid captions.")}finally{e.currentTarget.value=""}}}/>