Summary
Focused media resolves its item only when the view mounts. If Finder or another process removes or renames the backing file afterward, no filesystem listener remains active in media mode and the view does not return to the canvas as intended.
Evidence
src/media/MediaView.tsx:51-62 calls openDirectory only during the mount effect.
MediaView does not subscribe to fs-event.
- Opening media unmounts
CanvasView, which owns the existing filesystem-event subscription.
- The source comment and recent implementation commit state that media should close when its item disappears.
Proposed change
- Keep workspace filesystem reconciliation active independently of the current visual mode.
- Resolve relevant events through durable item identity rather than only the original path.
- Close to the canvas when the item is deleted or becomes a tombstone.
- Update the media source and metadata when an external rename preserves the item identity.
- Surface permission and decode failures explicitly rather than leaving an empty media stage.
Acceptance criteria
- Deleting the open file externally closes focused media and shows its tombstone on the canvas.
- Renaming the open file externally preserves the focused view and updates its filename when identity reconciliation succeeds.
- Permission loss produces a labeled error and a safe route back to the canvas.
- Event listeners are cleaned up without duplicate subscriptions.
- Tests cover delete, rename, permission loss, and unrelated filesystem events.
Summary
Focused media resolves its item only when the view mounts. If Finder or another process removes or renames the backing file afterward, no filesystem listener remains active in media mode and the view does not return to the canvas as intended.
Evidence
src/media/MediaView.tsx:51-62callsopenDirectoryonly during the mount effect.MediaViewdoes not subscribe tofs-event.CanvasView, which owns the existing filesystem-event subscription.Proposed change
Acceptance criteria