Skip to content

⚡ Bolt: Implement module-level cache for BlogApp data#92

Closed
schmug wants to merge 1 commit into
mainfrom
bolt-blog-cache-7199183064583099376
Closed

⚡ Bolt: Implement module-level cache for BlogApp data#92
schmug wants to merge 1 commit into
mainfrom
bolt-blog-cache-7199183064583099376

Conversation

@schmug
Copy link
Copy Markdown
Owner

@schmug schmug commented May 5, 2026

💡 What: Added a module-level caching mechanism (fetchPromise and cachedPayload) to src/components/os/apps/BlogApp.tsx.
🎯 Why: The OS shell interface frequently mounts and unmounts application windows. By keeping state inside BlogApp, every re-opening of the app triggered a fresh redundant API request to /api/blog.json for effectively static content.
📊 Impact: Reduces redundant API fetches by exactly 100% after the first cache load. Saves a network roundtrip every time the Blog app is re-opened, contributing to smoother, immediate OS transitions.
🔬 Measurement: Open the "Blog" app, close it, and reopen it while observing the Network tab. Previously, this fired multiple API calls; now it caches correctly after the first. All existing tests passing.


PR created automatically by Jules for task 7199183064583099376 started by @schmug

…equests

This commit introduces `fetchPromise` and `cachedPayload` outside the `BlogApp` component to effectively cache the static payload retrieved from `/api/blog.json`. Due to the OS interface behavior where apps are frequently mounted and unmounted, relying on component-level state causes unnecessary API calls for identical data.

Impact: Saves ~1 network roundtrip per Blog App open event after the initial fetch, drastically reducing overhead and slightly improving perceived rendering speed when toggling apps.

Co-authored-by: schmug <38227427+schmug@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@schmug
Copy link
Copy Markdown
Owner Author

schmug commented May 16, 2026

Superseded by #127 (merged to main), which consolidated the best of the duplicate Bolt/Sentinel/Palette scheduled-agent PRs into one reviewed change. Closing as duplicate.

@schmug schmug closed this May 16, 2026
@google-labs-jules
Copy link
Copy Markdown
Contributor

Superseded by #127 (merged to main), which consolidated the best of the duplicate Bolt/Sentinel/Palette scheduled-agent PRs into one reviewed change. Closing as duplicate.

Understood. Acknowledging that this work is now obsolete and stopping work on this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant