feat(smartlog): Phase 2 #310 — SmartlogCiOverlay.running count + badge fix - #419
Merged
Merged
Conversation
…e fix Add `running: usize` field to `SmartlogCiOverlay` tracking how many check runs are still in-progress or queued. Previously `format_ci_badge` hardcoded `(0/N)` for the running state; now it renders the accurate `● running (R running/N)` count populated by `attach_ci_overlay`. ## Changes - `SmartlogCiOverlay`: new `running: usize` field with `#[serde(default)]` for backward-compatible JSON deserialization. - `attach_ci_overlay`: count `status == "in_progress" | "queued"` runs. - `format_ci_badge`: render `● running (R running/N)` instead of `(0/N)`. - Tests: +4 cases (running count badge, zero-running edge case, Phase-1-era JSON backward compat, render_text integration check). Refs #310 Co-Authored-By: Claude Sonnet 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.
무엇
SmartlogCiOverlay에running: usize필드를 추가하고format_ci_badge의 running 상태 표시를 수정합니다.Phase 1에서 CI badge의 running 상태가
[CI: ● running (0/5)]처럼 hardcoded 0을 표시하는 버그가 있었습니다. 이 PR은 실제 in-progress/queued 체크 개수를 추적·표시합니다.왜
Refs #310 (CI overlay epic, v1.0 milestone)
Phase 1 (PR #418)에서
SmartlogCiOverlaystruct과attach_ci_overlay가 구현됐지만running상태의 badge가(0/N)으로 항상 0을 표시했습니다. 실제 in-progress check run 수를 보여줘야 smartlog가 의미 있는 CI 정보를 제공합니다.변경
SmartlogCiOverlay:running: usize필드 추가 (#[serde(default)]— 기존 JSON 역직렬화 호환)attach_ci_overlay:status == "in_progress" | "queued"check run 개수 집계format_ci_badge:● running (0/N)→● running (R running/N)정확한 표시src/cli/commands/smartlog.rs단독다음 Phase 힌트
Phase 3 (#310):
--no-ci-overlay단독 flag 또는--ci-detailsverbose 모드에서 개별 체크 run 이름/상태 나열 (현재는 집계만 표시). snapshot test (insta) 추가로 #308 acceptance criteria 완성.리스크
낮음 — 단일 파일 변경, 새 필드는
#[serde(default)]로 backward-compat, CLI/API surface 불변.롤백
git revert ccf087b— 단일 커밋.Test plan
cargo build --quiet✅cargo fmt --check✅cargo clippy --all-targets -- -D warnings✅cargo test --quiet✅ 229 passed (기존 226 + 신규 3 tests)ci_badge_running_shows_running_count: 정확한 running count 표시 확인ci_badge_running_zero_running_shows_zero: 엣지케이스 (running=0)ci_overlay_phase1_json_backward_compat:running키 없는 구 JSON deserializationrender_text_shows_running_ci_badge_with_accurate_count: full render 통합 확인@erishforG