Skip to content

feat(desktop-gpui): draw on screen while recording - #4314

Open
richiemcilroy wants to merge 13 commits into
mainfrom
feat/live-draw
Open

richiemcilroy wants to merge 13 commits into
mainfrom
feat/live-draw

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Draw on screen while recording. Pen, highlighter, arrow and rectangle in five colours, with undo and clear all, toggled from a new pen button on the recording bar or ⌃⌘P. Strokes are captured in the recording; the tools never are. Strokes fade a few seconds after they're drawn unless "Keep drawings on screen" is on in Settings > General.

Left, the screen while drawing. Right, the same moment in the recording: every stroke, no tools.

screen and recording

Tools, light Tools, dark
flowchart LR
  bar["Recording bar + tools row<br/>(already excluded from capture)"] -- toggle --> input
  input["Input panel<br/>excluded from capture, takes the mouse,<br/>open only while drawing"] --> ink[Ink]
  ink --> canvas["Canvas panel<br/>in the capture, click-through"]
Loading
  • Shift draws straight pen and highlighter lines, snaps arrows to 45° and makes rectangles square.
  • Esc, the pen or ⌃⌘P go back to click-through at once. Neither panel exists when there is nothing to draw or show, so recordings without drawing run exactly as before.
  • macOS, display and area recordings, Studio and Instant. A window recording captures the window on its own without the canvas, so the pen is dimmed there with the reason. Windows and Linux don't get the feature until click-through and capture inclusion are proven for these panels.
  • The shortcut registers only while a drawable recording runs, like the marker shortcut (hotkeys.rs, RecordingScopes).

Proof (real app on a Mac mini, driven with posted mouse and key events; synthetic page)

  • Studio display.mp4: mid-stroke, every stroke (above, right), after Clear all. Instant output.mp4: arrow.
  • Unit tests for the Shift constraints, fade curve, point thinning, path simplification and run sealing; settings, shortcut and copy tables updated.
30 s Studio display recording, screen changing main this PR
Not drawing: app CPU, 3 runs each 5.9% of a core 5.7% of a core
Not drawing: captured frames 60.0 fps, no gaps 60.0 fps, no gaps
Drawing continuously vs moving a window, same 120 Hz pointer path n/a 13.3% vs 6.9% of a core
Drawing: captured frames n/a 60.0 fps, no gaps

Drawing numbers use the dev profile with the app crate at opt-level 2 (dependencies already are); the plain debug build reads about 20%.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Adds drawing tools for macOS display and area recordings, with fading strokes, undo, clear, and a recording-only shortcut.

  • Drawn strokes appear in display and area recordings.
  • The recording bar opens a row of drawing tools and actions.
  • A recording setting lets drawings stay until they are cleared.

Reviews (2) · Last reviewed commit: "chore(desktop-gpui): drop comments that ..." · Reviewed by Greptile

@sandchest-com

sandchest-com Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Sandchest

Sandchest reviewed 802779d: nothing exploitable found in this change.

Sandchest reviews every change for vulnerabilities an attacker could use · 1 credit · Review details

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
cap-status Ignored Ignored Preview Nov 17, 2026 6:05am UTC

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found 1 potential issue (1 medium).

View 3 other findings in Capy.

Open in Capy

Comment thread apps/desktop-gpui/src/live_draw.rs Resolved
Comment thread apps/desktop-gpui/src/live_draw.rs Resolved
Comment thread apps/desktop-gpui/src/ui/surface.rs Resolved
@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 17, 2026 05:25 Inactive

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

Open in Capy

This branch was previously deployed

1 inactive (outdated) deployment
Preview – cap-status — 1b5657e7 Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant