fix: derive green pallino from git status instead of in-memory tracker

The green dot (new note indicator) was disappearing after Cmd+S because
markSaved cleared it from the in-memory newPaths set. Now resolveNoteStatus
derives "new" status from git status (untracked/added files) so the green
dot persists until the note is committed. The in-memory tracker is only
used for the brief window between note creation and first save to disk.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
lucaronin
2026-02-24 22:20:22 +01:00
parent 3ea175eec5
commit 8b44ebbc22
7 changed files with 77 additions and 48 deletions

View File

@@ -47,7 +47,7 @@ function TrashDateLine({ entry }: { entry: VaultEntry }) {
}
const NOTE_STATUS_DOT: Record<string, { color: string; testId: string; title: string }> = {
new: { color: 'var(--accent-green)', testId: 'new-indicator', title: 'New (unsaved)' },
new: { color: 'var(--accent-green)', testId: 'new-indicator', title: 'New (uncommitted)' },
modified: { color: 'var(--accent-orange)', testId: 'modified-indicator', title: 'Modified (uncommitted)' },
}