FudeReviewPanelにreviewedなファイルの数を表示する#151
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
FudeReviewPanel(sidepanel)の Files セクションに、VIEWED(閲覧済み)ファイル数の進捗を Files (Reviewed: N/M) 形式で表示できるようにする変更です。レビュー時にファイルの進捗状況をパネル上で即座に把握できるようになります。
Changes:
files.count_viewed(viewed_files, changed_files)を追加し、VIEWED 状態のファイル数を算出ui/sidepanel.luaの Files ヘッダーをReviewed: N/M表示に変更(flat/tree 両対応)- 上記に追従するテスト・ヘルプ・開発ドキュメント(CLAUDE.md)を更新
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| lua/fude/files.lua | VIEWED ファイル数を数える純粋関数 count_viewed を追加 |
| lua/fude/ui/sidepanel.lua | Files セクションのヘッダーに Reviewed: N/M を表示し、render で viewed_count を算出して渡す |
| tests/fude/files_spec.lua | count_viewed のテストを追加 |
| tests/fude/sidepanel_spec.lua | Files ヘッダーのフォーマット変更に合わせて既存テストを更新・追加 |
| doc/fude.txt | :FudeReviewPanel の Files ヘッダー表示仕様を追記 |
| CLAUDE.md | ui/sidepanel.lua / files.lua の責務・関数一覧の説明を更新 |
Comment on lines
+63
to
+67
| function M.format_files_section(file_entries, width, format_path_fn, viewed_count) | ||
| format_path_fn = format_path_fn or function(p) | ||
| return p | ||
| end | ||
| local lines = { string.format(" Files (%d)", #file_entries), string.rep("─", width) } | ||
| local lines = { string.format(" Files (Reviewed: %d/%d)", viewed_count, #file_entries), string.rep("─", width) } |
Collaborator
Author
There was a problem hiding this comment.
b7b2a74 で修正 — viewed_count = viewed_count or 0 を追加しました
Comment on lines
+107
to
+108
| function M.format_files_section_tree(tree_entries, total_file_count, width, viewed_count) | ||
| local lines = { string.format(" Files (Reviewed: %d/%d)", viewed_count, total_file_count), string.rep("─", width) } |
Comment on lines
288
to
290
| local scope_lines, scope_hls, scope_count = M.format_scope_section(scope_entries, width) | ||
| local viewed_count = files_mod.count_viewed(state.viewed_files, state.changed_files or {}) | ||
| local file_lines, file_hls, file_count |
Collaborator
Author
There was a problem hiding this comment.
b7b2a74 で修正 — viewed_count の算出を if repo_root then ブロック内に移動し、file_entries と同じスコープで算出するようにしました
| --- @param file_entries table[] entries from files.build_file_entries | ||
| --- @param width number available width in columns | ||
| --- @param format_path_fn (fun(s: string): string|nil)|nil formats file path for display (nil = identity) | ||
| --- @param viewed_count number number of files with VIEWED state |
Collaborator
Author
There was a problem hiding this comment.
b7b2a74 で修正 — count of files with VIEWED state に変更しました
| --- @param tree_entries table[] entries from ui.sidepanel.tree.flatten_tree | ||
| --- @param total_file_count number total number of changed files | ||
| --- @param width number available width in columns | ||
| --- @param viewed_count number number of files with VIEWED state |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
概要
FudeReviewPanel(sidepanel)の Files セクションヘッダーに viewed ファイル数を表示する。これまでファイル総数のみ表示されていたヘッダーを
Files (Reviewed: 3/10)の形式に変更し、レビュー進捗を一目で把握できるようにした。Closes #150
変更内容
files.luaに純粋関数count_viewed(viewed_files, changed_files)を追加し、VIEWED 状態のファイル数を算出するsidepanel.luaのformat_files_section/format_files_section_treeにviewed_countパラメータを追加し、ヘッダーをFiles (Reviewed: N/M)形式に変更render()でcount_viewedを呼び出し、両フォーマット関数に渡すテスト計画
make all)tests/fude/files_spec.lua(count_viewedの6テストケース)tests/fude/sidepanel_spec.lua(ヘッダーフォーマットのアサーション更新 + viewed count 表示のテスト追加)<Tab>での viewed 切替でヘッダー数値が即座に更新されることを確認Generated with Claude Code