Skip to content

[Bug]: Packaged macOS app hangs on startup with legacy persisted modelSelection.options #92

@nihar5hah

Description

@nihar5hah

Before submitting\n\n- [x] I searched existing issues and did not find a duplicate.\n- [x] I included enough detail to reproduce or investigate the problem.\n\n### Area\n\napps/desktop\n\n### Steps to reproduce\n\n1. Install the packaged macOS app from the DMG.\n2. Launch it with an existing profile that contains older persisted thread/project state.\n3. Wait for the workspace/chat UI to load.\n\n### Expected behavior\n\nThe app should migrate older persisted state and finish loading the desktop chat/workspace UI.\n\n### Actual behavior\n\nThe app gets stuck on the workspace loading screen and the backend restarts in a loop.\n\nIn my case the UI stayed on:\n\n- \n- \n\n### Impact\n\nBlocks work completely for existing users with affected local state.\n\n### Version or commit\n\nPackaged app version on macOS arm64.\n\n### Environment\n\n- macOS\n- Installed from DMG\n- Existing from older app usage\n\n### Logs or stack traces\n\nDesktop log symptom:\n\n\n\nServer-side root cause from local logs:\n\n\n\nAfter fixing that path locally, startup still failed on persisted projections with the same legacy shape:\n\n\n\n### Root cause\n\nOlder persisted state can store in a legacy array form like:\n\n\n\nCurrent startup expects to already be an object, for example:\n\n\n\nThe packaged app crashes during backend startup instead of normalizing this legacy data.\n\nThe affected data was present in at least two places:\n\n- \n- \n\n### Suggested fix\n\nAdd a startup migration that normalizes legacy / arrays into keyed objects in persisted state before decode/replay.\n\n### Workaround\n\nStarting with a fresh profile avoids the crash, but that does not preserve existing state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions