diff --git a/.beads/interactions.jsonl b/.beads/interactions.jsonl index 03d7216..65b2292 100644 --- a/.beads/interactions.jsonl +++ b/.beads/interactions.jsonl @@ -7,3 +7,4 @@ {"id":"int-ef0bb2b7","kind":"field_change","created_at":"2026-06-29T14:35:47.990869363Z","actor":"dawn","issue_id":"nucleus-9ot","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Removed old package and verified typescript / prettier formatting"}} {"id":"int-a4d53813","kind":"field_change","created_at":"2026-06-29T14:35:55.325922806Z","actor":"dawn","issue_id":"nucleus-bkx","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Epic complete: all list virtualizations rewritten to use TanStack Virtual."}} {"id":"int-3ef022dd","kind":"field_change","created_at":"2026-06-29T15:44:24.7334854Z","actor":"dawn","issue_id":"nucleus-huf","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Converted global notificationStream, jetstream, and pulsingPostId stores to Svelte 5 state objects."}} +{"id":"int-fb44cac5","kind":"field_change","created_at":"2026-06-29T16:02:53.45125394Z","actor":"dawn","issue_id":"nucleus-bwr","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Fixed Svelte 5 Date and Set lint errors by using Date.parse, SvelteDate, and SvelteSet."}} diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 2c5ff32..305eb09 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -1,3 +1,4 @@ +{"_type":"issue","id":"nucleus-bwr","title":"Resolve Svelte 5 Date and Set lint errors in state.svelte.ts","description":"Replace built-in Date instantiation with Date.parse or SvelteDate, and built-in Set instantiation with SvelteSet to satisfy Svelte 5 lint rules.","status":"closed","priority":2,"issue_type":"task","assignee":"dawn","owner":"90008@klbr.net","created_at":"2026-06-29T16:01:47Z","created_by":"dawn","updated_at":"2026-06-29T16:02:53Z","started_at":"2026-06-29T16:01:55Z","closed_at":"2026-06-29T16:02:53Z","close_reason":"Fixed Svelte 5 Date and Set lint errors by using Date.parse, SvelteDate, and SvelteSet.","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"nucleus-huf","title":"Modernize state stores to Svelte 5 Runes","description":"Convert notificationStream, jetstream, and pulsingPostId from Svelte 4 writables to Svelte 5 state/derived runes, updating components and routes.","status":"closed","priority":2,"issue_type":"task","assignee":"dawn","owner":"90008@klbr.net","created_at":"2026-06-29T15:41:52Z","created_by":"dawn","updated_at":"2026-06-29T15:44:25Z","started_at":"2026-06-29T15:42:02Z","closed_at":"2026-06-29T15:44:25Z","close_reason":"Converted global notificationStream, jetstream, and pulsingPostId stores to Svelte 5 state objects.","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"nucleus-9ot","title":"Clean up @tutorlatin/svelte-tiny-virtual-list and verify build/lints","description":"Uninstall unused dependency, run linter and build to make sure everything works perfectly","status":"closed","priority":2,"issue_type":"task","assignee":"dawn","owner":"90008@klbr.net","created_at":"2026-06-29T14:27:01Z","created_by":"dawn","updated_at":"2026-06-29T14:35:48Z","started_at":"2026-06-29T14:33:32Z","closed_at":"2026-06-29T14:35:48Z","close_reason":"Removed old package and verified typescript / prettier formatting","dependencies":[{"issue_id":"nucleus-9ot","depends_on_id":"nucleus-3w3","type":"blocks","created_at":"2026-06-29T17:28:10Z","created_by":"dawn","metadata":"{}"},{"issue_id":"nucleus-9ot","depends_on_id":"nucleus-ehl","type":"blocks","created_at":"2026-06-29T17:28:23Z","created_by":"dawn","metadata":"{}"},{"issue_id":"nucleus-9ot","depends_on_id":"nucleus-fcu","type":"blocks","created_at":"2026-06-29T17:28:15Z","created_by":"dawn","metadata":"{}"},{"issue_id":"nucleus-9ot","depends_on_id":"nucleus-ib8","type":"blocks","created_at":"2026-06-29T17:28:19Z","created_by":"dawn","metadata":"{}"},{"issue_id":"nucleus-9ot","depends_on_id":"nucleus-n16","type":"blocks","created_at":"2026-06-29T17:28:02Z","created_by":"dawn","metadata":"{}"},{"issue_id":"nucleus-9ot","depends_on_id":"nucleus-xnz","type":"blocks","created_at":"2026-06-29T17:28:06Z","created_by":"dawn","metadata":"{}"}],"dependency_count":6,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"nucleus-ehl","title":"Refactor GenericTimelineView to use TanStack Virtual","description":"Replace VirtualList in GenericTimelineView.svelte with TanStack Virtual using dynamic height measurement (measureElement)","status":"closed","priority":2,"issue_type":"task","assignee":"dawn","owner":"90008@klbr.net","created_at":"2026-06-29T14:26:53Z","created_by":"dawn","updated_at":"2026-06-29T14:33:25Z","started_at":"2026-06-29T14:33:01Z","closed_at":"2026-06-29T14:33:25Z","close_reason":"refactored GenericTimelineView.svelte to use TanStack Virtual with dynamic height","dependencies":[{"issue_id":"nucleus-ehl","depends_on_id":"nucleus-n16","type":"blocks","created_at":"2026-06-29T17:27:57Z","created_by":"dawn","metadata":"{}"}],"dependency_count":1,"dependent_count":2,"comment_count":0} diff --git a/src/lib/state.svelte.ts b/src/lib/state.svelte.ts index 53d6264..fa2a03f 100644 --- a/src/lib/state.svelte.ts +++ b/src/lib/state.svelte.ts @@ -1,3 +1,4 @@ +import { get } from 'svelte/store'; import { AtpClient, setRecordCache, @@ -302,8 +303,8 @@ export const loadAccountPreferences = async (account: Account) => { } // both exist - last modified wins - const localTime = new Date(localPrefs!.updatedAt).getTime(); - const remoteTime = new Date(remotePrefs!.updatedAt).getTime(); + const localTime = Date.parse(localPrefs!.updatedAt); + const remoteTime = Date.parse(remotePrefs!.updatedAt); if (localTime > remoteTime) { accountPreferences.set(account.did, localPrefs!); @@ -322,7 +323,7 @@ export const setAccountPreferences = ( const updated: Preferences = { ...existing, ...partial, - updatedAt: new Date().toISOString() + updatedAt: new SvelteDate().toISOString() }; accountPreferences.set(did, updated); @@ -454,8 +455,8 @@ export const fetchFollowingTimeline = async ( const postA = getPostFromUri(a); const postB = getPostFromUri(b); return ( - new Date(postB?.record.createdAt ?? 0).getTime() - - new Date(postA?.record.createdAt ?? 0).getTime() + (Date.parse(postB?.record.createdAt ?? '') || 0) - + (Date.parse(postA?.record.createdAt ?? '') || 0) ); }); @@ -468,7 +469,7 @@ export const fetchFollowingTimeline = async ( return; } - const subjects = new Set(follows.get(userDid)?.keys()); + const subjects = new SvelteSet(follows.get(userDid)?.keys()); subjects.add(userDid); // 2. Find the "newest" cursor(s) @@ -940,7 +941,7 @@ export const fetchInteractionsToFollowingTimelineEnd = async (client: AtpClient, for (const uri of feed) { const post = getPostFromUri(uri); if (post) { - const ts = new Date(post.record.createdAt).getTime() * 1000; + const ts = Date.parse(post.record.createdAt) * 1000; if (ts < minTimestamp) minTimestamp = ts; found = true; } @@ -969,7 +970,7 @@ export const fetchInteractionsToFeedTimelineEnd = async ( for (const uri of posts) { const post = getPostFromUri(uri); if (post) { - const ts = new Date(post.record.createdAt).getTime() * 1000; + const ts = Date.parse(post.record.createdAt) * 1000; if (ts < minTimestamp) minTimestamp = ts; found = true; }