Skip to content

feat(smartlog): Phase 6 — (no PR) display + full snapshot tests · Closes #309 Closes #308 - #422

Merged
erishforG merged 1 commit into
release/1.0from
feat/auto-smartlog-phase6-no-pr-display
Sep 4, 2026
Merged

feat(smartlog): Phase 6 — (no PR) display + full snapshot tests · Closes #309 Closes #308#422
erishforG merged 1 commit into
release/1.0from
feat/auto-smartlog-phase6-no-pr-display

Conversation

@erishforG

Copy link
Copy Markdown
Owner

무엇

parsec smartlog 에서 GitHub overlay 가 요청됐으나 열린 PR 이 없는 worktree 에
├─ (no PR) 라인을 명시적으로 표시합니다 (issue #309 마지막 미충족 acceptance criterion).
아울러 issue #308 의 "snapshot test >=1" acceptance criterion 을 full ASCII 골든-출력 비교 테스트로 충족합니다.

변경

핵심 로직 (3줄)

render_textoverlay_requested: bool 파라미터 추가.
node.prNone 이고 overlay_requested == true 이면 ├─ (no PR) 라인 emit.

src/cli/commands/smartlog.rs  +173 / -17

새 테스트 (6개)

테스트 목적
no_pr_line_shown_when_overlay_requested overlay=true, pr=None → (no PR) 표시
no_pr_line_suppressed_when_overlay_not_requested --no-overlay → (no PR) 없음
no_pr_line_plus_ci_badge_for_pr_less_node_with_ci CI overlay 있어도 (no PR) 위 표시
no_pr_line_absent_when_pr_overlay_is_set PR 있으면 (no PR) 없음
render_text_full_snapshot_single_node_with_pr_and_commit #308 골든 스냅샷 ①
render_text_full_snapshot_no_pr_no_commits #308 골든 스냅샷 ②

기존 테스트 15개: render_text(\u2026, false)render_text(\u2026, false, false) 시그니처 업데이트.

다음 Phase 힌트

리스크

LOW — 기존 동작 변화 없음. overlay_requested=false (= --no-overlay 모드) 또는 PR 있는 노드는 일절 영향 없음. 신규 (no PR) 라인은 opt-in (overlay 요청 시에만 출력).

롤백

git revert <sha> — 단일 커밋, 파일 1개.

Test plan

  • cargo build --quiet
  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test --quiet ✅ (238 + 81 + 10 + 5 tests, 0 failed)

@erishforG

 #309 Closes #308

## 무엇
- `render_text` 에 `overlay_requested: bool` 파라미터 추가
- GitHub overlay 가 요청됐지만 열린 PR 이 없는 worktree 에 `├─ (no PR)` 라인 표시
  (issue #309 마지막 미충족 acceptance criterion: "PR 없는 worktree는 (no PR) 표시")
- PR 이 있는 노드는 기존 PR badge 만 표시 (동작 불변)
- `--no-overlay` 모드에서는 (no PR) 표시 안 함 — 조회 자체를 안 했기 때문
- CI overlay 가 있고 PR 이 없는 노드: (no PR) 위에, CI badge 아래에 표시 (순서 보장)

## 테스트
- Phase 6 테스트 4개 추가:
  - `no_pr_line_shown_when_overlay_requested` — 핵심 경로
  - `no_pr_line_suppressed_when_overlay_not_requested` — --no-overlay 격리
  - `no_pr_line_plus_ci_badge_for_pr_less_node_with_ci` — Phase 3(#310) 공존
  - `no_pr_line_absent_when_pr_overlay_is_set` — PR 있으면 (no PR) 없음
- issue #308 acceptance criterion ("snapshot test >=1") 충족:
  - `render_text_full_snapshot_single_node_with_pr_and_commit` — 전체 ASCII 골든 출력
  - `render_text_full_snapshot_no_pr_no_commits` — (no PR) + 빈 커밋 골든 출력
- 기존 테스트 15개: `render_text(..., false)` → `render_text(..., false, false)` 시그니처 업데이트

## 다음 Phase 힌트
- #308 / #309 / #310 모두 acceptance criteria 충족 → 이슈 close
- v1.0 마일스톤 완료 → 마일스톤 close 검토

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@erishforG erishforG added the auto-improvement Daily auto-generated improvement PR/issue label Sep 4, 2026
@erishforG
erishforG merged commit 2baee75 into release/1.0 Sep 4, 2026
12 checks passed
@erishforG
erishforG deleted the feat/auto-smartlog-phase6-no-pr-display branch September 4, 2026 01:28
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