Repository navigation
fix(chat): keep disabled vision off when restoring watching mode - #172
Merged
Merged
Conversation
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.
What and why
After continuous vision is disabled, the backend retains
vision_mode=watchingfor the next enable. Reopening Chat previously treated that remembered mode as an enabled feature and displayed the continuous-vision button as active.Require both
vision_enabled=trueandvision_mode=watchingwhen loading the initial config and processing fullsystem.configsnapshots. This keeps the button aligned with the existing backend capture contract. The production change is confined to the ChatPage configuration effect; the other two files add regression coverage.Linked Issue: N/A — routine correction of the existing enabled-state display contract.
Change class
Owning layer: ChatPage projection of backend configuration.
User-visible effect: disabled vision remains visibly off when Chat reloads, while enabling the retained watching mode restores the active state.
Compatibility or migration impact: none.
Evidence
npm test: 378 Electron tests passed, including initial-load and cross-page notification cases.python -m pytest -q tests/test_visual_runtime_settings.py: 6 passed, including enabled/disabled capture with a remembered watching mode.npm run buildpassed in the isolated PR worktree.git diff --checkpassed.The state projection tests execute ChatPage's actual configuration effect. They cover enabled/disabled states, all existing modes, missing enabled state, and both notification envelopes. No layout or styling changes are included. No new runtime dependencies are introduced.
Final check