Skip to content

refactor(vscode): remove duplicate and unused UI code - #13536

Merged
marius-kilocode merged 3 commits into
mainfrom
reduce-duplicated-and-dead-code
Aug 28, 2026
Merged

refactor(vscode): remove duplicate and unused UI code#13536
marius-kilocode merged 3 commits into
mainfrom
reduce-duplicated-and-dead-code

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

What Problem This Solves

An obsolete transcript renderer remained reachable through a Storybook story and source-level tests even though production chat already uses the row-based renderer. The worktree-create menus and review UI also repeated the same controls, labels, and message construction, leaving several copies to maintain.

Why This Change Was Made

Move the remaining story and source assertions to the live transcript renderer before removing the unused implementation. Share only the identical worktree-create control and review helpers rather than combining the full sidebar or review components.

The legacy Git guard, project-specific callbacks, review loading, caching, scrolling, composer state, and comment lifecycle remain unchanged. Existing tests are retained and redirected to the production renderer, with one focused test for the shared review labels.

User Impact

No intended behavior change and no feature removal. Worktree creation, review comments, document tabs, and chat checkpoints remain available.

The patch adds 125 lines and removes 411, for 286 net lines removed, including the test, story, and CI-generated baseline updates.

Evidence

  • bun run build:check: type checks, lint, and extension/webview bundles passed.
  • bun run test:unit: 4,406 tests passed after merging current main.
  • bunx playwright test tests/diff-scroll-preservation.spec.ts --workers 2: all 8 tests passed, including comment editing, context switching, scrolling, and cached reviews.
  • bun run knip, bun run check-kilocode-change, and git diff --check passed.
  • Isolated VS Code: verified the primary worktree action and dropdown in both legacy and multi-project modes; added, edited, saved, and sent an inline review comment; checked the full-screen bulk-send payload; opened a Markdown document and verified its basename tab and full-path tooltip. The temporary session was deleted and the isolated instance was cleaned up.
  • Storybook smoke checks verified the live user/assistant/diff rows, the diff-summary target, and quick-create routing for two projects. The existing preview-runtime error also occurs on an unchanged control story; no new browser errors were observed in that comparison.

Inline review editing after the shared-label extraction:

Inline review comment editor with the existing Cancel and Save actions

The shared worktree menu retains the base branch, quick-create shortcut, and section action:

Worktree dropdown showing the main branch, quick-create shortcut, and New Section action

@kilo-code-bot

kilo-code-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (16 files)
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/composite-webview/diff-summary-collapsed-chromium-linux.png
  • packages/kilo-vscode/tests/unit/agent-manager-arch.test.ts
  • packages/kilo-vscode/tests/unit/plan-exit.test.ts
  • packages/kilo-vscode/tests/unit/revert-checkpoints.test.ts
  • packages/kilo-vscode/tests/unit/review-comments.test.ts
  • packages/kilo-vscode/webview-ui/agent-manager/DiffPanel.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/ProjectActions.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/WorktreeSectionActions.tsx
  • packages/kilo-vscode/webview-ui/diff-viewer/FullScreenDiffView.tsx
  • packages/kilo-vscode/webview-ui/diff-viewer/review-annotations.ts
  • packages/kilo-vscode/webview-ui/documents/DocumentPanel.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/MessageList.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/VscodeSessionTurn.tsx
  • packages/kilo-vscode/webview-ui/src/context/session-types.ts
  • packages/kilo-vscode/webview-ui/src/context/session.tsx
  • packages/kilo-vscode/webview-ui/src/stories/composite.stories.tsx

Reviewed by grok-4.6 · Input: 152.6K · Output: 17.2K · Cached: 756.9K

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 6880409 into main Aug 28, 2026
25 checks passed
@marius-kilocode
marius-kilocode deleted the reduce-duplicated-and-dead-code branch August 28, 2026 09:43
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.

2 participants