Skip to content

Settings sync: save the shared composer draft preference with the account - #17399

Merged
danielhanchen merged 1 commit into
mainfrom
fix/sync-share-composer-draft
Nov 10, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/sync-share-composer-draft

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

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).

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T12:45:06.580641Z 5ecfd85 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 5ecfd8593d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@danielhanchen
danielhanchen merged commit c0b61a1 into main Nov 10, 2026
@danielhanchen
danielhanchen deleted the fix/sync-share-composer-draft branch November 10, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant