Repository navigation
fix: repair saved desktops not shown under "My Desktops" - #814
Merged
fstagni merged 1 commit intoOct 29, 2026
Merged
Conversation
The JSON migration (v6.0.7) broke the state save/load round trip: the browser sends the state as an already serialized JSON text, so json.dumps() in web_saveAppState double-encoded it, and _safeDecode() returned the inner JSON string instead of the structure for both double-encoded and legacy DEncode data. As a result UP/listAppState returned strings, the frontend failed to build the 'My Desktops' tree (TypeError in oprVerifyDataStructure), and web_changeView rejected every desktop. Shared desktops kept working because their listing is metadata only. - store the state verbatim when it is already a JSON text - unwrap redundant JSON string layers in _safeDecode, restoring the historic json.loads(DEncode.decode(...)[0]) behavior; data saved with the broken versions decodes correctly and self-heals on next save - add regression tests covering all storage generations
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
The v6.0.7 JSON migration broke the state save/load round trip in
UPHandler:UP/listAppStatetherefore returned{name: "<json string>"}instead of{name: {...}}. In the frontend,oprVerifyDataStructure()throws on a string, the callback building the desktop tree never fires, and the "My Desktops" node is never created. Users with no saved desktops under the logged-in group still see the (empty) node - matching the reported symptom. Shared desktops kept working because their listing is metadata only.web_changeViewwas broken too (rejected every desktop with "Invalid desktop state format").Changes:
web_saveAppState: store the state verbatim when it is already a JSON text_safeDecode: unwrap redundant JSON string layers, restoring the historicjson.loads(DEncode.decode(...)[0])behavior. States saved with the broken versions decode correctly and self-heal on their next save - no DB migration neededEvidence
_safeDecodereturnedstrfor every stored desktop generation ->oprVerifyDataStructure()TypeError -> "My Desktops" missingpytest tests/Test_UPHandler.py-> 6 passedMerge Danger
Door: two-way - pure backend decode/encode fix, no schema change, no data migration; stored data is untouched and self-heals on save.
Blast Radius: all users' saved desktops and application states (My/Shared Desktops, changeView). Shared-desktop metadata listing is unaffected.