Skip to content

Rebuild Electron build system from scratch#84

Closed
saddlepaddle wants to merge 7 commits intomainfrom
desktop-build-audit
Closed

Rebuild Electron build system from scratch#84
saddlepaddle wants to merge 7 commits intomainfrom
desktop-build-audit

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented Nov 15, 2025

Summary

Completely rebuilt the desktop app's build system using electron-vite best practices. Removed fragile environment loading, simplified configurations, and standardized import paths with @/ and ~/ aliases throughout the codebase.

Changes

  • Clean build output to dist/ directory (was in node_modules/.dev/)
  • Fixed workspace package resolution by removing them from optimizeDeps
  • Standardized all 52 files to use consistent path aliases
  • Removed 4 unused dependencies and old backup files
  • Centralized app-specific config files to monorepo root

Verification

Both bun dev and bun run build verified working correctly. Zero TODOs related to build system.

Summary by CodeRabbit

  • Build System Updates

    • Modernized build configuration and streamlined development workflow.
    • Simplified build output structure with standardized directory layout.
    • Removed project configuration complexity and dependencies.
  • Documentation

    • Removed archived setup and configuration guides.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 15, 2025

Warning

Rate limit exceeded

@saddlepaddle has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 33 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 678544a and cfd652c.

📒 Files selected for processing (71)
  • apps/desktop/index.d.ts (1 hunks)
  • apps/desktop/src/main/lib/window-manager.ts (4 hunks)
  • apps/desktop/src/main/lib/window-state-manager.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace-ipcs.ts (2 hunks)
  • apps/desktop/src/main/lib/worktree-manager.ts (1 hunks)
  • apps/desktop/src/main/windows/main.ts (1 hunks)
  • apps/desktop/src/renderer/routes.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/AppFrame/AppFrame.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/DiffView/DiffContent.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/DiffView/DiffContentArea.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/AddTaskModal.tsx (3 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/AddTaskModal/CreatingView.tsx (2 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/AddTaskModal/TaskForm.tsx (4 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/AddTaskModal/TaskList.tsx (4 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/AddTaskModal/index.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/AddTaskModal/types.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/AddTaskModal/useTaskData.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/AddTaskModal/useTaskForm.ts (2 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/AddTaskModal/utils.ts (3 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/NewLayoutMain.tsx (9 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/AddTaskButton.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/ModeToggle.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/TaskTabs.tsx (2 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/WorktreeTabButton.tsx (3 hunks)
  • apps/desktop/src/renderer/screens/main/components/MainContentArea/MainContentArea.tsx (2 hunks)
  • apps/desktop/src/renderer/screens/main/components/MainContentArea/index.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/Sidebar.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/ModeCarousel.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/AnimatedBackground/AnimatedBackground.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/AnimatedBackground/index.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/ModeContent/index.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/ModeHeader/ModeHeader.tsx (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/ModeHeader/index.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/ModeNavigation/ModeNavigation.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/ModeNavigation/index.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/constants.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/hooks/useModeDetection.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/hooks/useScrollProgress.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/hooks/useScrollSnap.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/index.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/types.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeSwitcher/ModeSwitcher.tsx (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeSwitcher/index.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/WorktreeList.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/NewTabButton/index.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/WorktreeItem.tsx (6 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/components/TabItem/TabItem.tsx (2 hunks)
  • apps/desktop/src/renderer/screens/main/components/SidebarOverlay/SidebarOverlay.tsx (2 hunks)
  • apps/desktop/src/renderer/screens/main/components/SidebarOverlay/index.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSelectionModal/WorkspaceSelectionModal.tsx (3 hunks)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSelectionModal/index.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/constants.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useDiffData.ts (2 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useSidebar.ts (0 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useTabs.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useTasks.ts (8 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useWorkspace.ts (2 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useWorktrees.ts (3 hunks)
  • apps/desktop/src/renderer/screens/main/types.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/utils.ts (2 hunks)
  • apps/desktop/src/shared/ipc-channels.ts (0 hunks)
  • apps/desktop/src/shared/ipc-channels/deep-link.ts (0 hunks)
  • apps/desktop/src/shared/ipc-channels/external.ts (0 hunks)
  • apps/desktop/src/shared/ipc-channels/index.ts (1 hunks)
  • apps/desktop/src/shared/ipc-channels/proxy.ts (0 hunks)
  • apps/desktop/src/shared/ipc-channels/tab.ts (1 hunks)
  • apps/desktop/src/shared/ipc-channels/terminal.ts (0 hunks)
  • apps/desktop/src/shared/ipc-channels/types.ts (0 hunks)
  • apps/desktop/src/shared/ipc-channels/window.ts (0 hunks)
  • apps/desktop/src/shared/ipc-channels/workspace.ts (0 hunks)
  • apps/desktop/src/shared/ipc-channels/worktree.ts (0 hunks)

Walkthrough

A large refactoring PR that modernizes the desktop app's build system, applies consistent path alias imports across ~80 files, removes legacy configuration files, and replaces dynamic electron-builder configuration with a TypeScript-based approach. The workspace manager is decomposed into modular components, and the development environment is simplified with a fixed dev port and reduced dynamic environment variable injection.

Changes

Cohort / File(s) Summary
Build System & Configuration
apps/desktop/electron-builder.config.ts, apps/desktop/electron-builder.ts, apps/desktop/electron.vite.config.ts, apps/desktop/tsconfig.json, turbo.jsonc
New TypeScript-based electron-builder configuration added; old electron-builder.ts removed. Electron Vite config simplified: fixed dev port to 4927, removed dynamic env loading, reorganized output directories. tsconfig.json baseUrl changed to "./src", path aliases updated to "@/*" pattern. Turbo build outputs simplified.
Package Configuration
apps/desktop/package.json
Scripts restructured: dev/build/preview now delegate to electron-vite; package/release use electron-builder; added clean/typecheck/format:check. Main entry updated to "./dist/main/index.js". Dependencies removed: cross-env, dotenv, open, rollup-plugin-inject-process-env.
Editor & IDE Config Removed
apps/desktop/.editorconfig, apps/desktop/.npmrc, apps/desktop/.vscode/extensions.json, apps/desktop/.vscode/settings.json, apps/desktop/.github/FUNDING.yml
EditorConfig, VSCode extensions/settings, npm config, and GitHub funding metadata removed.
Project Config Removed
apps/desktop/.gitignore, apps/desktop/components.json
.gitignore emptied; shadcn/ui components.json (style, aliases, tailwind config) removed.
Documentation Removed
apps/desktop/ELECTRON_INSTALL_FIX.md, apps/desktop/docs/DEEP_LINKING.md, apps/desktop/docs/TYPE_SAFE_IPC.md
Electron installation troubleshooting guide, deep-linking protocol guide, and type-safe IPC documentation removed.
Workspace Management Refactored
apps/desktop/src/main/lib/workspace-manager.ts.old, apps/desktop/src/main/lib/workspace/group-cleanup.ts, apps/desktop/src/main/lib/workspace/tab-helpers.ts, apps/desktop/src/main/lib/workspace/tab-operations.ts, apps/desktop/src/main/lib/workspace/workspace-operations.ts, apps/desktop/src/main/lib/workspace/worktree-operations.ts
Old monolithic workspace-manager.ts.old deleted; workspace logic decomposed into modular files (group-cleanup, tab-helpers, tab-operations, workspace-operations, worktree-operations).
Import Path Aliases (Main & Lib)
apps/desktop/src/lib/electron-app/factories/app/setup.ts, apps/desktop/src/lib/electron-app/factories/windows/create.ts, apps/desktop/src/main/index.ts, apps/desktop/src/main/lib/config-manager.ts, apps/desktop/src/main/lib/workspace-ipcs.ts, apps/desktop/src/main/lib/workspace-manager.ts, apps/desktop/src/main/windows/main.ts, apps/desktop/src/preload/index.ts, apps/desktop/src/shared/...
Import paths updated from relative/global paths (shared/types, lib/electron-router-dom, etc.) to project aliases (@/shared/types, @/lib/electron-router-dom, etc.); package.json access pattern refactored to default import in shared/utils.ts.
Import Path Aliases (Renderer UI Components)
apps/desktop/src/renderer/components/ui/{dialog,input,label,separator}.tsx
Import path for cn utility changed from "renderer/lib/utils" to "@/renderer/lib/utils" across UI components.
Import Path Aliases (Renderer Routes & Contexts)
apps/desktop/src/renderer/routes.tsx, apps/desktop/src/renderer/contexts/WorktreeContext.tsx
Router and Worktree type imports updated to use @/ aliases.
Import Path Aliases (Renderer Screens & Layouts)
apps/desktop/src/renderer/screens/main/components/Layout/NewLayoutMain.tsx, apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/{TaskTabs,types}.tsx, apps/desktop/src/renderer/screens/main/components/MainContent/{TabContent,TabGroup}.tsx, apps/desktop/src/renderer/screens/main/components/MainContentArea/MainContentArea.tsx, apps/desktop/src/renderer/screens/main/components/PlanView/{KanbanColumn,PlanView,TaskCard,TaskPage}.tsx
Shared types and UI component imports updated to @/ path aliases across layout, main content, and plan view components.
Import Path Aliases (Renderer Sidebar Components)
apps/desktop/src/renderer/screens/main/components/Sidebar/{Sidebar,SidebarOverlay}.tsx, apps/desktop/src/renderer/screens/main/components/Sidebar/components/.../*
Type imports (Workspace, Worktree, Tab) and UI component imports (Dialog) updated to @/ aliases across Sidebar and all nested modal/carousel/indicator/list/item components.
Import Path Aliases (Renderer Tab & Workspace Content)
apps/desktop/src/renderer/screens/main/components/TabContent/components/{PortTab,PreviewTab}.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceSelectionModal/WorkspaceSelectionModal.tsx, apps/desktop/src/renderer/screens/main/hooks/{useTabs,useTasks,useWorkspace,useWorktrees}.ts, apps/desktop/src/renderer/screens/main/utils.ts
Tab, Workspace, and Worktree type imports, as well as hook and utility references, updated to @/ path aliases.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant DevServer as Dev Server<br/>(Port 4927)
    participant Renderer
    participant IPC
    participant Main
    
    Note over DevServer: Old: Dynamic port via getPortSync()
    Note over DevServer: New: Fixed port 4927, non-strict mode
    
    User->>DevServer: Request app on fixed port 4927
    DevServer->>Renderer: Serve renderer assets from dist/renderer
    Renderer->>IPC: IPC setup (uses `@/` path aliases)
    IPC->>Main: Main process handlers (uses `@/` path aliases)
    Main->>Renderer: Event responses
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Areas requiring extra attention:

  • apps/desktop/electron.vite.config.ts: Complex configuration changes including env handling removal, output directory restructuring, dev server port modification, and plugin ordering
  • apps/desktop/package.json: Script flow rewritten with new delegation pattern to electron-vite; dependency removals may impact tooling (verify no hidden dependencies on removed packages)
  • apps/desktop/electron-builder.config.ts & deletion of electron-builder.ts: Verify new TypeScript config exports correct structure and is properly referenced by build pipeline
  • apps/desktop/tsconfig.json: Path alias changes affect module resolution; confirm "@/" alias is correctly configured and doesn't conflict with existing setup
  • Workspace manager decomposition: Verify that splitting workspace-manager.ts.old into modular files maintains all original functionality and error handling
  • Bulk import alias updates: While repetitive, spot-check a few files from different layers (main, renderer, preload) to ensure consistency and no typos in alias paths

Possibly related PRs

  • start task #49: Modifies TaskPage, TaskCard, and terminal IPC files with functional task-start behavior; overlaps with this PR's import path updates in the same components
  • initial ws #77: Updates makeAppSetup signature in apps/desktop/src/lib/electron-app/factories/app/setup.ts; directly touches the file modified here for import path aliases
  • start tasks and top bar #81: Adds functional changes to useTasks.ts, worktree modules, and related renderer hooks; intersects with this PR's path alias refactoring in the same files

Poem

🐰 With aliases aligned, the paths now shine bright,

@/ prefixes guide us through the import night.

Build scripts simplified, the config runs lean,

Port 4927 steady—the smoothest we've seen! ✨

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'Rebuild Electron build system from scratch' clearly and specifically summarizes the main objective of the changeset, which is a comprehensive rebuild of the build system.
Description check ✅ Passed The PR description includes a clear summary, detailed changes list, and verification section. However, it does not include all template sections: Related Issues, Type of Change, Testing (structured steps), Screenshots, and Additional Notes are missing.

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

saddlepaddle and others added 2 commits November 14, 2025 17:36
Completely rewrote the Electron build configuration using best practices:

- Build outputs now go to dist/ instead of node_modules/.dev/
- Simplified package.json scripts (removed complex pre/post hooks)
- Clean electron.vite.config.ts with proper workspace package handling
- TypeScript electron-builder.config.ts for type safety
- Fixed TSConfig path resolution (baseUrl: "./src")
- Removed fragile environment variable loading
- Updated turbo.jsonc to cache dist/ properly

This fixes the issue where adding new packages would break the build
due to build artifacts living in node_modules.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@superset/ui doesn't have a root "." export (only subpath exports),
so Vite's optimizeDeps.include was failing. Workspace packages that
export raw source files don't need to be pre-bundled - Vite handles
them automatically.

Dev mode now works correctly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@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 (1)
apps/desktop/src/renderer/screens/main/components/SidebarOverlay/SidebarOverlay.tsx (1)

12-12: Update inline import to use the alias path.

The inline type import on line 12 still uses the old path format import("shared/types").Worktree, which is inconsistent with the alias-based imports used elsewhere in this file and across the PR.

Apply this diff to align with the standardized import paths:

-	onUpdateWorktree: (worktreeId: string, updatedWorktree: import("shared/types").Worktree) => void;
+	onUpdateWorktree: (worktreeId: string, updatedWorktree: import("@/shared/types").Worktree) => void;

Alternatively, import the type at the top of the file to avoid inline imports:

-import type { Workspace } from "@/shared/types";
+import type { Workspace, Worktree } from "@/shared/types";

Then update line 12:

-	onUpdateWorktree: (worktreeId: string, updatedWorktree: import("shared/types").Worktree) => void;
+	onUpdateWorktree: (worktreeId: string, updatedWorktree: Worktree) => void;
🧹 Nitpick comments (1)
apps/desktop/electron-builder.config.ts (1)

10-13: Consider reusing appId generation logic.

The appId generation logic here duplicates the logic in apps/desktop/src/shared/utils.ts. Consider importing makeAppId from the shared utilities to maintain DRY principles.

 import { join } from "node:path";
 import type { Configuration } from "electron-builder";
 import pkg from "./package.json";
+import { makeAppId } from "./src/shared/utils";

 const currentYear = new Date().getFullYear();
-const author = pkg.author?.name ?? pkg.author;
-const authorInKebabCase = author.replace(/\s+/g, "-");
-const appId = `com.${authorInKebabCase}.${pkg.name}`.toLowerCase();
+const author = pkg.author?.name ?? pkg.author;
+const appId = makeAppId();

 const config: Configuration = {
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between faeb587 and 7865e71.

📒 Files selected for processing (69)
  • apps/desktop/.editorconfig (0 hunks)
  • apps/desktop/.github/FUNDING.yml (0 hunks)
  • apps/desktop/.gitignore (0 hunks)
  • apps/desktop/.npmrc (0 hunks)
  • apps/desktop/.vscode/extensions.json (0 hunks)
  • apps/desktop/.vscode/settings.json (0 hunks)
  • apps/desktop/ELECTRON_INSTALL_FIX.md (0 hunks)
  • apps/desktop/components.json (0 hunks)
  • apps/desktop/docs/DEEP_LINKING.md (0 hunks)
  • apps/desktop/docs/TYPE_SAFE_IPC.md (0 hunks)
  • apps/desktop/electron-builder.config.ts (1 hunks)
  • apps/desktop/electron-builder.ts (0 hunks)
  • apps/desktop/electron.vite.config.ts (2 hunks)
  • apps/desktop/package.json (1 hunks)
  • apps/desktop/src/lib/electron-app/factories/app/setup.ts (1 hunks)
  • apps/desktop/src/lib/electron-app/factories/windows/create.ts (1 hunks)
  • apps/desktop/src/main/index.ts (2 hunks)
  • apps/desktop/src/main/lib/config-manager.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace-ipcs.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace-manager.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace-manager.ts.old (0 hunks)
  • apps/desktop/src/main/lib/workspace/group-cleanup.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace/tab-helpers.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace/tab-operations.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace/workspace-operations.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace/worktree-operations.ts (1 hunks)
  • apps/desktop/src/main/windows/main.ts (1 hunks)
  • apps/desktop/src/preload/index.ts (1 hunks)
  • apps/desktop/src/renderer/components/ui/dialog.tsx (1 hunks)
  • apps/desktop/src/renderer/components/ui/input.tsx (1 hunks)
  • apps/desktop/src/renderer/components/ui/label.tsx (1 hunks)
  • apps/desktop/src/renderer/components/ui/separator.tsx (1 hunks)
  • apps/desktop/src/renderer/contexts/WorktreeContext.tsx (1 hunks)
  • apps/desktop/src/renderer/routes.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/AddTaskModal.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/NewLayoutMain.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/TaskTabs.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/types.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/MainContent/TabContent.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/MainContent/TabGroup.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/MainContentArea/MainContentArea.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/PlanView/KanbanColumn.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/PlanView/PlanView.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/PlanView/TaskCard.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/PlanView/TaskPage.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/Sidebar.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/CreateWorktreeModal/CreateWorktreeModal.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorkspaceCarousel/WorkspaceCarousel.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorkspacePortIndicator/WorkspacePortIndicator.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorkspaceSwitcher/WorkspaceSwitcher.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/WorktreeList.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/PortIndicator/PortIndicator.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/WorktreeItem.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/components/GitStatusDialog.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/components/TabItem/TabItem.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreePortsList/WorktreePortsList.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/SidebarOverlay/SidebarOverlay.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/TabContent/components/PortTab/PortTab.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/TabContent/components/PreviewTab/PreviewTab.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSelectionModal/WorkspaceSelectionModal.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useTabs.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useTasks.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useWorkspace.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useWorktrees.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/utils.ts (1 hunks)
  • apps/desktop/src/shared/types.ts (1 hunks)
  • apps/desktop/src/shared/utils.ts (1 hunks)
  • apps/desktop/tsconfig.json (1 hunks)
  • turbo.jsonc (1 hunks)
💤 Files with no reviewable changes (12)
  • apps/desktop/ELECTRON_INSTALL_FIX.md
  • apps/desktop/.vscode/extensions.json
  • apps/desktop/.gitignore
  • apps/desktop/electron-builder.ts
  • apps/desktop/.npmrc
  • apps/desktop/docs/TYPE_SAFE_IPC.md
  • apps/desktop/.github/FUNDING.yml
  • apps/desktop/docs/DEEP_LINKING.md
  • apps/desktop/src/main/lib/workspace-manager.ts.old
  • apps/desktop/components.json
  • apps/desktop/.vscode/settings.json
  • apps/desktop/.editorconfig
🔇 Additional comments (64)
apps/desktop/src/renderer/contexts/WorktreeContext.tsx (1)

3-3: LGTM! Import path standardization applied correctly.

The import path has been successfully updated to use the @/ alias, aligning with the codebase-wide refactor. Since both dev and build have been verified as working, this change is confirmed functional.

apps/desktop/src/main/lib/workspace/worktree-operations.ts (1)

6-14: Alias import migration looks correct

The updated imports to @/shared/types and @/shared/utils/slug are consistent with the new alias scheme and do not alter runtime behavior. No further changes needed here.

apps/desktop/src/main/lib/workspace/tab-helpers.ts (1)

2-2: LGTM! Import path updated to use project alias.

The import path has been correctly updated to use the @/ alias, aligning with the project-wide module resolution refactoring.

apps/desktop/src/renderer/screens/main/components/Sidebar/Sidebar.tsx (1)

4-4: LGTM! Import path updated to use project alias.

The type import has been correctly updated to use the @/ alias for consistent module resolution across the codebase.

apps/desktop/src/renderer/screens/main/components/TabContent/components/PreviewTab/PreviewTab.tsx (1)

12-12: LGTM! Import path updated to use project alias.

The type import path has been correctly migrated to use the @/ alias, maintaining consistency with the build system refactoring.

apps/desktop/src/renderer/screens/main/components/PlanView/KanbanColumn.tsx (1)

3-3: LGTM! Import path updated to use project alias.

The type import has been correctly updated to use the @/ alias, consistent with the codebase-wide standardization.

apps/desktop/src/renderer/screens/main/utils.ts (1)

1-1: LGTM! Import path updated to use project alias.

The type import has been correctly migrated to the @/ alias pattern, aligning with the build system modernization.

turbo.jsonc (1)

10-10: LGTM! Build output consolidated to dist/ directory.

The build outputs have been correctly simplified to use the single dist/** path, consistent with the cleaned-up build system. This removes the previous fragmented output directories and aligns with the electron-vite best practices implementation.

apps/desktop/src/main/lib/workspace/tab-operations.ts (1)

3-10: LGTM! Import path updated to use project alias.

The type imports have been correctly updated to use the @/ alias on line 10, maintaining consistency with the project-wide module resolution standardization.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/WorktreeItem.tsx (1)

29-30: LGTM! Import paths updated to use project aliases.

Both import statements have been correctly migrated to use the @/ alias pattern—@/renderer/components/ui/dialog for UI components and @/shared/types for shared type definitions. This aligns with the standardized module resolution strategy across the codebase.

apps/desktop/tsconfig.json (2)

19-23: LGTM! Path alias configuration is well-structured.

The new path mappings correctly establish the foundation for the alias-based import strategy:

  • @/ resolves to ./src/ for application code
  • ~/ resolves to the monorepo root for cross-package imports

This aligns perfectly with the systematic import path updates across the codebase.


28-28: LGTM! Include path updated correctly.

The update from electron-builder.ts to electron-builder.config.ts aligns with the config file migration mentioned in the PR objectives.

apps/desktop/src/renderer/screens/main/components/TabContent/components/PortTab/PortTab.tsx (1)

4-4: LGTM! Import path updated correctly.

The migration from "shared/types" to "@/shared/types" is consistent with the project-wide alias strategy.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/components/GitStatusDialog.tsx (1)

4-11: LGTM! Dialog import correctly migrated to alias path.

The update to @/renderer/components/ui/dialog follows the consistent alias pattern used throughout this refactor.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/PortIndicator/PortIndicator.tsx (1)

9-9: LGTM! Type import updated correctly.

Consistent alias-based import migration.

apps/desktop/src/main/lib/workspace/workspace-operations.ts (1)

3-8: LGTM! Main process imports correctly migrated.

The alias-based import works correctly in the main process, confirming the path resolution is properly configured for both renderer and main contexts.

apps/desktop/src/renderer/screens/main/hooks/useTasks.ts (1)

2-2: LGTM! Hook import path updated correctly.

Consistent with the project-wide alias migration.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/components/TabItem/TabItem.tsx (1)

18-18: LGTM! Type imports correctly updated.

Follows the consistent alias pattern used throughout this refactor.

apps/desktop/src/preload/index.ts (1)

2-6: LGTM! Preload context imports correctly migrated.

The alias resolution working in the preload script confirms that the path configuration is properly set up across all Electron contexts (main, renderer, and preload).

apps/desktop/src/lib/electron-app/factories/windows/create.ts (1)

3-4: LGTM! Import paths successfully migrated to aliases.

The import paths have been correctly updated to use the @/ alias prefix, aligning with the project-wide standardization effort.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/CreateWorktreeModal/CreateWorktreeModal.tsx (1)

11-15: LGTM! UI component and type imports properly aliased.

All import paths have been correctly migrated to use the @/ alias, maintaining consistency with the broader refactoring effort.

apps/desktop/src/shared/types.ts (1)

3-3: LGTM! Type import correctly updated to alias path.

The import path for registerRoute has been properly migrated to the @/ alias format.

apps/desktop/src/renderer/screens/main/components/SidebarOverlay/SidebarOverlay.tsx (1)

1-1: LGTM! Top-level import updated correctly.

The Workspace type import has been properly migrated to use the @/shared/types alias.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorkspaceCarousel/WorkspaceCarousel.tsx (1)

9-9: LGTM! Type import migrated to alias path.

The Workspace type import has been correctly updated to use the @/shared/types alias.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorkspaceSwitcher/WorkspaceSwitcher.tsx (1)

12-12: LGTM! Type import correctly aliased.

The Workspace type import has been properly migrated to the @/shared/types alias path.

apps/desktop/src/main/lib/config-manager.ts (1)

5-5: LGTM! Type import updated to alias path.

The WorkspaceConfig type import has been correctly migrated to use the @/shared/types alias.

apps/desktop/src/renderer/screens/main/hooks/useWorktrees.ts (1)

2-2: LGTM! Type imports migrated to alias path.

The Workspace and Worktree type imports have been correctly updated to use the @/shared/types alias.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/WorktreeList.tsx (1)

3-3: LGTM! Alias-based import standardization.

The import path update to @/shared/types aligns with the project-wide migration to standardized path aliases described in the PR objectives.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorkspacePortIndicator/WorkspacePortIndicator.tsx (1)

9-9: LGTM! Alias-based import standardization.

The import path update to @/shared/types aligns with the project-wide migration to standardized path aliases.

apps/desktop/src/renderer/screens/main/components/Layout/AddTaskModal.tsx (1)

30-30: LGTM! Alias-based import standardization.

The import path update to @/shared/types aligns with the project-wide migration to standardized path aliases.

apps/desktop/src/renderer/screens/main/components/MainContentArea/MainContentArea.tsx (1)

8-8: LGTM! Alias-based import standardization.

The import path update to @/shared/types aligns with the project-wide migration to standardized path aliases.

apps/desktop/src/renderer/screens/main/hooks/useWorkspace.ts (1)

2-2: LGTM! Alias-based import standardization.

The import path update to @/shared/types aligns with the project-wide migration to standardized path aliases.

apps/desktop/src/renderer/screens/main/components/Layout/NewLayoutMain.tsx (1)

9-9: LGTM! Alias-based import standardization.

The import path update to @/shared/types aligns with the project-wide migration to standardized path aliases.

apps/desktop/src/renderer/routes.tsx (1)

1-1: LGTM! Alias-based import standardization.

The import path update to @/lib/electron-router-dom aligns with the project-wide migration to standardized path aliases.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreePortsList/WorktreePortsList.tsx (1)

4-4: LGTM! Alias-based import standardization.

The import path update to @/shared/types aligns with the project-wide migration to standardized path aliases.

apps/desktop/src/main/windows/main.ts (1)

4-7: LGTM! Clean path alias migration.

The import updates use @/ for internal modules and ~/ for root-level files (package.json), aligning with the build system refactor. Destructuring displayName from pkg is the correct approach.

apps/desktop/src/main/lib/workspace/group-cleanup.ts (1)

1-1: LGTM!

Type import correctly updated to use the @/ path alias.

apps/desktop/src/renderer/screens/main/components/MainContent/TabContent.tsx (1)

2-2: LGTM!

Type import correctly updated to use the @/ path alias, consistent with the build system refactor.

apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/types.ts (1)

1-1: LGTM!

Type import correctly updated to use the @/ path alias.

apps/desktop/src/renderer/screens/main/components/WorkspaceSelectionModal/WorkspaceSelectionModal.tsx (1)

4-5: LGTM!

Import paths correctly updated to use @/ aliases for both UI components and shared types, consistent with the build system refactor.

apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/TaskTabs.tsx (1)

11-11: LGTM!

Dialog component import correctly updated to use the @/ path alias.

apps/desktop/src/renderer/screens/main/components/MainContent/TabGroup.tsx (1)

9-9: LGTM!

Type import correctly updated to use the @/ path alias, consistent with the build system refactor.

apps/desktop/src/renderer/screens/main/components/PlanView/TaskPage.tsx (1)

5-5: LGTM!

Type import correctly updated to use the @/ path alias, aligning with the project-wide build system refactor.

apps/desktop/src/renderer/screens/main/hooks/useTabs.ts (1)

1-1: LGTM! Import path updated to use project alias.

The import path has been correctly updated to use the @/ alias, aligning with the project-wide standardization of import paths.

apps/desktop/src/main/lib/workspace-ipcs.ts (1)

10-10: LGTM! Import path updated to use project alias.

The import path has been correctly updated to use the @/ alias for shared types, maintaining consistency with the broader path alias refactor.

apps/desktop/src/renderer/components/ui/label.tsx (1)

4-4: LGTM! Import path updated to use project alias.

The import path has been correctly updated to use the @/ alias, consistent with the standardization across UI components.

apps/desktop/src/renderer/components/ui/separator.tsx (1)

3-3: LGTM! Import path updated to use project alias.

The import path has been correctly updated to use the @/ alias for the utility function.

apps/desktop/src/renderer/components/ui/input.tsx (1)

3-3: LGTM! Import path updated to use project alias.

The import path has been correctly updated to use the @/ alias, maintaining consistency with other UI components.

apps/desktop/src/main/lib/workspace-manager.ts (1)

11-11: LGTM! Import path updated to use project alias.

The import path has been correctly updated to use the @/ alias for shared types, consistent with the project-wide path alias standardization.

apps/desktop/src/renderer/screens/main/components/PlanView/PlanView.tsx (1)

5-5: LGTM! Import path updated to use project alias.

The import path has been correctly updated to use the @/ alias for shared types, aligning with the standardized import structure.

apps/desktop/src/renderer/screens/main/components/PlanView/TaskCard.tsx (1)

5-5: LGTM! Import path updated to use project alias.

The import path has been correctly updated to use the @/ alias, consistent with the broader refactor across the codebase.

apps/desktop/src/main/index.ts (2)

3-9: LGTM! Import path standardization.

The migration to @/ alias-based imports is clean and consistent with the PR's objective to standardize import paths across the codebase.


46-47: LGTM! Dynamic import updated correctly.

The dynamic import correctly uses the @/ alias and maintains the same functionality.

apps/desktop/src/renderer/components/ui/dialog.tsx (1)

5-5: LGTM! Consistent alias usage.

The import path update aligns with the project-wide migration to @/ aliases.

apps/desktop/src/lib/electron-app/factories/app/setup.ts (1)

7-9: LGTM! Import standardization.

The import paths have been successfully migrated to use @/ aliases, maintaining consistency with the broader refactoring effort.

apps/desktop/electron.vite.config.ts (4)

72-75: Good addition: React deduplication for workspace packages.

The dedupe configuration for react and react-dom is essential when using workspace packages to prevent multiple React instances, which can cause hooks errors and other runtime issues.


16-16: LGTM! Standardized output to dist/ directory.

The hardcoded output directories (dist/main, dist/preload, dist/renderer) align with the PR objective to clean up build output and the package.json main field update to ./dist/main/index.js.

Also applies to: 28-28, 64-64


61-61: Directory exists and contains public assets — verification passed.

The public assets directory at src/resources/public has been confirmed to exist and contains the expected public asset (illustration.svg). The configuration is correct.


35-36: I need to gather more information about the actual module type and electron-vite's handling of __dirname. Let me verify further:

I need to verify the module type configuration and the full context of the config file:

Now let me check the actual package.json and config file structure:

The review comment is based on a misunderstanding of how electron-vite handles __dirname in config files.

electron-vite is explicitly documented as compatible with CommonJS syntax including __dirname, with no need to fix these syntax problems. More specifically, electron-vite supports config files suffixed with .ts, and electron-vite is compatible with __dirname and there is no need to fix these syntax problems during migration.

The key distinction is that configuration files are build-time tooling, not runtime code. electron-vite's own documentation shows __dirname being used directly in config files, demonstrating this is a supported pattern.

However, the review comment raises a valid general concern: if your actual runtime code (not the config file) uses __dirname in an ESM context with "type": "module" in package.json, then that code would need to use import.meta.url with fileURLToPath. You should verify whether __dirname is used in runtime Electron code (main process, preload scripts, etc.), as those would require the suggested fix.

Likely an incorrect or invalid review comment.

apps/desktop/electron-builder.config.ts (2)

15-88: LGTM! Comprehensive Electron Builder configuration.

The configuration is well-structured with appropriate settings for all platforms (macOS, Linux, Windows), deep linking support, and sensible build optimizations. The TypeScript migration from the old electron-builder.js improves type safety.


23-23: Resource paths verified and correctly configured.

Verification confirms all resource paths referenced in the electron-builder configuration exist and are accessible:

  • Build resources directory: apps/desktop/src/resources/build
  • Icon files present: icon.icns, icon.ico

No action required.

apps/desktop/package.json (3)

6-6: LGTM! Main entry point updated correctly.

The main field now correctly points to the new dist/main/index.js output, aligning with the electron.vite.config.ts build output directory.


14-25: LGTM! Streamlined scripts with electron-vite and bun.

The script reorganization simplifies the build workflow by:

  • Using electron-vite for dev, build, and preview
  • Leveraging bun for fast execution
  • Removing complex multi-step processes

This aligns well with the PR objective to simplify the build system.


27-77: Removed dependencies are confirmed unused.

Verification complete: cross-env, dotenv, open, and rollup-plugin-inject-process-env are not referenced anywhere in the codebase. The removal is safe.

Comment thread apps/desktop/src/shared/utils.ts
saddlepaddle and others added 3 commits November 14, 2025 17:37
Converted all bare imports to use path aliases for consistency:
- @/* for src/ imports (e.g., @/main/lib/...)
- ~/* for root imports (e.g., ~/package.json)

This improves IDE autocomplete and makes import paths more explicit.
All 52 files updated to use the new import convention.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Removed:
- cross-env (no longer used in scripts)
- dotenv (using Vite's envDir instead)
- rollup-plugin-inject-process-env (removed from config)
- open (not imported anywhere)
- ELECTRON_INSTALL_FIX.md (outdated documentation)
- src/main/lib/workspace-manager.ts.old (old backup file)

Build and dev mode still work correctly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Removed files that should be at monorepo root or aren't needed:
- .editorconfig, .npmrc (not used with Bun)
- .vscode/, .github/ (root handles these)
- components.json (belongs in packages/ui)
- docs/ (TYPE_SAFE_IPC.md, DEEP_LINKING.md)
- .gitignore (root has this)

Kept only essential app-specific files:
- electron.vite.config.ts
- electron-builder.config.ts
- tsconfig.json
- index.d.ts (webview types)
- package.json
- trusted-dependencies-scripts.json

Build verified working after cleanup.
- Prefix unused variables/parameters with underscore
- Fix module augmentation false positive for ImportMeta
- Auto-fixed 70+ files with biome check --write

Note: Remaining lint/typecheck errors are pre-existing from main branch
Copy link
Copy Markdown
Contributor

@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 (1)
apps/desktop/src/renderer/screens/main/components/PlanView/TaskPage.tsx (1)

179-179: Fix missing arguments to onTabCreated() call.

The pipeline failure indicates onTabCreated() expects 2 arguments (worktreeId: string, tab: Tab) per the prop type at line 26, but is called with 0 arguments.

Apply this diff:

-				await onTabCreated();
+				await onTabCreated(targetWorktreeId, result.tab);
♻️ Duplicate comments (1)
apps/desktop/src/shared/utils.ts (1)

1-6: Guard against pkg.author being null/non‑string (startup crash risk)

pkg.author can be null, a string, or an object. As written:

  • pkg.author.name will throw if pkg.author is null/undefined.
  • author.replace(...) will throw if author is not a string.

Per previous review context, the root package.json currently has author: null, so this will crash at startup when apps/desktop/src/shared/utils.ts is loaded.

Normalize pkg.author to a safe string (object → .name, string → itself, anything else → fallback) before calling .replace, and also give pkg.name a fallback.

Here’s a concrete fix:

-import pkg from "~/package.json";
-
-const author = pkg.author.name ?? pkg.author;
-const name = pkg.name;
-const authorInKebabCase = author.replace(/\s+/g, "-");
-const appId = `com.${authorInKebabCase}.${name}`.toLowerCase();
+import pkg from "~/package.json";
+
+const rawAuthor = pkg.author;
+const author =
+	typeof rawAuthor === "string"
+		? rawAuthor
+		: rawAuthor &&
+			typeof rawAuthor === "object" &&
+			"name" in rawAuthor &&
+			typeof (rawAuthor as { name?: unknown }).name === "string"
+			? (rawAuthor as { name: string }).name
+			: "unknown-author";
+const name = typeof pkg.name === "string" ? pkg.name : "app";
+const authorInKebabCase = author.replace(/\s+/g, "-");
+const appId = `com.${authorInKebabCase}.${name}`.toLowerCase();
🧹 Nitpick comments (1)
apps/desktop/src/renderer/screens/main/components/TabContent/components/PreviewTab/PreviewTab.tsx (1)

212-213: Use the getStorageKey helper consistently.

The getStorageKey helper function is defined at line 80 but these locations use hardcoded storage key strings instead. For better maintainability and DRY compliance, use the helper consistently throughout the component.

Apply this diff to use the helper:

-			try {
-				const storageKey = `preview-tab-${tab.id}-url`;
-				sessionStorage.setItem(storageKey, normalized);
+			try {
+				sessionStorage.setItem(getStorageKey("url"), normalized);

And at line 358:

-			try {
-				const storageKey = `preview-tab-${tab.id}-url`;
-				sessionStorage.setItem(storageKey, url);
+			try {
+				sessionStorage.setItem(getStorageKey("url"), url);

Also applies to: 358-359

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7865e71 and 678544a.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (68)
  • apps/desktop/.editorconfig (0 hunks)
  • apps/desktop/.github/FUNDING.yml (0 hunks)
  • apps/desktop/.gitignore (0 hunks)
  • apps/desktop/.npmrc (0 hunks)
  • apps/desktop/.vscode/extensions.json (0 hunks)
  • apps/desktop/.vscode/settings.json (0 hunks)
  • apps/desktop/ELECTRON_INSTALL_FIX.md (0 hunks)
  • apps/desktop/components.json (0 hunks)
  • apps/desktop/docs/DEEP_LINKING.md (0 hunks)
  • apps/desktop/docs/TYPE_SAFE_IPC.md (0 hunks)
  • apps/desktop/electron-builder.config.ts (1 hunks)
  • apps/desktop/electron-builder.ts (0 hunks)
  • apps/desktop/electron.vite.config.ts (2 hunks)
  • apps/desktop/package.json (1 hunks)
  • apps/desktop/src/lib/electron-app/factories/app/setup.ts (1 hunks)
  • apps/desktop/src/lib/electron-app/factories/windows/create.ts (1 hunks)
  • apps/desktop/src/main/index.ts (2 hunks)
  • apps/desktop/src/main/lib/config-manager.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace-ipcs.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace-manager.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace-manager.ts.old (0 hunks)
  • apps/desktop/src/main/lib/workspace/group-cleanup.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace/tab-helpers.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace/tab-operations.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace/workspace-operations.ts (1 hunks)
  • apps/desktop/src/main/lib/workspace/worktree-operations.ts (1 hunks)
  • apps/desktop/src/main/windows/main.ts (1 hunks)
  • apps/desktop/src/preload/index.ts (1 hunks)
  • apps/desktop/src/renderer/components/ui/dialog.tsx (1 hunks)
  • apps/desktop/src/renderer/components/ui/input.tsx (1 hunks)
  • apps/desktop/src/renderer/components/ui/label.tsx (1 hunks)
  • apps/desktop/src/renderer/components/ui/separator.tsx (1 hunks)
  • apps/desktop/src/renderer/contexts/WorktreeContext.tsx (1 hunks)
  • apps/desktop/src/renderer/routes.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/NewLayoutMain.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/TaskTabs.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/types.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/MainContent/TabContent.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/MainContent/TabGroup.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/MainContentArea/MainContentArea.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/PlanView/KanbanColumn.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/PlanView/PlanView.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/PlanView/TaskCard.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/PlanView/TaskPage.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/Sidebar.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/CreateWorktreeModal/CreateWorktreeModal.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorkspaceCarousel/WorkspaceCarousel.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorkspacePortIndicator/WorkspacePortIndicator.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorkspaceSwitcher/WorkspaceSwitcher.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/WorktreeList.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/PortIndicator/PortIndicator.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/WorktreeItem.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/components/GitStatusDialog.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/components/TabItem/TabItem.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreePortsList/WorktreePortsList.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/SidebarOverlay/SidebarOverlay.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/TabContent/components/PortTab/PortTab.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/TabContent/components/PreviewTab/PreviewTab.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSelectionModal/WorkspaceSelectionModal.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useTabs.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useTasks.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useWorkspace.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/hooks/useWorktrees.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/utils.ts (1 hunks)
  • apps/desktop/src/shared/types.ts (1 hunks)
  • apps/desktop/src/shared/utils.ts (1 hunks)
  • apps/desktop/tsconfig.json (1 hunks)
  • turbo.jsonc (1 hunks)
💤 Files with no reviewable changes (12)
  • apps/desktop/components.json
  • apps/desktop/.vscode/settings.json
  • apps/desktop/.editorconfig
  • apps/desktop/docs/TYPE_SAFE_IPC.md
  • apps/desktop/src/main/lib/workspace-manager.ts.old
  • apps/desktop/electron-builder.ts
  • apps/desktop/.gitignore
  • apps/desktop/ELECTRON_INSTALL_FIX.md
  • apps/desktop/.vscode/extensions.json
  • apps/desktop/.npmrc
  • apps/desktop/.github/FUNDING.yml
  • apps/desktop/docs/DEEP_LINKING.md
✅ Files skipped from review due to trivial changes (3)
  • apps/desktop/src/main/lib/config-manager.ts
  • apps/desktop/src/main/lib/workspace-ipcs.ts
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/WorktreeItem.tsx
🚧 Files skipped from review as they are similar to previous changes (36)
  • apps/desktop/src/renderer/components/ui/label.tsx
  • apps/desktop/src/renderer/screens/main/components/Layout/NewLayoutMain.tsx
  • apps/desktop/src/renderer/screens/main/hooks/useWorktrees.ts
  • apps/desktop/src/renderer/screens/main/components/TabContent/components/PortTab/PortTab.tsx
  • apps/desktop/src/renderer/screens/main/hooks/useTabs.ts
  • apps/desktop/src/main/lib/workspace/group-cleanup.ts
  • apps/desktop/src/main/index.ts
  • apps/desktop/src/renderer/screens/main/hooks/useWorkspace.ts
  • apps/desktop/src/renderer/contexts/WorktreeContext.tsx
  • apps/desktop/src/renderer/screens/main/components/Sidebar/Sidebar.tsx
  • apps/desktop/src/renderer/screens/main/components/MainContent/TabContent.tsx
  • apps/desktop/src/renderer/components/ui/separator.tsx
  • apps/desktop/src/renderer/screens/main/components/PlanView/KanbanColumn.tsx
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorkspacePortIndicator/WorkspacePortIndicator.tsx
  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/renderer/components/ui/dialog.tsx
  • apps/desktop/src/shared/types.ts
  • apps/desktop/src/renderer/screens/main/utils.ts
  • apps/desktop/src/main/lib/workspace/tab-helpers.ts
  • apps/desktop/src/main/lib/workspace/workspace-operations.ts
  • apps/desktop/src/renderer/screens/main/components/PlanView/PlanView.tsx
  • apps/desktop/src/renderer/screens/main/components/MainContent/TabGroup.tsx
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/PortIndicator/PortIndicator.tsx
  • apps/desktop/src/renderer/screens/main/components/MainContentArea/MainContentArea.tsx
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/WorktreeList.tsx
  • apps/desktop/src/main/windows/main.ts
  • apps/desktop/src/renderer/screens/main/components/PlanView/TaskCard.tsx
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/CreateWorktreeModal/CreateWorktreeModal.tsx
  • turbo.jsonc
  • apps/desktop/src/renderer/components/ui/input.tsx
  • apps/desktop/src/main/lib/workspace/worktree-operations.ts
  • apps/desktop/src/main/lib/workspace-manager.ts
  • apps/desktop/src/renderer/screens/main/components/SidebarOverlay/SidebarOverlay.tsx
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorkspaceCarousel/WorkspaceCarousel.tsx
  • apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/types.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSelectionModal/WorkspaceSelectionModal.tsx
🧰 Additional context used
🪛 GitHub Actions: CI
apps/desktop/src/renderer/screens/main/components/PlanView/TaskPage.tsx

[error] 179-179: TS2554: Expected 2 arguments, but got 0.

🔇 Additional comments (19)
apps/desktop/src/main/lib/workspace/tab-operations.ts (1)

10-10: LGTM! Import path standardization applied correctly.

The change from "shared/types" to "@/shared/types" aligns with the PR's objective to standardize import paths using the @/ alias across the codebase.

apps/desktop/src/renderer/screens/main/components/TabContent/components/PreviewTab/PreviewTab.tsx (1)

12-12: LGTM! Path alias migration looks correct.

The import path update from "shared/types" to "@/shared/types" aligns with the PR's objective to standardize module resolution using path aliases. Since the PR reports successful verification with both dev and build commands, the alias configuration is properly set up.

apps/desktop/src/renderer/screens/main/hooks/useTasks.ts (1)

2-2: LGTM! Clean import alias refactor.

The import path update from "shared/types" to "@/shared/types" aligns with the PR's standardization objectives and has been verified through successful dev and build testing.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/components/TabItem/TabItem.tsx (1)

18-18: LGTM! Path alias update aligns with build system modernization.

The import path update to use the @/ alias is part of the project-wide standardization effort and correctly resolves the types.

apps/desktop/src/renderer/screens/main/components/PlanView/TaskPage.tsx (1)

5-5: LGTM! Path alias update aligns with build system modernization.

The import path update to use the @/ alias is part of the project-wide standardization effort and correctly resolves the types.

apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/TaskTabs.tsx (1)

11-11: LGTM! Path alias update aligns with build system modernization.

The import path update to use the @/ alias is part of the project-wide standardization effort and correctly resolves the Dialog components.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorkspaceSwitcher/WorkspaceSwitcher.tsx (1)

12-12: LGTM! Path alias update aligns with build system modernization.

The import path update to use the @/ alias is part of the project-wide standardization effort and correctly resolves the Workspace type.

apps/desktop/tsconfig.json (2)

19-23: LGTM! TypeScript configuration correctly supports path aliases.

The baseUrl and paths configuration correctly enables @/ (src-relative) and ~/ (monorepo root-relative) aliases used throughout the codebase. This aligns with the build system modernization objectives.


28-28: LGTM! Config file reference updated correctly.

The include path correctly references the new electron-builder.config.ts file mentioned in the PR objectives, replacing the old electron-builder.ts.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreeItem/components/GitStatusDialog.tsx (1)

11-11: LGTM! Path alias update aligns with build system modernization.

The import path update to use the @/ alias is part of the project-wide standardization effort and correctly resolves the Dialog components.

apps/desktop/src/renderer/screens/main/components/Sidebar/components/WorktreeList/components/WorktreePortsList/WorktreePortsList.tsx (1)

4-4: LGTM! Path alias update aligns with build system modernization.

The import path update to use the @/ alias is part of the project-wide standardization effort and correctly resolves the Worktree type.

apps/desktop/src/renderer/routes.tsx (1)

1-1: LGTM! Path alias update aligns with build system modernization.

The import path update to use the @/ alias is part of the project-wide standardization effort and correctly resolves the Router module.

apps/desktop/src/preload/index.ts (1)

2-6: Alias import switch looks correct

Using @/shared/ipc-channels here aligns with the repo-wide aliasing strategy and doesn’t change runtime behavior. No issues.

apps/desktop/src/lib/electron-app/factories/app/setup.ts (1)

7-9: Imports updated to alias paths without behavior change

The switch to @/… aliases for terminalManager, ENVIRONMENT/PLATFORM, and makeAppId is consistent with the new path strategy and keeps runtime behavior the same.

apps/desktop/electron.vite.config.ts (1)

1-76: Build/output restructuring in electron-vite config is correctly wired

Verification confirms the outDir paths are consistent across configs: package.json's main field points to ./dist/main/index.js, electron-vite.config.ts outputs to dist/main|preload|renderer, and electron-builder.config.ts captures them with dist/**/*. No functional issues detected.

apps/desktop/package.json (4)

6-6: Main entry path aligns with new build output structure.

Updated to ./dist/main/index.js, consistent with the PR's consolidation of build output to dist/ rather than node_modules/.dev/. This assumes electron-vite is configured to output main to dist/main/index.js and that the Electron Builder config references this correctly.


14-19: Scripts successfully reorganized for electron-vite workflow.

The new scripts cleanly separate concerns:

  • Lines 14–16: electron-vite commands (dev, build, preview)
  • Lines 17–19: Packaging orchestrated as bun run build && electron-builder[...]

This replaces the fragile environment-based setup and removes the need for cross-platform and environment-injection tooling. Script chaining is sound: package and release both call bun run build first (invoking line 15's electron-vite build), ensuring a fresh build before packaging.


21-21: Clean script appropriately added.

The clean script removes the dist/ output directory and is needed to support the new build structure. rimraf is present in devDependencies (line 70).


27-77: Dependency footprint appropriately streamlined.

Four unused dependencies removed (cross-env, dotenv, open, rollup-plugin-inject-process-env), aligning with the PR's elimination of fragile environment loading and dynamic environment variable injection. Key build dependencies are retained:

  • electron-vite (line 69), vite (line 75) for the new build system
  • tsx (line 73) for TypeScript config execution
  • electron-builder (line 67) for packaging

Comment thread apps/desktop/electron-builder.config.ts
@Kitenite Kitenite deleted the desktop-build-audit branch November 21, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant