From fe44153ac6873cf3300d790d1466cb2ed88dcc76 Mon Sep 17 00:00:00 2001 From: Test Date: Sun, 5 Apr 2026 04:53:52 +0200 Subject: [PATCH] fix: exclude non-markdown files from Inbox view Added isMarkdown check to isInboxEntry so .yml, .json, and binary files no longer appear in the Inbox. All other views (All Notes, Archive, Trash, Sections, Views) already filter by markdown. FOLDERS still shows all file types. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/utils/noteListHelpers.test.ts | 13 +++++++++++++ src/utils/noteListHelpers.ts | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/utils/noteListHelpers.test.ts b/src/utils/noteListHelpers.test.ts index a0d53c02..bb6b18b0 100644 --- a/src/utils/noteListHelpers.test.ts +++ b/src/utils/noteListHelpers.test.ts @@ -730,3 +730,16 @@ describe('filterEntries — fileKind filtering', () => { expect(result.map(e => e.title)).toEqual(['Old']) }) }) + +describe('filterInboxEntries — excludes non-markdown files', () => { + it('only shows markdown files in inbox', () => { + const now = Math.floor(Date.now() / 1000) + const entries = [ + makeEntry({ path: '/vault/note.md', title: 'Note', fileKind: 'markdown', createdAt: now }), + makeEntry({ path: '/vault/config.yml', title: 'config.yml', fileKind: 'text', createdAt: now }), + makeEntry({ path: '/vault/photo.png', title: 'photo.png', fileKind: 'binary', createdAt: now }), + ] + const result = filterInboxEntries(entries, 'all') + expect(result.map(e => e.title)).toEqual(['Note']) + }) +}) diff --git a/src/utils/noteListHelpers.ts b/src/utils/noteListHelpers.ts index a7f18e97..b293021b 100644 --- a/src/utils/noteListHelpers.ts +++ b/src/utils/noteListHelpers.ts @@ -381,8 +381,9 @@ export function countAllByFilter(entries: VaultEntry[]): Record