Skip to content

chore: Fix all lint errors and remove unused code#700

Merged
Shironex merged 2 commits intov0.14.0rcfrom
chore/fix-lint-errors-cleanup-unused-code
Jan 25, 2026
Merged

chore: Fix all lint errors and remove unused code#700
Shironex merged 2 commits intov0.14.0rcfrom
chore/fix-lint-errors-cleanup-unused-code

Conversation

@Shironex
Copy link
Collaborator

@Shironex Shironex commented Jan 25, 2026

Summary

  • Fix 75 ESLint errors by updating eslint.config.mjs with missing browser globals and proper configuration
  • Fix runtime bug in agent-output-modal.tsx (setOutput -> setStreamedContent)
  • Remove ~120 unused variable warnings across 97 files
  • Add descriptions to all @ts-nocheck comments (25 files)
  • Clean up misc lint issues

Changes

ESLint Configuration (apps/ui/eslint.config.mjs)

  • Add missing browser globals: MouseEvent, UIEvent, MediaQueryListEvent, AbortController, IntersectionObserver, XMLHttpRequest, Response, RequestInit, RequestCache, SVGElement, SVGSVGElement, HTMLAudioElement, cancelAnimationFrame, alert
  • Add Vite define global: __APP_VERSION__
  • Configure @ts-nocheck to require descriptions (minimum 10 characters)
  • Add no-unused-vars rule with caughtErrorsIgnorePattern for .mjs scripts

Bug Fix

  • Fix setOutput (undefined) -> setStreamedContent in agent-output-modal.tsx:285

Code Cleanup (97 files)

  • Remove unused imports (React hooks, lucide-react icons, type imports)
  • Remove unused constants, variables, and function definitions
  • Prefix intentionally unused parameters with underscore (_error, _callback, etc.)
  • Clean up destructuring assignments

@ts-nocheck Descriptions (25 files)

  • Add descriptive comments explaining why @ts-nocheck is needed (e.g., "dnd-kit type incompatibilities", "Electron IPC boundary typing")

Impact

Before: ~300 lint errors + warnings
After: 67 warnings (all @typescript-eslint/no-explicit-any)

Test plan

  • npm run lint:errors passes with 0 errors
  • npm run build completes successfully
  • Manual testing of UI functionality

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added a refresh button to the code view for manual refresh capability.
  • Chores

    • Enhanced ESLint configuration with improved type-checking rules and expanded global scope definitions.
    • Removed unused dependencies and improved code cleanliness across the UI components.
    • Added lint verification scripts for error detection.

✏️ Tip: You can customize this high-level summary in your review settings.

Shironex and others added 2 commits January 25, 2026 17:05
- Fix 75 ESLint errors by updating eslint.config.mjs:
  - Add missing browser globals (MouseEvent, AbortController, Response, etc.)
  - Add Vite define global (__APP_VERSION__)
  - Configure @ts-nocheck to require descriptions
  - Add no-unused-vars rule for .mjs scripts

- Fix runtime bug in agent-output-modal.tsx (setOutput -> setStreamedContent)

- Remove ~120 unused variable warnings across 97 files:
  - Remove unused imports (React hooks, lucide icons, types)
  - Remove unused constants and variables
  - Remove unused function definitions
  - Prefix intentionally unused parameters with underscore

- Add descriptions to all @ts-nocheck comments (25 files)

- Clean up misc issues:
  - Remove invalid deprecation plugin comments
  - Fix eslint-disable comment placement
  - Add missing RefreshCw import in code-view.tsx

Reduces lint warnings from ~300 to 67 (all remaining are no-explicit-any)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 25, 2026

📝 Walkthrough

Walkthrough

This PR comprises extensive cleanup and refactoring across the UI codebase, primarily removing unused imports, constants, and state variables. It also adds ESLint rules and configuration enhancements, introduces spawn-mode functionality to AddFeatureDialog with ancestor context handling, and updates multiple component signatures to mark unused parameters with underscore prefixes.

Changes

Cohort / File(s) Summary
ESLint & Lint Configuration
apps/ui/eslint.config.mjs, package.json
Added global scope entries for browser/DOM APIs (setTimeout, cancelAnimationFrame, SVGElement, MouseEvent, etc.), introduced @typescript-eslint/ban-ts-comment rule with ts-nocheck allowances, added no-unused-vars rule with underscore ignore pattern. New npm scripts lint:errors and lint:server:errors added.
Unused Import Cleanup
apps/ui/src/components/shared/model-override-trigger.tsx, apps/ui/src/components/ui/collapsible.tsx, apps/ui/src/components/ui/log-viewer.tsx, apps/ui/src/components/views/agent-tools-view.tsx, apps/ui/src/components/layout/project-switcher/components/notification-bell.tsx, apps/ui/src/components/views/overview/running-agents-panel.tsx, apps/ui/src/components/views/github-issues-view/components/issues-list-header.tsx, apps/ui/src/components/views/project-settings-view/commands-section.tsx, apps/ui/src/components/views/running-agents-view.tsx, apps/ui/src/components/views/settings-view/mcp-servers/components/mcp-server-header.tsx, apps/ui/src/components/views/terminal-view/terminal-panel.tsx, apps/ui/src/hooks/use-event-recency.ts, apps/ui/src/lib/utils.ts, apps/ui/src/lib/electron.ts
Removed unused React hooks (useEffect, useCallback), lucide-react icons, UI component imports, and type imports (cn, Button, CardHeader, Label, Key, DEFAULT_TERMINAL_FONT, etc.).
Unused Variable & Constant Removal
apps/ui/src/components/codex-usage-popover.tsx, apps/ui/src/components/dialogs/file-browser-dialog.tsx, apps/ui/src/components/shared/use-model-override.ts, apps/ui/src/components/usage-popover.tsx, apps/ui/src/components/views/project-settings-view/project-models-section.tsx, apps/ui/src/components/views/context-view.tsx, apps/ui/src/components/views/github-issues-view/hooks/use-issue-validation.ts, apps/ui/src/hooks/mutations/use-github-mutations.ts, apps/ui/src/hooks/use-settings-migration.ts, apps/ui/src/main.ts
Removed unused state (isLoading from useCodexUsage, currentTaskId getter), constants (MAX_RECENT_FOLDERS, REFRESH_INTERVAL_SECONDS, ALL_PHASES, LOCALSTORAGE_KEYS), helper functions (extractModel, getImagesPath, getAuthMethodLabel), and derived variables (isStale, codexMaxPercentage).
Unused Parameter & Destructuring Cleanup
apps/ui/src/components/layout/project-switcher/components/project-context-menu.tsx, apps/ui/src/components/shared/task-progress-panel.tsx, apps/ui/src/components/views/board-view/components/kanban-card/card-actions.tsx, apps/ui/src/components/views/board-view/hooks/use-board-drag-drop.ts, apps/ui/src/components/views/settings-view/components/settings-navigation.tsx, apps/ui/src/components/views/settings-view/mcp-servers/dialogs/security-warning-dialog.tsx, apps/ui/src/components/views/settings-view/model-defaults/phase-model-selector.tsx, apps/ui/src/hooks/mutations/use-worktree-mutations.ts, apps/ui/src/store/notifications-store.ts
Renamed destructured/parameter variables to underscore-prefixed variants (_currentProject, _index, _hasContext, _serverName, _sectionIndex, _get, _apiKey) to suppress unused-variable warnings without removing the parameters.
Catch Block Simplification
apps/ui/scripts/kill-test-servers.mjs, apps/ui/src/components/views/project-settings-view/project-identity-section.tsx, apps/ui/src/components/views/settings-view/api-keys/api-keys-section.tsx, apps/ui/src/components/views/settings-view/providers/cursor-settings-tab.tsx, apps/ui/src/hooks/use-settings-migration.ts
Converted catch blocks from named error binding (catch (error)) to bare catch or renamed (catch (_error)) where error is unused; error handling logic remains unchanged.
Store & Hook Signature Updates
apps/ui/src/components/views/agent-view.tsx, apps/ui/src/components/views/notifications-view.tsx, apps/ui/src/components/views/settings-view.tsx, apps/ui/src/components/views/board-view/worktree-panel/components/worktree-actions-dropdown.tsx, apps/ui/src/components/views/settings-view/providers/claude-settings-tab/subagents-section.tsx, apps/ui/src/components/views/settings-view/providers/codex-settings-tab.tsx, apps/ui/src/hooks/use-electron-agent.ts
Removed unused fields from destructured store/hook returns: error from useElectronAgent, setNotifications and setUnreadCount from useNotificationsStore, autoLoadClaudeMd/setAutoLoadClaudeMd from useAppStore, hasExternalTerminals from useAvailableTerminals, codexAuthStatus from useSetupStore, codexSandboxMode/codexApprovalPolicy from app store, addToQueue from useMessageQueue, and hasProject from useSubagents.
Removed Component State & Logic
apps/ui/src/components/views/board-view.tsx
Removed keyboard shortcuts import/usage, store-derived mappings (maxConcurrency, setMaxConcurrency, useWorktrees, enableDependencyBlocking, skipVerificationInAutoMode), showInitScriptIndicatorByProject subscription, and board action handlers (handleCommitFeature, handleMergeFeature); simplified component lifecycle and props wiring.
Type Import & Model Handling Refinements
apps/ui/src/components/views/board-view/components/kanban-card/agent-info-panel.tsx, apps/ui/src/components/views/board-view/shared/model-selector.tsx, apps/ui/src/components/views/board-view/shared/model-constants.ts, apps/ui/src/components/views/settings-view/appearance/appearance-section.tsx, apps/ui/src/components/views/settings-view/providers/opencode-model-configuration.tsx, apps/ui/src/components/views/settings-view/model-defaults/phase-model-selector.tsx, apps/ui/src/hooks/use-settings-sync.ts
Removed imports of AgentTaskInfo, ModelAlias, PROVIDER_PREFIXES, stripProviderPrefix, SidebarStyle, OpencodeModelId, and related model utility functions. Excluded cursor models from aggregated model groups in PhaseModelSelector; removed icon imports for OpenCode providers (DeepSeekIcon, QwenIcon, etc.) and derived variables (hasDynamicModels).
Descriptive @ts-nocheck Comments
apps/ui/src/components/views/board-view/components/kanban-card/card-badges.tsx, apps/ui/src/components/views/board-view/components/kanban-card/card-content-sections.tsx, apps/ui/src/components/views/board-view/components/kanban-card/card-header.tsx, apps/ui/src/components/views/board-view/components/kanban-card/kanban-card.tsx, apps/ui/src/components/views/board-view/components/kanban-card/summary-dialog.tsx, apps/ui/src/components/views/board-view/components/list-view/list-row.tsx, apps/ui/src/components/views/board-view/hooks/use-board-actions.ts, apps/ui/src/components/views/board-view/hooks/use-board-column-features.ts, apps/ui/src/components/views/board-view/dialogs/completed-features-modal.tsx, apps/ui/src/components/views/board-view/dialogs/dependency-tree-dialog.tsx, apps/ui/src/components/views/github-issues-view.tsx, apps/ui/src/components/views/interview-view.tsx, apps/ui/src/components/views/settings-view/providers/claude-settings-tab.tsx, apps/ui/src/components/views/setup-view/steps/cli-setup-step.tsx, apps/ui/src/components/views/setup-view/steps/codex-setup-step.tsx, apps/ui/src/hooks/use-responsive-kanban.ts, apps/ui/src/components/views/settings-view/api-keys/hooks/use-api-key-management.ts
Added descriptive suffixes to existing @ts-nocheck directives to document type issues and component concerns without functional changes.
AddFeatureDialog Expansion & Spawn Mode
apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx
Expanded AddFeatureDialogProps to include selectedNonMainWorktreeBranch and forceCurrentBranchMode; introduced getDefaultWorkMode helper and spawn-mode state (ancestors, selectedAncestorIds); added conditional ancestor context formatting and parent-as-dependency logic; enhanced description handling with version history integration; adjusted feature data building to conditionally derive fields based on work mode and spawn mode; preserved validation while extending to account for new modes and branch requirements.
Layout & Navigation Simplification
apps/ui/src/routes/__root.tsx, apps/ui/src/components/views/graph-view-page.tsx
Removed compact mode check, isBoardRoute detection, and unused variable stubs (isCompact, isBoardRoute, void theme, void fontFamilies); consolidated imports by removing useBoardBackground hook; removed followUpPreviewMap getter while preserving setter.
Board & Dialog Logic Updates
apps/ui/src/components/views/board-view/dialogs/agent-output-modal.tsx, apps/ui/src/components/views/board-view/dialogs/edit-feature-dialog.tsx, apps/ui/src/components/views/board-view/dialogs/follow-up-dialog.tsx, apps/ui/src/components/views/board-view/dialogs/mass-edit-dialog.tsx, apps/ui/src/components/views/board-view/hooks/use-board-column-features.ts
Changed streamed content accumulation from appending to output to dedicated streamedContent state; removed logger imports and TestingTabContent from edit-feature and follow-up dialogs; removed modelSupportsThinking and isCursorModel checks from mass-edit; removed effectiveWorktreePath calculation in column features.
Graph & Event Handling Modernization
apps/ui/src/components/views/graph-view/graph-canvas.tsx, apps/ui/src/components/views/graph-view/components/graph-controls.tsx, apps/ui/src/lib/file-picker.ts
Updated matchMedia event listener from deprecated addListener/removeListener to modern addEventListener/removeEventListener API; condensed lucide-react imports to single line; removed unused event parameter in directory picker change handler.
Test & Setup Refinements
apps/ui/tests/features/feature-manual-review-flow.spec.ts, apps/ui/tests/projects/new-project-creation.spec.ts, apps/ui/tests/projects/open-existing-project.spec.ts, apps/ui/tests/utils/project/setup.ts
Removed pre-test feature object construction in manual-review test (relying on API creation); removed unused imports (path, waitForNetworkIdle); added TypeScript type annotation to mockProjects array without runtime behavior change.
Miscellaneous Linting & Comments
apps/ui/src/components/views/setup-view/steps/claude-setup-step.tsx, apps/ui/src/components/views/spec-view/components/edit-mode/features-section.tsx, apps/ui/src/components/views/spec-view/components/edit-mode/roadmap-section.tsx, apps/ui/src/store/app-store.ts, apps/ui/src/store/test-runners-store.ts
Removed ClaudeSetupContentProps interface and getAuthMethodLabel helper; added eslint-disable-next-line comments for unused destructured variables; removed unused theme destructuring and minor lint adjustments.
Terminal & Settings Updates
apps/ui/src/components/views/terminal-view.tsx, apps/ui/src/components/views/github-issues-view.tsx
Removed setTerminalTabLayout from useAppStore destructuring; removed useMemo and getAuthHeaders imports; removed validation model string extraction (validationModelString); updated file header comments for clarity.
Setup & Utility Refinements
apps/ui/src/lib/main.ts
Removed electronAppReadFileSync and electronAppStatSync imports; removed MIN_WIDTH_EXPANDED constant and SIDEBAR layout constants, defaulting to MIN_WIDTH_COLLAPSED for window minimum width; simplified width-related logic.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 Cleanup Hop

Variables unused, now they're gone with care,
Imports untouched, we trim the air—
ESLint's new rules keep us strict and true,
Spawn mode sprouts where dialogs grew,
Hopping through files, refactoring's done! 🌿

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and directly summarizes the main objective of the changeset: fixing lint errors and removing unused code throughout the codebase.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@Shironex Shironex self-assigned this Jan 25, 2026
@Shironex Shironex added Refactor A complete logic rewrite is requested or being performed for an issue. cleanup remove unused files in the codebase labels Jan 25, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Shironex, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a comprehensive code cleanup and linting enforcement across the UI application. The primary goal was to eliminate a large number of ESLint errors and warnings by refining the linting configuration and removing dead code. This effort significantly improves code quality, maintainability, and reduces potential sources of bugs, ensuring a cleaner and more robust codebase for future development.

Highlights

  • ESLint Configuration Updates: The ESLint configuration has been significantly updated to include numerous missing browser globals (e.g., MouseEvent, AbortController, SVGElement), a Vite global (__APP_VERSION__), and a new rule to enforce descriptions for @ts-nocheck comments with a minimum length of 10 characters. The no-unused-vars rule was also configured to ignore variables prefixed with an underscore.
  • Extensive Unused Code Removal: Approximately 120 unused variables, imports (including React hooks and Lucide-React icons), constants, and function definitions have been removed across 97 files. This includes cleaning up destructuring assignments and removing unused state variables.
  • Bug Fix in Agent Output Modal: A runtime bug in agent-output-modal.tsx was resolved by correctly updating the state variable from setOutput to setStreamedContent when streaming new content.
  • @ts-nocheck Comment Descriptions: All existing @ts-nocheck comments have been updated to include descriptive explanations, such as 'dnd-kit type incompatibilities' or 'Electron IPC boundary typing', aligning with the newly enforced ESLint rule.
  • Code Simplification and Linting: Several catch (error) blocks were simplified to catch when the error variable was not utilized. Unused parameters in mock Electron API functions were consistently prefixed with an underscore (_). New lint:errors and lint:server:errors scripts were added to package.json for focused linting.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Shironex Shironex merged commit 5eda2c9 into v0.14.0rc Jan 25, 2026
5 of 6 checks passed
@Shironex Shironex deleted the chore/fix-lint-errors-cleanup-unused-code branch January 25, 2026 16:38
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/ui/src/components/views/settings-view/mcp-servers/dialogs/security-warning-dialog.tsx (1)

25-35: TypeScript error: Property _serverName does not exist on type SecurityWarningDialogProps.

The interface at line 17 defines serverName, but the destructuring at line 30 expects _serverName. This will cause a TypeScript compilation error.

Use the renaming syntax to destructure serverName as _serverName:

🐛 Proposed fix
 export function SecurityWarningDialog({
   open,
   onOpenChange,
   onConfirm,
   serverType,
-  _serverName,
+  serverName: _serverName,
   command,
   args,
   url,
   importCount,
 }: SecurityWarningDialogProps) {
apps/ui/src/components/views/github-issues-view.tsx (1)

139-152: Resolve the hardcoded model alias before the API call.

The feature object uses a hardcoded model alias 'opus' at line 147, passed directly to api.features.create() at line 154. Per coding guidelines, model aliases must be converted using resolveModelString() from @automaker/model-resolver before making API calls.

The correct pattern is shown in similar code (e.g., use-github-mutations.ts), where the model is resolved before the API call is made:

const resolvedModel = resolveModelString(model);
const result = await api.github.validateIssue(...);

Update the feature creation to resolve the model alias:

const feature = {
  // ... other fields
  model: resolveModelString('opus'),
  // ...
};
🤖 Fix all issues with AI agents
In `@apps/ui/src/hooks/use-electron-agent.ts`:
- Around line 164-172: The local queue is never populated after removing
addToQueue, so sendMessage bails out when isProcessing and messages are dropped;
fix by restoring local enqueue behavior inside sendMessage (or remove the queue
API entirely). Specifically, in the sendMessage function call path that checks
isProcessing, push the message payload into the useMessageQueue queue via the
queue's add/enqueue method (the same shape as queuedMessage: content, images,
textFiles) when processing is true, or alternatively remove
queuedMessages/clearQueue/processNext from the hook export and callers to
eliminate the dead queue surface; locate sendMessage and useMessageQueue usage
to implement the chosen fix.
🧹 Nitpick comments (9)
apps/ui/src/components/views/spec-view/components/edit-mode/features-section.tsx (1)

1-9: Consolidate duplicate imports from lucide-react.

The file imports from lucide-react twice (lines 1 and 9). Consider merging these into a single import statement for cleaner organization.

🔧 Suggested consolidation
-import { Plus, X, ChevronDown, ChevronUp, FolderOpen } from 'lucide-react';
+import { Plus, X, ChevronDown, ChevronUp, FolderOpen, ListChecks } from 'lucide-react';
 import { useState, useRef, useEffect } from 'react';
 import { Button } from '@/components/ui/button';
 import { Input } from '@/components/ui/input';
 import { Textarea } from '@/components/ui/textarea';
 import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
 import { Label } from '@/components/ui/label';
 import { Badge } from '@/components/ui/badge';
-import { ListChecks } from 'lucide-react';
 import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible';
apps/ui/src/components/ui/task-progress-panel.tsx (1)

39-39: Remove the unused state to avoid redundant renders.
setCurrentTaskId still triggers re-renders, but the value is never read. Consider removing this state entirely (and its setters) or convert it to a ref if you need to keep it for future use.

♻️ Possible cleanup
-  const [, setCurrentTaskId] = useState<string | null>(null);
+  // If currentTaskId is unused, remove this state and its setters
-        setCurrentTaskId(currentId || null);
+        // setCurrentTaskId(currentId || null);
-            setCurrentTaskId(taskEvent.taskId);
+            // setCurrentTaskId(taskEvent.taskId);
-            setCurrentTaskId(null);
+            // setCurrentTaskId(null);
apps/ui/src/hooks/use-settings-migration.ts (1)

123-130: Keep the parse error details for troubleshooting.

Swallowing the JSON parse exception removes useful context when the cache is corrupted. Consider capturing and logging the error while still falling back.

♻️ Suggested tweak
-      } catch {
-        logger.warn('Failed to parse settings cache, falling back to old storage');
-      }
+      } catch (error) {
+        logger.warn('Failed to parse settings cache, falling back to old storage', error);
+      }
apps/ui/src/hooks/use-responsive-kanban.ts (1)

1-1: Consider clarifying why TypeScript checking is disabled.

The description meets the new ESLint requirement but describes what the file does rather than why type checking is suppressed. Per the PR's pattern of descriptions like "dnd-kit type incompatibilities" or "Electron IPC boundary typing," consider explaining the actual TypeScript issue.

Potential improvement

If the suppression is due to setTimeout type conflicts (NodeJS.Timeout vs browser number), consider:

-// `@ts-nocheck` - responsive breakpoint logic with layout state calculations
+// `@ts-nocheck` - setTimeout return type conflicts between Node and DOM typings

Alternatively, verify whether @ts-nocheck is still needed—the code appears well-typed and might work with targeted // @ts-expect-error`` comments instead.

apps/ui/src/components/views/project-settings-view/project-identity-section.tsx (1)

100-118: Consider logging errors before discarding them.

The bare catch syntax is valid and fixes the unused variable lint warning. However, discarding errors entirely can make debugging production issues harder. Consider logging the error while keeping the user-friendly toast:

🔧 Optional: Add error logging for observability
-        } catch {
+        } catch (error) {
+          console.error('Failed to upload icon:', error);
           toast.error('Failed to upload icon', {
             description: 'Network error. Please try again.',
           });
         } finally {
-    } catch {
+    } catch (error) {
+      console.error('Icon upload failed:', error);
       toast.error('Failed to upload icon');
       setIsUploadingIcon(false);
     }

If you prefer to keep the bare catch for lint compliance, you could alternatively prefix the variable with underscore (catch (_error)) and add logging when needed during debugging.

apps/ui/src/components/views/setup-view/steps/cli-setup-step.tsx (1)

1-1: Consider improving the @ts-nocheck description or removing the directive entirely.

While the added description satisfies the new ESLint rule requiring a minimum 10-character explanation, it describes what the file does rather than why TypeScript checking is disabled. Good suppression comments should justify the need for disabling checks (e.g., "third-party library type incompatibilities" or "Electron IPC boundary typing issues").

Additionally, the code appears well-typed with proper interfaces and type annotations throughout. Consider whether @ts-nocheck is still necessary, or if specific @ts-expect-error directives on problematic lines would be more appropriate.

💡 Suggested improvements

Option 1: Improve the description to explain why

-// `@ts-nocheck` - CLI setup wizard with step validation and setup store state
+// `@ts-nocheck` - [reason explaining why TypeScript checking must be disabled]

Option 2: Remove the directive and address specific type issues

-// `@ts-nocheck` - CLI setup wizard with step validation and setup store state

Then add targeted @ts-expect-error comments only where TypeScript genuinely cannot infer types correctly.

apps/ui/src/components/views/settings-view/api-keys/hooks/use-api-key-management.ts (1)

1-1: Consider clarifying why @ts-nocheck is needed.

The current description explains what the hook does, but the PR objective states that @ts-nocheck comments should explain why suppression is required. A more helpful comment would describe the specific type incompatibility (e.g., "Electron IPC boundary typing issues" or "dynamic key access patterns").

apps/ui/src/components/views/board-view/hooks/use-board-column-features.ts (2)

1-1: Consider clarifying WHY @ts-nocheck is needed.

The description explains what this file does, but the PR objective states that @ts-nocheck comments should explain why the suppression is required (e.g., "dnd-kit type incompatibilities", "Electron IPC boundary typing"). Consider updating to describe the actual typing issue being suppressed.


79-92: useAppStore.getState() inside useMemo bypasses reactivity.

Calling getState() directly reads the current snapshot but doesn't subscribe to changes. If worktreesByProject or isPrimaryWorktreeBranch results change, this memo won't recompute since they're not in the dependency array (lines 199-206). The same applies to enableDependencyBlocking on line 176.

If this is intentional to avoid re-render storms, consider adding a comment explaining that choice. Otherwise, consider subscribing to these values via the hook's props or a separate selector to ensure the UI updates when they change.

Comment on lines +164 to +172
const { queuedMessages, isProcessingQueue, clearQueue, processNext } = useMessageQueue({
onProcessNext: async (queuedMessage) => {
await sendMessageDirectly(
queuedMessage.content,
queuedMessage.images,
queuedMessage.textFiles
);
},
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Local queue can’t be populated after dropping addToQueue.
sendMessage returns early when isProcessing, and there’s now no path to enqueue, so messages can be lost and queuedMessages stays empty. Either reintroduce local enqueueing or remove the local queue surface entirely to avoid dead functionality.

🐛 Proposed fix (restore local enqueue)
-  const { queuedMessages, isProcessingQueue, clearQueue, processNext } = useMessageQueue({
+  const { queuedMessages, isProcessingQueue, clearQueue, processNext, addToQueue } = useMessageQueue({
     onProcessNext: async (queuedMessage) => {
       await sendMessageDirectly(
         queuedMessage.content,
         queuedMessage.images,
         queuedMessage.textFiles
       );
     },
   });
-      if (isProcessing) {
-        logger.warn('Already processing a message');
-        return;
-      }
+      if (isProcessing) {
+        logger.warn('Already processing a message; queueing instead');
+        addToQueue(content, images, textFiles);
+        return;
+      }
-    [sessionId, workingDirectory, model, thinkingLevel, isProcessing]
+    [sessionId, workingDirectory, model, thinkingLevel, isProcessing, addToQueue]
🤖 Prompt for AI Agents
In `@apps/ui/src/hooks/use-electron-agent.ts` around lines 164 - 172, The local
queue is never populated after removing addToQueue, so sendMessage bails out
when isProcessing and messages are dropped; fix by restoring local enqueue
behavior inside sendMessage (or remove the queue API entirely). Specifically, in
the sendMessage function call path that checks isProcessing, push the message
payload into the useMessageQueue queue via the queue's add/enqueue method (the
same shape as queuedMessage: content, images, textFiles) when processing is
true, or alternatively remove queuedMessages/clearQueue/processNext from the
hook export and callers to eliminate the dead queue surface; locate sendMessage
and useMessageQueue usage to implement the chosen fix.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is an excellent and extensive pull request that significantly improves code quality by addressing a large number of linting errors and removing unused code across the repository. The changes are well-executed and follow best practices for code cleanup. I've reviewed the changes across all files and found them to be correct and beneficial. The bug fix in agent-output-modal.tsx is also a great catch. The codebase is now cleaner and more maintainable. Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup remove unused files in the codebase Refactor A complete logic rewrite is requested or being performed for an issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments