Skip to content

fix(desktop): do not trigger SnapShots while typing when feature is off - #79

Closed
macodev00 wants to merge 1 commit into
mainfrom
cursor/snapshots-typing-feature-off-b253
Closed

macodev00 wants to merge 1 commit into
mainfrom
cursor/snapshots-typing-feature-off-b253

Conversation

@macodev00

Copy link
Copy Markdown
Owner

Fixes pingdotgg#12769.

Problem

With SnapShots turned off, typing and ordinary chat updates still played the capture sound and stacked "Snapshot taken, but no project is available". The desktop main process already releases the shortcut and refuses new captures. SnapShotCoordinator stays mounted and never read snapShotEnabled, so each composer or thread update, focus, and visibility change listed leftover pending files, sounded them, and toasted again.

Change

While SnapShots are off, the coordinator does not subscribe, list pending captures, play the capture sound, or toast. A drain already in flight stops before the next sound, toast, or attachment, including a file read that resolves after the toggle. Pending files stay on disk and are delivered when the feature is turned back on.

An undeliverable capture is reported once, so the same pending file does not sound and toast on every later pass.

The macOS both-Shift poller is still killed when the feature is turned off. A regression covers that, and capture fails with disabled.

Scope and approval

Accepted bug: pingdotgg#12769 (bug, accepted, via-triage). Triage on the issue confirmed the main process tears the shortcut down and the remaining flood is the renderer coordinator. The desktop app embeds this web coordinator. Mobile is unchanged.

Verification

Node v24.13.1. vp was /workspace/node_modules/.bin/vp.

From apps/web:

vp test run --project unit src/components/desktop/SnapShotCoordinator.gate.test.tsx src/components/desktop/SnapShotCoordinator.test.ts
 Test Files  2 passed (2)
      Tests  21 passed (21)
   Start at  06:35:38
   Duration  2.87s

The new cases passed:

  • does not list, sound, or toast when chat state changes or the window focuses
  • drops an in-flight pending list once the feature turns off
  • lists again after the feature is turned back on
  • sounds and toasts an undeliverable capture once across later chat updates
  • leaves the capture pending when the file read finishes after the feature is off

From apps/desktop:

vp test run src/snapShot/DesktopSnapShot.test.ts -t "releases the macOS both-Shift poller"
 Test Files  1 passed (1)
      Tests  1 passed | 114 skipped (115)
   Duration  1.39s

From the repo root:

vp run --filter @t3tools/web typecheck

Exit 0.

vp lint --report-unused-disable-directives apps/web/src/components/desktop/SnapShotCoordinator.tsx apps/web/src/components/desktop/SnapShotCoordinator.test.ts apps/web/src/components/desktop/SnapShotCoordinator.gate.test.tsx apps/desktop/src/snapShot/DesktopSnapShot.test.ts

Exit 0. The only finding is an existing warning that lastTargetRef is written during render. This change does not touch that write.

vp fmt apps/web/src/components/desktop/SnapShotCoordinator.tsx apps/web/src/components/desktop/SnapShotCoordinator.test.ts apps/web/src/components/desktop/SnapShotCoordinator.gate.test.tsx apps/desktop/src/snapShot/DesktopSnapShot.test.ts

Finished with no further edits.

Limitations

No macOS desktop session and no real osascript poller. The poller test asserts the mocked child is killed and that capture fails with disabled.

No browser screenshots. The coordinator tests mount the component and assert that listing, sound, and toasts do not run while the feature is off, including after a chat-state change, focus, and a pending list that resolves after the toggle. Turning the feature back on lists again.

Pending files are not deleted when the feature is turned off.

Grok 4.7, Cursor cloud agent.

Open in Web Open in Cursor 

SnapShotCoordinator kept draining leftover captures on chat updates,
focus, and visibility after the feature was turned off, so the same
pending file played a sound and stacked a toast while typing.

Skip that work while SnapShots are off, stop a drain already in flight,
and report an undeliverable capture once. Turning the feature off still
kills the macOS both-Shift poller.

Fixes pingdotgg#12769
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Oct 2, 2026
@macodev00

Copy link
Copy Markdown
Owner Author

Opened upstream.

@macodev00 macodev00 closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: SnapShots keep triggering while typing even though the feature is turned off (stable 0.0.42, macOS)

1 participant