Skip to content

feat(desktop-gpui): restore the recordings overlay after a Studio recording - #4258

Open
richiemcilroy wants to merge 15 commits into
mainfrom
feat/gpui-recordings-overlay
Open

richiemcilroy wants to merge 15 commits into
mainfrom
feat/gpui-recordings-overlay

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Brings back the floating overlay that followed a Studio recording in 0.6.0 when "After a Studio recording" was set to show it.

Why it was missing

  • The Tauri app opened RecordingsOverlay from apply_post_studio_editor_behaviour (apps/desktop/src-tauri/src/recording.rs:5963-5975 at 800ab28de^).
  • The GPUI app has no overlay window. It kept the stored value showOverlay but labelled it "Show Cap", and the stop flow sent it to the fallback arm that reshows the main window (app_windows.rs, phase observer).
flowchart LR
    stop[Studio recording stops cleanly] --> rules[automation rules<br/>SkipEditor / OpenEditor]
    rules --> b{postStudioRecordingBehaviour}
    b -- openEditor --> editor[editor]
    b -- showOverlay --> overlay[recordings overlay<br/>main window stays hidden]
    b -- doNothing --> lib[library only]
    shot[screenshot taken] -- overlay already up --> overlay
Loading

What changed

  • apps/desktop-gpui/src/recordings_overlay.rs (new): a stack of 260x150 cards, newest on top, in the bottom-left corner of the display under the cursor. Hovering a card shows the Tauri card's actions:
Action Recording Screenshot
Close removes the card, cancels a running action same
Edit / Open opens the editor and removes the card opens the image
Copy to clipboard renders (MP4, 60 fps, 1080p, Web, the Tauri overlay's settings) and copies the file copies the image
Copy shareable link copies the saved link, or renders and uploads through upload_exported_video with the organization picked in the export dialog (first one if it is gone), with progress uploads the image through upload_rendered_screenshot and saves the link on the bundle
Export system save panel, then renders to that file save panel, then copies the PNG
  • Each action shows a progress panel with Close above it, which cancels the render or upload. A failure shows its message and a Retry button (offline, server error). Signed out starts sign-in. A free plan over 5 minutes opens pricing, as the editor does.

  • Renders go through the editor's ExportResources check and supervision (a full drive fails with its message, a low-space warning asks first; on Linux that dialog runs off the UI thread). An update restart waits for overlay work (updates::work_in_flight).

  • Cards stay until closed or edited, as in Tauri (no timeout). The stack hides while a recording runs or a screenshot is captured (two separate flags, so a screenshot during a recording keeps it hidden), and comes back afterwards. On Wayland it first presents an empty frame with the picker windows (empty_overlays_for_screenshot). Actions in flight keep running meanwhile.

  • A screenshot taken while the stack is up joins it, which is what the Tauri overlay did through NewScreenshotAdded. Screenshots do not open the stack by themselves (Tauri never did that either).

  • When the stack is taller than the display allows, the oldest idle card goes first; a card mid-upload is never dropped. Cards whose recording was deleted meanwhile are dropped when the stack comes back.

  • Setting: postStudioRecordingBehaviour is unchanged on disk. showOverlay, written by 0.6.0 for its overlay and by 0.6.1 to 0.6.3 for "Show Cap", now means the overlay again and is labelled "Show in overlay" (Shortcuts page outcome: "Show overlay"). Nothing new is written, so a downgrade to 0.6.0 still reads it.

  • Automations (feat(desktop-gpui): run saved automation rules #4059): its studio_editor_behaviour maps SkipEditor to doNothing and OpenEditor to openEditor, so the overlay is suppressed and the editor wins exactly as in Tauri's studio_recording_editor_behaviour. For screenshots, a matching rule that can delete the capture (a save or custom-path export followed by Delete local files, the same test feat(desktop-gpui): run saved automation rules #4059 uses to keep the editor closed) now gets no overlay card, so no card points at a file about to go (automation::screenshot_rule_deletes, passed into screenshot_finished).

  • Small visibility changes for reuse: editor_export::run_export, export_file_name, app_windows::gpui_display_id, remove_popup_window_chrome.

  • A failed action shows a short hint under its title ("Check your connection and try again." for links, "Something went wrong. Try again." for copy and export) with Retry. The raw error is logged. Sign-in, upgrade and export-resource messages are already written for people and show as they are.

  • The action buttons are light circles with dark icons in both appearances, as in Tauri (bg-gray-1 dark:bg-gray-12). The card itself matches Tauri: cover-fit thumbnail, black/40 hover layer, black/50 details strip.

Callers checked

  • postStudioRecordingBehaviour readers: the phase observer match (app_windows.rs), open_preparing_studio_editor and prepares_studio_editor (only openEditor prepares an editor; showOverlay still waits for finalization before the card appears, so actions never run on an unfinished recording), the Shortcuts page outcome cards and effect sentences (settings_pages.rs, unchanged wording for non-editor outcomes).
  • prepare_for_screenshot_capture and screenshot_finished (both screenshot paths, including Wayland's empty_overlays_for_screenshot, go through them).
  • run_export keeps its single editor caller; signature unchanged.
  • screenshot_finished has one caller (screenshot.rs), which now passes whether a rule deletes the capture. upload_rendered_screenshot gained an organization argument on main; the overlay's screenshot share passes None like the screenshot editor.

What could regress

  • Users with showOverlay saved from 0.6.1 to 0.6.3 now see the overlay instead of the main window coming back. That is the intent: the value always meant the overlay, and GPUI's own comment called the reshow a stand-in "until an overlay exists".
  • Every other behaviour value takes the same arm as before.

Tests

  • recordings_overlay::tests::failed_cards_show_a_hint_instead_of_the_raw_error: an HTTP 500 maps to the hint per action; sign-in, upgrade and resource-stop messages pass through.

  • recordings_overlay::tests (15): organization choice, corner placement and the work-area clamp, the card limit, overflow keeping busy cards, progress and titles for every state, a screenshot joining only an open stack, deleted recordings dropped on return, one action at a time with Close cancelling, a deleted recording closing its card, Done and Failed settling back, a screenshot during a recording keeping the stack hidden.

  • store::tests::post_studio_overlay_reads_tauri_and_gpui_stores: a full 0.6.0 general_settings object and a GPUI single-key store both read showOverlay as the overlay; unknown and absent values stay openEditor.

  • automation::tests::only_a_screenshot_rule_that_can_delete_drops_the_overlay_card: a save then delete rule drops the card; a disabled rule, a lone delete (which never runs), an editor rule and a Studio rule do not.

  • Locale surface tests cover every new string in all seven catalogs.

  • Real app (upload/real_app_tests.rs, macOS, run by instant-reliability.yml):

    • real_app_studio_overlay_keeps_the_main_window_hidden: a real Studio recording with showOverlay shows one card and the main window stays hidden.
    • real_app_overlay_actions_copy_share_retry_export_and_edit: drives the card through CAP_GPUI_AUTO_RECORDINGS_OVERLAY (debug builds only). Copy renders output/result.mp4 onto the clipboard; Share hits an injected 500 and fails, Retry uploads to the organization picked in the export dialog (orgId=org-picked) and the clipboard holds the saved /s/<id> link; Export writes an MP4 to the chosen path; Edit opens the editor.
    • real_app_recording_start_behaviour_minimises_or_hides_main_window used showOverlay only to get the main window back; it now uses the Instant "Show Cap" outcome for that.

Proof

  • macOS (GitHub macOS runner, real ScreenCaptureKit capture, this head): both overlay real-app tests pass with the rest of the real-app suite (13/13). App log from the actions run:
recordings overlay shown cards=1
recordings overlay copies the render path=.../output/result.mp4
recordings overlay action finished kind=Copy ok=true
recordings overlay action finished kind=Share ok=false   (injected 500)
recordings overlay action finished kind=Share ok=true    (retry, orgId=org-picked)
recordings overlay action finished kind=Save ok=true
editor window opened
  • Linux and Windows: the app builds and the unit tests pass in CI; the overlay window itself was not exercised on those desktops.

Screenshots and recording

Real app on a GitHub-hosted macOS 15 runner with real ScreenCaptureKit capture, driven by the same overlay hook as the tests (the share server is a local stub, so the failure is the injected 500). The runner desktop has a stock wallpaper and a Finder window, so each thumbnail is that recorded screen filling its card.

Light Dark
One card
Hover shows the actions
Stack of 3
Copy rendering
Copied
Share failed, Retry
Creating the link
Link copied
Edit opens the editor

Recordings (record, card, stack, Copy, Share failure and Retry, Copy shareable link, Edit): light, dark. Every still, including hover on each card of the stack and the stack hidden while recording, is on media/gpui-recordings-overlay.

RetriggerView in GreptileConfidence Score: 4/5

The PR needs a fix before merging because overlay actions can compete with automations for the same export file.

Findings

  1. P1 Renders compete for one file ▶
Fix with agent prompt
### Issue 1
apps/desktop-gpui/src/recordings_overlay.rs:1092
`render_for_project` writes Copy and Share exports to `meta.output_path()` without coordinating with automations. A Studio-finished rule can export to `ProjectFolder` or upload while the card is available. Clicking Copy or Share then starts another render to the same file.

If both renders stage a new file, one fails when it publishes. If the file already exists, both can write it at once, damaging the export or changing bytes during an upload. Coordinate work for each project, or render to a separate file and upload that exact file.

---

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

Summary

Restores the floating recordings overlay for the saved showOverlay setting.

  • Studio recordings can open a floating card stack with actions.
  • Capturing a screenshot hides the stack and can add the image as a card.
  • The saved Show overlay choice now opens the recordings stack.

The seven supplied earlier threads are unnumbered, so they have no previousFindings entries. Their fixes are present: Close appears above status panels, updates check busy cards, Wayland screenshots wait for an empty frame, renders use resource safeguards, the flagged comments were removed, and Linux save dialogs preserve chosen paths and show failures.

Reviews (13) · Last reviewed commit: "fix(desktop-gpui): no overlay card for a..." · Reviewed by Greptile

@sandchest-com

sandchest-com Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Sandchest

Sandchest reviewed 0cf3bf5: nothing exploitable found in this change.

Sandchest reviews every change for vulnerabilities an attacker could use · 3 credits · Review details

@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 3 potential issues (3 medium).

View 1 other finding in Capy.

Open in Capy

Comment thread apps/desktop-gpui/src/app_windows.rs Resolved
@vercel

vercel Bot commented Nov 14, 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 Skipped Skipped Nov 16, 2026 9:15pm UTC

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 14, 2026 06:45 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 1 potential issue (1 medium).

Open in Capy

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 14, 2026 06:57 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.

View 1 other finding in Capy.

Open in Capy

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 14, 2026 17:57 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 1 potential issue (1 medium).

View 2 other findings in Capy.

Open in Capy

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 14, 2026 23:13 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

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 15, 2026 15:53 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.

View 1 other finding in Capy.

Open in Capy

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 16, 2026 11:24 Inactive
Comment thread apps/desktop-gpui/src/platform.rs Resolved
@vercel
vercel Bot temporarily deployed to Preview – cap-status November 16, 2026 11:59 Inactive
@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 16, 2026 12:47 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.

View 3 other findings in Capy.

Open in Capy

@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.

View 1 other finding in Capy.

Open in Capy

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

) -> Result<PathBuf, String> {
let meta = RecordingMeta::load_for_project(project_path)
.map_err(|error| format!("Failed to load recording metadata: {error}"))?;
let save_path = destination.unwrap_or_else(|| meta.output_path());

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.

P1 Renders compete for one file

render_for_project writes Copy and Share exports to meta.output_path() without coordinating with automations. A Studio-finished rule can export to ProjectFolder or upload while the card is available. Clicking Copy or Share then starts another render to the same file.

If both renders stage a new file, one fails when it publishes. If the file already exists, both can write it at once, damaging the export or changing bytes during an upload. Coordinate work for each project, or render to a separate file and upload that exact file.

Knowledge Base Used: Export and editor rendering

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

Comment:
**Renders compete for one file**

`render_for_project` writes Copy and Share exports to `meta.output_path()` without coordinating with automations. A Studio-finished rule can export to `ProjectFolder` or upload while the card is available. Clicking Copy or Share then starts another render to the same file.

If both renders stage a new file, one fails when it publishes. If the file already exists, both can write it at once, damaging the export or changing bytes during an upload. Coordinate work for each project, or render to a separate file and upload that exact file.

**Knowledge Base Used:** [Export and editor rendering](https://app.greptile.com/-/switch-tenant?tenant=cap&next=%2Fcustom-context%2Fknowledge-base%2Fcapsoftware%2Fcap%2F-%2Fdocs%2Fexport-and-editor-rendering.md)

---

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

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cap-web — 0cf3bf5b Deployed Nov 16, 2026 by vercel[bot]
Preview – cap-status — 0cf3bf5b Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant