Skip to content

feat(desktop-gpui): add editor watch-preview overlay - #2605

Open
dovidmoishe wants to merge 4 commits into
CapSoftware:mainfrom
dovidmoishe:feat/gpui-editor-preview-fullscreen
Open

dovidmoishe wants to merge 4 commits into
CapSoftware:mainfrom
dovidmoishe:feat/gpui-editor-preview-fullscreen

Conversation

@dovidmoishe

@dovidmoishe dovidmoishe commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds a watch-preview control next to Split in the GPUI editor transport.
  • Clicking it lifts the current frame into a centred, rounded card over a dimmed editor. Space still plays and pauses; Escape, a click on the wash, or the control itself closes it.
  • Crop and export dismiss the overlay so it cannot sit under those surfaces. This gpui rev has no backdrop blur, so the wash is a dim rather than a blur.

https://x.com/itsdavetech/status/2110584950034493453?s=20

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with both previous findings addressed.

Summary

Adds an animated watch-preview card over a dimmed GPUI editor.

  • The editor lifts its current frame into a centered watch card.

Reviews (2) · Last reviewed commit: "fix(desktop-gpui): record watch overlay ..." · Reviewed by Greptile

Lift the editor player into a centred rounded card beside Split so recordings can be watched without the rest of the chrome.
@vercel

vercel Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@dovidmoishe is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

Comment on lines +689 to +690
if hidden {
return;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Watch frames go uncounted

While watch preview is open, this early return skips record_paint, and WatchView never calls it. Playback still shows pictures, but pausing reports zero or too few painted frames through paint_submitted_fps. This makes performance logs misleading. Pass the frame sequence and counters to WatchView and count frames where they are actually painted.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop-gpui/src/editor_window.rs
Line: 689-690

Comment:
**Watch frames go uncounted**

While watch preview is open, this early return skips `record_paint`, and `WatchView` never calls it. Playback still shows pictures, but pausing reports zero or too few painted frames through `paint_submitted_fps`. This makes performance logs misleading. Pass the frame sequence and counters to `WatchView` and count frames where they are actually painted.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment thread apps/desktop-gpui/src/editor_watch.rs Outdated
Comment on lines +1 to +3
//! The watch preview: the player's enlarge control lifts the composited frame
//! out of the stage into a centred, rounded card over a dimmed editor, and
//! puts it back on Escape, a click on the wash, or the control itself.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Comments repeat the feature

These opening comments describe the feature rather than explain a non-obvious decision. The repository guide says to default to no comments and explicitly bans comments that narrate behavior or describe the current change. Remove these lines before merging to satisfy that requirement. The comment above render_watch_preview_button and the new asset-test comment repeat the same pattern.

Context Used: CLAUDE.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop-gpui/src/editor_watch.rs
Line: 1-3

Comment:
**Comments repeat the feature**

These opening comments describe the feature rather than explain a non-obvious decision. The repository guide says to default to no comments and explicitly bans comments that narrate behavior or describe the current change. Remove these lines before merging to satisfy that requirement. The comment above `render_watch_preview_button` and the new asset-test comment repeat the same pattern.

**Context Used:** CLAUDE.md ([source](https://github.com/capsoftware/cap/blob/main/CLAUDE.md))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Count frames on the overlay canvas while the stage is hidden, and drop comments that only narrate the feature.
@dovidmoishe

Copy link
Copy Markdown
Contributor Author

@greptileai

@dovidmoishe

Copy link
Copy Markdown
Contributor Author

Hey @richiemcilroy, just checking in on this one! Happy to make any changes if needed to get it over the line.

This branch has not been deployed

No deployments
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