From cdac0d69bbdf3cc89aae2869adefb348b953466e Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sat, 16 May 2026 18:12:50 +0900 Subject: [PATCH] fix(workspace): report only the active notepad change --- src/shared/git-worktree/format-file-changes.ts | 2 +- src/shared/git-worktree/git-worktree.test.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/shared/git-worktree/format-file-changes.ts b/src/shared/git-worktree/format-file-changes.ts index 8a23dabf8..ef2a35f73 100644 --- a/src/shared/git-worktree/format-file-changes.ts +++ b/src/shared/git-worktree/format-file-changes.ts @@ -41,7 +41,7 @@ export function formatFileChanges(stats: GitFileStat[], notepadPath?: string): s const normalizedNotepadPath = normalizePath(notepadPath) const notepadStat = stats.find((s) => { const normalizedPath = normalizePath(s.path) - return normalizedPath === normalizedNotepadPath || normalizedPath.includes(".omo/notepads/") + return normalizedPath === normalizedNotepadPath }) if (notepadStat) { lines.push("[NOTEPAD UPDATED]") diff --git a/src/shared/git-worktree/git-worktree.test.ts b/src/shared/git-worktree/git-worktree.test.ts index 2c903d1dc..2ba125a11 100644 --- a/src/shared/git-worktree/git-worktree.test.ts +++ b/src/shared/git-worktree/git-worktree.test.ts @@ -65,4 +65,12 @@ describe("git-worktree", () => { expect(summary).toContain("[NOTEPAD UPDATED]") expect(summary).toContain(".omo/notepads/work/notes.md") }) + + test("#given notepad path #when formatting another omo notepad change #then does not report active notepad updated", () => { + const summary = formatFileChanges([ + { path: ".omo/notepads/other/notes.md", added: 1, removed: 0, status: "modified" }, + ], ".omo/notepads/work/notes.md") + + expect(summary).not.toContain("[NOTEPAD UPDATED]") + }) })