feat(import): warn that a document already has a workspace

Renaming the second workspace was the mechanism, not the news: what
matters is that this document already produced a workspace, so importing
it here copies it instead of updating it. The plan says that outright,
names the workspace, and does it on key overlap rather than on the name —
so it holds after either side has been renamed, and stays quiet when the
import is merging into that very workspace.

Plan notes carry a level so the ones worth a second thought read as
cautions, and the destination row gets its "new" chip back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Gregory Schier
2026-09-08 08:56:44 -07:00
co-authored by Claude Opus 5
parent cdc034b25a
commit 213458b60c
5 changed files with 173 additions and 46 deletions
+6 -1
View File
@@ -88,7 +88,12 @@ export type ImportPlanItem = {
*/
export type ImportPlanReason = "moved_into_ignored_folder";
export type ImportPlanWarning = { title: string; detail: string };
export type ImportPlanWarning = { title: string; detail: string; level: ImportPlanWarningLevel };
/**
* Whether a plan's note is something to know or something to think twice about.
*/
export type ImportPlanWarningLevel = "info" | "warning";
/**
* The model types an import plan can contain.