Skip to content

Apply Right sidebar open view width setting to all split-pane open flows#170

Merged
MocA-Love merged 1 commit intomainfrom
apply-sidebar-open-view-width-to-all-flows
Apr 15, 2026
Merged

Apply Right sidebar open view width setting to all split-pane open flows#170
MocA-Love merged 1 commit intomainfrom
apply-sidebar-open-view-width-to-all-flows

Conversation

@MocA-Love
Copy link
Copy Markdown
Owner

@MocA-Love MocA-Love commented Apr 14, 2026

Summary

The Right sidebar open view width setting (Settings → General) controls the initial width of new file/diff views when a file is opened as a split pane. It was only honored in 3 call sites — the Files sidebar double-click and Changes view file / line-jump handlers — so users reported the setting silently not applying most of the time.

Technically, the splitPercentage computed from this setting is only applied inside addFileViewerPane when the useRightSidebarOpenViewWidth option is true on the split-pane creation path (stores/tabs/store.ts). Every other call site fell back to DEFAULT_FILE_VIEWER_SPLIT_PERCENTAGE.

This PR passes useRightSidebarOpenViewWidth: true from every remaining addFileViewerPane call site that can hit the split-pane path, so the setting now applies uniformly regardless of origin.

Flows covered

  • Right sidebar: Search view and Problems view jump-to-line (RightSidebar/index.tsx handleOpenFileAtLine)
  • Chat (v1 / WorkspaceView): user message attachments, mentioned-file clicks, assistant message attachments
  • Chat (v2-workspace): user message attachments, mentioned-file clicks, assistant message attachments
  • Chat (shared components/Chat): MessageList image click and mention chip click, MessagePartsRenderer file link, ToolCallBlock open-file and open-diff actions
  • Terminal: cmd/ctrl-click file links (useFileLinkClick)
  • Command Palette (Quick Open) and Keyword Search result selection
  • File viewer internal nav: go-to-definition from the editor, reference graph node double-click
  • VS Code extension sync: openFileInPane and openDiffInPane IPC
  • Git history: CommitDetailsPanel file click
  • Memo creation: EmptyTabView and GroupStrip "Create Memo" buttons
  • Workspace initialization: pending workspace intent auto-open (?file=...)

Already-correct call sites (FilesView, RightSidebar handleFileOpenPane, RightSidebar handleChangesOpenFileAtLine) are untouched.

No behavior change for flows that open a file in a new tab (openInNewTab: true) or reuse an existing preview pane — those paths do not create a new split and ignore this option by design.

Test plan

  • Set "Right sidebar open view width" to a non-default value (e.g. 40)
  • Open a file via each of the flows above and confirm the new file pane takes the configured percentage
  • Verify behavior is unchanged when "File open mode" is set to new-tab
  • bun run lint
  • bun run typecheck

Summary by CodeRabbit

リリースノート

  • バグ修正
    • ファイルビューアペインを右サイドバーで開く際の表示幅の処理を改善しました。ファイルクリック、ファイルメンション、検索結果など、複数の操作からファイルを開く場合の動作が一貫性を持つようになります。

The "Right sidebar open view width" setting only took effect for 3 call
sites (Files sidebar, Changes view file click, Changes line jump).
Every other flow that opens a file via the split-pane path
(`addFileViewerPane` without `openInNewTab`) fell back to the default
split percentage, so users reported the setting silently not being
applied.

Pass `useRightSidebarOpenViewWidth: true` from all remaining call sites:
Search/Problems jump-to-line, Chat v1/v2 attachments and mentioned-file
clicks, chat markdown file links, tool call open-file / open-diff
actions, terminal file link clicks, Command Palette and keyword search
selections, go-to-definition inside the file viewer, reference graph
node double-click, VS Code extension open-file / diff sync, commit
details panel file click, Create-Memo buttons (EmptyTabView /
GroupStrip), and the workspace pending-intent auto open.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d2512746-c92d-4d7a-a395-a755410c869c

📥 Commits

Reviewing files that changed from the base of the PR and between def899c and 40c301f.

📒 Files selected for processing (19)
  • apps/desktop/src/renderer/components/Chat/ChatInterface/components/MessageList/MessageList.tsx
  • apps/desktop/src/renderer/components/Chat/ChatInterface/components/MessagePartsRenderer/MessagePartsRenderer.tsx
  • apps/desktop/src/renderer/components/Chat/ChatInterface/components/ToolCallBlock/ToolCallBlock.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/ChatPane/components/WorkspaceChatInterface/components/ChatMessageList/components/AssistantMessage/AssistantMessage.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/ChatPane/components/WorkspaceChatInterface/components/ChatMessageList/components/UserMessage/UserMessage.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/page.tsx
  • apps/desktop/src/renderer/screens/main/components/CommandPalette/useCommandPalette.ts
  • apps/desktop/src/renderer/screens/main/components/KeywordSearch/useKeywordSearch.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/EmptyTabView.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/GroupStrip/GroupStrip.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatPaneInterface/components/ChatMessageList/components/AssistantMessage/AssistantMessage.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatPaneInterface/components/ChatMessageList/components/UserMessage/UserMessage.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/FileViewerPane/components/FileViewerContent/FileViewerContent.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ReferenceGraphPane/ReferenceGraphPane.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/hooks/useFileLinkClick.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/ChangesView/components/GitGraphView/CommitDetailsPanel/CommitDetailsPanel.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/index.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/hooks/useVscodeDiffSync.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/hooks/useVscodeOpenFileSync.ts

📝 Walkthrough

Walkthrough

このプルリクエストでは、ファイルビューアペインを開く複数の呼び出し箇所(addFileViewerPane)に対して、useRightSidebarOpenViewWidth: trueオプションを一貫して追加しています。チャット、ワークスペース、検索、ターミナルなど、18個のファイルコンポーネント全体にわたってこの修正が適用されています。

Changes

Cohort / File(s) Summary
Chat Message Components
apps/desktop/src/renderer/components/Chat/.../MessageList/MessageList.tsx, apps/desktop/src/renderer/components/Chat/.../MessagePartsRenderer/MessagePartsRenderer.tsx, apps/desktop/src/renderer/components/Chat/.../ToolCallBlock/ToolCallBlock.tsx
ファイル表示やメンション処理時にaddFileViewerPaneuseRightSidebarOpenViewWidth: trueを追加
v2-Workspace Chat Components
apps/desktop/src/renderer/routes/.../ChatMessageList/components/AssistantMessage/AssistantMessage.tsx, apps/desktop/src/renderer/routes/.../ChatMessageList/components/UserMessage/UserMessage.tsx
アタッチメントとファイルメンション処理でuseRightSidebarOpenViewWidth: trueオプションを追加
Workspace Routes & Page
apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/page.tsx
ディープリンクインテント処理時にuseRightSidebarOpenViewWidth: trueを含める
Command Palette & Search
apps/desktop/src/renderer/screens/main/components/CommandPalette/useCommandPalette.ts, apps/desktop/src/renderer/screens/main/components/KeywordSearch/useKeywordSearch.ts
ファイル選択・検索マッチ時にuseRightSidebarOpenViewWidth: trueを追加
Workspace View Components
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/EmptyTabView.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/GroupStrip/GroupStrip.tsx
メモ作成・追加時にペイン開設オプションにuseRightSidebarOpenViewWidth: trueを含める
Chat Pane Components
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/.../AssistantMessage/AssistantMessage.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/.../UserMessage/UserMessage.tsx
チャットペインのアタッチメント・メンション処理にuseRightSidebarOpenViewWidth: trueを追加
File Viewer & Navigation
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/FileViewerPane/.../FileViewerContent/FileViewerContent.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ReferenceGraphPane/ReferenceGraphPane.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/hooks/useFileLinkClick.ts
定義への移動・参照グラフ・ファイルリンククリック処理にuseRightSidebarOpenViewWidth: trueを含める
Right Sidebar & Sync
apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/ChangesView/components/GitGraphView/CommitDetailsPanel/CommitDetailsPanel.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/index.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceView/hooks/useVscodeDiffSync.ts, apps/desktop/src/renderer/screens/main/components/WorkspaceView/hooks/useVscodeOpenFileSync.ts
Git変更表示・右サイドバー・Vscodeシンク処理でuseRightSidebarOpenViewWidth: trueオプションを追加

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 ウサギが跳ねたペインの横に
新しい旗がはためいて
useRightSidebarOpenViewWidthよ!
サイドバーの幅はもう思いのまま
18のファイルで統一の美しさ ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.53% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely describes the main change: applying the right sidebar open view width setting across all split-pane file opening flows throughout the codebase.
Description check ✅ Passed The PR description is comprehensive and well-structured, covering the motivation, technical details, all affected flows, test plan, and verification steps that match the provided template sections.

✏️ 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 apply-sidebar-open-view-width-to-all-flows

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.

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.

2 participants