Home

mweinbach / agent-coworker

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

fix: dismiss preview from in-modal gutter clicks

6 months ago

74a6502
Authored
mweinbach4/17/2026, 4:22:38 PM
The previous preview dismissal tweak closed the file viewer when the entire app
window lost focus, which was broader than intended. This narrows the behavior
so clicking the empty gutter area inside the popup viewer closes it, matching
the expected modal interaction without dismissing on arbitrary app blur.

Constraint: Keep dismissal scoped to the file preview modal and avoid changing shared dialog behavior for every surface
Rejected: Keep the window-blur dismissal | it closes the preview on the wrong interaction boundary
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Treat preview dismissal semantics as modal-specific; prefer explicit local handlers before broadening shared dialog behavior
Tested: bun run typecheck; bun run typecheck:desktop; cd apps/desktop && bun test; bun test; live Electron verification that clicking left/right of the preview closes the popup
Not-tested: Non-file dialogs with similar gutter layouts

Parenta203caa

2 files changed
  • apps/desktop/src/ui/FilePreviewModal.tsx+12−17
  • apps/desktop/test/file-preview-modal.test.tsx+6−3