Repository navigation
Remember the scanning panel position between sessions - #1040
Merged
Merged
Conversation
The dock chosen with the position keys is saved to panel-position.json in the app config folder and restored when the next scanning session starts. It stays out of the synced scanner settings. A missing or invalid file falls back to the default dock, and moving out of the pointer's way never changes the saved position. Closes #1039 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mark the position saved only once the write succeeds, so the next switch action retries it, and sync the file to disk before the rename like the scanning settings writer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
enaboapps
marked this pull request as ready for review
October 13, 2026 10:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1039
What changed
panel_positionmodule stores the chosen scanning panel dock locally inpanel-position.json({"column":C,"row":R}) in the app config folder, next topoint-scan.jsonandswitch-settings.json. Writes replace the file atomically through the existingstorage::replace_filehelper.Workflow::with_dockstarts a new scanning session at the saved dock (point_scan_runtime::new_engine).Workflow::take_dock_changereports a newly chosen dock once.Adapter::rememberhook, called after each switch action inscanning_runtime, saves the dock only when the chosen dock actually changed. The temporary move away from the pointer (moved) is never saved. A failed save logs a generic message and keeps the dock for the running app.resume_fromalso carries the chosen dock into the next scan, so the position holds within a run even if saving fails.scan_panel::Dockderives serde. It is not added to the synced scanner config, portable settings or Supabase preferences, so the synced format is unchanged.Validation
npm run lint: passnpm test: 295/295 vitest tests (13 files) and 12/12 node tests passnpm run build: passcargo fmt --check: passcargo clippy --all-targets -- -D warnings: passcargo test: 761 passed, 0 failed, 5 ignored; config tests 7 passedpanel_position::tests::a_saved_position_loads_back,panel_position::tests::missing_or_invalid_positions_use_the_default(temp dirs),point_workflow::tests::a_saved_panel_position_is_restored_and_only_chosen_positions_are_saved(no real input).npm run prediction-modelwas not run. It fails on this machine with an EPERM rename in.cache/prediction-neural, a local Windows lock unrelated to this change. The gitignoredsrc-tauri/resources/prediction-model,src-tauri/resources/prediction-neuralandsrc-tauri/binarieswere copied from the main checkout for the build and tests.Review
00f4113raised two low-severity findings: a failed save was counted as saved and never retried, and the file was not flushed before the rename. Both are fixed in0999b73: the position is marked saved only after a successful write, so the next switch action retries, and the file issync_alled beforereplace_file. Rust fmt, clippy and tests passed again (761 passed).0999b73reported no actionable findings.🤖 Generated with Claude Code