Skip to content

(janitor/dead-code): remove unused org KiloClaw query hooks - #6207

Open
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/dead-code/org-kiloclaw-hooks
Open

kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/dead-code/org-kiloclaw-hooks

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

What was deleted

13 unreferenced React Query hooks from apps/web/src/hooks/useOrgKiloClaw.ts:

  • useOrgKiloClawConfig
  • useOrgKiloClawPairing
  • useOrgRefreshPairing
  • useOrgKiloClawDevicePairing
  • useOrgRefreshDevicePairing
  • useOrgGatewayReady
  • useOrgControllerVersion
  • useOrgMorningBriefingStatus
  • useOrgKiloClawServiceDegraded
  • useOrgKiloClawLatestVersion
  • useOrgKiloClawAvailableVersions
  • useOrgFileTree
  • useOrgReadFile

The file retains its live exports (useOrgKiloClawStatus, useOrgKiloClawNavState, useOrgKiloClawGatewayStatus, useOrgKiloClawMyPin, useOrgKiloClawMutations), and no import becomes unused.

Evidence of unreachability

Each deleted symbol appears exactly once in the entire repository — its own export function declaration — and zero times in the external Kilo-Org/kilocode consumer. Confirmed via repository-wide word-boundary search over .ts/.tsx/.md/.json and a targeted token-occurrence count. The five retained hooks are the only ones imported by any component (verified against apps/web/src/app/(app)/claw/** and organizations/**).

Dynamic and configured entry points checked

  • No Next.js route/layout/loader conventions apply (this is a plain hooks module, not a page/route/layout file).
  • No string-based or dynamic references (React hooks are imported statically); no config, registry, or code-generation references.
  • Not referenced by apps/web barrel re-exports, tests, scripts, CI, or dev tooling.
  • No Cloudflare bindings, Durable Objects, queues, cron triggers, or Wrangler config in apps/web.

Contract and compatibility considerations

  • apps/web is a private application, not a published package; these hooks are not part of any SDK, CLI, or public API surface.
  • @kilocode/* packages and the tRPC router methods these hooks called are untouched; only the unused wrapper hooks were removed.
  • No persisted data, migrations, or rollback paths depend on these functions.

Validation

  • oxfmt apps/web/src/hooks/useOrgKiloClaw.ts — clean
  • oxlint --config .oxlintrc.json apps/web/src/hooks/useOrgKiloClaw.ts — 0 warnings, 0 errors
  • tsgo --noEmit -p apps/web/tsconfig.json — passed

Delete 13 unreferenced hooks from apps/web/src/hooks/useOrgKiloClaw.ts:
useOrgKiloClawConfig, useOrgKiloClawPairing, useOrgRefreshPairing,
useOrgKiloClawDevicePairing, useOrgRefreshDevicePairing, useOrgGatewayReady,
useOrgControllerVersion, useOrgMorningBriefingStatus,
useOrgKiloClawServiceDegraded, useOrgKiloClawLatestVersion,
useOrgKiloClawAvailableVersions, useOrgFileTree, and useOrgReadFile.

None of these symbols appear anywhere else in the repository, in tests,
configuration, or the external Kilo-Org/kilocode consumer.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Sep 16, 2026
@kilo-code-bot
kilo-code-bot Bot enabled auto-merge (squash) September 16, 2026 07:58
@kilo-code-bot

kilo-code-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Deleted-hook removal verified unreferenced: none of the 13 removed symbols appears in any .ts/.tsx/.md/.json file, and every remaining import from @/hooks/useOrgKiloClaw resolves to one of the five retained hooks.

Files Reviewed (1 file)
  • apps/web/src/hooks/useOrgKiloClaw.ts

Verification performed:

  • Working tree confirmed at PR head a0ee193aa66ecd282b07bd3eb45f6b3a4e4a92b6.
  • Repository-wide search for all 13 deleted identifiers returned zero references in code, tests, docs, or config.
  • All remaining import bindings in the file (useQuery, useMutation, useQueryClient, useTRPC, useKiloClawMutations type) are still consumed by the retained hooks, so no import becomes unused.
  • No barrel/re-export surface exists for this module; the remaining call sites import only useOrgKiloClawStatus, useOrgKiloClawNavState, useOrgKiloClawGatewayStatus, useOrgKiloClawMyPin, and useOrgKiloClawMutations.
  • Deletion-only diff: no added runtime code paths, and the tRPC query keys referenced by useOrgKiloClawMutations invalidations remain valid router surfaces.

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

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

Labels

janitor Automated dead-code/duplication cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants