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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG-PUBLIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

User-facing changes only, grouped by date under Added / Improved / Fixed.

## 0.7.1 — 2026-11-27

### Added

- Screen record: a Show cursor option in the recorder's settings, on by default, puts the mouse pointer in the video file itself, so it shows in any player. Zoom on click still works, and Edit doesn't draw a second pointer on top.

### Fixed

- Screen record: Edit said every recording had no cursor track, so the pointer, smoothing and zoom on click were missing in Edit and in exports. Fixed, including for recordings you already made.

## 0.7.0 — 2026-11-27

### Added
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@snaphub/desktop",
"version": "0.7.0",
"version": "0.7.1",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "capkit-desktop"
version = "0.7.0"
version = "0.7.1"
description = "CapKit lightweight desktop toolkit to capture, record, and showcase"
authors = ["CapKit"]
edition = "2024"
Expand Down
6 changes: 6 additions & 0 deletions apps/desktop/src-tauri/src/domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,10 @@ pub struct RecordingArtifactsDto {
pub system_audio_path: Option<String>,
pub microphone_path: Option<String>,
pub camera_path: Option<String>,
/// The hardware pointer is drawn into the video frames, so the editor
/// should not draw a second one from the cursor track.
#[serde(default)]
pub cursor_in_video: bool,
pub width: u32,
pub height: u32,
pub fps: u32,
Expand Down Expand Up @@ -587,6 +591,7 @@ mod request_tests {
system_audio_path: None,
microphone_path: None,
camera_path: Some("camera.mp4".into()),
cursor_in_video: true,
width: 1920,
height: 1080,
fps: 30,
Expand All @@ -595,6 +600,7 @@ mod request_tests {
})
.expect("artifacts serialize");
assert_eq!(value["cameraPath"], "camera.mp4");
assert_eq!(value["cursorInVideo"], true);
}

#[test]
Expand Down
3 changes: 3 additions & 0 deletions apps/desktop/src-tauri/src/platform/windows_recorder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ pub struct WindowsRecordingSession {
worker: Option<JoinHandle<Result<EncoderOutcome, SnaphubError>>>,
outcome: Arc<Mutex<Option<EncoderOutcome>>>,
pointer: Option<PointerSampler>,
cursor_in_video: bool,
system_audio: Option<AudioTrack>,
microphone: Option<AudioTrack>,
}
Expand Down Expand Up @@ -518,6 +519,7 @@ impl WindowsRecordingSession {
worker: Some(worker),
outcome,
pointer,
cursor_in_video: request.capture_cursor,
system_audio,
microphone,
},
Expand Down Expand Up @@ -599,6 +601,7 @@ impl RecordingSession for WindowsRecordingSession {
microphone_path: microphone_path.map(|path| path.to_string_lossy().into_owned()),
// The service sets the real path after the camera file closes.
camera_path: None,
cursor_in_video: self.cursor_in_video,
width: self.width,
height: self.height,
fps: self.fps,
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "CapKit",
"version": "0.7.0",
"version": "0.7.1",
"identifier": "com.snaphub.desktop",
"build": {
"beforeDevCommand": "pnpm dev",
Expand Down Expand Up @@ -42,7 +42,7 @@
}
],
"security": {
"csp": "default-src 'self' customprotocol: asset:; img-src 'self' asset: http://asset.localhost blob: data:; media-src 'self' asset: http://asset.localhost blob:; style-src 'self' 'unsafe-inline'; connect-src ipc: http://ipc.localhost",
"csp": "default-src 'self' customprotocol: asset:; img-src 'self' asset: http://asset.localhost blob: data:; media-src 'self' asset: http://asset.localhost blob:; style-src 'self' 'unsafe-inline'; connect-src ipc: http://ipc.localhost asset: http://asset.localhost",
"assetProtocol": {
"enable": true,
"scope": [
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/components/RecorderDock.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const artifacts: RecordingArtifacts = {
systemAudioPath: null,
microphonePath: null,
cameraPath: null,
cursorInVideo: false,
width: 2560,
height: 1440,
fps: 30,
Expand Down
13 changes: 12 additions & 1 deletion apps/desktop/src/components/RecorderDock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {
stopRecording,
} from "../lib/recordingTauri";
import { describeInvokeError } from "../lib/tauri";
import { Cancel, ChevronDown, Computer, Crop, Delete, Grip, Keyboard, Mic, Pause, Play, Record, Settings, Speaker, Stop, Video } from "./icons";
import { Cancel, ChevronDown, Computer, Crop, Delete, Grip, Keyboard, Mic, Pause, Play, Record, SelectPointer, Settings, Speaker, Stop, Video } from "./icons";

type Phase = "setup" | "counting" | "recording" | "saving";

Expand Down Expand Up @@ -668,6 +668,17 @@ export function RecorderDock(): React.JSX.Element {
</select>
</label>

<button
aria-pressed={settings.showCursor}
className={controlClass}
title="Shows the mouse pointer in the video file. Zoom on click works either way."
type="button"
onClick={() => patch({ showCursor: !settings.showCursor })}
>
<SelectPointer aria-hidden="true" size={14} />
Show cursor
</button>

<button
aria-pressed={settings.captureKeystrokes}
className={controlClass}
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/components/dashboard/RecordView.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const recording: RecordingArtifacts = {
systemAudioPath: null,
microphonePath: null,
cameraPath: null,
cursorInVideo: false,
width: 1920,
height: 1080,
fps: 30,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const item: RecordingArtifacts = {
systemAudioPath: null,
microphonePath: null,
cameraPath: null,
cursorInVideo: false,
width: 1920,
height: 1080,
fps: 30,
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/components/dashboard/StudioView.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const recording: RecordingArtifacts = {
systemAudioPath: "C:/Temp/CapKit/recordings/one/audio-system.m4a",
microphonePath: null,
cameraPath: null,
cursorInVideo: false,
width: 1920,
height: 1080,
fps: 30,
Expand Down
5 changes: 4 additions & 1 deletion apps/desktop/src/components/dashboard/StudioView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ export function StudioView({ initialRecording = null }: { initialRecording?: Rec
const raw = window.localStorage.getItem(videoSceneStorageKey);
const parsed = raw === null ? null : storedVideoScenesSchema.safeParse(JSON.parse(raw) as unknown);
const stored = parsed?.success === true ? parsed.data[selected.id] : undefined;
setScene(stored ?? defaultVideoScene(selected.durationSeconds));
const fresh = defaultVideoScene(selected.durationSeconds);
// A pointer already burned into the frames would be doubled by Studio's own.
setScene(stored ?? (selected.cursorInVideo ? { ...fresh, cursor: { ...fresh.cursor, show: false } } : fresh));
setTrack(null);
if (selected.cursorPath !== null) void loadCursorTrack(selected.cursorPath).then(setTrack);
}, [selected]);
Expand Down Expand Up @@ -522,6 +524,7 @@ export function StudioView({ initialRecording = null }: { initialRecording?: Rec
<MotionPanel
clickCount={clickTimes.length}
hasCameraTrack={hasCameraTrack}
cursorInVideo={selected.cursorInVideo}
hasCursorTrack={track !== null}
keysRecorded={track?.keysRecorded ?? false}
scene={scene}
Expand Down
7 changes: 7 additions & 0 deletions apps/desktop/src/components/dashboard/studio/StudioPanels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export function StagePanel({ scene, onPatch, onApplyLook }: { scene: VideoScene;
/** Cursor smoothing, zoom on click, and the camera. */
export function MotionPanel({
scene,
cursorInVideo,
hasCursorTrack,
hasCameraTrack,
clickCount,
Expand All @@ -170,6 +171,7 @@ export function MotionPanel({
onPatchKeystrokes,
}: {
scene: VideoScene;
cursorInVideo: boolean;
hasCursorTrack: boolean;
keysRecorded: boolean;
hasCameraTrack: boolean;
Expand All @@ -190,6 +192,11 @@ export function MotionPanel({
<div className={hasCursorTrack ? "space-y-2.5" : "pointer-events-none space-y-2.5 opacity-40"}>
<CollapsibleSection defaultOpen icon={SelectPointer} title="Cursor">
<Toggle checked={scene.cursor.show} label="Show cursor" onChange={(value) => onPatchCursor({ show: value })} />
{cursorInVideo ? (
<p className="text-[12px] leading-5 text-content/55">
The pointer is already in this video. Turning this on draws a smoothed one on top.
</p>
) : null}
<Slider
hint="Higher removes more jitter"
label="Smoothing"
Expand Down
10 changes: 9 additions & 1 deletion apps/desktop/src/domain/recording.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
defaultRecorderSettings,
formatBytes,
formatDuration,
recorderSettingsSchema,
readRecorderSettings,
repeatRatio,
toRecordingRequest,
Expand Down Expand Up @@ -119,7 +120,14 @@ describe("requests", () => {
it("leaves the hardware cursor out of the frames by default", () => {
// The cursor is recorded as its own track precisely so the editor can
// smooth it; burning it in would make that impossible.
expect(toRecordingRequest(defaultRecorderSettings, display, null).captureCursor).toBe(false);
expect(toRecordingRequest(defaultRecorderSettings, display, null).captureCursor).toBe(true);
expect(toRecordingRequest({ ...defaultRecorderSettings, showCursor: false }, display, null).captureCursor).toBe(false);
});

it("turns the cursor on for settings saved while it was off by default", () => {
const saved: Record<string, unknown> = { ...defaultRecorderSettings, captureCursor: false };
delete saved.showCursor;
expect(recorderSettingsSchema.parse(saved).showCursor).toBe(true);
});

it("keeps keystrokes off unless the user opts in, including for older stored settings", () => {
Expand Down
17 changes: 10 additions & 7 deletions apps/desktop/src/domain/recording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export const recordingArtifactsSchema = z.object({
systemAudioPath: z.string().nullable(),
microphonePath: z.string().nullable(),
cameraPath: z.string().nullable().default(null),
/** The pointer is burned into the frames; older recordings never were. */
cursorInVideo: z.boolean().default(false),
width: z.number(),
height: z.number(),
fps: z.number(),
Expand Down Expand Up @@ -88,13 +90,14 @@ export const recorderSettingsSchema = z.object({
microphoneDeviceId: z.string(),
systemAudioDeviceId: z.string().default(""),
/**
* Burns the hardware cursor into the video.
* Burns the hardware pointer into the video, so the file shows it in any
* player. On by default. The cursor track is recorded either way, so zoom on
* click still works; Studio just stops drawing its own pointer on top.
*
* Off by default: the cursor is recorded as a separate track instead, which
* is what lets the editor smooth its motion and zoom towards clicks. Turning
* this on permanently bakes the raw pointer into the frames.
* A new key with its own default: settings saved before this existed stored
* the old `captureCursor: false`, which would otherwise keep it off.
*/
captureCursor: z.boolean(),
showCursor: z.boolean().default(true),
/**
* Records key presses for the Studio overlay. Off by default and opt-in:
* shortcut names are kept, but typed characters are stored only as "typing
Expand All @@ -114,7 +117,7 @@ export const defaultRecorderSettings: RecorderSettings = {
microphone: false,
microphoneDeviceId: "",
systemAudioDeviceId: "",
captureCursor: false,
showCursor: true,
captureKeystrokes: false,
};

Expand Down Expand Up @@ -195,7 +198,7 @@ export function toRecordingRequest(
displayId: source.displayId,
region: crop,
fps: resolveFrameRate(settings.fps, source.refreshRate),
captureCursor: settings.captureCursor,
captureCursor: settings.showCursor,
captureKeystrokes: settings.captureKeystrokes,
systemAudio: settings.systemAudio,
microphone: settings.microphone,
Expand Down
2 changes: 1 addition & 1 deletion docs/current-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ This document records what exists in the runtime today. The roadmap remains the
- **Phase 2:** Combined image editor and visual asset Studio.
- **Phase 3:** Full local-library metadata, organization, tags, search, retention controls, and folder watching. The current dashboard is deliberately a lightweight on-demand view of the configured save directory, not this full library.
- **Phase 4:** Accounts, Cloudflare R2 storage, share URLs, view analytics, quotas, and billing.
- **Implemented, frame-by-frame validation pending:** Screen recording. Display, window, and drawn-region sources (the region overlay asks for an area per session and never persists it); countdown; a single-row floating dock that can be dragged by its grip and keeps its position (excluded from the video through `WDA_EXCLUDEFROMCAPTURE`); H.264 through the Media Foundation sink writer with no CPU-side frame copy; 24/30/60 fps plus a Native rate that follows the display's refresh rate (floored at 60, capped by the H.264 level 5.2 macroblock rate) with bitrate scaling to match; system-audio and microphone AAC sidecars with per-device selection and fallback warnings; and a 250 Hz cursor and click track written alongside every recording. New installs save under `Videos\CapKit` (configurable in Settings; the asset scope follows the folder across restarts). The recordings list overlays the cursor track on the letterboxed video and plays through the asset protocol. Verified by three ignored-by-default integration tests that need an interactive desktop; run them with `cargo test -- --ignored`.
- **Implemented, frame-by-frame validation pending:** Screen recording. Display, window, and drawn-region sources (the region overlay asks for an area per session and never persists it); countdown; a single-row floating dock that can be dragged by its grip and keeps its position (excluded from the video through `WDA_EXCLUDEFROMCAPTURE`); H.264 through the Media Foundation sink writer with no CPU-side frame copy; 24/30/60 fps plus a Native rate that follows the display's refresh rate (floored at 60, capped by the H.264 level 5.2 macroblock rate) with bitrate scaling to match; system-audio and microphone AAC sidecars with per-device selection and fallback warnings; and a 250 Hz cursor and click track written alongside every recording. A Show cursor recorder setting (on by default, stored as `showCursor` so settings saved under the old off-by-default `captureCursor` pick up the new default) also burns the hardware pointer into the frames; the artifact's `cursorInVideo` flag makes Studio start with its own pointer off for those recordings, while zoom on click keeps using the track. New installs save under `Videos\CapKit` (configurable in Settings; the asset scope follows the folder across restarts). The recordings list overlays the cursor track on the letterboxed video and plays through the asset protocol. Verified by three ignored-by-default integration tests that need an interactive desktop; run them with `cargo test -- --ignored`.
- **Implemented:** The camera window grants access on the dock click through WebView2 and clears a persisted deny, with a centred recovery panel (settings link, retry, close) when Windows blocks access or no camera exists. It closes with the recorder, clips the video to its circle/rounded/square shape, and can be dragged by the video itself.
- **Implemented, manual export validation pending:** The video Studio. Non-destructive trim, the Showcase treatment applied to video (background/padding/radius/shadow/effects via a shared `scene.ts`), cursor smoothing and automatic zoom-on-click (a `src/domain/zoomKeyframes.ts` keyframe track, mergeable with manual overrides), the camera as its own recorded track (`camera.mp4`, `webm` fallback) placed by corner or free drag, kept in step with the screen video within 150 ms, and included in MP4 and GIF exports (recordings without one show an empty Camera state), pause/resume that omits paused time from the output, and MP4 (WebCodecs + `mp4-muxer`) or GIF (hand-written encoder) export.
- Verified by automated tests: 318 frontend tests including GIF byte-format correctness (signature, trailer, loop extension, declared dimensions) and compositor draw-order/gating logic against a fake Canvas2D context.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snaphub",
"version": "0.7.0",
"version": "0.7.1",
"private": true,
"packageManager": "pnpm@11.14.0",
"scripts": {
Expand Down
Loading