Skip to content

Conversation

@egor-xyz
Copy link
Owner

@egor-xyz egor-xyz commented Jun 26, 2025

  • Updated import statements to use type for TypeScript types in various components and hooks.
  • Reordered props in ProjectMenu, PullRequest, and other components for consistency.
  • Removed unnecessary imports and cleaned up code formatting in multiple files.
  • Enhanced the getStatusIcon utility to handle GitHub action statuses more effectively.
  • Introduced a new utility file gitHubStatusUtils.ts for managing GitHub action status icons.
  • Improved type definitions in Modal, Group, and Project types for better clarity and maintainability.
  • Added ESLint configuration for improved code quality and consistency.

Summary by CodeRabbit

  • New Features

    • Added a utility to display GitHub action run statuses with corresponding icons.
    • Added support for the Ghostty shell in integrations.
  • Bug Fixes

    • Improved accuracy and consistency in type definitions and prop handling across multiple components.
  • Refactor

    • Streamlined import statements to use explicit type-only imports for better type clarity.
    • Reorganized and updated type declarations, converting many interfaces to type aliases.
    • Enhanced code readability by reordering props, destructuring, and import statements throughout the codebase.
  • Chores

    • Updated and renamed scripts in the project configuration.
    • Upgraded dependency versions for improved stability and compatibility.
    • Introduced a new ESLint configuration for TypeScript files.

- Updated import statements to use `type` for TypeScript types in various components and hooks.
- Reordered props in `ProjectMenu`, `PullRequest`, and other components for consistency.
- Removed unnecessary imports and cleaned up code formatting in multiple files.
- Enhanced the `getStatusIcon` utility to handle GitHub action statuses more effectively.
- Introduced a new utility file `gitHubStatusUtils.ts` for managing GitHub action status icons.
- Improved type definitions in `Modal`, `Group`, and `Project` types for better clarity and maintainability.
- Added ESLint configuration for improved code quality and consistency.
@egor-xyz egor-xyz requested a review from Copilot June 26, 2025 09:20
@coderabbitai
Copy link

coderabbitai bot commented Jun 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces a new ESLint configuration tailored for TypeScript, updates dependency versions and script names in package.json, and applies widespread code style and type import improvements across the codebase. Multiple files are refactored for clarity, type safety, and consistency, including converting interfaces to type aliases, reordering imports, and updating function signatures. Several utility and component files are reorganized, and a new utility for GitHub status icons is added.

Changes

File(s) Change Summary
eslint.config.mjs Added a new ESLint configuration using typescript-eslint, extending a base config and specifying ignore patterns for directories and non-TypeScript files.
package.json Renamed start to dev and eslint to lint scripts; upgraded multiple dependencies and devDependencies to newer versions.
src/main/app.ts, src/main/settings.ts Reordered import statements for consistency; no functional changes.
src/main/ipcs/ipcDarkMode.ts, src/main/ipcs/ipcGit.ts, src/main/ipcs/ipcGitHub.ts, src/main/ipcs/ipcLaunch.ts, src/main/ipcs/ipcProjects.ts, src/main/ipcs/preload.ts Updated imports to use TypeScript's type modifier for type-only imports; minor code style changes and explicit ESLint directives added where needed.
src/main/ipcs/ipcSticker.ts Removed unused imports and reordered type annotations.
src/main/libs/childProcess.ts, src/main/libs/integrations/getInstalledApps.ts Refactored functions to concise arrow function syntax; updated return type annotations from Array<string> to string[].
src/main/libs/git.ts Added @ts-ignore comments to suppress TypeScript errors and simplified catch blocks.
src/main/libs/integrations/editrosLaunch.ts, src/main/libs/integrations/integrations.ts Changed imports to use type modifier for type-only imports; reordered imports.
src/main/libs/integrations/fatal-error.ts Reordered and updated function signatures for fatalError, assertNonNullable, and forceUnwrap; improved type assertion semantics and error handling.
src/main/libs/integrations/path-exists.ts Removed an extraneous blank line; no functional changes.
src/main/libs/integrations/shellsLaunch.ts Cleaned up and reordered the Shell enum and getBundleID function; updated imports to use type modifier; added new shell Ghostty.
src/main/libs/integrations/shells.ts Added new shell entry Ghostty with bundle identifier.
src/main/libs/window.ts Reordered imports and simplified the getArea function.
src/rendered/AllProviders.tsx Added ESLint disable comments for React prop rules; updated imports to use type modifier for type-only imports.
src/rendered/App.tsx, src/rendered/Routing.tsx, src/rendered/components/AppNavbar/AppNavbar.styles.ts, src/rendered/components/AppNavbar/AppNavbar.tsx, src/rendered/components/Modals/GitMergeModal/GitMergeModal.styles.ts, src/rendered/components/Modals/GitResetModal/GitResetModal.styles.ts, src/rendered/components/Projects/Projects.styles.ts, src/rendered/components/Settings/Settings.styles.ts, src/rendered/components/ThemeSelector/ThemeSelector.styles.ts Reordered import statements for consistency; no logic changes.
src/rendered/components/BranchSelect/BranchSelect.tsx, src/rendered/components/GitStatusBadge/GitStatusBadge.tsx, src/rendered/components/GitStatusGroup/GitStatusGroup.tsx, src/rendered/components/GroupCollapse/GroupCollapse.tsx, src/rendered/components/Modals/GitMergeModal/GitMergeModal.tsx, src/rendered/components/Modals/GitResetModal/GitResetModal.tsx, src/rendered/components/Modals/GroupModal/GroupModal.tsx, src/rendered/components/Modals/TrayStickerModal/TrayStickerModal.tsx, src/rendered/components/Project/components/CheckoutBranch/CheckoutBranch.tsx, src/rendered/components/Project/components/Error/Error.tsx, src/rendered/components/Project/components/GitMenu/GitMenu.tsx, src/rendered/components/Project/components/GroupsSelect/GroupsSelect.tsx, src/rendered/components/Project/components/OpenInMenu/OpenInMenu.tsx, src/rendered/components/Project/components/ProjectMenu/ProjectMenu.tsx, src/rendered/components/Project/components/PullRequest/PullRequest.tsx, src/rendered/components/Project/components/QuickActions/QuickActions.tsx, src/rendered/components/Project/components/RemoveAlert/RemoveAlert.tsx, src/rendered/components/Project/components/RemoveGroupAlert/RemoveGroupAlert.tsx, src/rendered/components/Project/components/Workflow/Workflow.tsx, src/rendered/components/Projects/Projects.tsx, src/rendered/components/ShinyText/ShinyText.tsx, src/rendered/components/Settings/Settings.tsx, src/rendered/components/SettingsAppearance/SettingsAppearance.tsx, src/rendered/components/SettingsIntegrations/SettingsIntegrations.tsx Reordered props, destructuring, and import statements; updated to use type-only imports; minor formatting and code style adjustments; no logic changes.
src/rendered/assets/gitHubIcons.tsx Removed the exported getStatusIcon function and unused SVG imports; icon components remain.
src/rendered/assets/gitHubStatusUtils.ts Added a new utility function getStatusIcon mapping GitHub action run statuses to icon components.
src/rendered/components/Project/Project.tsx, src/rendered/components/Project/hooks/useActions/useActions.tsx, src/rendered/components/Project/hooks/usePulls/usePulls.tsx, src/rendered/hooks/useAppSettings.ts, src/rendered/hooks/useDarkMode.ts, src/rendered/hooks/useGit.ts, src/rendered/hooks/useGroups.ts, src/rendered/hooks/useModal.tsx, src/rendered/hooks/useProjects.ts Updated to use type-only imports; reordered destructuring and generic type parameters; minor code style improvements.
src/rendered/index.tsx, src/rendered/components/SettingsActions/SettingsActions.tsx Removed extraneous blank lines; no functional changes.
src/rendered/Theme.ts, src/rendered/typings.d.ts, src/types/Group.ts, src/types/appSettings.ts, src/types/settings.ts Updated imports to use type modifier for type-only imports; no logic changes.
src/rendered/styled.d.ts, src/types/foundEditor.ts, src/types/foundShell.ts, src/vite-env.d.ts Changed interface declarations to type aliases for consistency; no changes to structure or exported properties.
src/types/Modal.ts Reordered the union type for ThemeSource from `'system'
src/types/gitHub.ts Updated type aliases for Pull and Run to reference Octokit.prototype.rest methods directly; removed octokit instance; updated imports to use type modifier.
src/types/project.ts Introduced a new exported GitStatus type; moved and made local the Status type; updated imports to use type modifier.
src/rendered/window.d.ts Changed import to type-only and added ESLint directive for consistent type definitions.

Sequence Diagram(s)

sequenceDiagram
    participant UI
    participant GitHubStatusUtils
    participant IconComponents

    UI->>GitHubStatusUtils: getStatusIcon(status)
    GitHubStatusUtils->>IconComponents: Select icon for status
    GitHubStatusUtils-->>UI: Return corresponding icon component
Loading

Poem

A rabbit hopped through fields of code,
Tidying types and lightening the load.
Imports sorted, icons now shine,
ESLint guides the TypeScript line.
With every hop, the code grows neat—
Dependency carrots, a treat to eat!
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-06-26T10_59_00_319Z-debug-0.log

✨ 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the code by converting most imports to use the TypeScript “type” modifier, reordering props and import statements for consistency, and introducing a dedicated utility for GitHub action status icons.

  • Updated import statements across the codebase to leverage type imports.
  • Cleaned up and reordered props and state definitions in components and hooks.
  • Introduced the gitHubStatusUtils.ts utility to replace the in-file getStatusIcon function.

Reviewed Changes

Copilot reviewed 79 out of 84 changed files in this pull request and generated no comments.

File Description
src/types/* Converted regular imports to type imports and cleaned up duplicate imports.
src/rendered/* Reordered props and organized hook definitions; introduced new utility for GitHub action status icons.
src/main/* Updated imports and streamlined integration functions as well as IPC handlers.
package.json Updated dependency versions and renamed some NPM scripts.
Comments suppressed due to low confidence (1)

src/main/libs/integrations/editrosLaunch.ts:1

  • The filename 'editrosLaunch.ts' appears to be a typo; consider renaming it to 'editorsLaunch.ts' for clarity.
import { spawn, type SpawnOptions } from 'child_process';

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: 4

🧹 Nitpick comments (7)
src/rendered/components/GitStatusGroup/GitStatusGroup.tsx (1)

25-27: Typo in tooltip text

uncommited is missing a second “t”.

-            <b>{name}</b> has <b>{changedFiles}</b> uncommited changed file{changedFiles > 1 ? 's' : ''}
+            <b>{name}</b> has <b>{changedFiles}</b> uncommitted changed file{changedFiles > 1 ? 's' : ''}
src/rendered/AllProviders.tsx (1)

1-4: Consider addressing ESLint issues instead of disabling them wholesale.

Adding multiple ESLint disable comments at the file level may mask legitimate code quality issues. Consider addressing the underlying problems:

  • react/jsx-props-no-spreading: The prop spreading in CombineProviders could be made more explicit
  • react/display-name: Add display names to the returned components
  • @typescript-eslint/no-explicit-any: Consider using more specific types instead of any
src/rendered/components/BranchSelect/BranchSelect.tsx (1)

48-60: Minor performance tweak: memoise the filtered items list

The list is recomputed on every render even when gitStatus / branchSummary is unchanged.
A small useMemo will shave pointless work (and avoid repeated .toLowerCase() on large branch sets):

-  const items = (branchSummary?.all ?? [])
-    .filter((item) => item.toLowerCase().includes(query.toLowerCase()))
-    .map((item) => item.replace('remotes/', ''))
-    .slice(0, LIMIT);
+  const items = useMemo(() => {
+    return (branchSummary?.all ?? [])
+      .filter((item) => item.toLowerCase().includes(query.toLowerCase()))
+      .map((item) => item.replace('remotes/', ''))
+      .slice(0, LIMIT);
+  }, [branchSummary?.all, query]);
src/rendered/components/Project/components/RemoveAlert/RemoveAlert.tsx (1)

20-28: Avoid "false" being rendered in className

className={darkMode && Classes.DARK} will inject the string "false" when darkMode is false.
Wrap with clsx (already in deps) or a conditional template to suppress that artefact:

-      className={darkMode && Classes.DARK}
+      className={clsx({ [Classes.DARK]: darkMode })}
src/rendered/components/Project/components/RemoveGroupAlert/RemoveGroupAlert.tsx (1)

20-28: Same className issue as in RemoveAlert

See the previous comment – the "false" string will be rendered when darkMode is falsy.
Apply the same clsx guard here.

src/main/libs/integrations/shellsLaunch.ts (1)

51-74: assertNever return type is never, not string

Although never is assignable to string, returning it defeats the exhaustiveness check because the
function still appears to return a string. Use a separate throw to make the control-flow explicit:

-    default:
-      return assertNever(shell, `Unknown shell: ${shell}`);
+    default:
+      throw assertNever(shell, `Unknown shell: ${shell}`);
src/rendered/components/Projects/Projects.tsx (1)

37-37: Consider improving the button text grammar.

The text "Add one or few repositories" has a grammatical issue. Consider changing it to "Add one or more repositories" or "Add repositories" for better clarity.

-                text="Add one or few repositories"
+                text="Add one or more repositories"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e927dca and 03267fe.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (83)
  • eslint.config.mjs (1 hunks)
  • package.json (2 hunks)
  • src/main/app.ts (1 hunks)
  • src/main/ipcs/ipcDarkMode.ts (1 hunks)
  • src/main/ipcs/ipcGit.ts (3 hunks)
  • src/main/ipcs/ipcGitHub.ts (1 hunks)
  • src/main/ipcs/ipcLaunch.ts (1 hunks)
  • src/main/ipcs/ipcProjects.ts (1 hunks)
  • src/main/ipcs/ipcSticker.ts (1 hunks)
  • src/main/ipcs/preload.ts (1 hunks)
  • src/main/libs/childProcess.ts (1 hunks)
  • src/main/libs/git.ts (2 hunks)
  • src/main/libs/integrations/editrosLaunch.ts (1 hunks)
  • src/main/libs/integrations/fatal-error.ts (1 hunks)
  • src/main/libs/integrations/getInstalledApps.ts (1 hunks)
  • src/main/libs/integrations/integrations.ts (1 hunks)
  • src/main/libs/integrations/path-exists.ts (0 hunks)
  • src/main/libs/integrations/shellsLaunch.ts (2 hunks)
  • src/main/libs/window.ts (1 hunks)
  • src/main/settings.ts (1 hunks)
  • src/rendered/AllProviders.tsx (1 hunks)
  • src/rendered/App.tsx (2 hunks)
  • src/rendered/Routing.tsx (1 hunks)
  • src/rendered/Theme.ts (1 hunks)
  • src/rendered/assets/gitHubIcons.tsx (1 hunks)
  • src/rendered/assets/gitHubStatusUtils.ts (1 hunks)
  • src/rendered/components/AppNavbar/AppNavbar.styles.ts (1 hunks)
  • src/rendered/components/AppNavbar/AppNavbar.tsx (4 hunks)
  • src/rendered/components/BranchSelect/BranchSelect.tsx (4 hunks)
  • src/rendered/components/GitStatusBadge/GitStatusBadge.tsx (3 hunks)
  • src/rendered/components/GitStatusGroup/GitStatusGroup.tsx (1 hunks)
  • src/rendered/components/GroupCollapse/GroupCollapse.tsx (5 hunks)
  • src/rendered/components/Modals/GitMergeModal/GitMergeModal.styles.ts (1 hunks)
  • src/rendered/components/Modals/GitMergeModal/GitMergeModal.tsx (4 hunks)
  • src/rendered/components/Modals/GitResetModal/GitResetModal.styles.ts (1 hunks)
  • src/rendered/components/Modals/GitResetModal/GitResetModal.tsx (5 hunks)
  • src/rendered/components/Modals/GroupModal/GroupModal.tsx (4 hunks)
  • src/rendered/components/Modals/TrayStickerModal/TrayStickerModal.tsx (2 hunks)
  • src/rendered/components/Project/Project.tsx (3 hunks)
  • src/rendered/components/Project/components/CheckoutBranch/CheckoutBranch.tsx (4 hunks)
  • src/rendered/components/Project/components/Error/Error.tsx (2 hunks)
  • src/rendered/components/Project/components/GitMenu/GitMenu.tsx (2 hunks)
  • src/rendered/components/Project/components/GroupsSelect/GroupsSelect.tsx (2 hunks)
  • src/rendered/components/Project/components/OpenInMenu/OpenInMenu.tsx (5 hunks)
  • src/rendered/components/Project/components/ProjectMenu/ProjectMenu.tsx (3 hunks)
  • src/rendered/components/Project/components/PullRequest/PullRequest.styles.ts (1 hunks)
  • src/rendered/components/Project/components/PullRequest/PullRequest.tsx (2 hunks)
  • src/rendered/components/Project/components/QuickActions/QuickActions.styles.ts (1 hunks)
  • src/rendered/components/Project/components/QuickActions/QuickActions.tsx (4 hunks)
  • src/rendered/components/Project/components/RemoveAlert/RemoveAlert.tsx (1 hunks)
  • src/rendered/components/Project/components/RemoveGroupAlert/RemoveGroupAlert.tsx (1 hunks)
  • src/rendered/components/Project/components/Workflow/Workflow.tsx (3 hunks)
  • src/rendered/components/Project/hooks/useActions/useActions.tsx (3 hunks)
  • src/rendered/components/Project/hooks/usePulls/usePulls.tsx (1 hunks)
  • src/rendered/components/Projects/Projects.styles.ts (1 hunks)
  • src/rendered/components/Projects/Projects.tsx (4 hunks)
  • src/rendered/components/Settings/Settings.styles.ts (1 hunks)
  • src/rendered/components/Settings/Settings.tsx (2 hunks)
  • src/rendered/components/SettingsActions/SettingsActions.tsx (1 hunks)
  • src/rendered/components/SettingsAppearance/SettingsAppearance.tsx (1 hunks)
  • src/rendered/components/SettingsIntegrations/SettingsIntegrations.tsx (3 hunks)
  • src/rendered/components/ShinyText/ShinyText.tsx (1 hunks)
  • src/rendered/components/ThemeSelector/ThemeSelector.styles.ts (1 hunks)
  • src/rendered/components/ThemeSelector/ThemeSelector.tsx (1 hunks)
  • src/rendered/hooks/useAppSettings.ts (1 hunks)
  • src/rendered/hooks/useDarkMode.ts (2 hunks)
  • src/rendered/hooks/useGit.ts (2 hunks)
  • src/rendered/hooks/useGroups.ts (2 hunks)
  • src/rendered/hooks/useModal.tsx (2 hunks)
  • src/rendered/hooks/useProjects.ts (1 hunks)
  • src/rendered/index.tsx (0 hunks)
  • src/rendered/styled.d.ts (1 hunks)
  • src/rendered/typings.d.ts (1 hunks)
  • src/rendered/window.d.ts (1 hunks)
  • src/types/Group.ts (1 hunks)
  • src/types/Modal.ts (1 hunks)
  • src/types/appSettings.ts (1 hunks)
  • src/types/foundEditor.ts (1 hunks)
  • src/types/foundShell.ts (1 hunks)
  • src/types/gitHub.ts (1 hunks)
  • src/types/project.ts (2 hunks)
  • src/types/settings.ts (1 hunks)
  • src/vite-env.d.ts (1 hunks)
💤 Files with no reviewable changes (2)
  • src/rendered/index.tsx
  • src/main/libs/integrations/path-exists.ts
🧰 Additional context used
🧬 Code Graph Analysis (24)
src/main/libs/git.ts (1)
src/main/settings.ts (1)
  • settings (12-41)
src/rendered/components/ThemeSelector/ThemeSelector.tsx (1)
src/rendered/hooks/useDarkMode.ts (1)
  • useDarkMode (27-43)
src/main/ipcs/ipcProjects.ts (1)
src/main/settings.ts (1)
  • settings (12-41)
src/main/ipcs/ipcLaunch.ts (3)
src/types/foundEditor.ts (1)
  • LaunchEditor (7-7)
src/main/libs/integrations/editrosLaunch.ts (1)
  • launchExternalEditor (14-41)
src/types/foundShell.ts (1)
  • LaunchShell (7-7)
src/rendered/components/SettingsAppearance/SettingsAppearance.tsx (1)
src/rendered/hooks/useAppSettings.ts (1)
  • useAppSettings (8-24)
src/rendered/components/Project/components/Error/Error.tsx (1)
src/rendered/components/Project/Project.styles.ts (2)
  • MiddleBlock (51-57)
  • ProjectActions (59-66)
src/rendered/hooks/useAppSettings.ts (1)
src/types/appSettings.ts (1)
  • AppSettings (4-17)
src/rendered/components/Project/components/QuickActions/QuickActions.tsx (1)
src/rendered/assets/gitHubIcons.tsx (1)
  • ActionsIcon (11-16)
src/rendered/components/ShinyText/ShinyText.tsx (1)
src/rendered/components/ShinyText/ShinyText.styles.ts (1)
  • Root (12-30)
src/rendered/components/Projects/Projects.tsx (2)
src/rendered/hooks/useGroups.ts (1)
  • useGroups (18-55)
src/rendered/hooks/useProjects.ts (1)
  • useProjects (15-41)
src/main/libs/integrations/shellsLaunch.ts (1)
src/main/libs/integrations/fatal-error.ts (1)
  • assertNever (13-15)
src/rendered/hooks/useGroups.ts (1)
src/types/Group.ts (2)
  • Group (3-8)
  • Groups (10-10)
src/rendered/components/BranchSelect/BranchSelect.tsx (1)
src/rendered/components/BranchSelect/BranchSelect.styles.ts (1)
  • SelectButton (12-25)
src/rendered/components/Project/components/RemoveGroupAlert/RemoveGroupAlert.tsx (2)
src/types/Group.ts (1)
  • Group (3-8)
src/types/Modal.ts (1)
  • ModalProps (1-5)
src/rendered/assets/gitHubStatusUtils.ts (2)
src/types/gitHub.ts (1)
  • Run (8-10)
src/rendered/assets/gitHubIcons.tsx (6)
  • ActionsCanceledIcon (18-23)
  • ActionDoneIcon (25-30)
  • ActionFailedIcon (32-37)
  • ActionInProgressIcon (48-52)
  • ActionPendingIcon (66-69)
  • ActionsIcon (11-16)
src/rendered/components/SettingsIntegrations/SettingsIntegrations.tsx (4)
src/rendered/hooks/useAppSettings.ts (1)
  • useAppSettings (8-24)
src/rendered/components/SettingsIntegrations/SettingsIntegrations.styles.ts (2)
  • TokenWrapper (13-18)
  • Row (7-11)
src/types/foundEditor.ts (1)
  • FoundEditor (1-5)
src/types/foundShell.ts (1)
  • FoundShell (1-5)
src/rendered/components/Modals/GroupModal/GroupModal.tsx (2)
src/types/Modal.ts (1)
  • ModalProps (1-5)
src/rendered/hooks/useGroups.ts (1)
  • useGroups (18-55)
src/rendered/components/Project/components/OpenInMenu/OpenInMenu.tsx (2)
src/rendered/components/Project/components/OpenInMenu/index.ts (1)
  • OpenInMenu (1-1)
src/rendered/assets/gitHubIcons.tsx (1)
  • ActionsIcon (11-16)
src/rendered/components/Project/components/ProjectMenu/ProjectMenu.tsx (1)
src/rendered/hooks/useModal.tsx (1)
  • useModal (62-85)
src/rendered/components/Modals/GitResetModal/GitResetModal.tsx (3)
src/types/project.ts (1)
  • GitStatus (3-10)
src/types/Modal.ts (1)
  • ModalProps (1-5)
src/rendered/components/Modals/GitResetModal/GitResetModal.styles.ts (1)
  • StyledBranchSelect (25-28)
src/rendered/components/Modals/TrayStickerModal/TrayStickerModal.tsx (2)
src/types/Modal.ts (1)
  • ModalProps (1-5)
src/rendered/components/Modals/TrayStickerModal/TrayStickerModal.styles.ts (1)
  • Actions (8-14)
src/rendered/components/Modals/GitMergeModal/GitMergeModal.tsx (3)
src/types/project.ts (1)
  • GitStatus (3-10)
src/types/Modal.ts (1)
  • ModalProps (1-5)
src/rendered/components/Modals/GitMergeModal/GitMergeModal.styles.ts (1)
  • MergeTo (24-30)
src/rendered/components/Project/components/RemoveAlert/RemoveAlert.tsx (1)
src/types/Modal.ts (1)
  • ModalProps (1-5)
src/rendered/components/Project/components/CheckoutBranch/CheckoutBranch.tsx (1)
src/rendered/utils/appToaster.ts (1)
  • appToaster (4-11)
🪛 Biome (1.9.4)
src/rendered/components/Project/Project.tsx

[error] 10-10: Do not shadow the global "Error" property.

Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.

(lint/suspicious/noShadowRestrictedNames)

src/rendered/components/Modals/TrayStickerModal/TrayStickerModal.tsx

[error] 6-6: Do not shadow the global "Error" property.

Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.

(lint/suspicious/noShadowRestrictedNames)

🔇 Additional comments (138)
eslint.config.mjs (2)

5-8: ignores pattern may accidentally exclude every .ts file, not just root‐level ones

In Flat-config globs, *.ts matches all .ts files that sit in the root of the project but also in any sub-folder that is passed as the working directory when ESLint runs.
If CI calls eslint ., the working dir is the repo root, so every .ts directly under any nested folder that becomes the working dir (e.g. packages/foo) will also be excluded.
That defeats the purpose of the second config block which is supposed to lint TS sources.

Consider tightening the glob or removing it entirely:

-    ignores: ['node_modules', 'dist', 'build', '*.js', '*.ts', '.tmp', '.vite']
+    // ignore only build artefacts & root-level JS helpers
+    ignores: ['node_modules', 'dist', 'build', '/*.js', '/*.ts', '.tmp', '.vite']

(or drop the *.ts entry if there are no root-level TS utility scripts).


1-2: Good call adopting the new typescript-eslint flat config helper

Importing the meta-package and a shared base config keeps the repo’s lint rules DRY.

src/rendered/components/AppNavbar/AppNavbar.styles.ts (1)

3-3: Import reorder improves visual grouping

Placing styled after third-party SVG keeps external-asset imports grouped together. 👍

src/rendered/Routing.tsx (1)

4-4: Minor import shuffle acknowledged

Pure re-ordering; no behavioural impact.

src/rendered/components/Modals/GitMergeModal/GitMergeModal.styles.ts (1)

2-2: Consistent styled placement

Matches the import order conventions introduced in this PR.

src/rendered/components/Projects/Projects.styles.ts (1)

2-2: Import order aligned with new style

Nothing else changed—looks good.

src/rendered/components/Modals/GitResetModal/GitResetModal.styles.ts (1)

3-3: LGTM: Import reordering for consistency.

The repositioning of the styled import improves code organization and aligns with the consistent import ordering being applied across the codebase.

src/rendered/components/Settings/Settings.styles.ts (1)

4-4: LGTM: Consistent import organization improvement.

Moving the styled import maintains consistency with the import ordering pattern being applied across style files.

src/rendered/typings.d.ts (1)

6-6: Excellent: Proper use of type-only import.

Converting to import type React is the correct approach since React is only used for type annotations in this module declaration. This improves build performance and follows TypeScript best practices.

src/main/ipcs/ipcDarkMode.ts (1)

2-2: Good: Proper type-only import usage.

Converting to import { type ThemeSource } is correct since it's only used for type annotation. This follows TypeScript best practices and improves clarity.

src/main/app.ts (1)

4-4: LGTM: Import reordering for consistency.

The repositioning of the path import improves import organization and aligns with the consistent ordering pattern being applied across the codebase.

src/rendered/components/SettingsActions/SettingsActions.tsx (1)

1-4: LGTM: Clean formatting improvement

The removal of the trailing blank line after imports improves code consistency and aligns with the PR's objective of streamlining import statements.

src/rendered/components/ThemeSelector/ThemeSelector.styles.ts (1)

1-2: LGTM: Consistent import organization

The reordering of imports to place @blueprintjs/core imports before styled-components improves consistency across the codebase and follows a logical grouping pattern.

src/main/ipcs/ipcGitHub.ts (1)

4-4: LGTM: Proper type-only import usage

Converting the PullType import to use the type modifier is a good TypeScript practice that clarifies the import is used only for typing purposes and may help with compilation optimization.

src/main/settings.ts (1)

3-4: LGTM: Improved import organization and type safety

The reordering of the path import and conversion of the Settings import to type-only both improve code organization and follow TypeScript best practices. The type-only import clearly indicates that Settings is used exclusively for type annotations.

src/rendered/components/SettingsAppearance/SettingsAppearance.tsx (1)

8-8: LGTM: Consistent destructuring order

The reordering of destructured variables from useAppSettings improves consistency across the codebase while maintaining the same functionality.

src/rendered/components/GitStatusGroup/GitStatusGroup.tsx (1)

1-2: Explicit type imports look good

Switching to type-only imports is correct and helps the compiler elide unused runtime code.

src/types/Modal.ts (1)

7-7: Order change is harmless, just double-check enum‐like usages

Re-ordering the union literal has no type-system impact, but if any UI relies on ThemeSource[] order (e.g. for menu rendering) verify that the visual order is still as intended.

src/types/Group.ts (1)

1-1: Good move to a type-only import

Keeps runtime bundle lean and matches the new lint rules.

src/main/libs/integrations/editrosLaunch.ts (1)

1-3: type imports acknowledged

Import changes are correct and safe.

src/rendered/Theme.ts (1)

2-2: Type-only import looks good

Matches the pattern applied across the PR.

src/rendered/components/Project/components/PullRequest/PullRequest.styles.ts (1)

2-3: Import reordering looks good.

The reordering of imports to group third-party imports together improves consistency and readability without affecting functionality.

src/rendered/components/ThemeSelector/ThemeSelector.tsx (2)

3-3: Import reordering improves consistency.

The alphabetical ordering of theme asset imports enhances code organization and readability.


9-9: Destructuring reordering is consistent.

The reordering of destructured properties aligns with consistent patterns across the codebase.

src/main/ipcs/ipcSticker.ts (2)

1-1: Excellent cleanup of unused imports.

Removing unused imports (Menu, BrowserWindow, and electron-log) improves code maintainability and reduces bundle size without affecting functionality.


3-3: Type annotation reordering is consistent.

The reordering of union types follows a consistent pattern, though both null | Tray and Tray | null are functionally equivalent.

src/types/appSettings.ts (1)

1-2: Excellent use of TypeScript type modifier.

Using import { type ... } explicitly marks these as type-only imports, which is a TypeScript best practice that improves tree-shaking and makes the code more explicit about import usage.

src/rendered/components/AppNavbar/AppNavbar.tsx (3)

6-6: Import reordering improves organization.

Moving the useModal import earlier and grouping related imports enhances code readability and organization.


10-10: Style imports are well-grouped.

Grouping style-related imports together improves code organization and makes it easier to identify styling dependencies.


34-34: JSX prop reordering maintains consistency.

The consistent ordering of props (moving minimal after icon) across Button components improves code readability and follows a logical pattern.

Also applies to: 50-50, 75-75

src/rendered/window.d.ts (1)

1-2: LGTM! Proper use of type-only imports and ESLint configuration.

The changes correctly use TypeScript's type import modifier for the Bridge type since it's only used in type declarations. The ESLint directive appropriately handles the style conflict with the global interface declaration pattern.

src/main/libs/window.ts (2)

1-1: Good import organization.

Grouping type imports together improves readability and follows TypeScript conventions.


5-5: Nice function simplification.

Converting to a concise arrow function improves readability while maintaining the same functionality.

src/main/ipcs/preload.ts (1)

1-8: Excellent type import consistency.

Converting all type imports to use the type modifier improves compilation efficiency and clearly indicates these are type-only imports. This systematic approach aligns perfectly with the PR's objectives.

src/rendered/hooks/useDarkMode.ts (2)

1-1: Proper type-only import usage.

Using the type modifier for ThemeSource is appropriate since it's only used for type annotations.


28-28: Destructuring reorder looks fine.

The order change doesn't affect functionality since these are independent properties from the store, and the hook's return interface remains unchanged.

src/main/ipcs/ipcProjects.ts (2)

2-2: Appropriate type-only import.

Using the type modifier for Projects is correct since it's only used for type annotations.


7-7: Good function simplification.

Converting to a concise arrow function improves readability. The synchronous nature of settings.get() makes this appropriate based on usage patterns elsewhere in the file.

src/main/libs/integrations/integrations.ts (1)

1-6: Excellent type-only import improvements!

The addition of type modifiers for BrowserWindow, FoundShell, and FoundEditor correctly identifies these as type-only imports, which improves tree-shaking and makes the code intent clearer. The import reordering also enhances readability by grouping related imports together.

src/rendered/components/Project/hooks/usePulls/usePulls.tsx (1)

6-7: Proper type-only import usage.

The addition of type modifiers for Pull, PullType, and Project correctly identifies these as type-only imports since they're only used for type annotations throughout the hook. This improves compilation efficiency and code clarity.

src/main/libs/git.ts (2)

33-33: Good cleanup of unused catch parameter.

Simplifying the catch block by removing the unused parameter _ improves code cleanliness and follows modern JavaScript/TypeScript practices.


6-9: ```shell
#!/bin/bash

Locate the Settings type definition(s)

rg -n "export (type|interface) Settings" -n src

Inspect the Store class definition and its get() signature

sed -n '1,200p' src/main/settings.ts
rg -n "get(" -n src/main/settings.ts


</details>
<details>
<summary>src/types/foundShell.ts (1)</summary>

`1-5`: **Consistent interface to type alias conversion.**

The conversion from `interface FoundShell<T>` to `export type FoundShell<T>` maintains the same structure and functionality while aligning with the broader codebase refactoring pattern. Type aliases provide more flexibility and consistency with other type definitions in the project.

</details>
<details>
<summary>src/rendered/components/Settings/Settings.tsx (2)</summary>

`2-7`: **Good import organization improvements.**

The reordering of import statements groups related imports together, enhancing code readability and maintainability. These organizational changes align with the PR's goal of improving code structure.

---

`22-22`: **Minor prop reordering for consistency.**

Moving the `vertical` prop maintains consistent prop ordering throughout the codebase, which contributes to better code organization.

</details>
<details>
<summary>src/rendered/components/Project/components/QuickActions/QuickActions.styles.ts (1)</summary>

`2-3`: **Import re-ordering looks good**

External library imports are now grouped before `styled-components`, improving readability and aligning with common style guides. No functional impact.

</details>
<details>
<summary>src/rendered/components/Project/components/PullRequest/PullRequest.tsx (2)</summary>

`2-4`: **Explicit `type` imports – nice improvement**

Switching `FC` and `Pull` to type-only imports reduces the emitted JavaScript and clarifies intent. 👍

---

`13-13`: **Destructuring reorder is a noop**

Simply re-ordering the property list inside the destructuring has no runtime effect; everything still compiles correctly.

</details>
<details>
<summary>src/rendered/App.tsx (2)</summary>

`4-9`: **Stylistic tweaks acknowledged**

Import re-ordering and whitespace changes improve consistency; no behavioural change detected.

---

`22-22`: **Blank line after `<GlobalStyles />`**

Tiny readability win; no objections.

</details>
<details>
<summary>src/rendered/components/Project/components/Error/Error.tsx (2)</summary>

`2-4`: **Type-only React import – good**

Keeps the runtime bundle clean; no further issues.

---

`21-32`: **Prop order shuffle is harmless**

Re-ordering `minimal` and `large` props is stylistic only; BlueprintJS treats them as booleans regardless of order.

</details>
<details>
<summary>src/rendered/AllProviders.tsx (2)</summary>

`6-6`: **Excellent use of type-only imports.**

The explicit `type` modifier for React type imports improves build performance and makes the import intentions clear.

---

`8-9`: **Import reordering is consistent.**

The alphabetical ordering of `HTML5Backend` before `HashRouter` improves code organization.

</details>
<details>
<summary>src/main/ipcs/ipcLaunch.ts (2)</summary>

`2-3`: **Good use of type-only imports.**

Converting to explicit type-only imports improves clarity and build performance.

---

`13-14`: ```shell
#!/usr/bin/env bash
# Show the LaunchShell type alias or interface declaration
rg -n -C3 "LaunchShell" src

# Display the top of ipcLaunch.ts to inspect imports and type usage
sed -n '1,50p' src/main/ipcs/ipcLaunch.ts
src/rendered/components/ShinyText/ShinyText.tsx (1)

5-18: Consistent prop ordering improves readability.

The reordering of props to place className first (as it's optional and commonly used) followed by speed and text creates a logical flow and maintains consistency with the component's usage pattern.

src/main/ipcs/ipcGit.ts (3)

3-3: Good use of type-only import.

Converting GitStatus to a type-only import improves build performance and makes the import intention explicit.


22-24: Cleaner empty catch block.

Removing the unused error variable from the catch block improves code clarity while maintaining the same error handling behavior.


68-70: Improved readability with explicit conditional.

The explicit if statement is more readable than the previous short-circuit expression and makes the control flow clearer.

src/main/libs/childProcess.ts (1)

3-11: Good refactoring to concise arrow function.

The simplification from a block-bodied arrow function to a concise arrow function improves readability while maintaining the exact same functionality, including error handling and stdout trimming.

src/rendered/hooks/useGit.ts (2)

3-3: LGTM: Correct type-only import usage.

The conversion to type-only import is appropriate since GitStatus is only used for type annotations.


93-96: LGTM: Cleaner useEffect cleanup syntax.

The refactoring from block body with explicit return to direct arrow function return makes the cleanup function more concise while maintaining the same functionality.

src/rendered/hooks/useAppSettings.ts (2)

1-1: LGTM: Appropriate type-only import.

Correctly converted to type-only import since AppSettings is only used for type annotations.


8-8: LGTM: Generic type parameter reordering.

The reordering from AppSettings & Actions to Actions & AppSettings is functionally equivalent but may improve readability by placing the actions interface first.

src/types/settings.ts (1)

1-2: LGTM: Consistent type-only import conversions.

All imports correctly converted to type-only imports since they're exclusively used for type annotations in the Settings type definition.

Also applies to: 4-5

src/rendered/components/Project/components/Workflow/Workflow.tsx (4)

2-2: LGTM: Appropriate type-only imports.

Both FC and Run are correctly converted to type-only imports since they're only used for type annotations.

Also applies to: 4-4


3-3: LGTM: Import source updated for relocated utility.

The import source correctly reflects the relocation of getStatusIcon to the new gitHubStatusUtils module, which improves code organization by separating utility functions from icon components.


15-15: LGTM: Cosmetic destructuring reorder.

The reordering of destructured properties doesn't affect functionality and may improve code organization.


40-40: LGTM: Minor formatting improvement.

The additional blank line improves JSX readability without affecting functionality.

src/types/foundEditor.ts (2)

1-5: LGTM: Interface to type alias conversion.

The conversion from interface to type alias maintains the same semantics while improving consistency across the codebase as part of the broader refactoring effort.


9-15: LGTM: Consistent interface to type conversion.

The conversion of IErrorMetadata from interface to type alias aligns with the codebase consistency improvements while preserving all functionality.

src/rendered/components/Project/hooks/useActions/useActions.tsx (3)

5-6: LGTM: Proper TypeScript type imports

The use of type imports for Run, GitStatus, and Project is correct and follows TypeScript best practices for type-only imports.


16-18: LGTM: Destructuring reorder is fine

The reordering of gitHubActions and gitHubToken in the destructuring assignment doesn't affect functionality and may improve consistency.


60-69: LGTM: Improved JSX formatting

The added line breaks and explicit fragment wrapping improve readability without changing the rendered output.

src/rendered/hooks/useProjects.ts (2)

2-3: LGTM: Proper TypeScript type import and reordering

The use of type import for Projects and reordering of imports improves code organization and follows TypeScript best practices.


15-15: LGTM: Generic type parameter reordering is safe

The reordering from State & Actions to Actions & State is safe since intersection types are commutative and doesn't affect the resulting type.

src/rendered/components/Project/components/QuickActions/QuickActions.tsx (2)

2-4: LGTM: Proper TypeScript type imports

The use of type imports for FC, GitStatus, and Project is correct and follows TypeScript best practices for type-only imports.


46-46: LGTM: Simplified title prop syntax

Removing unnecessary braces from string literals in the title props improves code readability without changing functionality.

Also applies to: 86-86, 94-94

src/rendered/assets/gitHubStatusUtils.ts (1)

14-35: Verify GitHub API status values

The getStatusIcon function handles various status values, but some cases like 'success' and 'failure' might not be standard GitHub API status values. GitHub typically uses the conclusion field for success/failure outcomes, not the status field.

Please verify that all mapped status values align with the actual GitHub Actions API response structure.

What are the possible values for the status field in GitHub Actions workflow runs API response?
src/rendered/hooks/useGroups.ts (2)

1-1: LGTM: Proper TypeScript type imports

The use of type imports for Group and Groups is correct and follows TypeScript best practices for type-only imports.


18-18: LGTM: Generic type parameter reordering is safe

The reordering from State & Actions to Actions & State is safe since intersection types are commutative and doesn't affect the resulting type.

src/rendered/components/Project/components/GitMenu/GitMenu.tsx (3)

2-4: LGTM: Improved TypeScript type imports

The explicit type imports for FC, GitStatus, and Project enhance type safety and clarity while potentially improving tree-shaking optimization.


11-11: LGTM: Consistent prop ordering

The reordering of destructured props maintains functionality while improving consistency across components.


24-24: LGTM: Improved JSX readability

Moving the text props to separate lines enhances code readability and follows consistent formatting patterns.

Also applies to: 30-30

src/rendered/components/GitStatusBadge/GitStatusBadge.tsx (3)

1-2: LGTM: Enhanced type import clarity

The explicit type imports for Blueprint.js types (IconName, Intent) and React types (FC, JSX) improve code clarity and type safety.


14-14: LGTM: Consistent prop destructuring

The reordering of props maintains functionality while following consistent patterns across the codebase.


27-27: LGTM: Improved JSX formatting

The added blank line between the Icon and Count elements enhances visual separation and readability.

src/rendered/components/Project/components/ProjectMenu/ProjectMenu.tsx (3)

2-4: LGTM: Consistent type import improvements

The explicit type imports for FC and GitStatus align with the PR's goal of enhancing TypeScript clarity and type safety.


26-26: LGTM: Enhanced JSX readability

Moving the text props to separate lines across all MenuItem components creates consistent formatting and improves code readability.

Also applies to: 32-32, 38-38, 45-45, 61-61


28-28: LGTM: Improved visual separation

The added blank lines between MenuItem elements enhance visual organization and make the menu structure more apparent.

Also applies to: 34-34, 40-40

src/rendered/components/GroupCollapse/GroupCollapse.tsx (4)

2-2: LGTM: Improved type import clarity

The explicit type imports for FC, Group, and Projects enhance type safety and follow consistent patterns across the codebase.

Also applies to: 6-7


22-22: LGTM: Consistent prop ordering

The reordering of destructured props maintains all functionality while improving consistency with other components.


93-93: LGTM: Attribute reordering

Moving the ref={drag} attribute after onClick is a valid organizational change that doesn't affect the drag-and-drop functionality.


97-97: LGTM: Enhanced visual spacing

The added blank lines improve JSX readability and create better visual separation between elements.

Also applies to: 108-108, 121-121

src/rendered/assets/gitHubIcons.tsx (2)

4-4: LGTM: Import reordering

The reordering of the actionCanceled import maintains functionality while improving code organization.


1-70: ```shell
#!/bin/bash

Re-run search without specifying unrecognized --type flag

echo "🔍 Searching for imports of getStatusIcon in .ts/.tsx files:"
rg "import.getStatusIcon" -g ".ts" -g "*.tsx" -n

echo -e "\n🔍 Searching for any remaining references to getStatusIcon in .ts/.tsx files:"
rg "getStatusIcon" -g ".ts" -g ".tsx" -n


</details>
<details>
<summary>src/rendered/components/BranchSelect/BranchSelect.tsx (1)</summary>

`72-74`: **Explicit boolean not required – good clean-up**  

Replacing `resetOnSelect={true}` with the shorthand prop is tidy and semantically identical.

</details>
<details>
<summary>src/rendered/components/Projects/Projects.tsx (3)</summary>

`6-6`: **LGTM! Type-only import improves build optimization.**

Converting the `Group` import to a type-only import is excellent for TypeScript compilation efficiency and clarity.

---

`18-23`: **LGTM! Arrow function conversion improves conciseness.**

The refactoring from a traditional function to an arrow function maintains the same logic while being more concise and readable.

---

`15-16`: **LGTM! Consistent prop and destructuring reordering.**

The reordering of destructured variables and component props improves consistency across the codebase without affecting functionality.



Also applies to: 62-62

</details>
<details>
<summary>src/rendered/components/Project/components/GroupsSelect/GroupsSelect.tsx (2)</summary>

`2-2`: **LGTM! Type-only import for better TypeScript optimization.**

Converting the `FC` import to type-only is a good practice that improves build efficiency.

---

`29-29`: **LGTM! Consistent formatting and prop reordering.**

The JSX reformatting, prop reordering, and destructuring parameter reordering improve code consistency without affecting functionality.



Also applies to: 35-42, 46-46, 52-52

</details>
<details>
<summary>src/rendered/components/Project/components/CheckoutBranch/CheckoutBranch.tsx (3)</summary>

`2-2`: **LGTM! Type-only imports improve build optimization.**

Converting `FC` and `GitStatus` to type-only imports is excellent for TypeScript compilation efficiency.



Also applies to: 6-6

---

`35-44`: **LGTM! If-else refactoring improves code clarity.**

The refactoring from a conditional expression to an explicit if-else statement significantly improves readability and makes the success and error handling logic much clearer.

---

`17-17`: **LGTM! Consistent prop reordering.**

The reordering of destructured props and component props maintains functionality while improving consistency across the codebase.



Also applies to: 58-58

</details>
<details>
<summary>src/rendered/components/SettingsIntegrations/SettingsIntegrations.tsx (2)</summary>

`6-7`: **LGTM! Type-only imports for better build optimization.**

Converting `FoundEditor` and `FoundShell` to type-only imports improves TypeScript compilation efficiency and clearly indicates these are only used for typing.

---

`12-12`: **LGTM! Consistent reordering improves codebase uniformity.**

The reordering of destructured variables, props, and parameters maintains functionality while improving consistency across the codebase. These changes align well with the PR's goal of standardizing code style.



Also applies to: 34-34, 43-44, 55-55, 60-60, 79-79, 84-84

</details>
<details>
<summary>src/rendered/components/Project/components/OpenInMenu/OpenInMenu.tsx (4)</summary>

`1-2`: **LGTM! Comprehensive type-only import improvements.**

Converting multiple imports (`IconName`, `MaybeElement`, `FC`, `GitStatus`, `Project`) to type-only imports is excellent for build optimization and clearly indicates their usage for typing purposes only.



Also applies to: 6-6

---

`32-32`: **LGTM! Cleaner function parameter with type inference.**

Simplifying the default parameter syntax by removing the explicit type annotation is cleaner since TypeScript can infer the string type automatically.

---

`44-44`: **LGTM! Removing unnecessary optional chaining in template literals.**

Removing the optional chaining (`?.`) in template literals makes sense since these values are being used in contexts where they're expected to exist, and the components are already conditionally rendered based on their existence.



Also applies to: 52-52, 67-67, 73-73, 79-79

---

`17-17`: **LGTM! Consistent prop reordering.**

Reordering the destructured props maintains functionality while improving consistency with other components in the codebase.

</details>
<details>
<summary>src/rendered/components/Modals/GitMergeModal/GitMergeModal.tsx (2)</summary>

`2-5`: **Good TypeScript import improvements.**

Converting to explicit type-only imports using the `type` modifier is a best practice that improves build optimization and makes the intent clearer. This aligns well with the PR's goal of improving type usage across components.

---

`15-16`: **Props destructuring reordering looks good.**

The component props and destructuring have been reordered for consistency. The intersection type order and parameter extraction maintain the same functionality while improving readability.

</details>
<details>
<summary>src/rendered/hooks/useModal.tsx (3)</summary>

`1-1`: **ESLint disable comment is appropriately placed.**

The JSX props spreading disable is reasonable here since this is a modal system that needs to forward props dynamically to different modal components.

---

`4-15`: **Excellent import organization improvements.**

The conversion to explicit type-only imports and the reorganization of imports improves code clarity and potentially helps with build optimization. Moving the `zustand` import to the bottom follows a logical grouping pattern.

---

`26-40`: **Union type reordering maintains functionality.**

The reordering of the `ActiveModal` union type members doesn't affect the type's behavior and appears to follow a consistent ordering pattern.

</details>
<details>
<summary>src/types/project.ts (3)</summary>

`1-1`: **Type-only imports are a good improvement.**

Converting to explicit type-only imports using the `type` modifier follows TypeScript best practices and improves build optimization.

---

`3-10`: **GitStatus type restructuring looks well-organized.**

Moving the `GitStatus` type to the top makes it more prominent as a primary export, and the structure with optional properties is clear and well-defined.

---

`21-21`: ```shell
#!/bin/bash
echo "First 25 lines of src/types/project.ts:"
sed -n '1,25p' src/types/project.ts
src/main/libs/integrations/getInstalledApps.ts (3)

3-3: Good use of concise array type syntax.

Using string[] instead of Array<string> is more concise and commonly preferred in TypeScript codebases.


5-6: ESLint disable comment is appropriately used.

The @typescript-eslint/no-explicit-any disable is reasonable here since this function is processing shell command output where the exact types aren't guaranteed. The code maintains type safety at the function boundaries.


10-23: Arrow function conversion improves conciseness.

Converting to an arrow function that directly returns the Promise makes the code more concise while maintaining the same functionality and error handling behavior.

src/rendered/components/Modals/GroupModal/GroupModal.tsx (3)

2-8: Type imports and organization improvements look good.

Converting to explicit type-only imports and reordering imports (moving v4 after type imports) follows good TypeScript practices and improves code organization.


17-18: Props and destructuring reordering maintains functionality.

The intersection type order change and hook destructuring reordering are stylistic improvements that don't affect the component's behavior.


51-53: Explicit if statement improves code clarity.

Converting from a short-circuit expression to an explicit if statement makes the conditional logic more readable and intentional.

src/rendered/components/Project/Project.tsx (3)

2-2: Excellent use of TypeScript type-only imports.

The addition of type modifiers for FC and Project imports improves compilation optimization and makes the intent clearer.

Also applies to: 6-6


32-35: Good refactor to explicit conditional statements.

Replacing short-circuit evaluation with explicit if statements improves readability and makes the intent clearer, especially for side effects like getActions() and refreshPulls().


10-10: Static analysis false positive - ignore Error shadowing warning.

The static analysis tool incorrectly flags the Error import as shadowing the global Error object. This import is actually referencing a local component ./components/Error, not the global Error constructor, so this warning can be safely ignored.

src/types/gitHub.ts (2)

1-2: Good adoption of type-only imports.

Adding type modifiers to these imports improves compilation optimization and clearly indicates these are used only for typing.


4-10: Excellent improvement - removed unnecessary octokit instantiation.

Changing from using an octokit instance to referencing Octokit.prototype.rest directly is much more efficient. This eliminates the need to instantiate octokit just to access type information while maintaining the same type definitions.

src/rendered/components/Modals/TrayStickerModal/TrayStickerModal.tsx (2)

2-2: Good use of type-only imports.

Adding type modifiers for React types and ModalProps follows TypeScript best practices and improves compilation efficiency.

Also applies to: 4-4


6-6: Static analysis false positive - ignore Error shadowing warning.

The Error import here is from ./TrayStickerModal.styles, not shadowing the global Error constructor. This static analysis warning can be safely ignored.

src/rendered/components/Modals/GitResetModal/GitResetModal.tsx (1)

1-2: Consistent type-only import improvements.

Adding type modifiers to Intent, FC, ModalProps, and GitStatus imports maintains consistency with the broader codebase refactoring and follows TypeScript best practices.

Also applies to: 4-5

package.json (2)

8-8: Good script naming conventions.

Renaming startdev and eslintlint follows common npm script conventions and improves clarity.

Also applies to: 13-13


26-77: Verify dependency version compatibility.

The dependency updates look reasonable with mostly minor version bumps, but please ensure these versions are compatible with the new ESLint configuration and don't introduce breaking changes.

#!/bin/bash
# Check for any known security vulnerabilities in the updated dependencies
npm audit --audit-level=moderate

# Verify key dependencies are compatible
echo "Checking TypeScript compatibility..."
npm list typescript

echo "Checking ESLint related packages..."
npm list | grep -E "(eslint|@eslint)"

echo "Checking React version compatibility..."
npm list react react-dom
src/main/libs/integrations/fatal-error.ts (2)

29-32: Function reorganization looks good.

The fatalError function positioning change improves code organization without affecting functionality.


40-46: ```shell
#!/bin/bash

Exhaustive search for forceUnwrap usages to confirm parameter order updates

rg -n "forceUnwrap\s*(" .


</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

import { ExternalEditorError, type FoundEditor } from '../../../types/foundEditor';
import { pathExists } from './path-exists';

const darwin = true;
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Hard-coded darwin flag breaks Windows / Linux support

const darwin = true; forces macOS logic on every platform.

-const darwin = true;
+const darwin = process.platform === 'darwin';

Without this, non-mac users will hit the open command path or incorrect error labels.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const darwin = true;
- const darwin = true;
+ const darwin = process.platform === 'darwin';
🤖 Prompt for AI Agents
In src/main/libs/integrations/editrosLaunch.ts at line 6, the constant darwin is
hard-coded to true, which forces macOS-specific logic on all platforms and
breaks Windows/Linux support. Replace the hard-coded true value with a dynamic
check that sets darwin to true only if the current platform is macOS, typically
by using process.platform === 'darwin'. This will ensure platform-specific code
paths execute correctly based on the actual OS.

Comment on lines +4 to 6
export type DefaultTheme = {
my: string;
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Changing DefaultTheme from interface to type breaks module augmentation

styled-components relies on declaration merging via an interface called DefaultTheme.
Converting it to a type prevents other modules from extending the theme and will produce TypeScript errors (Duplicate identifier 'DefaultTheme') when additional augmentations exist.

-  export type DefaultTheme = {
+  // Keep as interface to allow declaration merging
+  export interface DefaultTheme {
     my: string;
-  }
+  }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export type DefaultTheme = {
my: string;
}
// Keep as interface to allow declaration merging
export interface DefaultTheme {
my: string;
}
🤖 Prompt for AI Agents
In src/rendered/styled.d.ts around lines 4 to 6, revert the DefaultTheme
declaration from a type alias back to an interface to support module
augmentation. Change "export type DefaultTheme" to "export interface
DefaultTheme" so that other modules can extend the theme without TypeScript
errors related to duplicate identifiers.

Comment on lines +4 to 10
type ImportMeta = {
readonly env: ImportMetaEnv;
}

interface ImportMeta {
readonly env: ImportMetaEnv;
type ImportMetaEnv = {
readonly VITE_PUBLIC_URL: string;
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Using type here prevents module augmentation – switch back to interface

ImportMeta and ImportMetaEnv are ambient globals that Vite augments via declaration merging.
Converting them from interfacetype breaks that mechanism because type aliases shadow the
built-in definitions instead of extending them, which can lead to duplicate-identifier or missing-property
errors in downstream code that still relies on the original interfaces.

-type ImportMeta = {
-  readonly env: ImportMetaEnv;
-}
-
-type ImportMetaEnv = {
-  readonly VITE_PUBLIC_URL: string;
-}
+interface ImportMetaEnv {
+  readonly VITE_PUBLIC_URL: string;
+}
+
+interface ImportMeta {
+  readonly env: ImportMetaEnv;
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
type ImportMeta = {
readonly env: ImportMetaEnv;
}
interface ImportMeta {
readonly env: ImportMetaEnv;
type ImportMetaEnv = {
readonly VITE_PUBLIC_URL: string;
}
interface ImportMetaEnv {
readonly VITE_PUBLIC_URL: string;
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}
🤖 Prompt for AI Agents
In src/vite-env.d.ts around lines 4 to 10, replace the type aliases for
ImportMeta and ImportMetaEnv with interface declarations. This change restores
module augmentation support by enabling declaration merging, preventing
shadowing of built-in definitions and avoiding duplicate-identifier or
missing-property errors in downstream code.

Comment on lines +23 to 27
export function assertNonNullable<T>(x: T, message: string): asserts x is NonNullable<T> {
if (x === null) {
return fatalError(message);
} else {
return x;
}
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical bug: Incomplete null/undefined checking in assertion function.

The function documentation states it handles values that "could be null or undefined", but the implementation only checks for null with strict equality (=== null). This means undefined values will pass through without being caught, violating the type assertion contract.

Apply this fix to check for both null and undefined:

-  if (x === null) {
+  if (x == null) {
     return fatalError(message);
   }

Alternatively, use explicit checks for both:

-  if (x === null) {
+  if (x === null || x === undefined) {
     return fatalError(message);
   }
🤖 Prompt for AI Agents
In src/main/libs/integrations/fatal-error.ts around lines 23 to 27, the
assertNonNullable function only checks if x is strictly null but does not check
for undefined, which contradicts its intended behavior of asserting non-nullable
values. Update the condition to check if x is either null or undefined using a
strict equality check for both or a combined check (e.g., x === null || x ===
undefined) before calling fatalError to ensure the assertion correctly handles
both cases.

@egor-xyz egor-xyz merged commit 9bb49c2 into main Jun 26, 2025
1 of 2 checks passed
@egor-xyz egor-xyz deleted the update-packages-26 branch June 26, 2025 10:59
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