added last update time

This commit is contained in:
Arjun 2026-04-01 20:58:43 +05:30
parent 5fab2b95f4
commit 669650be1a
4 changed files with 28 additions and 10 deletions

View file

@ -153,6 +153,12 @@ function getSortValue(note: NoteEntry, column: string): string | number {
if (column === 'mtimeMs') return note.mtimeMs if (column === 'mtimeMs') return note.mtimeMs
const v = note.fields[column] const v = note.fields[column]
if (!v) return '' if (!v) return ''
// Sort date-like columns numerically
if (column === 'last_update' || column === 'first_met') {
const s = Array.isArray(v) ? v[0] ?? '' : v
const ms = Date.parse(s)
return isNaN(ms) ? 0 : ms
}
return Array.isArray(v) ? v[0] ?? '' : v return Array.isArray(v) ? v[0] ?? '' : v
} }
@ -776,6 +782,17 @@ function CellRenderer({
return <span className="text-muted-foreground whitespace-nowrap truncate block">{formatDate(note.mtimeMs)}</span> return <span className="text-muted-foreground whitespace-nowrap truncate block">{formatDate(note.mtimeMs)}</span>
} }
// Date-like frontmatter columns — render like Last Modified
if (column === 'last_update' || column === 'first_met') {
const value = note.fields[column]
if (!value || Array.isArray(value)) return null
const ms = Date.parse(value)
if (!isNaN(ms)) {
return <span className="text-muted-foreground whitespace-nowrap truncate block">{formatDate(ms)}</span>
}
return <span className="text-muted-foreground whitespace-nowrap truncate block">{value}</span>
}
// Frontmatter column // Frontmatter column
const value = note.fields[column] const value = note.fields[column]
if (!value) return null if (!value) return null

View file

@ -925,6 +925,7 @@ If you discovered new name variants during resolution, add them to Aliases field
- Note state changes with \`[Field → value]\` in activity - Note state changes with \`[Field → value]\` in activity
- Escape quotes properly in shell commands - Escape quotes properly in shell commands
- Write only one file per response (no multi-file write batches) - Write only one file per response (no multi-file write batches)
- **Always set \`Last update\`** in the Info section to the YYYY-MM-DD date of the source email or meeting. When updating an existing note, update this field to the new source event's date.
--- ---

View file

@ -23,7 +23,7 @@ const DEFAULT_NOTE_TYPE_DEFINITIONS: NoteTypeDefinition[] = [
**Email:** {email or leave blank} **Email:** {email or leave blank}
**Aliases:** {comma-separated: first name, nicknames, email} **Aliases:** {comma-separated: first name, nicknames, email}
**First met:** {YYYY-MM-DD} **First met:** {YYYY-MM-DD}
**Last seen:** {YYYY-MM-DD} **Last update:** {YYYY-MM-DD}
## Summary ## Summary
{2-3 sentences: Who they are, why you know them, what you're working on together.} {2-3 sentences: Who they are, why you know them, what you're working on together.}
@ -56,7 +56,7 @@ const DEFAULT_NOTE_TYPE_DEFINITIONS: NoteTypeDefinition[] = [
**Domain:** {primary email domain} **Domain:** {primary email domain}
**Aliases:** {comma-separated: short names, abbreviations} **Aliases:** {comma-separated: short names, abbreviations}
**First met:** {YYYY-MM-DD} **First met:** {YYYY-MM-DD}
**Last seen:** {YYYY-MM-DD} **Last update:** {YYYY-MM-DD}
## Summary ## Summary
{2-3 sentences: What this org is, what your relationship is.} {2-3 sentences: What this org is, what your relationship is.}
@ -90,7 +90,7 @@ const DEFAULT_NOTE_TYPE_DEFINITIONS: NoteTypeDefinition[] = [
**Type:** {deal|product|initiative|hiring|other} **Type:** {deal|product|initiative|hiring|other}
**Status:** {active|planning|on hold|completed|cancelled} **Status:** {active|planning|on hold|completed|cancelled}
**Started:** {YYYY-MM-DD or leave blank} **Started:** {YYYY-MM-DD or leave blank}
**Last activity:** {YYYY-MM-DD} **Last update:** {YYYY-MM-DD}
## Summary ## Summary
{2-3 sentences: What this project is, goal, current state.} {2-3 sentences: What this project is, goal, current state.}
@ -131,7 +131,7 @@ const DEFAULT_NOTE_TYPE_DEFINITIONS: NoteTypeDefinition[] = [
**Keywords:** {comma-separated} **Keywords:** {comma-separated}
**Aliases:** {other ways this topic is referenced} **Aliases:** {other ways this topic is referenced}
**First mentioned:** {YYYY-MM-DD} **First mentioned:** {YYYY-MM-DD}
**Last mentioned:** {YYYY-MM-DD} **Last update:** {YYYY-MM-DD}
## Related ## Related
- [[People/{Person}]] {relationship} - [[People/{Person}]] {relationship}

View file

@ -47,7 +47,7 @@ role: VP Engineering
organization: Acme Corp organization: Acme Corp
email: sarah@acme.com email: sarah@acme.com
first_met: "2024-06-15" first_met: "2024-06-15"
last_seen: "2025-01-20" last_update: "2025-01-20"
--- ---
\`\`\` \`\`\`
@ -80,7 +80,7 @@ Use these exact keys for each tag category:
Extract all \`**Key:** value\` fields from the \`## Info\` (or \`## About\`) section into YAML frontmatter keys: Extract all \`**Key:** value\` fields from the \`## Info\` (or \`## About\`) section into YAML frontmatter keys:
1. **Convert keys to snake_case**: e.g. \`**First met:**\`\`first_met\`, \`**Last activity:**\`\`last_activity\`, \`**Last seen:**\`\`last_seen\`. 1. **Convert keys to snake_case**: e.g. \`**First met:**\`\`first_met\`, \`**Last update:**\`\`last_update\`.
2. **Strip wiki-link syntax**: \`[[Organizations/Acme Corp]]\`\`Acme Corp\`. Extract just the display name (last path segment). 2. **Strip wiki-link syntax**: \`[[Organizations/Acme Corp]]\`\`Acme Corp\`. Extract just the display name (last path segment).
3. **Skip blank/placeholder values**: If a field says "leave blank", is empty, or contains only template placeholders like \`{role}\`, omit it from the frontmatter. 3. **Skip blank/placeholder values**: If a field says "leave blank", is empty, or contains only template placeholders like \`{role}\`, omit it from the frontmatter.
4. **Quote dates**: Wrap date values in quotes, e.g. \`first_met: "2024-06-15"\`. 4. **Quote dates**: Wrap date values in quotes, e.g. \`first_met: "2024-06-15"\`.
@ -93,10 +93,10 @@ Extract all \`**Key:** value\` fields from the \`## Info\` (or \`## About\`) sec
**Per note type, extract these fields:** **Per note type, extract these fields:**
- **People**: role, organization, email, aliases, first_met, last_seen - **People**: role, organization, email, aliases, first_met, last_update
- **Organizations**: type, industry, relationship, domain, aliases, first_met, last_seen - **Organizations**: type, industry, relationship, domain, aliases, first_met, last_update
- **Projects**: type, status, started, last_activity - **Projects**: type, status, started, last_update
- **Topics** (from \`## About\`): keywords, aliases, first_mentioned, last_mentioned - **Topics** (from \`## About\`): keywords, aliases, first_mentioned, last_update
- **Meetings**: Extract from the note content and file path: - **Meetings**: Extract from the note content and file path:
- \`date\`: meeting date (from the file path \`Meetings/{source}/YYYY/MM/DD/\` or from \`created_at\`/\`Date:\` in content) - \`date\`: meeting date (from the file path \`Meetings/{source}/YYYY/MM/DD/\` or from \`created_at\`/\`Date:\` in content)
- \`source\`: \`granola\` or \`fireflies\` (from the file path) - \`source\`: \`granola\` or \`fireflies\` (from the file path)