Settings file: unknown entries of some types and unknown [notifications] siblings are lost on save #882

Open
opened 2026-11-18 08:02:42 +00:00 by charles · 0 comments
Owner

Found while joining Task 14 with Task 7 on the shell branch (PR #860). In fluxer-platform's settings file handling:

  1. Unknown entries inside [notifications.sounds] survive a load → save only if they are a bool, an integer or a string: toml_to_stored drops floats, arrays and tables.
  2. notifications_to_file rewrites [notifications] with only sounds, so any other key or sub-table a newer client adds under [notifications] is lost when an older client saves.

Wanted. A settings file written by a newer client must survive an older client's save unchanged in every part the older client does not know: carry unknown values of any TOML type, and preserve unknown siblings of the tables the client rewrites (check the same for the other tables Task 7 added: keybinds, shell). Tests: plant a float, an array, a table and an unknown sibling table; load, change one known setting, save; the planted entries are still there.

Found while joining Task 14 with Task 7 on the `shell` branch (PR #860). In fluxer-platform's settings file handling: 1. Unknown entries inside `[notifications.sounds]` survive a load → save only if they are a bool, an integer or a string: `toml_to_stored` drops floats, arrays and tables. 2. `notifications_to_file` rewrites `[notifications]` with only `sounds`, so any other key or sub-table a newer client adds under `[notifications]` is lost when an older client saves. **Wanted.** A settings file written by a newer client must survive an older client's save unchanged in every part the older client does not know: carry unknown values of any TOML type, and preserve unknown siblings of the tables the client rewrites (check the same for the other tables Task 7 added: keybinds, shell). Tests: plant a float, an array, a table and an unknown sibling table; load, change one known setting, save; the planted entries are still there.
charles added this to the Desktop shell milestone 2026-11-18 08:02:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#882
No description provided.