Sync collapsed sidebar rows and sections through the server - #3305
Merged
SawyerHood merged 1 commit intoSep 9, 2026
Merged
Conversation
SawyerHood
force-pushed
the
bb/ui-preferences-collapsed-sets
branch
from
September 8, 2026 23:32
6357c14 to
d6c85c3
Compare
SawyerHood
force-pushed
the
bb/ui-preferences-collapsed-sets
branch
from
September 8, 2026 23:40
d6c85c3 to
aeb4604
Compare
SawyerHood
force-pushed
the
bb/ui-preferences-collapsed-sets
branch
2 times, most recently
from
September 8, 2026 23:48
a42fee7 to
f2bcf0f
Compare
SawyerHood
force-pushed
the
bb/ui-preferences-collapsed-sets
branch
from
September 9, 2026 17:03
f2bcf0f to
133805c
Compare
SawyerHood
force-pushed
the
bb/ui-preferences-collapsed-sets
branch
from
September 9, 2026 17:12
133805c to
7304258
Compare
SawyerHood
marked this pull request as ready for review
September 9, 2026 17:24
SawyerHood
force-pushed
the
bb/ui-preferences-collapsed-sets
branch
from
September 9, 2026 17:40
7304258 to
2c37a95
Compare
Convert the six collapsed-id atoms to synced preferences with a short write debounce so rapid toggles coalesce into one request, and prune ids of deleted projects, threads, environments, and thread sections on the server when a collapsed list is stored. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
SawyerHood
force-pushed
the
bb/ui-preferences-collapsed-sets
branch
from
September 9, 2026 18:31
2c37a95 to
13cd5b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
After #3304 the structural sidebar settings sync, but the six collapsed-id lists (projects, threads, environments, built-in sections, thread sections, machines) still live only in localStorage.
What changed
Layer 3 of 3 (stack #3306). Base: #3304.
sidebarCollapsedAtoms.ts: the six collapsed atoms become in-memory synced preferences; theiratomWithStoragewrappers and the folder-era storage adapter are deleted. Every existing toggle site already uses functional updates, so conflicting writes from two devices re-apply on top of the server list instead of clobbering it, and toggles made while a request is in flight compose into the next one.RootComposeMobileRecents.test.tsxseeds the atom through a jotai store instead of localStorage.Review
One GPT-6 Astra review round requested changes. All three findings were in the layer 2 sync controller (writes rebased onto the submitted revision, composed functional updates through a conflict, and reconciling the authoritative response after pending writes settle). They are fixed and tested in #3304. A later simplification pass removed this layer's server-side pruning and write debounce as not worth their code.
How you verified
@bb/app,@bb/db, and@bb/serverpublic-route suites green;pnpm exec turbo run typecheck --filter='...[origin/main]'green.🤖 Generated with Claude Code