fix: vault cache misses files in new directories, breaking theme restore
Root cause: git_uncommitted_files() used `git status --porcelain` which reports new untracked directories as `?? theme/` instead of listing individual files inside. The .md filter skipped directory entries, so files in newly-created directories (theme/default.md, etc.) were invisible to the cache system. Fix: additionally use `git ls-files --others --exclude-standard` which lists individual untracked files, resolving directories to their contents. Also: - Add type/theme.md definition (icon: palette) to restore and getting-started vault - Seed theme/*.md vault notes in getting-started vault - Fix mock create_vault_theme to add entries for dev mode Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -319,6 +319,16 @@ line-height-base: 1.6
|
||||
|
||||
# ${displayName}
|
||||
`
|
||||
const now = Date.now() / 1000
|
||||
MOCK_ENTRIES.push({
|
||||
path, filename: `${slug}.md`, title: displayName, isA: 'Theme',
|
||||
aliases: [], belongsTo: [], relatedTo: [], status: null, owner: null,
|
||||
cadence: null, archived: false, trashed: false, trashedAt: null,
|
||||
modifiedAt: now, createdAt: now, fileSize: 512, snippet: `A custom ${displayName} theme.`,
|
||||
wordCount: 10, relationships: {}, icon: null, color: null, order: null,
|
||||
sidebarLabel: null, template: null, sort: null, view: null,
|
||||
outgoingLinks: [], properties: {},
|
||||
})
|
||||
syncWindowContent()
|
||||
return path
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user