Fast startup: defer bootstrap to background, lazy feed load

- Node::open_with_bind no longer runs bootstrap (anchor connect, NAT
  probe, referrals). New run_bootstrap() method called from background
  task after UI is live.
- Background tasks (pull cycle, diff cycle, etc.) start after bootstrap
  completes, not during block_on.
- Feed no longer pre-loaded during welcome screen readiness check.
  Ready button enables immediately after get_node_info succeeds.
- Feed loads on tab switch, not during startup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Scott Reimers 2026-04-16 17:19:05 -04:00
parent 19a95b7c45
commit 5e7eed9638
3 changed files with 79 additions and 53 deletions

View file

@ -3702,10 +3702,9 @@ async function init() {
setupOverlay.classList.remove('hidden');
setupName.focus();
}
// Pre-load feed + messages from local DB (instant — no network needed)
await loadFeed(true).catch(() => {});
// Pre-load messages (lightweight) — feed loads when user switches to it
loadMessages(true).catch(() => {});
// Mark ready button as clickable
// Mark ready button as clickable immediately — feed loads on tab switch
if (readyBar) readyBar.style.width = '100%';
if (readyBtn) {
readyBtn.disabled = false;