⚡ Bolt: Module-level caching for Blog data#115
Conversation
…n unmount In the windowed OS architecture, opening and closing the blog window wipes the local React state, which caused a redundant network request to `/api/blog.json` each time the app launched. This commit introduces a module-level `fetchPromise` and `cachedPayload` to cache the static response and deduplicate fetches globally across instances, ensuring instant load times for subsequent window launches. Co-authored-by: schmug <38227427+schmug@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…#127) Consolidates three superseded automated PRs into one reviewed change, resolving their overlapping edits to BlogApp.tsx by hand: - BlogApp: module-level fetch cache + 10s AbortSignal timeout (supersedes #115) - Fetch timeouts on useProjects.ts and github.ts (supersedes #122; its redundant BlogApp hunk dropped — covered by the #115 cache path) - Accessible "clear" buttons on Launcher / Projects / Blog filter inputs + semantic <time> on the desktop Taskbar clock (supersedes #114) Behavior change accepted: the 10s timeout on the build-time github.ts fetch makes a transiently slow api.github.com fail the build fast instead of hanging. Supersedes and closes 24 duplicate scheduled-agent PRs across the Bolt / Sentinel / Palette clusters. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Folded into #127 (merged to main). Hand-integrated there alongside the other two cluster winners to resolve overlapping BlogApp.tsx edits. Thanks! |
💡 What: Added module-level caching variables (
fetchPromiseandcachedPayload) toBlogApp.tsxto handle the JSON data fetch.🎯 Why: In the windowed OS architecture, components unmount when closed, which wiped their local state and caused the component to fetch the static
/api/blog.jsonfile over the network every single time the user opened the Blog app.📊 Impact: Eliminates 100% of redundant API calls for the blog content after the first open, enabling instant zero-latency loads on subsequent window interactions.
🔬 Measurement: Verify by booting the OS, opening the Blog app, closing it, and opening it again—the second load should happen immediately without any network requests hitting the browser's dev tools network panel.
PR created automatically by Jules for task 3345225327533789657 started by @schmug