Skip to content

fix(documents): default file picker to cwd, not ~/Downloads#952

Merged
cpcloud merged 1 commit intomicasa-dev:mainfrom
cpcloud:worktree-demo-picker-cwd
Apr 18, 2026
Merged

fix(documents): default file picker to cwd, not ~/Downloads#952
cpcloud merged 1 commit intomicasa-dev:mainfrom
cpcloud:worktree-demo-picker-cwd

Conversation

@cpcloud
Copy link
Copy Markdown
Collaborator

@cpcloud cpcloud commented Apr 18, 2026

Summary

  • The document file picker resolved its starting dir through cfg.Documents.ResolvedFilePickerDir(), which defaulted to xdg.UserDirs.Download when unconfigured. That's non-deterministic — demos, tapes, and tutorials pressing Enter in the picker would select whatever sits at the top of the recorder's real ~/Downloads, producing irreproducible captures and a PII-leak risk for committed demo videos.
  • Default to the current working directory instead. Uniform behavior for normal and demo modes; explicit documents.file_picker_dir / MICASA_DOCUMENTS_FILE_PICKER_DIR still wins. Users who prefer Downloads as the starting location set it explicitly.

Reproduction steps

  1. Drop a PDF into ~/Downloads.
  2. Run micasa (or micasa demo), go to Docs tab, press i then A.
  3. File picker opens in ~/Downloads and Enter selects the first file there.

On this branch, step 3 opens the picker in the dir micasa was launched from.

@cpcloud cpcloud added bug Something isn't working documents Document management features labels Apr 18, 2026
The document file picker defaulted to the system Downloads folder
via `xdg.UserDirs.Download`. That's non-deterministic — demos, tapes,
and tutorials would pick up whatever happens to sit at the top of
the recorder's real Downloads, producing non-reproducible captures
and risking PII leaks in committed demo videos.

Default to the current working directory instead. Explicit
`documents.file_picker_dir` / `MICASA_DOCUMENTS_FILE_PICKER_DIR`
still wins. Users who want Downloads as the starting location set
it explicitly.
@cpcloud cpcloud force-pushed the worktree-demo-picker-cwd branch from b5b442c to ddbba69 Compare April 18, 2026 10:54
@cpcloud cpcloud changed the title fix(cli): default demo-mode file picker to cwd, not ~/Downloads fix(documents): default file picker to cwd, not ~/Downloads Apr 18, 2026
@cpcloud cpcloud removed the bug Something isn't working label Apr 18, 2026
@cpcloud cpcloud enabled auto-merge (squash) April 18, 2026 10:58
@cpcloud cpcloud merged commit d4ff6ad into micasa-dev:main Apr 18, 2026
28 checks passed
@cpcloud cpcloud deleted the worktree-demo-picker-cwd branch April 18, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documents Document management features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant