fix: repair missing Local Project assignments for existing chats#1559
Open
yazan1991 wants to merge 1 commit into
Open
fix: repair missing Local Project assignments for existing chats#1559yazan1991 wants to merge 1 commit into
yazan1991 wants to merge 1 commit into
Conversation
yazan1991
marked this pull request as ready for review
July 17, 2026 23:20
Open
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
Closes #1558.
Adds an explicit Manager maintenance action that analyzes and repairs missing Local Project assignments for existing conversations with a valid rollout CWD.
Root cause
Local Projects are retained in global state, and older rollout files retain their working directory. Some legacy threads lack the
thread-project-assignmentsrecord that the UI requires to show the conversation beneath its Local Project.Behavior
Schema assumptions
The repair requires
local-projectsto be an object keyed by the project IDs inproject-order. It pairs each such ID with the same-index root inelectron-saved-workspace-roots; malformed types or unequal array lengths fail safely without writing.Tests
Added focused Rust tests for exact matches, existing assignments, unmatched and missing CWDs, both rollout CWD locations, malformed JSONL, ambiguous roots, duplicate thread IDs, dry runs, idempotency, backups, verification rollback, and preservation of unrelated fields.
Validation run:
git diff --check— passedcargo fmt --check/cargo test -p codex-plus-core local_project_repair— not run: Rust/Cargo is unavailable in the local environmentnpm run check/ build — not run: manager dependencies are unavailable locallyNo personal state, paths, thread IDs, or local test artifacts are included.