Commit d4ff6ad
authored
fix(documents): default file picker to cwd, not ~/Downloads (#952)
## 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.1 parent e92499d commit d4ff6ad
2 files changed
Lines changed: 20 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | 272 | | |
278 | 273 | | |
279 | 274 | | |
| |||
829 | 824 | | |
830 | 825 | | |
831 | 826 | | |
832 | | - | |
833 | | - | |
| 827 | + | |
| 828 | + | |
834 | 829 | | |
835 | 830 | | |
836 | 831 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1064 | 1064 | | |
1065 | 1065 | | |
1066 | 1066 | | |
1067 | | - | |
1068 | | - | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1069 | 1072 | | |
1070 | 1073 | | |
1071 | | - | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
1072 | 1085 | | |
1073 | 1086 | | |
1074 | 1087 | | |
| |||
0 commit comments