Skip to content

(janitor/comments): remove narration, banners, and commented-out code from admin console - #8900

Merged
kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/comments-admin-console
Oct 26, 2026
Merged

kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/comments-admin-console

Conversation

@kilo-code-bot

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

Copy link
Copy Markdown
Contributor

(janitor/comments): admin console comment cleanup

Package / topic area cleaned

The admin console module: apps/web/src/app/admin/ (Kilo Cloud admin UI — pages, API routes, and shared components under one app router tree).

Files touched

48 files, all under apps/web/src/app/admin/.

Comment lines removed

272 comment lines (plus 34 directly-resulting blank lines; 1 line is a trailing-inline-comment removal on otherwise-unchanged code). 306 deletions, 1 insertion total — the insertion is the same code line re-emitted after its trailing comment was stripped; no code, types, tests, or assertions changed.

Categories of noise removed

  • Section banner separators and dash-line rules (// --- X ---, // ── X ──, // ----------)
  • Step-narration comments (// Step 1: Stop if not already stopped, // First create the admin note, // Then block the user)
  • Restatements of the next line / function name (// Get visible columns, // Filter by availability, // Handle sorting, // Validate tier)
  • State-group labels over obvious useState clusters (// Credit form state, // API state, // Results state)
  • Commented-out code (dead classifyRecord tooltip body and isLikelyAbuse color branches in UserAdminHeuristicAbuse.tsx)
  • Test assertion-group labels that narrate assertions (// Status and email badges)

Important comments intentionally retained

  • All security rationale (CSV formula injection in csvExport.ts, SQL identifier validation in kiloclaw-analytics/route.ts, admin-audit-entry refetch avoidance in session-traces/hooks.ts)
  • Business rules and non-obvious semantics (past-due banner as single source of truth, chain grouping via transferred_to_subscription_id, tier name mapping in OssSponsorshipDialog, inverse personal_account_disabled flag, tri-state match state, dirty-form sync guards in BenchmarksSection)
  • External/platform constraints (Postgres LIKE backslash escaping, bead_dependencies endpoint limitation in BeadInspectorDashboard, HTTP analytics middleware gap in kiloclaw-analytics)
  • Test-intent comments ("Health badges use text, not color alone", "Subject and requester are distinct concepts")
  • The eslint-disable directives in debug/trpc/TrpcDebug.tsx (suppressions left untouched)

Follow-up refactor candidates

None required — every deleted comment's information was fully recoverable from adjacent code.

Validation performed

  • Reviewed every deleted line: only comment lines (and their blank lines) removed; git diff --check clean
  • oxlint on apps/web/src/app/admin: pass (exit 0, no findings)
  • tsgo --noEmit for apps/web: pass
  • jest src/app/admin/data-exports/data-export-components.test.ts: 9/9 fail with an AggregateError in cleanupDbForTest/DB setup — identical on the clean tree (pre-existing sandbox environment limitation, unrelated to this change)

… from admin console

Delete 272 comment lines across the admin console area
(apps/web/src/app/admin): section banner separators, step-narration
comments, state-group labels, and commented-out code. Comments
explaining business rules, security rationale, and non-obvious
constraints are retained.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Oct 26, 2026
@kilo-code-bot
kilo-code-bot Bot enabled auto-merge October 26, 2026 08:22
@kilo-code-bot

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

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The PR removes 272 comment lines across 48 files under apps/web/src/app/admin/, and a line-by-line audit of the patch confirms the only non-comment change is one re-emitted const seenRepos = new Set<string>(); with its trailing comment stripped, so no executable behavior changes.

Assumptions: [INFERENCE] Validation was not executed because this session is read-only; the assessment is based on the full diff, which contains exactly one added line and 306 deletions, all of which are // comment or blank lines. [INFERENCE] No removed line was a tooling directive (eslint-disable, @ts-*, prettier-ignore, istanbul/c8, biome-ignore), so no lint or type suppression is lost.

Verification Notes

  • Removed lines are exclusively comment-only; no logic, JSX, types, imports, or assertions changed.
  • Commented-out code removed in UserAdminHeuristicAbuse.tsx left valid functions (getAbuseTooltipContent still returns the same string, getAbuseStatusColor still returns '').
  • Retained comments still cover the security and business rationale the PR description claims (CSV formula-injection prefix in csvExport.ts, transferred_to_subscription_id chain grouping and personal_account_disabled semantics in UserAdminKiloClaw.tsx).
  • git diff --check reports no whitespace errors; the head commit matches the reviewed SHA.
Files Reviewed (48 files)
  • apps/web/src/app/admin/api/abuse/blacklisted-domains/route.ts
  • apps/web/src/app/admin/api/account-deduplication/route.ts
  • apps/web/src/app/admin/api/alerting/hooks.ts
  • apps/web/src/app/admin/api/slack-bot/stats/route.ts
  • apps/web/src/app/admin/api/users/[id]/referrals/route.ts
  • apps/web/src/app/admin/api/users/route.ts
  • apps/web/src/app/admin/auto-routing/BenchmarksSection.tsx
  • apps/web/src/app/admin/bot-requests/BotRequestsContent.tsx
  • apps/web/src/app/admin/bulk-credits/page.tsx
  • apps/web/src/app/admin/code-reviews/page.tsx
  • apps/web/src/app/admin/code-reviews/utils/csvExport.ts
  • apps/web/src/app/admin/components/FeatureInterestLeaderboard.tsx
  • apps/web/src/app/admin/components/FeatureInterestTimeline.tsx
  • apps/web/src/app/admin/components/KiloclawExtendTrial.tsx
  • apps/web/src/app/admin/components/KiloclawInstances/KiloCliRunCard.tsx
  • apps/web/src/app/admin/components/KiloclawInstances/KiloclawInstanceDetail.tsx
  • apps/web/src/app/admin/components/KiloclawInstances/KiloclawInstancesPage.tsx
  • apps/web/src/app/admin/components/KiloclawVersions/KiloclawVersionsPage.tsx
  • apps/web/src/app/admin/components/ModelStatsTable.tsx
  • apps/web/src/app/admin/components/OrganizationAdmin/AddMemberDialog.tsx
  • apps/web/src/app/admin/components/OrganizationAdmin/OrganizationAdminCreatedBy.tsx
  • apps/web/src/app/admin/components/OrganizationAdmin/OrganizationWorkOSCard.tsx
  • apps/web/src/app/admin/components/OrganizationAdmin/OssSponsorshipDialog.tsx
  • apps/web/src/app/admin/components/OrganizationAdmin/PlanDialog.tsx
  • apps/web/src/app/admin/components/OrganizationAdmin/TrialEndDateDialog.tsx
  • apps/web/src/app/admin/components/RevenueDailyChart.tsx
  • apps/web/src/app/admin/components/SessionTraceViewer.tsx
  • apps/web/src/app/admin/components/UserAdmin/UserAdminCreditGrant.tsx
  • apps/web/src/app/admin/components/UserAdmin/UserAdminHeuristicAbuse.tsx
  • apps/web/src/app/admin/components/UserAdmin/UserAdminKiloClaw.tsx
  • apps/web/src/app/admin/components/UserAdmin/UserAdminKiloPass.tsx
  • apps/web/src/app/admin/components/UserAdmin/UserAdminNotes.tsx
  • apps/web/src/app/admin/components/UserAdmin/UserAdminUsageBilling.tsx
  • apps/web/src/app/admin/contributors/page.tsx
  • apps/web/src/app/admin/credit-categories/CreditCategoriesTable.tsx
  • apps/web/src/app/admin/credit-categories/CreditCategoryUsers.tsx
  • apps/web/src/app/admin/credit-categories/[key]/page.tsx
  • apps/web/src/app/admin/credit-categories/docs/page.tsx
  • apps/web/src/app/admin/data-exports/data-export-components.test.ts
  • apps/web/src/app/admin/debug/ai-attribution/OrganizationCombobox.tsx
  • apps/web/src/app/admin/email-testing/page.tsx
  • apps/web/src/app/admin/gastown/page.tsx
  • apps/web/src/app/admin/gastown/towns/[townId]/ContainerTab.tsx
  • apps/web/src/app/admin/gastown/towns/[townId]/agents/[agentId]/AgentInspectorDashboard.tsx
  • apps/web/src/app/admin/organizations/[id]/page.tsx
  • apps/web/src/app/admin/oss/page.tsx
  • apps/web/src/app/admin/users/[id]/heuristic-abuse/page.tsx
  • apps/web/src/app/admin/users/[id]/page.tsx

Reviewed by deepseek-flash-latest · Input: 61.9K · Output: 9.1K · Cached: 507.6K

Review guidance: REVIEW.md from base branch main

@kilo-code-bot

kilo-code-bot Bot commented Oct 26, 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 5661121. Signal: #8900 (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