Skip to content

chore: remove unused test exports GetLocalDiffStats and WatchPRState - #975

Open
euxaristia wants to merge 1 commit into
Gitlawb:mainfrom
euxaristia:chore/remove-dead-code-904
Open

chore: remove unused test exports GetLocalDiffStats and WatchPRState#975
euxaristia wants to merge 1 commit into
Gitlawb:mainfrom
euxaristia:chore/remove-dead-code-904

Conversation

@euxaristia

@euxaristia euxaristia commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove dead test helper exports GetLocalDiffStats and WatchPRState from internal/tui/export_test.go, which were left unreferenced following #706.

Changes

  • internal/tui/export_test.go: Remove GetLocalDiffStats, WatchPRState, and unused context/os imports.

Test plan

  • go run golang.org/x/tools/cmd/deadcode@latest -test ./... passes.
  • go fmt ./... and go vet ./... pass.
  • go test ./internal/tui/... passes.
  • go run ./cmd/zero-release build and smoke pass.
  • git diff HEAD --check clean.

Refs #904

Summary by CodeRabbit

  • Tests
    • Removed two test-only helper functions that exposed local diff statistics and pull request state monitoring.
    • Simplified test support imports and setup.

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0e6598c1-2ca3-4577-bcf4-7723b943d767

📥 Commits

Reviewing files that changed from the base of the PR and between 27b319c and 1535a24.

📒 Files selected for processing (1)
  • internal/tui/export_test.go
💤 Files with no reviewable changes (1)
  • internal/tui/export_test.go

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


Walkthrough

The test export file removes two exported helper functions and their unused context and os imports.

Changes

Test seam cleanup

Layer / File(s) Summary
Remove obsolete test helpers
internal/tui/export_test.go
Removes GetLocalDiffStats and WatchPRState, plus their unused imports.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 1535a

This is a narrowly scoped cleanup of unused test-only code with no actionable merge-blocking risk remaining after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing the unused test exports GetLocalDiffStats and WatchPRState.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@Vasanthdev2004 Vasanthdev2004 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked both symbols across the tree and neither has a caller. TestGetLocalDiffStatsFallsBackToOriginBase reads like it uses the exported wrapper but calls the unexported getLocalDiffStats directly, and WatchPRStateContext is the one model.go actually uses and is untouched.

Built and ran internal/tui on the head: green, go vet clean, gofmt clean. Branch is current with main.

Nice cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants