This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

Add publishedDate (YYYY-MM-DD) via LLM enrichment

- Enrichment prompt now asks for publishedDate in YYYY-MM-DD format
- Cards show date (month+day when available, year otherwise)
- publishedDate derived from URL patterns and LLM inference
- All 26 records now have publishedDate

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>

author
Nandi
co-author
Letta Code
date (May 17, 2026, 10:39 PM -0700) commit 8e3218c1 parent c2cf676b
+13 -5
+4 -3
src/landing-page.ts
··· 82 82 container.innerHTML = summaries.map(s => { 83 83 const domains = (s.domains || []).map(d => '<span class="domain">' + d + '</span>').join(''); 84 84 const venue = s.venue ? '<span class="venue-badge">' + s.venue + '</span> ' : ''; 85 - const year = s.year ? ' (' + s.year + ')' : ''; 85 + const dateStr = s.publishedDate ? s.publishedDate.replace(/-01$/, '') : (s.year ? String(s.year) : ''); 86 + const dateInTitle = dateStr ? ' (' + dateStr + ')' : ''; 86 87 const authors = (s.authors || []).length > 0 87 88 ? s.authors.length <= 3 ? s.authors.join(', ') : s.authors[0] + ' et al.' 88 89 : ''; 89 90 return '<a class="paper-card" href="/paper/' + s.rkey + '">' 90 - + '<div class="title">' + venue + escHtml(s.title) + year + '</div>' 91 - + '<div class="meta">' + (s.year ? s.year + ' · ' : '') + (authors ? escHtml(authors) + ' · ' : '') + escHtml(s.posterHandle) + '</div>' 91 + + '<div class="title">' + venue + escHtml(s.title) + dateInTitle + '</div>' 92 + + '<div class="meta">' + (dateStr ? dateStr + ' · ' : '') + (authors ? escHtml(authors) + ' · ' : '') + escHtml(s.posterHandle) + '</div>' 92 93 + '<div class="summary">' + escHtml(s.summary).substring(0, 200) + '</div>' 93 94 + (domains ? '<div class="domains">' + domains + '</div>' : '') 94 95 + '</a>';
+4 -1
src/paper-summarizer.ts
··· 19 19 domains: string[]; 20 20 venue: string; 21 21 year: number | null; 22 + publishedDate: string | null; 22 23 } 23 24 24 25 export function extractFromPost(post: PaperPost): Partial<PaperSummary> { ··· 198 199 - "summary": 2-3 sentence summary in your own words. Focus on what the paper does and why it matters. Not a restatement of the abstract. 199 200 - "domains": array of 1-3 research domain strings (e.g. ["machine learning", "optimization"]) 200 201 - "takeaway": one sentence — the single most important thing a reader should remember 201 - - "year": the publication year as an integer (e.g. 2026). Derive from the URL, abstract, or title. 202 + - "publishedDate": the publication date in YYYY-MM-DD format. Derive from the URL (e.g. biorxiv.org URLs contain YYYY.MM.DD, arXiv URLs contain YYMM), abstract, or title. If only month is known, use YYYY-MM-01. If only year, use YYYY-01-01. 202 203 203 204 Paper: {title} 204 205 URL: {paperUrl} ··· 212 213 domains: string[]; 213 214 takeaway: string; 214 215 year?: number; 216 + publishedDate?: string; 215 217 } 216 218 217 219 export async function enrichWithLetta( ··· 275 277 domains: parsed.domains || paper.domains, 276 278 takeaway: parsed.takeaway || "", 277 279 year: parsed.year || undefined, 280 + publishedDate: parsed.publishedDate || undefined, 278 281 }; 279 282 }
+5 -1
src/worker.ts
··· 239 239 summary.domains = enrichment.domains; 240 240 if (enrichment.takeaway) (summary as any).takeaway = enrichment.takeaway; 241 241 if (enrichment.year) summary.year = enrichment.year; 242 + if (enrichment.publishedDate) (summary as any).publishedDate = enrichment.publishedDate; 242 243 return { post, summary }; 243 244 } catch (err: any) { 244 245 console.error(`Enrichment failed for ${post.paperUrl}: ${err?.message ?? err}, using heuristic`); ··· 327 328 328 329 await ensureContrailReady(db); 329 330 330 - // Get records that need enrichment (empty/placeholder summaries, no takeaway, Untitled, or missing year) 331 + // Get records that need enrichment 331 332 const rows = await db 332 333 .prepare( 333 334 `SELECT rkey, record FROM records_summary ··· 338 339 OR json_extract(record, '$.takeaway') = '' 339 340 OR json_extract(record, '$.year') IS NULL 340 341 OR json_extract(record, '$.year') = 0 342 + OR json_extract(record, '$.publishedDate') IS NULL 341 343 ORDER BY time_us DESC LIMIT 20` 342 344 ) 343 345 .all<{ rkey: string; record: string }>(); ··· 381 383 if (result.takeaway) record.takeaway = result.takeaway; 382 384 if (result.title) record.title = result.title; 383 385 if (result.year) record.year = result.year; 386 + if (result.publishedDate) record.publishedDate = result.publishedDate; 384 387 385 388 await db 386 389 .prepare("UPDATE records_summary SET record = ? WHERE rkey = ?") ··· 554 557 summary.domains = enrichment.domains; 555 558 if (enrichment.takeaway) (summary as any).takeaway = enrichment.takeaway; 556 559 if (enrichment.year) summary.year = enrichment.year; 560 + if (enrichment.publishedDate) (summary as any).publishedDate = enrichment.publishedDate; 557 561 return { post, summary }; 558 562 } catch { 559 563 return { post, summary };