Skip to content

[Bug]: Changing the sidebar project filter collapses an expanded Settled shelf back to 10 threads #34291

Open

Description

@lewis-zh

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open the sidebar and expand the Settled shelf. It shows 10 settled threads.
  2. Click "Show 25 more" once or more, so the shelf shows more than 10.
  3. Change the project filter in the sidebar (add, remove or clear a project).

Expected behavior

The Settled shelf keeps the number of threads I expanded it to, now for the filtered projects.

Actual behavior

The Settled shelf goes back to 10 threads. To see the older threads again I have to click "Show 25 more" again after every filter change.

Cause

settledTail in apps/web/src/components/Sidebar.tsx stores the count with the projectScopeKey it was set for. When the project filter changes, projectScopeKey changes and the count resets to SETTLED_TAIL_INITIAL_COUNT (10):

if (settledTail.scopeKey !== projectScopeKey) {
  setSettledTail({ scopeKey: projectScopeKey, count: SETTLED_TAIL_INITIAL_COUNT });
}

Keeping the count across filter changes, or remembering it per filter, would fix this.

Impact

Minor bug or occasional failure

Version or commit

0.1.9-nightly.20261111.4515 (code read at main @ 49bab99)

Environment

macOS 26.2, T3 Code (Nightly) desktop app

Activity

  1. Karthik-beta commented on Nov 11, 2026

    @Karthik-beta

    Looking at a fix for this. The reset comes from settledTail in Sidebar.tsx being keyed to projectScopeKey, which has been the case since sidebar v2 (#5672), so I want to check the intended behavior before opening a PR.

    Would you take a change that keeps the expanded count when the project filter changes (one count for the shelf, dropping the scope key)? Or is the reset intended, for example to keep the rendered list short after switching filters?

    If keeping it is fine, the change is small: drop the scope key from that state, plus a sidebar test and before/after captures.

  2. lewis-zh commented on Nov 11, 2026

    @lewis-zh
    Author

    As a user — I expected the count to stay when I change the filter. I expand the shelf to look for an older thread, then use the filter to find narrow down. and the reset undoes the expansion. One count for the shelf works for me. I'll leave it to the maintainers to say whether the reset was intended.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions