Skip to content

fix(desktop): collapse the Cloud sidebar section's rows like every other section - #6754

Merged
Kitenite merged 1 commit into
mainfrom
cloudworkspace-hidable-pa
Aug 22, 2026
Merged

Kitenite merged 1 commit into
mainfrom
cloudworkspace-hidable-pa

Conversation

@Kitenite

@Kitenite Kitenite commented Aug 22, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Clicking the Cloud section header in the dashboard sidebar now hides its rows, the same way Pinned / Sessions / Projects do.

Why / Context

The Cloud header was already wired to the shared sidebar-sections-collapse store (it has a cloud key and the header toggled it), but DashboardSidebarCloudSection never read the flag back. So the chevron rotated and the state persisted while the five cloud rows stayed put.

How It Works

DashboardSidebarCloudSection subscribes to collapsed.cloud and skips rendering the rows while it's set, the exact gate DashboardSidebarPinnedSection and DashboardSidebarSessionsSection use. The collapsed-rail mode is untouched; no section has chrome there.

Manual QA (CDP, real dev app on this worktree, 5 cloud workspaces in the sidebar)

Before (pre-fix file checked out): click Cloud header → store cloud: true, chevron turned, 5 rows still in DOM, section 192px.

After:

  • Click Cloud header → 0 rows in DOM, section 32px (header only), chevron points right
  • Reload → stays collapsed (persisted store)
  • Click again → 5 rows back, 192px
  • 6 rapid toggles → ends expanded, console.error hook stayed empty

Testing

  • bun run typecheck (desktop)
  • biome check on the changed file

Summary by cubic

Collapse the Cloud sidebar section’s rows when its header is toggled, matching Pinned/Sessions/Projects. Previously the chevron rotated and the collapse state persisted, but the rows stayed visible; now they hide and restore on toggle.

  • Subscribes to useSidebarSectionsCollapseStore and gates rendering on collapsed.cloud, mirroring other sections.
  • No changes to collapsed-rail mode; only affects the expanded sidebar.

Written for commit 7d75722. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Cloud workspace entries in the dashboard sidebar now correctly hide when the cloud section is collapsed.
    • Existing workspace data and filtering behavior remain unchanged.

…her section

The Cloud header already toggled the shared sidebar-sections-collapse
store, but the section never read the flag back, so the chevron turned
while the rows stayed put. Gate the rows on it the way Pinned and
Sessions do.
@Kitenite
Kitenite merged commit 83338ee into main Aug 22, 2026
11 checks passed
@Kitenite
Kitenite deleted the cloudworkspace-hidable-pa branch August 22, 2026 15:08
@github-actions

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

@coderabbitai

coderabbitai Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7762d2f6-47e4-4da6-984b-a839a0c40e14

📥 Commits

Reviewing files that changed from the base of the PR and between b9d851f and 7d75722.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarCloudSection/DashboardSidebarCloudSection.tsx

📝 Walkthrough

Walkthrough

The cloud sidebar now reads collapsed.cloud from useSidebarSectionsCollapseStore. It keeps the cloud section header visible and hides workspace rows when the section is collapsed.

Changes

Cloud sidebar collapse rendering

Layer / File(s) Summary
Cloud section collapse rendering
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarCloudSection/DashboardSidebarCloudSection.tsx
The component subscribes to the cloud collapse state and conditionally renders workspace rows. The section header remains rendered.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: saddlepaddle

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cloudworkspace-hidable-pa

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant