fix(ui): open saved plans against their owning project
Saved Project knowledge plans opened as an empty editor whenever the
viewer could not resolve the owning project from the current directory:
managed chats (openchamber:chats is not a registered project), worktrees
outside the repo path, and plan tabs restored after a reload. Titles
still rendered because the list reads the manifest through the correct
owner.
- Thread the owner explicitly (savedProjectPlan = { projectRef, planId })
from the panel, mobile surfaces, and persisted context tabs; PlanView
no longer guesses the project.
- An unrecognized directory resolves to no owner instead of borrowing
the active project's knowledge.
- Serialize plan writes per document (planSaveQueue) so close/switch
within the autosave debounce no longer drops the last edits, saves
cannot land out of order, and a recovered save clears the error banner.
- Send saved-plan contents inline in Improve/Implement prompts (they
have no file path); disable those actions for managed-chat plans,
which have no project directory to create a session in.
- Drop persisted plan tabs that carry an id without an owner rather than
reopening them against a guessed project.
This commit is contained in:
@@ -57,6 +57,17 @@ export interface ProjectRef {
|
||||
path: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* A saved project plan plus the project that owns it, carried as one value so
|
||||
* a viewer can never end up with a plan id whose owner it has to guess.
|
||||
* PlanView resolves no owner on its own: the panel (or the persisted tab,
|
||||
* or the mobile surface) that opened the plan knows the owner exactly.
|
||||
*/
|
||||
export interface SavedProjectPlanTarget {
|
||||
projectRef: ProjectRef;
|
||||
planId: string;
|
||||
}
|
||||
|
||||
export const PROJECT_NOTE_BODY_MAX_LENGTH = 3000;
|
||||
export const PROJECT_TODO_TEXT_MAX_LENGTH = 120;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user