Skip to content

fix(desktop-gpui): keep the main window hidden after an Instant recording - #3440

Merged
richiemcilroy merged 9 commits into
mainfrom
fix/gpui-instant-main-window-hidden
Oct 27, 2026
Merged

richiemcilroy merged 9 commits into
mainfrom
fix/gpui-instant-main-window-hidden

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Stopping an Instant recording on macOS opened the share link in the browser and then brought Cap's main window back on top of it, so it had to be closed by hand. The main window now stays hidden after a clean Instant recording unless the user picks the new Show Cap outcome.

flowchart TD
    A[Instant recording stops cleanly] --> B{After an Instant recording}
    B -->|Open link| C[Link copied + opened in browser<br/>main window stays hidden]
    B -->|Show Cap| D[Link copied<br/>main window comes back]
    B -->|Copy link only| E[Link copied<br/>nothing opens]
Loading
  • apps/desktop-gpui/src/session.rs:1386 sets finished_instant when an Instant recording stops cleanly. Low storage still counts as unclean, so its notice is still shown in the main window.
  • The phase observer at apps/desktop-gpui/src/app_windows.rs:667 reads it alongside finished_studio. Unless the outcome is Show Cap, it takes the same path as Studio's "Do nothing": it parks the camera preview, syncs the dock and leaves the main window hidden. Failures, errors and recordings without a link still bring it back.
  • On Linux the clean-capture lease restores the main window before this branch runs, so Linux behaves as before.

Setting

Settings > Shortcuts > After an Instant recording:

Before After
Open link (In your browser) Open link (In your browser)
Show Cap (Back to the recorder)
Copy link only (Nothing opens) Copy link only (Nothing opens)

disableAutoOpenLinks is shared with the Tauri app, so the third state lives in a new key, showMainWindowAfterInstantRecording, and the two keys together make up store::PostInstantBehaviour:

pub fn post_instant_behaviour(&self) -> PostInstantBehaviour {
    if !self.disable_auto_open_links {
        PostInstantBehaviour::OpenLink
    } else if self.show_main_window_after_instant {
        PostInstantBehaviour::ShowCap
    } else {
        PostInstantBehaviour::CopyLink
    }
}
  • A store that predates the new key reads showMainWindowAfterInstantRecording as equal to disableAutoOpenLinks. Anyone on "Copy link only" saw the main window come back, so they now load as Show Cap and nothing changes for them.
  • The two Show Cap strings reuse the existing Studio translations in every locale.
  • real_app_instant_outcome_decides_whether_main_window_returns records an Instant clip against MockCap under each outcome. It checks that the observer keeps the main window hidden for Open link and Copy link only, and takes the reshow for Show Cap.
  • A main window reopened during the recording is already on screen, so it takes the reshow too, which resumes its inputs.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with no outstanding actionable findings.

Summary

The PR keeps Cap hidden after a clean Instant recording unless the user selects Show Cap.

  • Cap stays hidden after an Instant recording unless the user chooses Show Cap.
  • Instant recording settings offer Open link, Show Cap, and Copy link only.

The three earlier threads are addressed. No new actionable issues were found. This review checked code paths; it did not run the native app or integration tests.

Reviews (4) · Last reviewed commit: "test(desktop-gpui): require the Show Cap..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
cap-status Ready Ready Preview Oct 27, 2026 2:28am UTC

Comment thread apps/desktop-gpui/src/app_windows.rs
Comment thread apps/desktop-gpui/src/store.rs Outdated
@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@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/app_windows.rs
@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@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

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

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

Comment thread apps/desktop-gpui/src/upload/real_app_tests.rs Outdated

@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

@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
richiemcilroy merged commit 97c8d63 into main Oct 27, 2026
62 checks passed

This branch was successfully deployed

2 active deployments
Preview – cap-web — ca2ed7db Deployed Oct 27, 2026 by vercel[bot]
Preview – cap-status — ca2ed7db Deployed Oct 27, 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