Bar widget settings written through the shell lost after a plugin update
Custom price rows saved in a widget's settings disappeared after updating that plugin, and a saved key-file reference rotated at the same time. Filing here because widget settings persist through the shell rather than through the plugin, which writes per-key patches only.
What happened
A bar widget holds settings in shell.json (a JSON object of custom prices, in this case). Two entries were added through omarchy bar set <widget> costPriceOverrides '<json>' on 27 October, and both were verified present in the file and in effect. After omarchy plugin update <widget> to a release that changed the plugin's QML and manifest version, only the oldest entry remained: the two added that day were gone. The widget's own saved key-file reference changed the same day as well (pointing at a new private file, the previous one removed), though the key itself was only renewed once by hand.
What I ruled out
- The plugin writes per-key patches. Its settings editor emits
changeRequestedwith only the keys that changed, and its key-saving flow sets one key per save. Nothing in the plugin writes the whole settings object. - Plugin rescan survives:
omarchy-shell shell rescanPluginswith a test key written throughomarchy bar setleft every setting intact. - Plugin code reload survives: touching a plugin QML file to trigger the hot reload left every setting intact.
- A shell restart survives:
omarchy restart shellleft every setting intact, including keys written throughomarchy bar set. - The plugin's own editor had a save-as-you-type bug (fixed in JanitorHead/omarchy-quotatank#19) that disturbed typing, but it never wrote settings for an incomplete row and is not the loss.
So the write paths look right and the three triggers I can force all preserve the values; the loss happened somewhere in the plugin-update window and I cannot reproduce it since.
What would help
- Does the shell rewrite a widget's
shell.jsonentry on plugin update or widget recreation, and if so from what snapshot? The surviving entry is the oldest one, which reads like an older snapshot winning over newer writes. - The saved key-file reference rotating without a user action may be the same story from the other side: the widget's key flow stages a private file and commits its path when the host has persisted it, so a settings write that lost newer keys might also have re-committed an older staged path.
Anything you can point at — or a diagnostic to run the next time a plugin is updated — would be welcome. I will keep a copy of the settings around the next update here and report what changes.
https://github.com/omacom/omarchy/issues/15850#issuecomment-6357124607
A second data point that may be the mechanism, found while updating a bar widget plugin from 2.x to 3.x today.
A plugin update does not reload the running widget's code. The plugin's files are replaced on disk, but the widget keeps executing the version it was created with until the shell restarts. Evidence: after omarchy plugin update to a release whose reader dropped the --source flag, the limits reader kept failing with "exited with status 2", and the captured process argv showed the old widget still passing --source direct to the new reader. Touching a plugin QML file did not replace the instance either. omarchy restart shell fixed it immediately; the same call then ran without the flag.
That explains a transient failure, and it also looks like the shape of the settings loss in the report above: a widget running pre-update code holds pre-update state, and any write it makes after the update — a key save, a settings commit — lands from that stale snapshot. The pattern matches exactly: entries added after the widget's snapshot were lost, the oldest one survived, and saved key-file references rotated to new staged files with no user action.
If that is the mechanism, the fix belongs here rather than in plugins: either reload a widget's code when its plugin is updated, or make widget writes merge into the stored settings rather than replace them, so a stale writer cannot drop keys it never saw. Either one would have prevented both symptoms.
Codex High read the report, both follow-ups, the linked issue #15850, and the current base branch's contributor rules. I read this as a bug report, but the separate classification check returned no usable answer, so its classification remains unresolved and no label has been applied.
The settings loss and the stale widget code described here have not been reproduced in this review; no runtime tests were run and no fix was prepared. This issue is waiting for maintainer review because the classification check could not be completed.