Skip to content

fix(desktop): ドラッグドロップの分割幅をプレビューと一致させる (#342)#343

Merged
MocA-Love merged 1 commit intomainfrom
fix/342-drop-split-width
Apr 19, 2026
Merged

fix(desktop): ドラッグドロップの分割幅をプレビューと一致させる (#342)#343
MocA-Love merged 1 commit intomainfrom
fix/342-drop-split-width

Conversation

@MocA-Love
Copy link
Copy Markdown
Owner

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

概要

Files タブから pane にファイルをドラッグして開いたとき、青いプレビューは 50% ゾーンを示しているのに、実際に開かれた file viewer が Right sidebar open view width 設定 (例: 25%) の幅で開いてしまい、プレビューと食い違う問題を修正。

原因

#336 で追加したドロップ処理では addFileViewerPaneuseRightSidebarOpenViewWidth: true を渡していた。これによりストア側が Right sidebar の幅設定を split percentage に流用するため、設定が 25% だとドロップ結果の pane も 25% になっていた。プレビュー側は常に 50% ゾーンを表示するため不一致が発生。

変更点

  • BasePaneWindow のドロップハンドラから useRightSidebarOpenViewWidth: true を外し、ドロップ時は常に DEFAULT (50/50) で分割するように変更。
  • サイドバー右側の幅設定は、クリックで開く既存動線にのみ適用される状態に戻る。

動作確認

  • bun run lintapps/desktopbun run typecheck パス。
  • ローカルで Right sidebar open view width を 25% に設定 → Files タブからペインの右半分にドラッグ → プレビュー通り 50/50 で分割されることを想定。

Closes #342

Summary by CodeRabbit

リリースノート

  • バグ修正
    • ファイルを内部的にドラッグ&ドロップした際の動作を調整しました。

Dropping a file onto a pane used the Right sidebar open view width
setting for the split percentage, producing a pane whose width did not
match the blue drop preview (which always highlights the 50% zone).
Drop into an explicit zone should honor the user's positional choice
with a 50/50 split; the sidebar width setting remains for click-to-open
flows from the sidebar.

Closes #342
@MocA-Love
Copy link
Copy Markdown
Owner Author

@codex review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 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: 5f9c1094-91ce-407b-bbb7-1955260b20ce

📥 Commits

Reviewing files that changed from the base of the PR and between e8739b9 and 97c6b6f.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/components/BasePaneWindow/BasePaneWindow.tsx
💤 Files with no reviewable changes (1)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/components/BasePaneWindow/BasePaneWindow.tsx

📝 Walkthrough

Walkthrough

BasePaneWindow のファイルドロップハンドラーから useRightSidebarOpenViewWidth: true オプションを削除し、addFileViewerPane() の呼び出しを簡素化しました。その他のドラッグ/ドロップの状態管理は変わっていません。

Changes

コホート / ファイル(s) 変更概要
ファイルドロップハンドラー修正
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/components/BasePaneWindow/BasePaneWindow.tsx
内部ファイルドロップキャプチャハンドラーで addFileViewerPane() を呼び出す際に、useRightSidebarOpenViewWidth: true オプションを削除

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 分

Possibly related PRs

Poem

🐰 ✨ Right sidebar width の呼び出しが消えて
ドロップされたファイルは正しい幅に
バグの青いプレビューも満足げ
ドラッグの魔法がもう完璧だね!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed タイトルは PR の主な変更内容(ドラッグドロップの分割幅をプレビューと一致させる)を明確に要約しており、関連する issue 番号も含まれている。
Description check ✅ Passed PR の説明は、概要、原因、変更点、動作確認などが十分に記載されており、テンプレートの主要要件を満たしている。
Linked Issues check ✅ Passed PR は issue #342 で報告されたドラッグドロップ時のプレビューと実際の幅の不一致を、useRightSidebarOpenViewWidth: true を除去することで解決している。
Out of Scope Changes check ✅ Passed 変更は BasePaneWindow のドロップハンドラから 1 行を削除する限定的な修正であり、issue #342 の解決に直接関連しており、スコープ外の変更は含まれていない。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 fix/342-drop-split-width

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.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@MocA-Love MocA-Love merged commit 3cd77c5 into main Apr 19, 2026
6 checks passed
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.

[bug] Filesタブからのドラッグドロップ機能について

1 participant