Repository navigation
Studio: keep the Ask before downloading programs setting across browsers - #17240
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…ount (#17399) ## Summary `(Python 3.13, a-f)` is red on `main`: ``` studio/backend/tests/test_device_sync_settings.py::test_every_synced_store_field_is_saved E AssertionError: ('ChatPrefsPayload', {'shareComposerDraft'}) ``` This is a merge race between two correct PRs. #16548 (merged yesterday) added the opt-in `shareComposerDraft` preference to the chat preferences store. #17240 (merged today) added a guard that every synced chat preferences field is accepted by the server: the sync hook sends the whole store, and `ChatPrefsPayload` ignores unknown keys, so a field the model does not list is silently dropped and never follows the account. `shareComposerDraft` is not in `LOCAL_CHAT_PREFS` (which is only for browser-bound state such as notification permission and panel layout), so it is meant to sync like the other composer preferences, and today it does not. ## Changes - `studio/backend/routes/settings.py`: `ChatPrefsPayload` accepts `shareComposerDraft: Optional[bool]`, next to the other composer preferences. The setting now follows the account like `plainTextComposer` does; nothing else changes and older clients that do not send it are unaffected. ## Testing - `studio/backend/tests/test_device_sync_settings.py`: 19 passed; on `main` the guard fails as above (1 failed, 18 passed).
Turning off “Ask before downloading programs” in Settings > Browser only stuck in the browser where it was changed. Opening Studio in another browser, a private window or from a new tunnel address showed it switched back on, while the “Ask before downloading” toggle next to it carried over as expected. The server dropped this one setting when saving the account’s browser preferences.
The account’s browser preferences now save and return this setting like the others, so it follows the account everywhere. Accounts saved before this change keep each browser’s current value until the setting is changed again.
A backend test now reads the synced Browser, Chat and Plus menu stores and fails when the server model is missing a field the client sends, so the next new setting cannot be dropped the same way.
Before and after
Both toggles turned off in browser A, then Settings > Browser opened in a fresh browser B for the same account.
Before: “Ask before downloading programs” is back on in browser B. After: it stays off.