Skip to content

(janitor/comments): clean comments in cloud-agent-next web UI - #7838

Merged
eshurakov merged 1 commit into
mainfrom
kilo/quiet-spire-rf9
Oct 19, 2026
Merged

eshurakov merged 1 commit into
mainfrom
kilo/quiet-spire-rf9

Conversation

@kilo-code-bot

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

Copy link
Copy Markdown
Contributor

Scope

Single coherent area: the Cloud Agent Next web UI module in apps/web — apps/web/src/components/cloud-agent-next/** and apps/web/src/lib/cloud-agent-next/**. Comment-only changes; no code, types, or behavior touched.

Results

  • 25 files touched, 496 comment lines removed, 11 lines modified in place (trailing-comment strips).
  • Noise categories removed:
    • // ===== / // ----- banner separators (including file-title banners like "Session Form Atoms", "Types", "Derived Atoms", "Scroll", "Render").
    • Numbered step narration ("1. Prepare", "2. Check if...", "Steps: ..." JSDoc lists in run-session.ts).
    • Restatements of adjacent code ("Get profiles based on context", "Validate it's an object", "Render compaction separator", "Force-complete any in-flight tool parts").
    • Obsolete/stale remarks ("PLACEHOLDER" module header, "TODO: Update this URL when the new cloud-agent-next worker is deployed").
    • Test narration in event-processor.test.ts (~128 lines: setup/execution/assertion labels, helper JSDoc) and db-session-atoms.test.ts (banners).
    • Duplicate semantic comments where JSDoc already said the same thing (cloud-agent-client.ts field groups).

Kept (intentionally)

  • Business rules, invariants, race/edge-case rationale: MCP envelope/secret rationale, worktree ownership, lifecycle idempotency, callback-security note, WS replay/cursor/replace-socket behavior, completedMessages idempotency + terminated suppression, scroll/resume invariants, Rules-of-Hooks note, "mirrors ... pattern" context lines, CLI format notes, re-export compat notes.
  • Required directives/suppressions: eslint-disable in types.ts, and comments inside empty catch blocks in CloudAgentProvider.tsx / git-utils.ts (they satisfy no-empty and describe the fall-through).
  • Generated files excluded; no comments rewritten into shorter versions.

Refactor opportunities

None identified — the area was comment noise only; no commented-out code, no suppressions to unwind, no dead code found.

Validation

  • oxlint on both directories: 0 warnings, 0 errors (one intermediate state produced 3 no-empty errors; fixed by restoring the in-block comments above).
  • jest apps/web src/lib/cloud-agent-next: 8 suites, 226 tests passed.
  • jest apps/web src/components/cloud-agent-next: 85 suites, 1971 tests passed.
  • tsgo --noEmit (web): clean.
  • git diff --check: clean.

@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Oct 17, 2026
@kilo-code-bot

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

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Comment-only cleanup of the cloud-agent-next web UI: all 12 added lines are unchanged statements with trailing comments stripped (plus one comment rewrite), and all 509 removed lines are comments or banner separators, so no functional, security, or leak-related risk was introduced.

Files Reviewed (25 files)
  • apps/web/src/components/cloud-agent-next/ChatInput.tsx
  • apps/web/src/components/cloud-agent-next/CloudAgentProvider.tsx
  • apps/web/src/components/cloud-agent-next/CloudChatPage.tsx
  • apps/web/src/components/cloud-agent-next/EnvVarsDialog.tsx
  • apps/web/src/components/cloud-agent-next/MessageBubble.tsx
  • apps/web/src/components/cloud-agent-next/MessageContent.tsx
  • apps/web/src/components/cloud-agent-next/NewSessionPanel.tsx
  • apps/web/src/components/cloud-agent-next/PartRenderer.tsx
  • apps/web/src/components/cloud-agent-next/PermissionCard.tsx
  • apps/web/src/components/cloud-agent-next/ProfileSelector.tsx
  • apps/web/src/components/cloud-agent-next/QuestionToolCard.tsx
  • apps/web/src/components/cloud-agent-next/SetupCommandsDialog.tsx
  • apps/web/src/components/cloud-agent-next/SuggestionCard.tsx
  • apps/web/src/components/cloud-agent-next/hooks/useSidebarSessions.ts
  • apps/web/src/components/cloud-agent-next/legacy-session-types.ts
  • apps/web/src/components/cloud-agent-next/session-config.ts
  • apps/web/src/components/cloud-agent-next/store/db-session-atoms.test.ts
  • apps/web/src/components/cloud-agent-next/store/db-session-atoms.ts
  • apps/web/src/components/cloud-agent-next/store/session-form-atoms.ts
  • apps/web/src/components/cloud-agent-next/types.ts
  • apps/web/src/lib/cloud-agent-next/cloud-agent-client.ts
  • apps/web/src/lib/cloud-agent-next/processor/event-processor.test.ts
  • apps/web/src/lib/cloud-agent-next/processor/event-processor.ts
  • apps/web/src/lib/cloud-agent-next/run-session.ts
  • apps/web/src/lib/cloud-agent-next/websocket-manager.ts
Previous Review Summary (commit 4851877)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 4851877)

Status: No Issues Found | Recommendation: Merge

This PR removes comments only: every one of the 11 added lines is an existing statement with a trailing comment stripped, and all removed lines are comments or banner separators, so no functional, security, or logic finding was identified. Required directives (eslint-disable in types.ts) and non-empty catch/fall-through comments are preserved, and the removal of duplicative narration aligns with the repo's no-comments convention.

Files Reviewed (26 files)
  • apps/web/src/components/cloud-agent-next/ChatInput.tsx
  • apps/web/src/components/cloud-agent-next/CloudAgentProvider.tsx
  • apps/web/src/components/cloud-agent-next/CloudChatPage.tsx
  • apps/web/src/components/cloud-agent-next/EnvVarsDialog.tsx
  • apps/web/src/components/cloud-agent-next/MessageBubble.tsx
  • apps/web/src/components/cloud-agent-next/MessageContent.tsx
  • apps/web/src/components/cloud-agent-next/NewSessionPanel.tsx
  • apps/web/src/components/cloud-agent-next/PartRenderer.tsx
  • apps/web/src/components/cloud-agent-next/PermissionCard.tsx
  • apps/web/src/components/cloud-agent-next/ProfileSelector.tsx
  • apps/web/src/components/cloud-agent-next/QuestionToolCard.tsx
  • apps/web/src/components/cloud-agent-next/ResumeConfigModal.tsx
  • apps/web/src/components/cloud-agent-next/SetupCommandsDialog.tsx
  • apps/web/src/components/cloud-agent-next/SuggestionCard.tsx
  • apps/web/src/components/cloud-agent-next/hooks/useSidebarSessions.ts
  • apps/web/src/components/cloud-agent-next/legacy-session-types.ts
  • apps/web/src/components/cloud-agent-next/session-config.ts
  • apps/web/src/components/cloud-agent-next/store/db-session-atoms.test.ts
  • apps/web/src/components/cloud-agent-next/store/db-session-atoms.ts
  • apps/web/src/components/cloud-agent-next/store/session-form-atoms.ts
  • apps/web/src/components/cloud-agent-next/types.ts
  • apps/web/src/lib/cloud-agent-next/cloud-agent-client.ts
  • apps/web/src/lib/cloud-agent-next/processor/event-processor.test.ts
  • apps/web/src/lib/cloud-agent-next/processor/event-processor.ts
  • apps/web/src/lib/cloud-agent-next/run-session.ts
  • apps/web/src/lib/cloud-agent-next/websocket-manager.ts

Reviewed by deepseek-v4.1-flash-1017 · Input: 61.3K · Output: 5K · Cached: 550.5K

Review guidance: REVIEW.md from base branch main

@eshurakov eshurakov 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.

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Independently reviewed all 26 changed files at 48518770fdec300a594b56dabca229d6357f88da against base d38649d7e3ac06c45d76c61baa334be5df0fbc02: no major correctness or security issues found.

Fetched every changed base/head source via GitHub API and verified identical TypeScript/TSX ASTs with zero parse errors. The changes remove comments only; executable code, types, JSX, and test assertions are unchanged. Required directives, callback-secret rationale, lifecycle/replay invariants, and empty-catch comments remain intact; removed scalar/collection descriptions are still documented in the enclosing API JSDoc. Followed scoped web guidance and the Cloud design overlay; no rendered UI changes.

CI evidence: web tests (8/8 shards), Cloud Agent suites, typechecks, lint, and build passed. Existing automated review reports no issues; no submitted reviews or inline findings were present.

Non-blocking correctness caveat: CI format-check failed on PermissionCard.tsx, SuggestionCard.tsx, store/db-session-atoms.test.ts, store/session-form-atoms.ts, and processor/event-processor.test.ts. Please run the formatter on those files and restore green CI before merge. This approval does not imply CI is green.

Validation limitation: no local runtime/browser suites rerun; relied on PR CI plus the independent all-file AST comparison. No workspace changes or dependency installation.

Files Reviewed (26 files)
  • apps/web/src/components/cloud-agent-next/ChatInput.tsx
  • apps/web/src/components/cloud-agent-next/CloudAgentProvider.tsx
  • apps/web/src/components/cloud-agent-next/CloudChatPage.tsx
  • apps/web/src/components/cloud-agent-next/EnvVarsDialog.tsx
  • apps/web/src/components/cloud-agent-next/MessageBubble.tsx
  • apps/web/src/components/cloud-agent-next/MessageContent.tsx
  • apps/web/src/components/cloud-agent-next/NewSessionPanel.tsx
  • apps/web/src/components/cloud-agent-next/PartRenderer.tsx
  • apps/web/src/components/cloud-agent-next/PermissionCard.tsx
  • apps/web/src/components/cloud-agent-next/ProfileSelector.tsx
  • apps/web/src/components/cloud-agent-next/QuestionToolCard.tsx
  • apps/web/src/components/cloud-agent-next/ResumeConfigModal.tsx
  • apps/web/src/components/cloud-agent-next/SetupCommandsDialog.tsx
  • apps/web/src/components/cloud-agent-next/SuggestionCard.tsx
  • apps/web/src/components/cloud-agent-next/hooks/useSidebarSessions.ts
  • apps/web/src/components/cloud-agent-next/legacy-session-types.ts
  • apps/web/src/components/cloud-agent-next/session-config.ts
  • apps/web/src/components/cloud-agent-next/store/db-session-atoms.test.ts
  • apps/web/src/components/cloud-agent-next/store/db-session-atoms.ts
  • apps/web/src/components/cloud-agent-next/store/session-form-atoms.ts
  • apps/web/src/components/cloud-agent-next/types.ts
  • apps/web/src/lib/cloud-agent-next/cloud-agent-client.ts
  • apps/web/src/lib/cloud-agent-next/processor/event-processor.test.ts
  • apps/web/src/lib/cloud-agent-next/processor/event-processor.ts
  • apps/web/src/lib/cloud-agent-next/run-session.ts
  • apps/web/src/lib/cloud-agent-next/websocket-manager.ts

Remove excessive boilerplate comments, section headers, and redundant documentation across the `cloud-agent-next` implementation. This includes cleaning up:

- Component files (`ChatInput`, `CloudChatPage`, `NewSessionPanel`, etc.)
- Core logic and processors (`event-processor.ts`, `run-session.ts`, `websocket-manager.ts`)
- Type definitions and stores (`types.ts`, `db-session-atoms.ts`, `session-form-atoms.ts`)
- Test files and client implementations

This refactor improves code readability by reducing visual noise without changing any functional behavior.
@eshurakov
eshurakov force-pushed the kilo/quiet-spire-rf9 branch from 4851877 to 75c7be5 Compare October 19, 2026 15:14

Copy link
Copy Markdown
Contributor

Prepared for merge without merging.

  • Rebased the single comment-cleanup commit onto main, replacing 48518770fdec300a594b56dabca229d6357f88da with 75c7be58bd8a60f82de13ff78b4d5d1e54c869ab using an explicit force-with-lease.
  • Resolved the only conflict by preserving main’s deletion of ResumeConfigModal.tsx from (janitor/dead-code): remove orphaned cloud-agent-next components and hook #7974. Retained non-obvious selection priorities, loading-delay rationale, transport architecture comments, and required directives.
  • Fixed all five files flagged by the original format-check. Targeted pnpm format, oxfmt --list-different, oxlint (25 changed files, zero warnings/errors), and git diff --check passed.
  • Compared old/new diffs and verified identical TypeScript ASTs and emitted JavaScript against main for all 25 changed files. Original PR’s 26 files were also verified comment-only.
  • Focused pure unit verification: event processor, WebSocket manager, run-session, and db-session-atoms; 4 suites / 113 tests passed using a temporary DB-free Jest config. Jest required --forceExit after assertions because of open process handles; normal and detectOpenHandles runs passed all assertions but did not exit within the bounded window.
  • Fresh checks: 50 successful, 6 skipped, none failed or pending. GitHub reports APPROVED / MERGEABLE / CLEAN.

No broad local build/typecheck or repository-wide test run was performed. Work was isolated under /tmp/kilo; the shared checkout was not modified.

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.

1 participant