Skip to content

chore: remove verified unused Orca code - #27175

Merged
nwparker merged 2 commits into
mainfrom
nwparker/zombie-rm-dead-code
Oct 10, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/zombie-rm-dead-code

Conversation

@nwparker

@nwparker nwparker commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 85 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​13 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1069 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1056

ELI5

Remove code Orca no longer calls. Users should see the same behavior before and after this cleanup.

What Changed

Delete ten disconnected modules and 71 unused exported functions across the desktop, renderer, shared code, and relay. Remove two private dashboard functions, four private lookup constants, and imports that became unused. Remove the three orphaned translation keys from all six language catalogs as well. The result removes over 1,000 lines overall.

The deleted modules cover retired WSL hook helpers, wall-clock parsing, a mobile capability parser, client shell lookup, skill version selection, sidebar counts, tab-group context, quick-command animation, and inactive-workspace estimates.

Rebased onto current main, including #27177, which fixes an existing cross-version test fixture that also failed on this PR's original base. The cleanup adds no compatibility-test changes.

Why

These implementations have no consumers. Keeping them makes it harder to identify the code that actually controls Orca.

Used the existing Knip 5.88.1 audit to find candidates, then independently searched the entire repository, including mobile, cloud, tests, scripts, and build configuration. Every removed exported function's name occurred only at its definition. Checked namespace imports and dynamic loading separately. Kept worker/build entry points and compile-time checks that Knip reports as unused.

This approach removes confirmed unreachable implementations while avoiding broad automatic deletion based on one tool's findings.

Linked Issue

None — maintainer cleanup requested directly.

Visual Proof

N/A — only unused implementations and imports are removed; there is no visual or interaction change.

Testing

Local validation on macOS, with ORCA_BACKGROUND_LAUNCH=1:

  • pnpm tc — passed before and after.
  • pnpm test <direct consumer test files> --maxWorkers=6 — 199 test files passed; 2,432 tests passed, one expected failure, one skipped. Selected existing tests using collectUnitDependencyGraph in config/scripts/ci-unit-dependency-graph.mjs and the direct importers of all edited modules.
  • pnpm run build:electron-vite, pnpm run build:cli, pnpm run build:relay — passed. Relay builds include Linux, macOS, Windows, and WSL targets.
  • pnpm run check:code-quality:changed, Oxlint on all 69 edited files, formatting, and git diff --check — passed.
  • pnpm run verify:localization-catalogs, pnpm run verify:localization-extraction, pnpm run verify:localization-coverage — passed after deleting the orphaned translation entries.
  • pnpm test tests/e2e/cross-version-wire/ --maxWorkers=6 — all 37 files and 191 tests passed with the corrected fixture from main; the platform-detection suite also passed.
  • Optional pnpm run typecheck:e2e reports the same 256 existing errors on the original base and this branch, with no new errors. Root pnpm tc passes.
  • Repeated Knip audit: unused files 24 → 14; unused exports 161 → 90; no newly orphaned exports.
  • Compared the original and edited syntax trees: all 695 surviving production top-level declarations are structurally identical. Changes consist only of deletions and import cleanup.

No new tests: this removes implementations with no callers; existing consumer tests exercise the retained behavior. Full lint, full unit suite, native packaging, and real Linux/Windows/SSH runs were not run locally and remain for CI.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Review

Reviewed dynamic worker loading, module initialization, persistence and cleanup, remote compatibility, folder workspaces, and platform-specific uses. The removed implementations do not register RPC methods or produce wire messages; remaining protocol values and registered handlers are retained.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

The remaining Knip file findings are build/process entry points, an Electron test fixture, and compile-time parity checks. They are intentionally retained.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 34d8323d-97e4-4378-8043-d0fd689969a2

📥 Commits

Reviewing files that changed from the base of the PR and between 74976d068500497762533051ca5c660c9c2f13d9 and d1d4523.


You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2e04ca53-c898-4f4c-8563-aa72d3a22e84




📥 Commits

Reviewing files that changed from the base of the PR and between 216fa94d49e677944bb3d35d9e42ce756102d035 and 74976d068500497762533051ca5c660c9c2f13d9.





📒 Files selected for processing (6)
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json




💤 Files with no reviewable changes (6)
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/zh.json




Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.






📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The change removes exported helpers, types, components, and test utilities across main-process, renderer, and shared code. It also deletes the time-zone wall-clock module and the tab-group host module. Dashboard card filtering now accepts dashboard filters and applies them to cards; the separate workspace-filtering function was removed. Several locale entries for workspace-cleanup progress and terminal-link settings were removed or replaced.








Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 74976

The reviewed localization cleanup does not leave the affected interfaces with missing translations. No issue identified here prevents merging.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 27.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 10 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check Passed The title clearly and concisely identifies the primary change: removing verified unused Orca code.
Description check Passed The description follows the required structure and explains the scope, rationale, testing, review considerations, and unchanged user behavior. It also documents that the author is a maintainer and tha…



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@nwparker
nwparker force-pushed the nwparker/zombie-rm-dead-code branch from 74a1d7c to d1d4523 Compare October 10, 2026 07:42
@nwparker
nwparker merged commit 4bdeff3 into main Oct 10, 2026
64 of 65 checks passed
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.

1 participant