From abbfb552ccfef6448eb76a63065956a772b7e0c9 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Sat, 28 Feb 2026 23:21:10 +0000 Subject: [PATCH] feat: client-side tab caching for instant tab switching Previously loaded tabs stay in the DOM and are shown/hidden via CSS. New tabs are fetched via fetch() + DOMParser on first visit, then cached. Switching back is instant with no network request. Co-Authored-By: Claude Opus 4.6 --- server/shell.ts | 51 ++++++-- shared/tab-cache.ts | 276 +++++++++++++++++++++++++++++++++++++++ website/public/shell.css | 26 ++++ website/shell.ts | 4 + 4 files changed, 347 insertions(+), 10 deletions(-) create mode 100644 shared/tab-cache.ts diff --git a/server/shell.ts b/server/shell.ts index 87ff57a..56c5cd3 100644 --- a/server/shell.ts +++ b/server/shell.ts @@ -54,7 +54,7 @@ export function renderShell(opts: ShellOptions): string { ${escapeHtml(title)} - +