修复划词追问保存失败无反馈#338
Merged
H-Chris233 merged 2 commits intoMay 7, 2026
Merged
Conversation
Selection Ask reused the same QA hotkey and history persistence paths as other settings pages, but the page did not surface pending, success, or failure states. A rejected hotkey registration or settings write could therefore leave users believing the feature or history option was enabled when the backend had not accepted the change.\n\nThis keeps the existing persistence contract and mirrors the Translation page status treatment: register QA hotkeys before saving prefs, stop on registration errors, refresh after write failures, and add localized feedback for all supported UI languages.\n\nConstraint: Issue Open-Less#315 requests minimal UI feedback and rollback behavior without refactoring the shared settings queue.\nRejected: Refactor HotkeySettingsContext persistence semantics | broader cross-page behavior change than needed for this bug.\nConfidence: high\nScope-risk: narrow\nTested: cd openless-all/app && npm run build\nTested: git diff --check\nNot-tested: Manual Tauri hotkey conflict flow on macOS/Windows.\nRelated: Open-Less#315
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
PR Reviewer Guide 🔍(Review updated until commit b0f481c)Here are some key observations to aid the review process:
|
The Selection Ask page now disables its card toggles while a save is in flight, but the nested shortcut recorder still accepted new recordings. That left a small overlap window where a second QA hotkey save could race the current setQaHotkey/savePrefs pair.\n\nThis keeps the recorder default behavior unchanged for other pages by adding an optional disabled prop and only wiring it from Selection Ask during its saving state.\n\nConstraint: Review feedback on PR Open-Less#338 requested preventing overlapping QA shortcut saves without broad settings-queue refactoring.\nRejected: Global serialization inside ShortcutRecorder | unnecessary for pages that already own their own persistence state.\nConfidence: high\nScope-risk: narrow\nTested: cd openless-all/app && npm run build\nTested: git diff --check\nNot-tested: Manual browser interaction against a slow Tauri IPC response.\nRelated: https://github.com/appergb/openless/issues/315\nRelated: Open-Less#338
|
Persistent review updated to latest commit b0f481c |
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.
User description
摘要
验证
cd openless-all/app && npm run buildgit diff --checkCloses #315
PR Type
Bug fix
Description
Add saving/saved/failed UI feedback for QA hotkey and history saves.
Stop persistence on hotkey registration error and refresh prefs to prevent UI drift.
Disable toggles and shortcut recorder during save to avoid race conditions.
Add localized error messages in zh‑CN, zh‑TW, en, ja, ko.
Diagram Walkthrough
flowchart LR A["User toggle / history change"] -- saving --> B["showSaveStatus('saving')"] B --> C["setQaHotkey or persistPrefs"] C -- success --> D["showSaveStatus('saved')"] C -- error --> E["showSaveStatus('failed') with message"] E --> F["refresh prefs and stop"] D --> G["UI reflects true state"] F --> G A --> H["Disable toggles & recorder during saving"]File Walkthrough
1 files
Introduce save state feedback and error handling6 files
Add disabled prop to prevent recording during savesAdd English error messages for save failuresAdd Japanese error messages for save failuresAdd Korean error messages for save failuresAdd Simplified Chinese error messages for save failuresAdd Traditional Chinese error messages for save failures