Skip to content

chore: resolve bottom 40 unused-import quality findings - #2451

Merged
jatmn merged 1 commit into
Twigpine:mainfrom
jatmn:fix/bottom-40-unused-locals
Oct 27, 2026
Merged

jatmn merged 1 commit into
Twigpine:mainfrom
jatmn:fix/bottom-40-unused-locals

Conversation

@jatmn

@jatmn jatmn commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fix the bottom 40 open findings in the unused-local-variable Code Quality list, selected from the managed findings API's default descending order.

Remove 44 unused import bindings. Removing the unused LogoV2 import also exposes 12 unreachable legacy logo files to the required Knip gate; remove precisely that disconnected group. The former logo slot already renders null, and the live welcome screen, wordmark, status notices, and overage components remain.

Managed Code Quality finding IDs: 33, 35, 36, 37, 41, 43, 46, 48, 49, 51, 50, 52, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 84.

Impact

  • User-facing impact: none intended; component logic, hook calls and live rendering paths are unchanged.
  • Developer/maintainer impact: fixes the selected 40 findings and keeps the dead-code gate passing. The 12 supporting deletions were independently reviewed for external references, dynamic imports, module effects and package/build contracts.

Testing

  • I followed Validation, including applicable lint/static/type checks and regression tests.
  • Affected surfaces: unused component imports and the disconnected legacy logo graph. Core gates and existing component/consumer tests selected; no previous PR validation reused.
  • Passed on reviewed commit 9fd0f9a190adc2f0b2347ecc0d2239cba463efad with Node 26.12.1 and Bun 1.4.4:
    • bun install --frozen-lockfile
    • bun run check:static — lint, any budget, CLI/SDK build and smoke, Knip
    • bun run typecheck:fast — 3,310 files
    • bun run typecheck:type-tests — 11 files
    • node bin/openclaude --version
    • NODE_DISABLE_COMPILE_CACHE=1 node bin/openclaude --version
    • git fetch https://github.com/Twigpine/openclaude.git main then bun run security:pr-scan -- --base FETCH_HEAD --head HEAD
    • git diff --check
  • Focused regression command: bun run test src/components/agents/AgentsMenu.test.tsx src/components/ModelPicker.test.tsx src/components/ModelPicker.switchProfile.test.ts src/components/PromptInput/Notifications.effort.test.tsx src/components/HighlightedCode/Fallback.test.tsx src/components/LogSelector.resumeBranches.test.ts src/utils/markdown.test.ts src/utils/cliHighlight.test.ts src/utils/diff.test.ts src/components/LogoV2/WordmarkRow.test.tsx src/utils/statusNoticeDefinitions.safety.test.tsx src/__tests__/statusNoticeLocalModel.test.ts — 103 passed, 0 failed, 241 assertions.
  • All 40 import edits preserve non-import ASTs and TypeScript emitted JavaScript. Built immutable base and candidate: CLI output is identical after generated timestamp, source-path, local-symbol and debug-ID normalization; SDK differs only in equivalent ordering of two assignments to the same noop stub.
  • Full unit suite not selected locally because executable behavior is preserved; CI runs the full matrix. Website/extension checks are inapplicable. Existing non-failing lint warnings and Knip hints remain. No local gate blockers or waivers.
  • CI: all 25 completed checks passed; 3 untouched-surface jobs skipped as expected. CodeRabbit approved commit 9fd0f9a190adc2f0b2347ecc0d2239cba463efad with no inline findings. Both CodeQL analyses and the code-scanning result passed. The PR remains a draft for user/maintainer review.

Notes

  • Reviewed AGENTS.md and CONTRIBUTING.md.
  • Provider/model path tested: not applicable; provider behavior is unchanged.
  • Screenshots: not applicable; no rendered UI or terminal presentation changes.
  • Main-branch dashboard findings require merge and a successful Code Quality rescan to close. No findings were dismissed.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 94ebcff and 9fd0f9a.

Files selected for processing: 52
  • src/components/FullscreenLayout.tsx
  • src/components/HelpV2/HelpV2.tsx
  • src/components/HighlightedCode.tsx
  • src/components/IdeAutoConnectDialog.tsx
  • src/components/LogSelector.tsx
  • src/components/LogoV2/AnimatedAsterisk.tsx
  • src/components/LogoV2/AnimatedClawd.tsx
  • src/components/LogoV2/ChannelsNotice.tsx
  • src/components/LogoV2/Clawd.tsx
  • src/components/LogoV2/CondensedLogo.tsx
  • src/components/LogoV2/EmergencyTip.tsx
  • src/components/LogoV2/FeedColumn.tsx
  • src/components/LogoV2/GuestPassesUpsell.tsx
  • src/components/LogoV2/LogoV2.tsx
  • src/components/LogoV2/Opus1mMergeNotice.tsx
  • src/components/LogoV2/VoiceModeNotice.tsx
  • src/components/LogoV2/feedConfigs.tsx
  • src/components/MCPServerDesktopImportDialog.tsx
  • src/components/MCPServerMultiselectDialog.tsx
  • src/components/Markdown.tsx
  • src/components/Messages.tsx
  • src/components/ModelPicker.tsx
  • src/components/OutputStylePicker.tsx
  • src/components/PromptInput/Notifications.tsx
  • src/components/SessionBackgroundHint.tsx
  • src/components/SessionPreview.tsx
  • src/components/Stats.tsx
  • src/components/StructuredDiff/Fallback.tsx
  • src/components/TeleportError.tsx
  • src/components/TeleportRepoMismatchDialog.tsx
  • src/components/WorkflowMultiselectDialog.tsx
  • src/components/agents/AgentsMenu.tsx
  • src/components/agents/SnapshotUpdateDialog.tsx
  • src/components/agents/ToolSelector.tsx
  • src/components/agents/new-agent-creation/wizard-steps/DescriptionStep.tsx
  • src/components/agents/new-agent-creation/wizard-steps/PromptStep.tsx
  • src/components/design-system/Ratchet.tsx
  • src/components/design-system/Tabs.tsx
  • src/components/diff/DiffDetailView.tsx
  • src/components/diff/DiffDialog.tsx
  • src/components/diff/DiffFileList.tsx
  • src/components/hooks/HooksConfigMenu.tsx
  • src/components/mcp/MCPListPanel.tsx
  • src/components/mcp/MCPSettings.tsx
  • src/components/mcp/McpParsingWarnings.tsx
  • src/components/messages/AssistantToolUseMessage.tsx
  • src/components/messages/RateLimitMessage.tsx
  • src/components/messages/UserMemoryInputMessage.tsx
  • src/components/messages/UserToolResultMessage/utils.tsx
  • src/components/permissions/AskUserQuestionPermissionRequest/PreviewBox.tsx
  • src/components/permissions/AskUserQuestionPermissionRequest/QuestionNavigationBar.tsx
  • src/components/permissions/ComputerUseApproval/ComputerUseApproval.tsx
Files with no reviewable changes: 18
  • src/components/Messages.tsx
  • src/components/agents/SnapshotUpdateDialog.tsx
  • src/components/messages/UserToolResultMessage/utils.tsx
  • src/components/LogoV2/Clawd.tsx
  • src/components/LogoV2/LogoV2.tsx
  • src/components/LogoV2/EmergencyTip.tsx
  • src/components/LogSelector.tsx
  • src/components/LogoV2/GuestPassesUpsell.tsx
  • src/components/LogoV2/ChannelsNotice.tsx
  • src/components/StructuredDiff/Fallback.tsx
  • src/components/LogoV2/CondensedLogo.tsx
  • src/components/LogoV2/AnimatedClawd.tsx
  • src/components/LogoV2/Opus1mMergeNotice.tsx
  • src/components/LogoV2/VoiceModeNotice.tsx
  • src/components/LogoV2/feedConfigs.tsx
  • src/components/LogoV2/AnimatedAsterisk.tsx
  • src/components/messages/UserMemoryInputMessage.tsx
  • src/components/LogoV2/FeedColumn.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Recent review details
Context from checks skipped due to timeout: 3
  • GitHub Check: CodeRabbit
  • GitHub Check: unit-tests (2)
  • GitHub Check: CodeQL (javascript-typescript)
Additional context used
Code guidelines: 1
AGENTS.md — configured
Path-based instructions: 4
Review permission prompts, auto-allow logic, sandbox behavior, SDK permission schemas, shell/PowerShell execution, and background execution paths as security-sensitive.

CodeRabbit configuration file

Files:

  • src/components/permissions/ComputerUseApproval/ComputerUseApproval.tsx
  • src/components/permissions/AskUserQuestionPermissionRequest/PreviewBox.tsx
  • src/components/permissions/AskUserQuestionPermissionRequest/QuestionNavigationBar.tsx
Apply the OpenClaude maintainer review rubric from AGENTS.md.

CodeRabbit configuration file

Files:

  • src/components/diff/DiffDialog.tsx
  • src/components/permissions/ComputerUseApproval/ComputerUseApproval.tsx
  • src/components/mcp/MCPListPanel.tsx
  • src/components/ModelPicker.tsx
  • src/components/SessionPreview.tsx
  • src/components/mcp/McpParsingWarnings.tsx
  • src/components/permissions/AskUserQuestionPermissionRequest/PreviewBox.tsx
  • src/components/TeleportRepoMismatchDialog.tsx
  • src/components/agents/new-agent-creation/wizard-steps/DescriptionStep.tsx
  • src/components/design-system/Tabs.tsx
  • src/components/hooks/HooksConfigMenu.tsx
  • src/components/mcp/MCPSettings.tsx
  • src/components/MCPServerDesktopImportDialog.tsx
  • src/components/agents/ToolSelector.tsx
  • src/components/agents/AgentsMenu.tsx
  • src/components/messages/AssistantToolUseMessage.tsx
  • src/components/SessionBackgroundHint.tsx
  • src/components/OutputStylePicker.tsx
  • src/components/TeleportError.tsx
  • src/components/Stats.tsx
  • src/components/diff/DiffDetailView.tsx
  • src/components/agents/new-agent-creation/wizard-steps/PromptStep.tsx
  • src/components/messages/RateLimitMessage.tsx
  • src/components/MCPServerMultiselectDialog.tsx
  • src/components/WorkflowMultiselectDialog.tsx
  • src/components/HighlightedCode.tsx
  • src/components/FullscreenLayout.tsx
  • src/components/PromptInput/Notifications.tsx
  • src/components/design-system/Ratchet.tsx
  • src/components/IdeAutoConnectDialog.tsx
  • src/components/diff/DiffFileList.tsx
  • src/components/Markdown.tsx
  • src/components/HelpV2/HelpV2.tsx
  • src/components/permissions/AskUserQuestionPermissionRequest/QuestionNavigationBar.tsx
Source excerpt: No hidden policy change: Verify that product, trust-model, routing-default, telemetry/network, and permission-policy changes are not hidden inside unrelated cleanup.

CodeRabbit inference engine (Custom checks)

Files:

  • src/components/diff/DiffDialog.tsx
  • src/components/permissions/ComputerUseApproval/ComputerUseApproval.tsx
  • src/components/mcp/MCPListPanel.tsx
  • src/components/ModelPicker.tsx
  • src/components/SessionPreview.tsx
  • src/components/mcp/McpParsingWarnings.tsx
  • src/components/permissions/AskUserQuestionPermissionRequest/PreviewBox.tsx
  • src/components/TeleportRepoMismatchDialog.tsx
  • src/components/agents/new-agent-creation/wizard-steps/DescriptionStep.tsx
  • src/components/design-system/Tabs.tsx
  • src/components/hooks/HooksConfigMenu.tsx
  • src/components/mcp/MCPSettings.tsx
  • src/components/MCPServerDesktopImportDialog.tsx
  • src/components/agents/ToolSelector.tsx
  • src/components/agents/AgentsMenu.tsx
  • src/components/messages/AssistantToolUseMessage.tsx
  • src/components/SessionBackgroundHint.tsx
  • src/components/OutputStylePicker.tsx
  • src/components/TeleportError.tsx
  • src/components/Stats.tsx
  • src/components/diff/DiffDetailView.tsx
  • src/components/agents/new-agent-creation/wizard-steps/PromptStep.tsx
  • src/components/messages/RateLimitMessage.tsx
  • src/components/MCPServerMultiselectDialog.tsx
  • src/components/WorkflowMultiselectDialog.tsx
  • src/components/HighlightedCode.tsx
  • src/components/FullscreenLayout.tsx
  • src/components/PromptInput/Notifications.tsx
  • src/components/design-system/Ratchet.tsx
  • src/components/IdeAutoConnectDialog.tsx
  • src/components/diff/DiffFileList.tsx
  • src/components/Markdown.tsx
  • src/components/HelpV2/HelpV2.tsx
  • src/components/permissions/AskUserQuestionPermissionRequest/QuestionNavigationBar.tsx
Source excerpt: TypeScript with strict mode and ESM imports.

CodeRabbit inference engine (AGENTS.md)

Files:

  • src/components/diff/DiffDialog.tsx
  • src/components/permissions/ComputerUseApproval/ComputerUseApproval.tsx
  • src/components/mcp/MCPListPanel.tsx
  • src/components/ModelPicker.tsx
  • src/components/SessionPreview.tsx
  • src/components/mcp/McpParsingWarnings.tsx
  • src/components/permissions/AskUserQuestionPermissionRequest/PreviewBox.tsx
  • src/components/TeleportRepoMismatchDialog.tsx
  • src/components/agents/new-agent-creation/wizard-steps/DescriptionStep.tsx
  • src/components/design-system/Tabs.tsx
  • src/components/hooks/HooksConfigMenu.tsx
  • src/components/mcp/MCPSettings.tsx
  • src/components/MCPServerDesktopImportDialog.tsx
  • src/components/agents/ToolSelector.tsx
  • src/components/agents/AgentsMenu.tsx
  • src/components/messages/AssistantToolUseMessage.tsx
  • src/components/SessionBackgroundHint.tsx
  • src/components/OutputStylePicker.tsx
  • src/components/TeleportError.tsx
  • src/components/Stats.tsx
  • src/components/diff/DiffDetailView.tsx
  • src/components/agents/new-agent-creation/wizard-steps/PromptStep.tsx
  • src/components/messages/RateLimitMessage.tsx
  • src/components/MCPServerMultiselectDialog.tsx
  • src/components/WorkflowMultiselectDialog.tsx
  • src/components/HighlightedCode.tsx
  • src/components/FullscreenLayout.tsx
  • src/components/PromptInput/Notifications.tsx
  • src/components/design-system/Ratchet.tsx
  • src/components/IdeAutoConnectDialog.tsx
  • src/components/diff/DiffFileList.tsx
  • src/components/Markdown.tsx
  • src/components/HelpV2/HelpV2.tsx
  • src/components/permissions/AskUserQuestionPermissionRequest/QuestionNavigationBar.tsx
Additional comments: 34
src/components/FullscreenLayout.tsx: 1

3-3: LGTM!

src/components/HelpV2/HelpV2.tsx: 1

5-5: LGTM!

src/components/HighlightedCode.tsx: 1

3-3: LGTM!

src/components/IdeAutoConnectDialog.tsx: 1

2-2: LGTM!

src/components/MCPServerDesktopImportDialog.tsx: 1

2-2: LGTM!

src/components/MCPServerMultiselectDialog.tsx: 1

3-3: LGTM!

src/components/Markdown.tsx: 1

3-3: LGTM!

src/components/ModelPicker.tsx: 1

4-4: LGTM!

src/components/OutputStylePicker.tsx: 1

3-3: LGTM!

src/components/PromptInput/Notifications.tsx: 1

4-4: LGTM!

src/components/SessionBackgroundHint.tsx: 1

3-3: LGTM!

src/components/SessionPreview.tsx: 1

3-3: LGTM!

src/components/Stats.tsx: 1

6-6: LGTM!

src/components/TeleportError.tsx: 1

2-2: LGTM!

src/components/TeleportRepoMismatchDialog.tsx: 1

2-2: LGTM!

src/components/WorkflowMultiselectDialog.tsx: 1

2-2: LGTM!

src/components/agents/AgentsMenu.tsx: 1

4-4: LGTM!

src/components/agents/ToolSelector.tsx: 1

3-3: LGTM!

src/components/agents/new-agent-creation/wizard-steps/DescriptionStep.tsx: 1

2-2: LGTM!

src/components/agents/new-agent-creation/wizard-steps/PromptStep.tsx: 1

2-2: LGTM!

src/components/design-system/Ratchet.tsx: 1

2-2: LGTM!

src/components/design-system/Tabs.tsx: 1

2-2: LGTM!

src/components/diff/DiffDetailView.tsx: 1

4-4: LGTM!

src/components/diff/DiffDialog.tsx: 1

3-3: LGTM!

src/components/diff/DiffFileList.tsx: 1

3-3: LGTM!

src/components/hooks/HooksConfigMenu.tsx: 1

15-15: LGTM!

src/components/mcp/MCPListPanel.tsx: 1

3-3: LGTM!

src/components/mcp/MCPSettings.tsx: 1

2-2: LGTM!

src/components/mcp/McpParsingWarnings.tsx: 1

2-2: LGTM!

src/components/messages/AssistantToolUseMessage.tsx: 1

3-3: LGTM!

src/components/messages/RateLimitMessage.tsx: 1

2-2: LGTM!

src/components/permissions/AskUserQuestionPermissionRequest/PreviewBox.tsx: 1

2-2: LGTM!

src/components/permissions/AskUserQuestionPermissionRequest/QuestionNavigationBar.tsx: 1

3-3: LGTM!

src/components/permissions/ComputerUseApproval/ComputerUseApproval.tsx: 1

7-7: LGTM!

Walkthrough

The pull request deletes the LogoV2 component set and removes unused imports from other components. The changes remove existing logo layouts, feeds, notices, and related display state. Import edits do not change runtime behavior.

Changes: LogoV2 removal

Layer / File(s) Summary
Logo rendering and feed components
src/components/LogoV2/{AnimatedAsterisk,AnimatedClawd,Clawd,CondensedLogo,FeedColumn,feedConfigs}.tsx
The Clawd renderers, animation components, feed components and builders, and condensed layout were deleted.
Notices and upsell components
src/components/LogoV2/{ChannelsNotice,EmergencyTip,GuestPassesUpsell,Opus1mMergeNotice,VoiceModeNotice}.tsx
The channel and emergency notices, guest-pass upsell, and voice-mode and Opus merge notices were deleted.
Logo composition removal
src/components/LogoV2/LogoV2.tsx, src/components/Messages.tsx
The LogoV2 component and its import in Messages were removed.

Unused import cleanup

Layer / File(s) Summary
Remove unused imports
src/components/*.tsx, src/components/HelpV2/HelpV2.tsx, src/components/PromptInput/Notifications.tsx, src/components/StructuredDiff/Fallback.tsx, src/components/agents/..., src/components/design-system/..., src/components/diff/..., src/components/hooks/..., src/components/mcp/..., src/components/messages/..., src/components/permissions/...
Unused React hooks, React, Fuse, and command imports were removed. No runtime logic changes are described for these edits.

Priority: Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Possibly related PRs

Suggested reviewers: devpedry, kevincodex1, gnanam1990

Merge Risk: Minimal · up to 9fd0f

No user-facing behavior change or merge-blocking risk is evidenced.

Pre-merge checks: Passed 6 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Risk Surface Disclosed Warning The PR touches listed risk surfaces: MCP files, permission-request and computer-use approval components, and the deleted legacy ChannelsNotice, which contained MCP, plugin, and auth checks. The desc… Add a risk-surface note to the PR description or review. Name the permissions, MCP/plugin, and auth-related legacy paths; state that the edits are unused-import removals or disconnected-code deletion; and explicitly state whether they intro…
Passed Passed checks: 6 passed
Check name Status Explanation
Title check Passed The title is concise, scoped, and accurately describes the primary change: resolving the selected unused-import quality findings. It also covers the related cleanup of disconnected legacy logo files.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
No Hidden Policy Change Passed No hidden policy change is introduced. The non-deletion edits remove import bindings only. In the base, Messages.tsx imported LogoV2, but LogoHeader assigned null and rendered StatusNotices …
Description check Passed The description follows the repository template. It explains the changes, rationale, impact, affected surfaces, validation commands and results, focused tests, inapplicable checks, CI status, review s…
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 34 files.

Full details: No Hidden Policy Change

Explanation

No hidden policy change is introduced. The non-deletion edits remove import bindings only. In the base, Messages.tsx imported LogoV2, but LogoHeader assigned null and rendered StatusNotices instead (Messages.tsx:36, 63-71, 683-684); no live <LogoV2> call exists. The deleted LogoV2 files form a disconnected graph with no external references. Channel enforcement and permission gates remain in src/services/mcp/channelNotification.ts and useManageMCPConnections.ts, and live welcome, status, overage, and permission components remain. The diff does not change routing defaults, telemetry/network enforcement, trust boundaries, or permission policy.

Full details: Description check

Explanation

The description follows the repository template. It explains the changes, rationale, impact, affected surfaces, validation commands and results, focused tests, inapplicable checks, CI status, review status, and known limitations.

Full details: Risk Surface Disclosed

Explanation

The PR touches listed risk surfaces: MCP files, permission-request and computer-use approval components, and the deleted legacy ChannelsNotice, which contained MCP, plugin, and auth checks. The description calls out generic component-import and legacy-logo changes, unchanged logic, and no local gate blockers, but it does not explicitly identify these sensitive surfaces or state whether they introduce a blocker. The current review has zero actionable findings and no risk-surface discussion.

Resolution

Add a risk-surface note to the PR description or review. Name the permissions, MCP/plugin, and auth-related legacy paths; state that the edits are unused-import removals or disconnected-code deletion; and explicitly state whether they introduce a blocker. Also record any CI or review checks that remain pending.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@jatmn jatmn self-assigned this Oct 27, 2026
@jatmn
jatmn marked this pull request as ready for review October 27, 2026 14:56
@jatmn
jatmn merged commit a8843cf into Twigpine:main Oct 27, 2026
28 checks passed
@jatmn
jatmn deleted the fix/bottom-40-unused-locals branch October 27, 2026 14:56
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.

1 participant