Skip to content

Reset a project’s expanded thread list when its folder is collapsed #354

Description

@Tryanks

Next-release requirement (2026-09-08): This issue must be completed before the next release. The existing scope, diagnosis and acceptance criteria below remain in force.

Existing behavior

“Show more” already changes to “Show less”; that behavior landed in #20 and is part of the design contract. The remaining request concerns the interaction between two separate states.

SessionsSidebar.expanded_groups tracks whether a project's thread list exceeds the six-thread limit. The project header click updates the store's project-collapse state without removing that project from expanded_groups.

Reproduction

  1. Use grouped sidebar mode with a project containing more than six visible threads.
  2. Click Show more and observe the expanded list and Show less control.
  3. Collapse the project folder using its header, then reopen it.

The expanded thread list is retained. It should reopen with the normal limited list and Show more.

Acceptance criteria

  • Collapsing a project resets only that project's “Show more” expansion; reopening starts at the normal limit.
  • The direct Show less control continues to work.
  • Another project's expansion and parent/child thread folds are unaffected; collapsed children still do not consume the visible-thread limit.
  • Update the sidebar design contract and verify the full click sequence in both themes. Add focused regression coverage through the actual sidebar state transition, rather than another test of the toggle label.

This issue records the remaining UI change; the original note's request to implement via an isolated worktree and merge a passing PR belongs to the eventual implementation workflow.

Code context

Reviewed against main at b4c549787da6 (2026-09-08).

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions