-
Notifications
You must be signed in to change notification settings - Fork 0
Recents
LocalStorage-backed LRU list of projects, key recent-projects. Cap 30 entries. Implemented in src/recents.ts.
-
Dashboard polling:
recordSeenBatchon every poll, dedupes by cwd within the tick. Primary source: recents auto-populate from your actual running processes without explicit bookmarking. -
Launcher hand-off:
recordSeenBatchonce beforelaunchCommand, so launches that fail to bind a port still leave a recents trace.
recordSeenBatch canonicalizes cwds on every write and merges entries that resolve to the same realpath. Lets stale duplicates from earlier builds self-clean.
The picker also calls recordSeenBatch([]) on mount to force the migration immediately, so a long-time user's stale entries clean up the first time they open the picker after upgrading.
- Running entries are hidden in the picker view (the dashboard owns them). They reappear once stopped.
- Entries whose folder no longer exists on disk are hidden this render but kept in storage: a remounted external drive or restored backup brings them back.
Each entry optionally carries a favicon data URI, persisted by the dashboard via updateRecentFavicon so the picker can show real icons for stopped projects. The full detection + caching story (including the 24 KB MAX_FAVICON_BYTES persistence cap and why the cache is keyed by cwd here but by port on the dashboard) lives on the Favicons page.
Storage-relevant takeaway for this layer: a persisted favicon is capped at 24 KB, so the recents store stays small: ≤ 24 KB per entry × 30 entries, and in practice far less.
- If even the capped favicons grow concerning, move them to a separate
LocalStoragekey so the recents list itself stays small for fast reads.