Skip to content

fix(gui): clean up unused imports and variables in git components#311

Merged
echobt merged 1 commit intomasterfrom
fix/git-components-unused-imports
Jan 27, 2026
Merged

fix(gui): clean up unused imports and variables in git components#311
echobt merged 1 commit intomasterfrom
fix/git-components-unused-imports

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 27, 2026

Summary

This PR cleans up unused imports and variables in the git components (GitPanel.tsx, DiffView.tsx, BlameView.tsx, BranchComparison.tsx, MergeEditor.tsx, StashPanel.tsx) as part of the AGENT4 analysis tasks.

Changes

GitPanel.tsx

  • Remove unused LFSStatus type import from GitLFSManager
  • Comment out unused Box, Flex, VStack, HStack imports from design-system
  • Prefix unused worktree callback parameter with underscore

DiffView.tsx

  • Prefix unused state/functions with underscore:
    • highlightedLine/setHighlightedLine
    • showLineNumbers, enableWordDiff
    • getLineBackground, getLineColor
    • toggleHunkCollapse, generateHunkPatch
    • computeWordDiff, renderWordDiffContent

BlameView.tsx

  • Remove unused tokens import
  • Prefix groupedLines function and idx parameter with underscore

BranchComparison.tsx

  • Remove unused onMount import
  • Prefix unused expandedSections, toggleSection, filteredBranches with underscore

MergeEditor.tsx

  • Prefix unused functions/variables with underscore:
    • calculateLineMapping
    • showDiffDecorations, setShowDiffDecorations, hasBaseContent
    • resultLines, resolvedStartLine
    • navigateToNextUnresolved, acceptBothReverse

StashPanel.tsx

  • Remove unused tokens import

Notes

All prefixed variables are prepared for future features and retained for documentation purposes. Using the underscore prefix is the TypeScript convention for marking intentionally unused code.

- GitPanel.tsx: Remove unused LFSStatus import, comment out unused Flex imports,
  prefix unused worktree callback parameter
- DiffView.tsx: Prefix unused variables with underscore (showLineNumbers, enableWordDiff,
  getLineBackground, getLineColor, toggleHunkCollapse, generateHunkPatch, computeWordDiff,
  renderWordDiffContent, highlightedLine/setHighlightedLine)
- BlameView.tsx: Remove unused tokens import, prefix unused groupedLines and idx parameter
- BranchComparison.tsx: Remove unused onMount import, prefix unused expandedSections,
  toggleSection, and filteredBranches with underscore
- MergeEditor.tsx: Prefix unused variables (calculateLineMapping, showDiffDecorations,
  hasBaseContent, resultLines, resolvedStartLine, navigateToNextUnresolved, acceptBothReverse)
- StashPanel.tsx: Remove unused tokens import

All prefixed variables are prepared for future features and kept for documentation purposes.
@echobt echobt merged commit 59aee04 into master Jan 27, 2026
1 of 3 checks passed
@echobt echobt deleted the fix/git-components-unused-imports branch January 27, 2026 17:00
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