resolvedスレッドの[resolved]表示を先頭コメントのみに変更 - #166
Closed
kyu08 wants to merge 1 commit into
Closed
Conversation
Local review resolution is thread-level and materialize() propagates it to every comment in the thread, so comment_badges rendered [resolved] on every reply. Show it only on the thread root (the head comment, which has no in_reply_to_id) so a resolved thread is marked once across the comment browser thread pane, the comment viewer, and the reply window. [agent] stays per-comment; the browser left-list label is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
ローカルレビューで resolve 済みスレッドを表示する際、各返信コメントのヘッダーにも [resolved] が繰り返し表示されていた挙動を、スレッド先頭(root コメント)にのみ表示するよう調整するPRです。resolved がスレッド単位の状態であることを UI 表示に正しく反映します。
Changes:
lua/fude/ui/format.luaのcomment_badgesで、[resolved]を root コメント(in_reply_to_idが null)にのみ付与するよう変更- null 判定に
util.is_nullを用いてvim.NILを含むケースでも純粋関数として扱えるよう整理 tests/fude/ui_spec.luaにcomment_badgesの新規テストケースを追加(root/reply、agent との組み合わせ)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lua/fude/ui/format.lua | [resolved] バッジの付与条件を「root のみ」に限定し、スレッド単位状態の表示を適正化 |
| tests/fude/ui_spec.lua | comment_badges の仕様を検証するテストを追加し、root/reply と agent 組み合わせをカバー |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
ローカルレビューでresolveしたスレッドは、スレッド表示(コメントブラウザの右上ペイン・コメントビューア・返信ウィンドウ)で各コメントのヘッダーに
[resolved]が並んでいました。resolvedはスレッド単位の状態のため、スレッドの先頭コメント(root)にのみ[resolved]を表示するよう変更します。local/store.luaのmaterialize()がスレッドのresolved状態を全コメント(root+replies)に伝播させており、ui/format.luaのcomment_badgesが各コメントでcomment.resolvedを見て[resolved]を付けていたのが原因です。変更内容
ui/format.luacomment_badges:[resolved]はin_reply_to_idを持たないrootコメントのときだけ付与する(util.is_nullでnull判定、純粋性維持)。[agent]はコメント単位のまま[resolved]ラベル(entry単位)は変更なしテスト計画
make all(luacheck / stylua / 全spec / check-state-deps / check-purity / check-docs)が全てパスui_specのcomment_badges(root→[resolved]、reply→なし、agentはコメント単位、agent+resolved rootの複合)[resolved]が出ること備考
is_resolved、PR コメントにresolved/unresolvedラベルを表示する #156/resolvedなコメントの表示/非表示を切り替えるFudeReviewToggleResolvedを追加 #163)とは独立したコードパス(こちらはcomment.resolved=ローカルレビュー)で、mainから直接分岐していますGenerated with Claude Code