Skip to content

(janitor/dead-code): remove orphaned cloud-agent-next components and hook - #7974

Merged
kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/dead-code-cloud-agent-next-orphans
Oct 19, 2026
Merged

kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/dead-code-cloud-agent-next-orphans

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

What was deleted

Five files under apps/web/src/components/cloud-agent-next/, all unreachable from any entry point:

  • ErrorBanner.tsx — error banner superseded by inline indicators (event-processor.ts comments document the deliberate removal)
  • OrgContextModal.tsx — organization-context chooser that is never rendered
  • ResumeConfigModal.tsx — CLI-session resume config modal that is never rendered
  • TodoReadToolCard.tsx — todo "read" tool card that is never dispatched
  • hooks/useOrgContextCommand.ts — org-context command hook with no caller

606 lines removed, no production behavior change.

Evidence of unreachability

  • Repository-wide search for each symbol (ErrorBanner, OrgContextModal, ResumeConfigModal, TodoReadToolCard, useOrgContextCommand) across *.ts, *.tsx, *.js, *.json, *.md, *.mjs, *.css, *.yaml finds no import, re-export, dynamic import, or string reference — only stale prose comments (// No ErrorBanner …, * Used by ResumeConfigModal …).
  • No barrel: cloud-agent-next has no index.ts, and no export * from './ErrorBanner' (or equivalent) exists anywhere.
  • No test imports any of the five files.
  • No Storybook story references any of them.
  • MODES and VALID_MODE_VALUES (the only extra exports from ResumeConfigModal) are not imported anywhere; ResumeConfig is defined and used via ./types, so the redundant re-export removed here had no consumer.
  • The kilocode external consumer repo was cloned and searched: no reference (only unrelated StartupErrorBanner substring matches).

Dynamic and configured entry points checked

  • Next.js file conventions: none — the files live under src/components/, not src/app//src/pages/, so no page/route/layout discovery applies.
  • No next/dynamic or import(...) loads them.
  • Not referenced by Cloudflare bindings, Durable Objects, queues, cron, alarms, RPC, workflows, or Wrangler config (these are web-app UI files, not Worker modules).
  • Not exposed through any package.json exports (they are internal to apps/web, not a published package).
  • Not referenced by CI, scripts, dev/, or examples.

Contract and compatibility considerations

  • No public/SDK/package contract is affected; these were internal React components/hook in the web app.
  • No module-level side effects: each file only defines a component/hook/constants; deleting them removes no initialization.
  • No persisted data, migration, or rollout state is touched. updateOrgContextAtom in store/db-session-atoms.ts becomes an unused internal export (its only caller was useOrgContextCommand) but is left in place because it writes the orgContext/orgContextConfirmed fields that are part of the persisted IndexedDbSessionData shape.

Validation

  • tsgo --noEmit -p apps/web/tsconfig.json (web typecheck): pass, before and after deletion.
  • oxlint --config .oxlintrc.json apps/web/src/components/cloud-agent-next: 0 warnings, 0 errors.
  • git diff --check: clean.
  • No test imports the deleted files, so no test suite is affected; full next build was not run because this environment has no PostgreSQL/Redis.

Delete five cloud-agent-next files that are unreachable from any entry
point and have no remaining consumer:

- ErrorBanner.tsx (superseded by inline indicators)
- OrgContextModal.tsx
- ResumeConfigModal.tsx
- TodoReadToolCard.tsx
- hooks/useOrgContextCommand.ts

Repository-wide searches find no import, re-export, dynamic import,
barrel export, story, or configuration reference to any of them; only
stale prose comments remain. The typecheck and oxlint passes confirm no
module referenced the deleted files.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Oct 19, 2026
@kilo-code-bot
kilo-code-bot Bot enabled auto-merge October 19, 2026 07:50
@kilo-code-bot

kilo-code-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Verified that the five deleted cloud-agent-next files are truly unreachable: no import, re-export, barrel, dynamic dispatch, test, or config reference remains, so the deletion removes dead code without a behavior change.

Files Reviewed (5 files)
  • apps/web/src/components/cloud-agent-next/ErrorBanner.tsx
  • apps/web/src/components/cloud-agent-next/OrgContextModal.tsx
  • apps/web/src/components/cloud-agent-next/ResumeConfigModal.tsx
  • apps/web/src/components/cloud-agent-next/TodoReadToolCard.tsx
  • apps/web/src/components/cloud-agent-next/hooks/useOrgContextCommand.ts

Verification Notes

  • Repository-wide search for ErrorBanner, OrgContextModal, ResumeConfigModal, TodoReadToolCard, and useOrgContextCommand finds only stale prose comments (event-processor.ts, event-processor.test.ts, session-config.ts, types.ts) — no real consumer.
  • PartRenderer.tsx dispatches only todowrite → TodoWriteToolCard; there is no todo_read/todoread case, so TodoReadToolCard is genuinely un-dispatched.
  • MODES, VALID_MODE_VALUES, and the ResumeConfig re-export removed with ResumeConfigModal have no importers; ResumeConfig is consumed from ./types.
  • No index.ts barrel exists in cloud-agent-next or its hooks/ directory, and nothing imports the deleted hook.
  • updateOrgContextAtom (left in place) lives in the unchanged store/db-session-atoms.ts and is correctly retained for the persisted IndexedDbSessionData shape.

This is a deletion-only diff with no added lines, so there are no commentable changed lines and no findings to report.


Reviewed by deepseek-v4.1-flash · Input: 38.2K · Output: 4.1K · Cached: 253.4K

Review guidance: REVIEW.md from base branch main

@kilo-code-bot

kilo-code-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Meta Janitor: Safety review passed; requesting approval.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Meta-janitor safety approval for 3875b07. Signal: #7974 (comment). GitHub auto-merge remains responsible for merging.

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