Home

mweinbach / agent-coworker

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

fix: streamline desktop file preview opening and cleanup cues

6 months ago

376db16
Authored
mweinbach4/17/2026, 3:52:33 PM
The desktop file preview still carried misleading opener copy, transient DOCX
layout messaging, and Word lockfile noise in the sidebar. This finishes the
preview follow-up by resolving a best-effort preferred opener label on macOS,
keeping the actual launch on the default app path, forcing the DOCX page shell
into a white document surface with tighter page sizing, and suppressing Office
lockfiles in both backend directory reads and renderer-side stale explorer data.

Constraint: Keep the launch behavior on the existing default-app path and avoid introducing a broader app-picker UI in this pass
Rejected: Add a full multi-app opener menu in the preview header | more UI surface than requested and unnecessary for the current single-action flow
Rejected: Hide lockfiles only at directory-read time | stale cached explorer state would still show them until a refresh
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If a real multi-app opener is added later, keep the single-action button label colon-free and switch to colon or menu affordances only when multiple choices are actually visible
Tested: bun run typecheck; bun run typecheck:desktop; cd apps/desktop && bun test; bun test; live Electron verification for DOCX opener label, white preview page, and hidden ~$.docx lockfiles
Not-tested: Non-mac preferred opener labeling beyond the generic Open fallback

Parentedf5f85

12 files changed
  • apps/desktop/electron/ipc/files.ts+74−1
  • apps/desktop/electron/preload.ts+11−0
  • apps/desktop/electron/services/explorerVisibility.ts+3−0
  • apps/desktop/src/lib/desktopApi.ts+6−0
  • apps/desktop/src/lib/desktopCommands.ts+4−0
  • apps/desktop/src/lib/desktopSchemas.ts+2−0
  • apps/desktop/src/ui/FilePreviewModal.tsx+14−47
  • apps/desktop/src/ui/file-explorer/WorkspaceFileExplorer.tsx
+10
−3
  • apps/desktop/test/file-preview-modal.test.tsx+8−50
  • apps/desktop/test/files-ipc.test.ts+15−0
  • apps/desktop/test/helpers/mockDesktopCommands.ts+1−0
  • apps/desktop/test/workspace-file-explorer.test.ts+25−3