Repository navigation
feat(desktop-gpui): add editor watch-preview overlay - #2605
dovidmoishe wants to merge 4 commits into
Conversation
Lift the editor player into a centred rounded card beside Split so recordings can be watched without the rest of the chrome.
|
@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. |
| if hidden { | ||
| return; |
There was a problem hiding this comment.
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.| //! 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. |
There was a problem hiding this comment.
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.
|
Hey @richiemcilroy, just checking in on this one! Happy to make any changes if needed to get it over the line. |
Summary
https://x.com/itsdavetech/status/2110584950034493453?s=20


Confidence 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.
Reviews (2) · Last reviewed commit: "fix(desktop-gpui): record watch overlay ..." · Reviewed by Greptile