Skip to content

chore: remove dead frontend code + enable noUnusedLocals - #34

Merged
GeiserX merged 1 commit into
mainfrom
cleanup/frontend-spotless
Jul 5, 2026
Merged

GeiserX merged 1 commit into
mainfrom
cleanup/frontend-spotless

Conversation

@GeiserX

@GeiserX GeiserX commented Jul 5, 2026 •

Copy link
Copy Markdown
Owner

First cleanup PR from the /review-code! audit (spotless pass).

  • Delete 14 confirmed-dead functions from frontend/src/main.ts (~195 lines) + 3 now-unused Wails-binding imports.
  • Enable noUnusedLocals in frontend/tsconfig.json — dead symbols now fail the build.
  • Fix the sidebar version string v0.5.0→v0.6.0.

Verified on macOS: tsc --noEmit passes clean with noUnusedLocals on (proves no dead code remains and nothing live was removed); go test ./... green (Go untouched).

Summary by CodeRabbit

  • Bug Fixes
    • Improved app state refreshing so the UI updates more reliably, even if deployment data refreshes fail temporarily.
  • Chores
    • Updated the desktop version label shown in the app from v0.5.0 to v0.6.0.

Delete 14 never-called functions from frontend/src/main.ts (~195 lines) and
their 3 now-unused Wails-binding imports, and enable noUnusedLocals in
frontend/tsconfig.json so dead symbols fail the build going forward. Fix the
sidebar version string (v0.5.0 -> v0.6.0).

Verified on macOS: tsc --noEmit clean with noUnusedLocals on; go test ./... green.
@coderabbitai

coderabbitai Bot commented Jul 5, 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

Run ID: 30845fa3-103f-4b78-8237-aac2bb32bcb1

📥 Commits

Reviewing files that changed from the base of the PR and between f55a71e and 64c1891.

📒 Files selected for processing (2)
  • frontend/src/main.ts
  • frontend/tsconfig.json

📝 Walkthrough

Walkthrough

Removes legacy service-card/detail rendering helpers and associated credential/deploy/log action handlers from main.ts, simplifies refreshState into a concurrent fetch-and-rerender function, trims unused Wails imports, updates the footer version string, and enables noUnusedLocals in tsconfig.

Changes

Frontend cleanup

Layer / File(s) Summary
Import surface reduction
frontend/src/main.ts
Removes ManagedRuntimePlan/RuntimePlan and RestartService from Wails and local type imports.
Remove legacy rendering/action code, simplify refreshState
frontend/src/main.ts
Deletes service card/category/deployment/earnings/detail rendering helpers and credential/deploy/stop/restart/remove/logs/collect handlers; replaces old refresh logic with a concise refreshState that concurrently fetches runtime info and deployments (falling back on RefreshDeployments failure), then rebuilds state via GetAppState and rerenders.
Version label and tsconfig update
frontend/src/main.ts, frontend/tsconfig.json
Bumps footer version to "Desktop v0.6.0" and enables noUnusedLocals alongside strict in tsconfig.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • GeiserX/CashPilot-Desktop#29: Both PRs modify the same service-management UI/action handling code in frontend/src/main.ts, with this PR removing what that PR's baseline feature added.
🚥 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 matches the main changes: removing dead frontend code and enabling noUnusedLocals.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cleanup/frontend-spotless

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.

@GeiserX
GeiserX merged commit ac3dc38 into main Jul 5, 2026
4 of 5 checks passed
@GeiserX
GeiserX deleted the cleanup/frontend-spotless branch July 5, 2026 02:07
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