Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

test: cover desktop update, maximize, and open-failure gates

open
Stack 2/2
#353 opened by cursor[bot]cursor/missing-test-coverage-e565→main
Conversation0
cursor[bot]
Commits
0
Files changed…
opened this pull request
Author
· yesterday

Risky behavior now covered

Recent desktop fixes in #349 left these fail-closed paths without direct tests:

  • The update-ready notification is held until click, action, or a non-timeout close. A timed-out Windows toast stays referenced so Action Center can still deliver Restart. Closing an older toast does not drop the toast that replaced it.
  • Restored maximize runs once, on the first live reveal. A window that was not maximized is left alone, and a destroyed window does not consume the one shot.
  • Opening a previewed file externally, opening a truncated code preview, or popping a canvas out reports a foreground error instead of swallowing it. Error messages and non-Error rejections are both shown. A successful open stays quiet, and a blank code-preview path does not call openPath.
  • getWorkspaceServerStatus, hydrateTranscript, and unwatchWorkspaceDirectory name themselves when preload input validation fails, and they do not invoke IPC.

Test files added/updated

  • Added apps/desktop/test/update-ready-notification.test.ts and apps/desktop/electron/services/updateReadyNotification.ts
  • Added apps/desktop/test/deferred-maximize.test.ts and apps/desktop/electron/services/deferredMaximize.ts
  • Updated apps/desktop/test/file-preview-modal.test.tsx and apps/desktop/src/ui/CodeFilePreview.tsx (openCodePreviewExternally)
  • Updated apps/desktop/test/canvas-window-lifecycle.test.tsx
  • Updated apps/desktop/test/preload-boundary.test.ts
  • apps/desktop/electron/main.ts calls the extracted hold and deferred-maximize helpers. Click, Restart Now, and focus behavior are unchanged.

Why this reduces regression risk

These were bug fixes that previously lived only in main.ts or as empty .catch handlers. A garbage-collected update toast drops Restart, maximizing at construction flashes an unpainted window, and a failed open or pop-out used to look like a no-op. The new tests lock the policies that prevent those regressions without snapshotting UI chrome.

Validation

  • bun test on the five touched desktop test files: 53 pass
  • bunx biome check on touched files: clean
  • bun run typecheck: clean
  • bun run docs:check: clean
  • Full suite not re-run; this environment's historical full runs truncate, and the change is covered by the targeted files.
Open in Web View Automation 
This branch can’t be merged automatically yet
Branch comparison failed — verify branches still exist in storage.
0 approving reviews
None yet
Checks
No checks recorded
Fast-forward
Source must contain the target branch tip
main ← cursor/missing-test-coverage-e565

Sign in to comment.

Stack

2/2
1

Merge readiness

Checking mergeability after the indexing worker computes the current branch state.

Autopilot

Debug

Reviews

Approved0
ReviewersNone yet

Configure an OpenRouter key in repository settings.

Update README.md

#125 mobile-fixes ← main

Updated 4 months ago

merged
2

test: cover desktop update, maximize, and open-failure gates

#353 main ← cursor/missing-test-coverage-e565

Updated yesterday

open