Skip to content

Fix sidebar thread panel weird states.#1497

Merged
juliusmarminge merged 4 commits intopingdotgg:mainfrom
shivamhwp:sidebar-ui-weird-state-bug
Mar 28, 2026
Merged

Fix sidebar thread panel weird states.#1497
juliusmarminge merged 4 commits intopingdotgg:mainfrom
shivamhwp:sidebar-ui-weird-state-bug

Conversation

@shivamhwp
Copy link
Copy Markdown
Collaborator

@shivamhwp shivamhwp commented Mar 28, 2026

What Changed

  • Removed the Collapsible wrapper around each project’s thread list in the left sidebar.
  • Kept the project open/closed state logic the same, but made thread rows render directly from sidebar state instead of through a measured-height collapsible panel.
  • Preserved the existing list/reorder animation path while ensuring thread rows and overflow are hidden cleanly when a project is not showing its thread panel.

Why

The sidebar had a desync bug where the project caret could remain in the expanded state while the thread list was visually missing. This showed up most often after refresh and after project reordering triggered by message sends.

The root cause was that visibility depended on both state and a height-measured animated container. The chevron was driven by persisted project expansion state, but the rows were still gated by a separate collapsible layout path that could end up with stale height during hydration or reorder. Removing that wrapper makes visibility purely state-driven and keeps animation out of the correctness path, which is a more reliable long-term structure.

UI Changes

This changes sidebar interaction behavior, so before/after screenshots and a short video should be included for:

  • Refresh with a project expanded
  • Sending a message that causes project resorting
  • Expanding/collapsing a project with visible threads

vid

Screen.Recording.2026-03-29.at.12.40.22.AM.mov

ps : don't mind the lag, it's coz of low memory on my device.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Low Risk
Low risk UI change, but it alters sidebar expand/collapse rendering behavior and could affect thread list visibility/animation edge cases.

Overview
Fixes inconsistent sidebar project thread visibility by removing the Collapsible/CollapsibleContent wrapper around each project’s thread list and rendering thread rows directly based on shouldShowThreadPanel.

Keeps the thread list container mounted (now with overflow-hidden) so reordering/auto-animate remains intact while avoiding height-measurement desyncs that could leave the chevron expanded with no visible threads.

Written by Cursor Bugbot for commit 4204457. This will update automatically on new commits. Configure here.

Note

Fix weird states in sidebar thread panel by replacing Collapsible with conditional rendering

Removes the Collapsible/CollapsibleContent wrapper from the project thread panel in Sidebar.tsx. Thread rows now render conditionally based on shouldShowThreadPanel, while the SidebarMenuSub container always renders with overflow-hidden. The 'Show more'/'Show less' controls are no longer gated by CollapsibleContent, so they can appear even when the thread panel is hidden.

Macroscope summarized 4204457.

- Remove Collapsible wrapper around project thread list
- Hide thread rows and overflow cleanly when the panel is not shown
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

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

Run ID: fcc713e2-228f-4cd5-85a3-5a18374dffd9

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 and usage tips.

@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 28, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

- Remove redundant thread panel guard from show more/less controls
- Keep thread list expansion state tied to project expansion only
@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Mar 28, 2026
@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Mar 28, 2026
@juliusmarminge juliusmarminge merged commit 5210a83 into pingdotgg:main Mar 28, 2026
10 checks passed
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.

2 participants