Skip to content

feat: フォーカス中ペインの下にプレビューを常時表示#16

Merged
myuron merged 4 commits into
mainfrom
feat/preview-pane
Jun 28, 2026
Merged

feat: フォーカス中ペインの下にプレビューを常時表示#16
myuron merged 4 commits into
mainfrom
feat/preview-pane

Conversation

@myuron

@myuron myuron commented Jun 28, 2026

Copy link
Copy Markdown
Owner

概要

フォーカス中ペインの下に、カーソル行のファイル/ディレクトリ内容を常時表示するプレビュー領域を追加しました。

  • Source フォーカス時は Source ペインの下、Dest フォーカス時は Dest ペインの下に表示
  • 非フォーカス側は従来どおり全高で描画

表示内容

  • テキストファイル: 内容(先頭からプレビュー領域に収まる行数)
  • ディレクトリ: 中のエントリ一覧(ディレクトリは末尾に /
  • バイナリ/読み込み失敗/空: その旨のメッセージ

変更点

  • fs.FileSystemReadFile を追加。OSFS 実装は先頭 64KiB までに制限して巨大ファイルでも安全
  • internal/ui/preview.gopreviewLines / isBinary / renderPreview を追加
  • render() でフォーカス側を縦分割(ペイン約2/3・プレビュー約1/3、最小高さを確保)

テスト

  • isBinary / previewLines(テキスト・バイナリ・ディレクトリ・読み込み失敗・空・nil)の単体テスト
  • フォーカス側にプレビューが描画されることの統合テスト
  • gofmt / golangci-lint / go test ./... / nix build すべてパス

🤖 Generated with Claude Code

カーソル行のファイル/ディレクトリの内容を、フォーカス中ペインの下に
常時表示するプレビュー領域を追加。Source フォーカス時は Source の下、
Dest フォーカス時は Dest の下に表示する。

- fs.FileSystem に ReadFile を追加(OSFS は先頭64KiBまで読み込み)
- テキストは内容、ディレクトリは中の一覧を表示
- バイナリ・読み込み失敗・空はメッセージを表示

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@myuron, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 10 minutes and 26 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e64ae6f2-07ac-4dc6-a3fc-ff25183bf19a

📥 Commits

Reviewing files that changed from the base of the PR and between 6c8ee4d and 133416a.

📒 Files selected for processing (11)
  • .claude/plans/plan.md
  • internal/fs/fs.go
  • internal/fs/osfs.go
  • internal/pane/pane_test.go
  • internal/ui/keybinding.go
  • internal/ui/layout.go
  • internal/ui/model.go
  • internal/ui/model_test.go
  • internal/ui/preview.go
  • internal/ui/preview_test.go
  • internal/ui/render.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/preview-pane

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.

myuron and others added 3 commits June 28, 2026 16:00
- プレビュー領域の高さを約1/3から50%へ変更
- Tab の巡回にプレビューを追加(Sourceペイン→Sourceプレビュー→
  Destペイン→Destプレビュー、Source未選択時はSourceをスキップ)
- プレビューフォーカス時は j/k でスクロール、gg/G で先頭/末尾へ
- プレビュー対象(カーソル行)が変わったらスクロール位置をリセット
- フォーカス位置に応じて枠色とステータス表示を切り替え

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tab の逆方向として Shift+Tab を追加。
Destペイン → Sourceプレビュー → Sourceペイン → Destプレビュー の順で
巡回し、SourcePane未選択時はSource側をスキップする。
通常モード・プレビューフォーカス時の双方で有効。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
フォーカス移動を2軸に分離。
- Tab: 左右ペイン間の横移動(縦位置のペイン/プレビューは維持)
- Shift+Tab: ペインとプレビュー間の縦移動(左右位置は維持)

SourcePane未選択時はTabでの横移動を無効化する。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@myuron
myuron merged commit d989341 into main Jun 28, 2026
2 checks passed
@myuron
myuron deleted the feat/preview-pane branch June 28, 2026 16:08
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