Repository navigation
fix(sidebar): the settled shelf closes once you move on - #695
Merged
Merged
Conversation
An expanded settled shelf stayed open indefinitely. It now collapses when you open a thread outside it or a new message arrives in the open thread, on web, desktop, and mobile. Browsing and un-settling threads, including several in a row, keep it open.
Web previewThe preview was removed because this PR closed or the preview label was removed. |
incognitojam
marked this pull request as draft
October 9, 2026 17:08
incognitojam
marked this pull request as ready for review
October 9, 2026 17:14
This branch was successfully deployed
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.
Once expanded, the sidebar's Settled shelf stayed open indefinitely on web, desktop, and mobile. The only way to close it was the header toggle, and the expanded state is persisted, so a shelf opened once to find old work kept crowding the list long after.
The shelf now collapses when you move on from it:
latestUserMessageAt, so every send path counts, including sending to a settled thread, which un-settles it.It stays open while you open settled threads from the shelf, while you un-settle threads (including several in a row), when you leave for Settings and return to the same thread, and across reloads.
The rule is one pure function shared by both clients (
advanceSettledShelfFocusinpackages/client-runtime/src/state/threadSettled.ts). Web runs it in the sidebar. Mobile runs it from a render-nothing component in the thread screen, keeping the previous thread at module scope because phone thread screens remount per thread. Upstream persists the shelf state the same way (#5136, #5152) and has no auto-collapse, so this adds a fork ledger entry. The thread sidebar guide gains one sentence describing the behavior.Validation
On web, against a
styal drive servescenario with four settled threads (provider reactors disabled, so sending a message starts no agent):aria-expanded="false", stored valuefalse).Unit tests cover the rule's transitions, including that a shell loading for the open thread is not mistaken for a sent message. Mobile typechecks but was not exercised on a device or simulator. The shelf looks the same as before; only when it closes has changed, so there are no before/after images.
Written by an agent (Claude Code, claude-opus-5-5).