Skip to content

Bug: existing local chats can miss Local Project assignments #1558

Description

@yazan1991

Summary

Existing conversations can have a valid rollout working directory but be absent from their matching Local Project because the global-state assignment record is missing.

Observed behavior

  • Local Projects and their saved workspace roots are present in global state.
  • Older rollout files retain an authoritative CWD in supported metadata locations.
  • Some existing threads are missing from thread-project-assignments.
  • Adding the matching local-project assignment causes the conversation to appear immediately.

Proposed safe repair

Add an explicit, user-triggered repair action with dry-run and apply modes. It should:

  • match only exact normalized rollout CWDs to exactly one saved Local Project root;
  • preserve every existing assignment and all unrelated global-state fields;
  • skip missing, unmatched, ambiguous, malformed, and duplicate rollout records;
  • create a timestamped backup, write atomically, reopen to verify, and restore the backup on verification failure;
  • be idempotent and never run automatically at startup.

Scope

This is intentionally limited to Local Project assignment recovery. It does not change providers, routing, authentication, plugins, or normal startup behavior.

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