Skip to content

feat(smartlog): Phase 2 #310 — SmartlogCiOverlay.running count + badge fix - #419

Merged
erishforG merged 1 commit into
release/1.0from
feat/auto-310-ci-overlay-phase2
Sep 3, 2026
Merged

feat(smartlog): Phase 2 #310 — SmartlogCiOverlay.running count + badge fix#419
erishforG merged 1 commit into
release/1.0from
feat/auto-310-ci-overlay-phase2

Conversation

@erishforG

Copy link
Copy Markdown
Owner

무엇

SmartlogCiOverlayrunning: 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)에서 SmartlogCiOverlay struct과 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-details verbose 모드에서 개별 체크 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 deserialization
    • render_text_shows_running_ci_badge_with_accurate_count: full render 통합 확인

@erishforG

…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>
@erishforG erishforG added the auto-improvement Daily auto-generated improvement PR/issue label Sep 3, 2026
@erishforG
erishforG merged commit 70262c5 into release/1.0 Sep 3, 2026
12 checks passed
@erishforG
erishforG deleted the feat/auto-310-ci-overlay-phase2 branch September 3, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-improvement Daily auto-generated improvement PR/issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant