Skip to content

fix: コメント間の区切り線をウィンドウ幅まで伸ばす - #231

Merged
kyu08 merged 6 commits into
mainfrom
copilot/extend-comment-delimiter-to-end-of-line
Oct 9, 2026
Merged

kyu08 merged 6 commits into
mainfrom
copilot/extend-comment-delimiter-to-end-of-line

Conversation

Copilot AI commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

概要

コメントビューア、reply/editウィンドウ、コメントブラウザで、コメント間の区切り線(---)が40文字固定で途中で切れていた。区切り線を表示しているウィンドウの幅まで伸ばす。

before

after

変更内容

  • 当初のインラインコメントボックス枠線を伸ばす変更(445f0fa)を取り消した
    • 依頼の対象はスレッド表示の区切り線で、インラインの枠線ではなかったため
  • format_comments_for_display・format_reply_comments_for_display・format_comment_browser_threadに省略可能なseparator_width引数を追加し、区切り線をbuild_comment_separator(width)で生成するようにした
    • 幅の取得を呼び出し側に任せることで、ui/format.luaの純粋性(make check-purity)を保っている
    • 幅を渡さない場合は従来どおり40文字になる
  • 呼び出し側でウィンドウ幅を渡すようにした
    • ビューアとreply/editウィンドウはcalculate_float_dimensionsの幅を使う(style minimalのfloatなのでウィンドウ幅がそのままテキスト幅になる)
    • コメントブラウザは右上ペインのnvim_win_get_widthを使う。エントリ切替のたびに再計算するので、リサイズ後も次の切替で追従する

テスト計画

  • 既存テスト全パス (make all)
  • 新規テスト追加: tests/fude/ui_spec.lua
  • 手動確認: :FudeReviewListCommentsで複数コメントのスレッドを開き、区切り線が右端まで伸びることを確認した

備考

表示後にビューアやreply/editウィンドウをリサイズしても区切り線は再計算されない。


Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 9, 2026 14:10

Copilot AI left a comment

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.

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

Copilot AI linked an issue Oct 9, 2026 that may be closed by this pull request
Co-authored-by: kyu08 <49891479+kyu08@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 14:12
Copilot AI changed the title [WIP] Fix comment delimiter extension to end of line インラインコメントのdelimiterを行末まで延長 Oct 9, 2026
Copilot AI requested a review from kyu08 October 9, 2026 14:13

Copilot AI left a comment

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.

🟢 Approval recommended

実装は目的に沿っており、本文幅を維持したまま境界線の表示幅を適切に検証しています。

0 open findings

🧠 Review effort: Balanced

Comment thread lua/fude/ui/inline.lua Outdated
local available_width = text_width - indent_width - right_margin
local box_width = math.min(max_box_width, math.max(50, available_width))
local body_max_width = box_width - 6
local border_width = math.max(2, text_width - indent_width)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

test comment

Copilot AI balanced review requested due to automatic review settings October 9, 2026 14:55
@kyu08 kyu08 changed the title インラインコメントのdelimiterを行末まで延長 fix: コメント間の区切り線をウィンドウ幅まで伸ばす Oct 9, 2026

Copilot AI left a comment

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.

🟢 Approval recommended

各表示経路への幅伝播と後方互換のフォールバックが一貫して実装・テストされています。

0 open findings

🧠 Review effort: Balanced

@kyu08
kyu08 marked this pull request as ready for review October 9, 2026 14:59
@kyu08
kyu08 merged commit 7b9534a into main Oct 9, 2026
10 checks passed
@kyu08
kyu08 deleted the copilot/extend-comment-delimiter-to-end-of-line branch October 9, 2026 14:59
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.

コメントのdelimiterを行末まで延長する

3 participants