Skip to content

refactor: remove dead/vestigial helpers with zero prod usage#499

Merged
bigcat88 merged 1 commit into
mainfrom
matt/be-2832-remove-dead-code
Jul 10, 2026
Merged

refactor: remove dead/vestigial helpers with zero prod usage#499
bigcat88 merged 1 commit into
mainfrom
matt/be-2832-remove-dead-code

Conversation

@mattmillerai

Copy link
Copy Markdown
Collaborator

ELI-5

We had six little helper functions (and one big commented-out block of old code) that nothing in the project actually uses anymore — leftover scaffolding. This PR just deletes them. Nothing that runs changes; there's simply less dead code to trip over.

What & why

Pure removal of dead/vestigial code — every item below was verified to have zero callers across both comfy_cli/ and tests/ (grep is authoritative here: none of these are reached via getattr/globals dynamic dispatch, and none are re-exported via any module __all__):

  • workspace_manager.scan_dir_concur — 0 callers. Also latently buggy: it hardcoded base_path = Path("."), ignoring self.workspace_path, so it would have scanned the wrong directory if ever wired up.
  • workspace_manager.check_file_is_model — referenced only by scan_dir_concur; dead as a pair once that goes.
  • Commented-out load_yaml block in workspace_manager.py (~23 lines) — pure noise. The live save_yaml immediately below it (which shares a similar header comment) is real and is left untouched.
  • renderer.Renderer.flush_throttled — 0 callers (its sibling throttled_event has real callers and stays).
  • glyphs.glyph_only — 0 callers (only status_glyph is used).
  • branding.cli_footer — 0 callers (the sole reference is a doc-comment in test_panels.py noting "no separate cli_footer").

Judgment call

Removing scan_dir_concur orphaned two imports that were used only by it — import concurrent.futures and from pathlib import Path. I removed those too (verified via grep they had no other use in the file), otherwise the linter would flag them as unused. This keeps the change to a clean, lint-green removal.

Testing

  • ruff check comfy_cli/ — clean
  • ruff format --check on all touched files — already formatted
  • Full pytest suite — 2455 passed, 36 skipped

No behavior change.

Removes six internal helpers verified to have zero callers across
comfy_cli/ and tests/ (no dynamic dispatch touches them):

- workspace_manager.scan_dir_concur (also buggy: hardcoded Path('.'),
  ignoring self.workspace_path) and its only-caller-of check_file_is_model
- workspace_manager.check_file_is_model (only referenced by scan_dir_concur)
- commented-out load_yaml block in workspace_manager
- renderer.Renderer.flush_throttled
- glyphs.glyph_only
- branding.cli_footer

Also drops the now-orphaned concurrent.futures and pathlib.Path imports
that were used only by scan_dir_concur. Pure removal, no behavior change.
@mattmillerai mattmillerai added cursor-review Request Cursor bot review agent-coded PR authored by the agent-work loop labels Jul 10, 2026
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 3 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: db20329a-c829-435d-86b2-287516f0728b

📥 Commits

Reviewing files that changed from the base of the PR and between 91fbfd9 and fcf7cc0.

📒 Files selected for processing (4)
  • comfy_cli/output/branding.py
  • comfy_cli/output/glyphs.py
  • comfy_cli/output/renderer.py
  • comfy_cli/workspace_manager.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch matt/be-2832-remove-dead-code
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch matt/be-2832-remove-dead-code

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Cursor Review — Consolidated panel

Triggered by @mattmillerai.

✅ No high-signal findings.

Panel: 6/8 reviewers contributed findings.

Reviewers that did not contribute: kimi-k2.5:adversarial (empty), kimi-k2.5:edge-case (empty)

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 10, 2026
@bigcat88
bigcat88 merged commit 0f106ca into main Jul 10, 2026
32 of 38 checks passed
@bigcat88
bigcat88 deleted the matt/be-2832-remove-dead-code branch July 10, 2026 08:13
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

agent-coded PR authored by the agent-work loop cursor-review Request Cursor bot review lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants