feat: display CI check status in PR overview#2
Conversation
Show CI check runs with pass/fail indicators and summary count between DESCRIPTION and COMMENTS sections. Duplicate checks from re-runs are deduplicated, keeping only the latest result per name. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable gx keymap on CI status lines to open the check's detailsUrl in the browser. The line-to-URL mapping is passed through setup_github_refs via a new line_urls parameter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Set Vim marks ('d, 's, 'c) on DESCRIPTION, CI STATUS, and COMMENTS
sections when opening the PR overview, allowing quick navigation.
Mark characters are configurable via overview.marks option.
Change new comment keymap from c to C to avoid mark conflict.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
gxが使用可能であることがパッと見わかりにくいけど全部にunderline引くのもなぁ・・ |
There was a problem hiding this comment.
Pull request overview
Adds CI check status visibility and navigation improvements to the PR overview float, integrating GitHub statusCheckRollup data into the existing ReviewOverview UI.
Changes:
- Fetches
statusCheckRollupviagh pr viewand renders a new CI STATUS section with per-check symbols/highlights plus a pass-count summary. - Adds overview section marks (
'd/'s/'c) and line-levelgxsupport to open CI check URLs. - Expands unit tests and updates documentation for the new CI STATUS section and mark customization.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lua/reviewit/gh.lua | Requests statusCheckRollup in PR overview JSON payload. |
| lua/reviewit/ui.lua | Renders CI STATUS section, deduplicates checks, adds section marks, and enables gx opening check URLs. |
| tests/reviewit/ui_spec.lua | Adds coverage for check formatting/dedup/summary and overview rendering outputs. |
| doc/reviewit.txt | Documents CI STATUS section, section marks, and overview.marks option. |
Comments suppressed due to low confidence (3)
lua/reviewit/ui.lua:156
deduplicate_checks()useskey = check.name or check.context or "unknown". If multiple check entries lack bothnameandcontext, they will all collapse into a single "unknown" entry, dropping data incorrectly. Use a unique fallback key (e.g., the check index,check.id, ortostring(check)), or skip deduplication when the identifier is missing.
for _, check in ipairs(checks) do
local key = check.name or check.context or "unknown"
if not seen[key] then
table.insert(order, key)
end
seen[key] = check
end
lua/reviewit/ui.lua:570
- Section marks are user-configurable (
overview.marks), butvim.api.nvim_buf_set_markis called without validation orpcall. If a user sets an invalid mark (e.g., multi-character string or unsupported char), this will error and prevent the overview from rendering. Consider validatingmarkis a 1-character string and wrapping the call inpcall(or ignoring invalid entries with a warning).
-- Set section marks
local marks = config.opts.overview and config.opts.overview.marks
or { description = "d", ci_status = "s", comments = "c" }
for section, mark in pairs(marks) do
local line = result.sections[section]
if line and mark then
vim.api.nvim_buf_set_mark(buf, mark, line, 0, {})
end
doc/reviewit.txt:190
- The docs show
overview.marksas part of the default configuration snippet, butlua/reviewit/config.luadefaults currently do not includeoverview.marks(the code only provides a fallback at runtime). Either addmarks = { description = "d", ci_status = "s", comments = "c" }to the actual defaults, or adjust the documentation snippet to reflect the real defaults.
-- Width/height as percentage of screen (1-100)
width = 80,
height = 80,
-- Section marks (jump with 'd, 's, 'c)
marks = { description = "d", ci_status = "s", comments = "c" },
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kyu08
left a comment
There was a problem hiding this comment.
- PR Overview (
ReviewOverview) の DESCRIPTION セクション後に CI STATUS セクションを追加
実際このPRのレビューにこのPRの機能使ってみてますがCheck Status出るのめっちゃいいですねww
- CI チェック行で
gxを押すとワークフロー URL をブラウザで開ける
- セクションマーク(
'd/'s/'c)で DESCRIPTION / CI STATUS / COMMENTS にジャンプ可能
これにキーマップ貼られてるのも使いやすくていいですね!!!
[s, ]sでnext section/previous sectionに飛べてもいいかもですね(とはいえ今のままでも全然便利そうです)
|
Summary
ReviewOverview) の DESCRIPTION セクション後に CI STATUS セクションを追加gxを押すとワークフロー URL をブラウザで開ける'd/'s/'c)で DESCRIPTION / CI STATUS / COMMENTS にジャンプ可能overview.marksオプションでカスタマイズ可能Changes
lua/reviewit/gh.luaget_pr_overview()にstatusCheckRollupフィールドを追加lua/reviewit/ui.luaformat_check_status()— チェック結果を記号・ハイライトにマッピングdeduplicate_checks()— 同名チェックの重複排除(最新のみ保持)build_checks_summary()— "N/M passed" サマリー文字列の生成build_overview_lines()に CI STATUS セクション・セクション追跡・check_urls を追加setup_github_refs()にline_urlsパラメータを追加(行レベル URL マッピング)show_overview_float()にセクションマーク設定を追加tests/reviewit/ui_spec.luadoc/reviewit.txtoverview.marksオプションのドキュメント追加Test plan
make allpasses (luacheck + stylua + 133 tests):ReviewStart→:ReviewOverviewで CI STATUS セクション表示確認gxでワークフロー URL が開くこと'd/'s/'cでセクションジャンプできること🤖 Generated with Claude Code