Files
pipelines/app/notes/files-remembers-last-folder.md
T
alan 1928cfe51b Remember the last Files folder per chat
Persist each chat session's last navigated Files folder, restore it with bounded parent fallback, and forget it when the session closes. Add persistence coverage and capture-fixture support for the reviewed behavior.
2026-11-12 22:56:52 +00:00

14 lines
938 B
Markdown

# Files remembers the last folder
Implemented per-server/per-chat Files folder persistence with a bounded 200-entry SharedPreferences record. Successful directory navigation updates the record; startup restores it, validates it against the chat directory, and walks parent folders using `list_directory` when the saved folder is gone. Closing a chat removes its record. File previews and filters remain transient.
## Checks
- `tool/memwatch/full.sh 'test/features/chat/files/files_controller_persistence_test.dart test/features/chat/files/files_panel_test.dart test/features/chat/files/files_models_test.dart'`: 20 passed.
- `tool/analyze.sh`: clean.
- Browser/device captures were not run in this implementation stage.
The browser fixture supports `filesMissing=1` alongside `files=1`: after
seeding a remembered `assets` folder, reload with that flag to show the folder
request failing and the panel reopening at `/workspace/demo`.