feat: minimal Today.md UI polish - no emoji headings, better track chip (#528)

* feat: remove emoji headings and polish track block chip styling

- Strip emojis from Today.md section headings (new + existing files via migration)
- Track chip: full-width card style matching email blocks, colored icons per track type
- Larger, taller chip with muted gray background for light/dark mode

* feat: increase track chip icon and text size

* feat: make track block icons configurable via yaml
This commit is contained in:
gagan 2026-05-06 14:34:53 +05:30 committed by GitHub
parent f26d57e8eb
commit 0bb58e55ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 79 additions and 28 deletions

View file

@ -15,9 +15,10 @@ interface Section {
const SECTIONS: Section[] = [
{
heading: '## Up Next',
heading: '## Up Next',
track: {
trackId: 'up-next',
icon: 'clock',
instruction:
`Write 1-3 sentences of plain markdown giving the user a shoulder-tap about what's next on their calendar today.
@ -41,9 +42,10 @@ Plain markdown prose only — no calendar block, no email block, no headings.`,
},
},
{
heading: '## 📅 Calendar',
heading: '## Calendar',
track: {
trackId: 'calendar',
icon: 'calendar-days',
instruction:
`Emit today's meetings as a calendar block titled "Today's Meetings".
@ -60,9 +62,10 @@ After the block, you MAY add one short markdown line per event giving useful pre
},
},
{
heading: '## 📧 Emails',
heading: '## Emails',
track: {
trackId: 'emails',
icon: 'mail',
instruction:
`Maintain a digest of email threads worth the user's attention today, rendered as zero or more email blocks (one per thread).
@ -81,9 +84,10 @@ Do NOT re-list threads the user has already seen unless their state changed (new
},
},
{
heading: '## 📰 What You Missed',
heading: '## What You Missed',
track: {
trackId: 'what-you-missed',
icon: 'history',
instruction:
`Short markdown summary of what happened yesterday that matters this morning.
@ -106,9 +110,10 @@ Do NOT manufacture content to fill the section.`,
},
},
{
heading: '## Today\'s Priorities',
heading: '## Today\'s Priorities',
track: {
trackId: 'priorities',
icon: 'list-todo',
instruction:
`Ranked markdown list of the real, actionable items the user should focus on today.
@ -154,7 +159,28 @@ function buildDailyNoteContent(): string {
return parts.join('\n');
}
function migrateEmojiHeadings(): void {
if (!fs.existsSync(DAILY_NOTE_PATH)) return;
let content = fs.readFileSync(DAILY_NOTE_PATH, 'utf-8');
const original = content;
const replacements: [string, string][] = [
['## ⏱ Up Next', '## Up Next'],
['## 📅 Calendar', '## Calendar'],
['## 📧 Emails', '## Emails'],
['## 📰 What You Missed', '## What You Missed'],
["## ✅ Today's Priorities", "## Today's Priorities"],
];
for (const [from, to] of replacements) {
content = content.split(from).join(to);
}
if (content !== original) {
fs.writeFileSync(DAILY_NOTE_PATH, content, 'utf-8');
console.log('[DailyNote] Migrated emoji headings');
}
}
export function ensureDailyNote(): void {
migrateEmojiHeadings();
if (fs.existsSync(DAILY_NOTE_PATH)) return;
fs.writeFileSync(DAILY_NOTE_PATH, buildDailyNoteContent(), 'utf-8');
console.log('[DailyNote] Created today.md');

View file

@ -27,6 +27,7 @@ export const TrackBlockSchema = z.object({
schedule: TrackScheduleSchema.optional(),
model: z.string().optional().describe('ADVANCED — leave unset. Per-track LLM model override (e.g. "anthropic/claude-sonnet-4.6"). Only set when the user explicitly asked for a specific model for THIS track. The global default already picks a tuned model for tracks; overriding usually makes things worse, not better.'),
provider: z.string().optional().describe('ADVANCED — leave unset. Per-track provider name override (e.g. "openai", "anthropic"). Only set when the user explicitly asked for a specific provider for THIS track. Almost always omitted; the global default flows through correctly.'),
icon: z.string().optional().describe('Lucide icon name for the chip (e.g. "clock", "calendar-days", "mail", "history", "list-todo"). Omit to use the default icon for this track.'),
lastRunAt: z.string().optional().describe('Runtime-managed — never write this yourself'),
lastRunId: z.string().optional().describe('Runtime-managed — never write this yourself'),
lastRunSummary: z.string().optional().describe('Runtime-managed — never write this yourself'),