fix: add visible key to frontmatterToEntryPatch maps

The ENTRY_DELETE_MAP and update map in frontmatterToEntryPatch were
missing the 'visible' key. When handleDeleteProperty or
handleUpdateFrontmatter was called for 'visible', the in-memory
VaultEntry was not updated, causing the sidebar to stay stale even
after the file on disk was correctly modified.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Test
2026-03-07 00:20:51 +01:00
parent 2a00b8aac7
commit 7ddc0c14bf
4 changed files with 66 additions and 3 deletions

View File

@@ -150,7 +150,7 @@ const ENTRY_DELETE_MAP: Record<string, Partial<VaultEntry>> = {
icon: { icon: null }, owner: { owner: null }, cadence: { cadence: null },
aliases: { aliases: [] }, belongs_to: { belongsTo: [] }, related_to: { relatedTo: [] },
archived: { archived: false }, trashed: { trashed: false }, order: { order: null },
template: { template: null }, sort: { sort: null },
template: { template: null }, sort: { sort: null }, visible: { visible: null },
}
/** Map a frontmatter key+value to the corresponding VaultEntry field(s). */
@@ -170,6 +170,7 @@ export function frontmatterToEntryPatch(
template: { template: str },
sort: { sort: str },
view: { view: str },
visible: { visible: value === false ? false : null },
}
return updates[k] ?? {}
}