Skip to content

resolvedスレッドの[resolved]表示を先頭コメントのみに変更 - #166

Closed
kyu08 wants to merge 1 commit into
mainfrom
fix/resolved-badge-head-only
Closed

resolvedスレッドの[resolved]表示を先頭コメントのみに変更#166
kyu08 wants to merge 1 commit into
mainfrom
fix/resolved-badge-head-only

Conversation

@kyu08

@kyu08 kyu08 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

概要

ローカルレビューでresolveしたスレッドは、スレッド表示(コメントブラウザの右上ペイン・コメントビューア・返信ウィンドウ)で各コメントのヘッダーに[resolved]が並んでいました。resolvedはスレッド単位の状態のため、スレッドの先頭コメント(root)にのみ[resolved]を表示するよう変更します。

local/store.luamaterialize()がスレッドのresolved状態を全コメント(root+replies)に伝播させており、ui/format.luacomment_badgesが各コメントでcomment.resolvedを見て[resolved]を付けていたのが原因です。

変更内容

  • ui/format.lua comment_badges: [resolved]in_reply_to_idを持たないrootコメントのときだけ付与する(util.is_nullでnull判定、純粋性維持)。[agent]はコメント単位のまま
  • 位置ではなくroot判定にしたので、1行に複数スレッドがある場合も各スレッドのheadに正しく1つずつ出る
  • コメントブラウザ左リストの末尾[resolved]ラベル(entry単位)は変更なし

テスト計画

  • make all(luacheck / stylua / 全spec / check-state-deps / check-purity / check-docs)が全てパス
  • 新規テスト追加: ui_speccomment_badges(root→[resolved]、reply→なし、agentはコメント単位、agent+resolved rootの複合)
  • 手動確認: ローカルレビューでスレッドをresolveし、ブラウザ右上ペイン・ビューア・返信ウィンドウのいずれもrootにのみ[resolved]が出ること

備考


Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings July 21, 2026 12:07

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.

Pull request overview

ローカルレビューで resolve 済みスレッドを表示する際、各返信コメントのヘッダーにも [resolved] が繰り返し表示されていた挙動を、スレッド先頭(root コメント)にのみ表示するよう調整するPRです。resolved がスレッド単位の状態であることを UI 表示に正しく反映します。

Changes:

  • lua/fude/ui/format.luacomment_badges で、[resolved] を root コメント(in_reply_to_id が null)にのみ付与するよう変更
  • null 判定に util.is_null を用いて vim.NIL を含むケースでも純粋関数として扱えるよう整理
  • tests/fude/ui_spec.luacomment_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 組み合わせをカバー

@kyu08 kyu08 closed this Jul 21, 2026
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