Repository navigation
Conversation
When switching workspaces with Ctrl+Cmd+[ / Ctrl+Cmd+], the sidebar now scrolls to keep the selected tab visible when sessions exceed the screen height. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@codex review |
|
@sugarshin is attempting to deploy a commit to the Manaflow Team on Vercel. A member of the Team first needs to authorize it. |
@sugarshin I have started the AI code review. It will take a few minutes to complete. |
📝 WalkthroughWalkthroughThe VerticalTabsSidebar's sidebar Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
🧠 Learnings used✅ Actions performedReview triggered.
|
|
To use Codex here, create a Codex account and connect to github. |
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Sources/ContentView.swift`:
- Around line 8831-8836: Add a debug log inside a DEBUG guard to record the
tab-selection scroll path: in the onChange handler observing
tabManager.selectedTabId (the block that calls scrollProxy.scrollTo(newId,
anchor: nil)), wrap a dlog(...) call in `#if` DEBUG / `#endif` and log the newId
(and any minimal context like "tab selected" or tabManager) before performing
the withAnimation scroll so the event is emitted to the unified debug log;
reference tabManager.selectedTabId, the onChange closure, scrollProxy.scrollTo
and the dlog free function when making the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Greptile SummaryThis PR adds auto-scroll behavior to the sidebar so the selected workspace stays visible when cycling through workspaces with Ctrl+Cmd+[/]. The implementation wraps the existing Key points:
Confidence Score: 5/5Safe to merge — only P2 style issues remain; the scrolling logic is correct and well-tested. No P0 or P1 issues found. The ScrollViewReader/onChange approach is correct: ForEach(tabs, id: .id) exposes view IDs to the scroll proxy, anchor: nil provides minimal-scroll semantics, and the animation is straightforward. Remaining findings are a deprecated single-arg onChange closure and an indentation inconsistency — neither affects runtime behavior. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant KeyHandler
participant TabManager
participant VerticalTabsSidebar
participant ScrollViewReader
participant ScrollView
User->>KeyHandler: Ctrl+Cmd+] / Ctrl+Cmd+[
KeyHandler->>TabManager: selectNextTab() / selectPreviousTab()
TabManager->>TabManager: selectedTabId = newId
TabManager-->>VerticalTabsSidebar: onChange(selectedTabId)
VerticalTabsSidebar->>ScrollViewReader: scrollProxy.scrollTo(newId, anchor: nil)
ScrollViewReader->>ScrollView: animate scroll (easeOut 0.15s)
ScrollView-->>User: Selected tab visible in sidebar
Reviews (1): Last reviewed commit: "fix: auto-scroll sidebar to follow works..." | Re-trigger Greptile |
- Use two-argument onChange API (deprecated single-arg form on macOS 14+) - Add dlog for sidebar scroll event in DEBUG builds Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3b82e4f to
86bf756
Compare
Summary
ScrollViewinScrollViewReaderand add.onChange(of: tabManager.selectedTabId)to scroll to the active tabanchor: nilfor minimal scrolling — no scroll when the tab is already visibleTesting
reload.sh --tag fix-sidebar-scroll --launch)Demo Video
screen2026-03-31.21.01.17.mov
Review Trigger (Copy/Paste as PR comment)
Checklist
Summary by cubic
Sidebar now auto-scrolls to keep the selected tab visible when switching workspaces with Ctrl+Cmd+[ / Ctrl+Cmd+], even when the list exceeds screen height. Implemented with
ScrollViewReaderand the two-argument.onChangeto scroll totabManager.selectedTabIdwith a short ease-out animation (anchor: nil); adds a DEBUG log for scroll events.Written for commit 86bf756. Summary will update on new commits.
Summary by CodeRabbit