Home

mweinbach / agent-coworker

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

fix: dismiss preview only from the overlay area

6 months ago

2538f2b
Authored
mweinbach4/17/2026, 4:35:38 PM
The previous preview dismissal change still treated parts of the popup itself as
outside, which was the wrong interaction boundary. This restores the correct
modal behavior: only clicks on the gray overlay outside the popup dismiss the
preview, while clicks anywhere inside the popup remain non-dismissing.

Constraint: Keep the fix local to FilePreviewModal and avoid changing the shared dialog contract unless another surface explicitly needs different behavior
Rejected: Treat any non-document click inside the popup as dismissing | that collapses normal modal interaction and contradicts the intended boundary
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: For modal dismissal semantics, treat the overlay and the popup as separate interaction zones; do not infer “outside” from content layout inside the popup
Tested: bun run typecheck; bun run typecheck:desktop; cd apps/desktop && bun test; bun test; live Computer Use click on the gray overlay outside the preview popup
Not-tested: Other dialogs that may eventually want custom overlay-dismiss behavior

Parent74a6502

2 files changed
  • apps/desktop/src/ui/FilePreviewModal.tsx+0−5
  • apps/desktop/test/file-preview-modal.test.tsx+16−5