Repository navigation
fix(config): accept GUI writes that restore an omitted default - #3858
Merged
bobleer merged 2 commits intoNov 10, 2026
Merged
Conversation
Settings such as app.flow_chat.send_during_turn omit their default value when serialized so legacy config files stay unchanged. Writing that default through the legacy GUI config path succeeded, but the follow-up read-back of the effective value failed with "Config path not found", so the GUI reported a save failure and kept showing the old value. Report the omitted default as null, matching an optional read of the path, and keep failing on any other read error.
Serde ignores unknown fields, so a legacy write to a misspelled path, or to a field this host does not know yet, leaves the config unchanged and used to fail on its read-back. Only report a missing leaf as null when the write actually changed the config, which is the case when restoring an omitted default or clearing an optional value.
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.
Summary
Switching Settings → Message sending → Send during a running turn back to Send immediately (default) failed with "Failed to save message sending preference", and the selector stayed on Queue.
AppFlowChatConfig::send_during_turnusesskip_serializing_if = is_immediateso legacy config files stay unchanged. Writing"immediate"through the legacy GUI config path therefore succeeds, but the follow-up read-back ofeffective_valueinapply_legacy_config_mutation_with_model_snapshotgetsNotFound: Config path 'app.flow_chat.send_during_turn' not found. The command returns an error, so the frontend cache never updates.This change reports the missing leaf as
null, matching an optional read of that path, only when the write changed the config. Serde silently drops unknown fields without changing anything, so writes to a misspelled path, or to a field this host does not know yet (for example from a newer peer controller), keep failing loudly as before. The persisted config shape is unchanged.Type and Areas
Type: bug fix
Areas: Rust core (
openbitfun-coreproduct-control config), desktop settings, CLI peer host (shares the same legacy write path)Motivation / Impact
Optionleaf withnull, which hit the sameNotFound.app.language, the only path whose backend effect readseffective_value, always serializes its value and is unaffected.Verification
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib agentic::tools::openbitfun_control_config: 11 passed, including:legacy_mutation_accepts_writes_of_an_omitted_default:queue→immediateround trip, and clearing an optional leaf (app.flow_chat.last_mode_id) withnull.legacy_mutation_still_rejects_paths_the_config_drops: a write to an unknown field still returns thenot founderror.Root cause confirmed from the desktop
app.logerror above. Not yet re-checked by hand in the running desktop app. Exercised locally only; the desktop and CLI peer hosts both reach this through the sharedapply_legacy_config_mutation, but remote workspace and Peer Device Mode were not tested separately.AI-assisted (Claude Code); lightly tested.
Reviewer Notes
immediate, writeimmediate) still returns the oldnot founderror, because it cannot be told apart from an unknown field without schema knowledge. The settings UI skips writes that equal the current value, so this is not reachable from the selector.failed_legacy_transactioncannot roll back a path whose previous value was an omitted default (previous_valueisNone). That only matters if a backend or presentation effect fails, and this path has none.Checklist