Update the recent project history when opening projects#1329
Update the recent project history when opening projects#1329amilcarlucas merged 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates project-opening behavior so that opening a vehicle directory also records it in the “recently used” history (handled by the business layer rather than the UI).
Changes:
- Persist “recently used vehicle directory” history when
VehicleProjectManager.open_*succeeds. - Expand data-model tests to assert history is recorded on success and not recorded on failure.
- Add frontend tests intended to ensure the view doesn’t write recent-history directly.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/test_frontend_tkinter_project_opener.py | Adds UI-layer tests asserting history isn’t updated directly by the view. |
| tests/test_data_model_vehicle_project.py | Updates manager tests to expect history updates on successful opens and no updates on failures. |
| ardupilot_methodic_configurator/data_model_vehicle_project.py | Implements history recording inside open_vehicle_directory / open_last_vehicle_directory. |
| # Act: Complete workflow – the manager method is responsible for | ||
| # updating the history, so we don't call store_recently_used_vehicle_dir | ||
| # explicitly here. | ||
| vehicle_path = manager.open_vehicle_directory("/vehicle/path") |
There was a problem hiding this comment.
manager.open_vehicle_directory(...) now calls store_recently_used_vehicle_dir(...) internally, which (by default) delegates to LocalFilesystem.store_recently_used_vehicle_dir(...). If this test doesn’t patch/stub that history-writing path in its setup, it may introduce real filesystem/config side effects and become flaky. Patch manager.store_recently_used_vehicle_dir (or LocalFilesystem.store_recently_used_vehicle_dir) in this workflow test and assert it was called with vehicle_path.
3e3b663 to
5333915
Compare
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Test Results 2 files ±0 2 suites ±0 28m 15s ⏱️ -15s Results for commit 5339f33. ± Comparison against base commit e991dd6. This pull request removes 2 and adds 5 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
15c51f5 to
f5439bd
Compare
| Do not update history directly from the view when user selects a directory manually. | ||
|
|
||
| When the user picks an arbitrary existing vehicle directory through the selection widgets | ||
| the window should not update the history the manager is responsible for that. |
There was a problem hiding this comment.
Missing punctuation between 'history' and 'the manager'. Add a semicolon, period, or em dash for clarity.
| the window should not update the history the manager is responsible for that. | |
| the window should not update the history; the manager is responsible for that. |
f5439bd to
623f0d5
Compare
623f0d5 to
5339f33
Compare
No description provided.