Skip to content

sidebar scrollbar always visible — should only appear when content overflows - #3279

Closed
lawrencecchen wants to merge 1 commit into
mainfrom
loader/issue-3241-sidebar-scrollbar-video19
Closed

lawrencecchen wants to merge 1 commit into
mainfrom
loader/issue-3241-sidebar-scrollbar-video19

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

Addresses #3241

Generated by cmux-loader.

Recorded videos:

  • repro-before: .runner/videos/repro-before.mov (ok)
  • fixed-after: .runner/videos/fixed-after.mov (ok)

Run artifacts: https://github.com/manaflow-ai/cmux-loader/actions/runs/25090033696

Codex final message:

Implemented a focused fix for #3241 in the workspace sidebar.

Change made

  • Updated Sources/ContentView.swift in VerticalTabsSidebar.workspaceScrollArea so the sidebar ScrollView now uses:
    • scrollIndicators(.automatic)

This keeps sidebar scrollers from being permanently visible and lets indicator visibility follow overflow/OS scroll behavior.

Verification performed

  1. Built tagged debug app with required flow:
    ./scripts/reload.sh --tag loader

=======================================================
loader: file:///Users/runner/Library/Developer/Xcode/DerivedData/cmux-loader/Build/Products/Debug/cmux%20DEV%20loader.app

  1. Captured GUI recordings via loader workflow:
  • repro-before (status=ok)
  • fixed-after (status=ok)
  1. Kept all work within the single requested file and used tagged build only.

Summary by cubic

Fixes #3241: The workspace sidebar scrollbar now appears only when content overflows. Updated the VerticalTabsSidebar ScrollView to use .scrollIndicators(.automatic) so visibility follows the OS.

Written for commit 114756c. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • Refactor
    • Restructured sidebar workspace list scroll view composition with improved scroll indicator configuration.

Generated by cmux-loader.
@vercel

vercel Bot commented Apr 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Apr 29, 2026 4:08am
cmux-staging Building Building Preview, Comment Apr 29, 2026 4:08am

@coderabbitai

coderabbitai Bot commented Apr 29, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ff1006d7-90aa-4e49-826e-e63dc1393185

📥 Commits

Reviewing files that changed from the base of the PR and between af36cab and 114756c.

📒 Files selected for processing (1)
  • Sources/ContentView.swift

📝 Walkthrough

Walkthrough

The sidebar workspace list scroll view composition in ContentView.swift is restructured. The ScrollView is now emitted directly within ScrollViewReader, while drag-auto-scroll functionality is preserved via SidebarScrollViewResolver. Explicit .scrollIndicators(.automatic) configuration is added, replacing the prior nesting and layout structure.

Changes

Cohort / File(s) Summary
Sidebar Scroll View Composition
Sources/ContentView.swift
Restructured workspaceScrollArea to emit ScrollView directly within ScrollViewReader, preserve dragAutoScrollController.attach(scrollView:) via SidebarScrollViewResolver, and add explicit .scrollIndicators(.automatic) configuration. Prior nesting/layout structure removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 A scroll view finds its perfect nest,
Wrapped in readers, now at rest,
Drag and scroll in harmony blend,
The sidebar's journey takes a bend! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the core change and verification, but omits critical template sections: Testing, Demo Video, Review Trigger, and Checklist. Add Testing section with manual verification details, include Demo Video URLs from recorded artifacts, add Review Trigger comment block, and complete the Checklist with the required items.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing the sidebar scrollbar to appear only when content overflows instead of always being visible.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 loader/issue-3241-sidebar-scrollbar-video19

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
Review rate limit: 2/8 reviews remaining, refill in 39 minutes and 11 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds .scrollIndicators(.automatic) to the ScrollView inside VerticalTabsSidebar.workspaceScrollArea, so the sidebar scroll indicator follows platform/overflow behavior instead of being permanently visible. The functional change is correct and minimal; the diff also introduces inconsistent indentation (the ScrollView block is un-indented to the ScrollViewReader level), but this is cosmetic only and has no runtime effect.

Confidence Score: 4/5

Safe to merge; the functional change is a single targeted modifier addition with no behavioural regressions.

Only P2 finding (cosmetic indentation inconsistency). The core fix — .scrollIndicators(.automatic) — is the correct SwiftUI API for overflow-only scroll indicator visibility, and the view hierarchy and scrollProxy scope are unchanged.

No files require special attention.

Important Files Changed

Filename Overview
Sources/ContentView.swift Adds .scrollIndicators(.automatic) to VerticalTabsSidebar.workspaceScrollArea's ScrollView; indentation is inconsistent but functionally correct.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[VerticalTabsSidebar] --> B[workspaceScrollArea]
    B --> C[GeometryReader]
    C --> D[ScrollViewReader]
    D --> E[ScrollView]
    E -->|".scrollIndicators(.automatic) — NEW"| F{Content overflows?}
    F -- Yes --> G[Show scroll indicator]
    F -- No --> H[Hide scroll indicator]
    E --> I[".background — SidebarScrollViewResolver"]
    E --> J[".safeAreaInset / .overlay / .onAppear / .onChange"]
Loading

Reviews (1): Last reviewed commit: "Address https://github.com/manaflow-ai/c..." | Re-trigger Greptile

Comment thread Sources/ContentView.swift
Comment on lines +9806 to +9812
ScrollView {
workspaceScrollContent(
renderContext: renderContext,
minHeight: geometryProxy.size.height
)
}
.scrollIndicators(.automatic)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Indentation de-sync inside ScrollViewReader closure

After the refactor, ScrollView and its immediately chained modifiers (.scrollIndicators, .background) are unindented to the same column as ScrollViewReader { scrollProxy in, while the modifiers that follow (.safeAreaInset, .overlay, .onAppear, .onChange, …) are indented one level deeper. Swift doesn't use whitespace for parsing, so this compiles fine, but the visual mismatch makes it look like two separate view expressions live inside the closure — which would be a compile error — rather than one long modifier chain.

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Closing this loader dogfood PR because the downloaded before/after videos still show the macOS FileVault confirmation sheet over cmux. I am patching FileVault suppression in the loader and rerunning from a fresh branch.

@lawrencecchen
lawrencecchen deleted the loader/issue-3241-sidebar-scrollbar-video19 branch April 29, 2026 04:07

This branch was successfully deployed

1 active deployment
Preview – cmux — 114756c0 Deployed Apr 29, 2026 by vercel[bot]
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.

sidebar scrollbar always visible — should only appear when content overflows

1 participant