From 62c8d0f7a8a38e68cbc954271c324080521a72be Mon Sep 17 00:00:00 2001 From: lucaronin Date: Tue, 24 Feb 2026 22:07:13 +0100 Subject: [PATCH] fix: pass modifiedFiles to NoteList so Changes view filters correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit App.tsx passed getNoteStatus but not modifiedFiles to NoteList. The Changes view uses modifiedPathSet (derived from modifiedFiles) to filter entries, so it was always empty — showing "no pending changes" even with modifications present. Co-Authored-By: Claude Opus 4.6 --- src/App.tsx | 2 +- src/components/NoteList.test.tsx | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 0cd9ff68..fd2dacd6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -202,7 +202,7 @@ function App() {
- +
diff --git a/src/components/NoteList.test.tsx b/src/components/NoteList.test.tsx index e137d511..9e86aea6 100644 --- a/src/components/NoteList.test.tsx +++ b/src/components/NoteList.test.tsx @@ -950,5 +950,17 @@ describe('NoteList — virtual list with large datasets', () => { expect(screen.getByText('Build Laputa App')).toBeInTheDocument() expect(screen.queryByText('Facebook Ads Strategy')).not.toBeInTheDocument() }) + + it('shows modified notes when both getNoteStatus and modifiedFiles are provided', () => { + // Regression: App.tsx passes both getNoteStatus and modifiedFiles. + // The changes filter must use modifiedFiles for filtering even when getNoteStatus is present. + const getNoteStatus = (path: string) => modifiedFiles.some((f) => f.path === path) ? 'modified' as const : 'clean' as const + render( + + ) + expect(screen.getByText('Build Laputa App')).toBeInTheDocument() + expect(screen.getByText('Facebook Ads Strategy')).toBeInTheDocument() + expect(screen.queryByText('Matteo Cellini')).not.toBeInTheDocument() + }) }) })