Fix RSS time filters and add draggable grid layout

Normalize pub_date to ISO 8601 on insert so SQLite datetime comparisons
work correctly. Migrate existing RFC 2822 dates. Change 1h filter to 12h.
Add react-grid-layout with persistent drag/resize and reset button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Shivam Patel
2026-02-09 17:51:06 -05:00
parent 717d52bd9a
commit 4ee365cfc0
13 changed files with 324 additions and 47 deletions

View File

@@ -85,6 +85,13 @@ async function setupRssTables(db) {
}
}
function normalizeDate(item) {
const raw = item.isoDate || item.pubDate;
if (!raw) return null;
const d = new Date(raw);
return isNaN(d.getTime()) ? null : d.toISOString();
}
async function syncRssFeeds(db) {
if (!RSSParser) return;
const parser = new RSSParser({ timeout: 5000 });
@@ -101,7 +108,7 @@ async function syncRssFeeds(db) {
feed.id,
item.title,
item.link,
item.pubDate || item.isoDate || null,
normalizeDate(item),
item.creator || item.author || null,
(item.contentSnippet || item.content || '').substring(0, 500) || null
);