Skip to content

Cache sidebar content for instant render on subsequent launches#946

Open
ratley wants to merge 1 commit intopingdotgg:mainfrom
ratley:sidebar-cache
Open

Cache sidebar content for instant render on subsequent launches#946
ratley wants to merge 1 commit intopingdotgg:mainfrom
ratley:sidebar-cache

Conversation

@ratley
Copy link

@ratley ratley commented Mar 12, 2026

What Changed

Caches the sidebar project & thread titles.

Why

The sidebar currently doesn't render anything until the WebSocket is connected, resulting in "No projects yet" being shown for a couple of seconds when the app is opened. This is a UX improvement.

UI Changes

Before

t3-sidebar-before.mov

After

t3-sidebar-after.mov

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Cache sidebar projects and threads in localStorage for instant render on subsequent launches

  • readPersistedState in store.ts now parses cachedProjects and cachedThreads from localStorage and hydrates state.projects and state.threads on startup, with threadsHydrated: false until the server response arrives.
  • persistState now writes cachedProjects and cachedThreads to localStorage on each state update, expanding the storage schema.
  • Behavioral Change: on first load after this change, the sidebar renders from cache immediately rather than waiting for server data; stale cache is replaced once syncServerReadModel completes.

Macroscope summarized a15da82.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e5662939-2f76-438d-936b-80f5b303ebab

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 12, 2026
@ratley ratley changed the title Cache sidebar projects & thread titles for instant render on subsequent launches Cache sidebar content for instant render on subsequent launches Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant