Skip to content

fix(web): persist the Settled shelf's collapsed state#4573

Open
ipanasenko wants to merge 1 commit into
pingdotgg:mainfrom
ipanasenko:fix/persist-settled-collapse
Open

fix(web): persist the Settled shelf's collapsed state#4573
ipanasenko wants to merge 1 commit into
pingdotgg:mainfrom
ipanasenko:fix/persist-settled-collapse

Conversation

@ipanasenko

@ipanasenko ipanasenko commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

What changed

The Settled shelf in Sidebar V2 now remembers whether you collapsed it.

image

Why

Collapsing a section reads as a lasting preference, not a per-session one. Tucking history away and finding it back on every relaunch means re-collapsing it forever.

Note

Persist the Settled shelf's collapsed state in local storage

Replaces the in-memory useState for settledShelfExpanded in SidebarV2.tsx with useLocalStorage, keyed at t3code:sidebar-v2:settled-expanded. The shelf now defaults to expanded on first visit and retains its state across page reloads.

Macroscope summarized 6d84f3f.


Note

Low Risk
UI preference only—no server, auth, or data-path changes; worst case is a bad stored boolean falling back to the default expanded state.

Overview
Persists whether the Sidebar V2 Settled shelf is expanded across reloads by storing that preference in localStorage instead of session-only React state.

settledShelfExpanded in SidebarV2.tsx now uses useLocalStorage with key t3code:sidebar-v2:settled-expanded, default expanded (true), and Schema.Boolean for read/write validation. Collapse/expand behavior is unchanged; only the toggle’s expanded/collapsed choice survives a new session.

Reviewed by Cursor Bugbot for commit 6d84f3f. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

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 Plus

Run ID: e16a45b7-dfc2-40a9-868c-4e8847d7f578

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

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jul 26, 2026
Collapsing Settled in Sidebar V2 read as a lasting preference but was
component state, so every relaunch brought the history back. Move it to
the useLocalStorage hook used for other client-only UI prefs, defaulting
to expanded so nothing changes for anyone who hasn't collapsed it.
@ipanasenko
ipanasenko force-pushed the fix/persist-settled-collapse branch from d033bcc to 6d84f3f Compare July 26, 2026 12:28
@ipanasenko
ipanasenko marked this pull request as ready for review July 26, 2026 12:58
@macroscopeapp

macroscopeapp Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Simple UI preference persistence using an existing localStorage hook. The change is self-contained with no impact on business logic or sensitive functionality.

You can customize Macroscope's approvability policy. Learn more.

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

Labels

size:S 10-29 changed lines (additions + deletions). 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