Skip to content

Fix modal#63

Merged
Kitenite merged 2 commits intomainfrom
fix-modal
Nov 11, 2025
Merged

Fix modal#63
Kitenite merged 2 commits intomainfrom
fix-modal

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Nov 11, 2025

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

  • Style

    • Removed top border styling from the main content container for a cleaner interface appearance.
  • Refactor

    • Restructured task tabs component architecture for improved maintainability and modularity.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 11, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request refactors the TaskTabs component by decomposing it into a modular directory structure with specialized sub-components (SidebarToggle, ModeToggle, PRActions, WorktreeTab variants) and a shared types file. The public API (TaskTabsProps, WorktreeWithTask) is preserved. NewLayoutMain.tsx receives minor styling updates (border removal) and import reorganization. No behavioral changes to the component's runtime logic.

Changes

Cohort / File(s) Summary
TaskTabs Refactoring – Old Location
apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs.tsx
Deleted original monolithic TaskTabs component and its exported interfaces (WorktreeWithTask, TaskTabsProps). Functionality redistributed across new modular sub-components.
TaskTabs Refactoring – New Directory
apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/*
New modular structure: TaskTabs.tsx (main component), SidebarToggle.tsx, ModeToggle.tsx, PRActions.tsx, WorktreeTab.tsx, WorktreeTabButton.tsx, BasicWorktreeContent.tsx, TaskWorktreeContent.tsx, PendingWorktreeContent.tsx, AddTaskButton.tsx, types.ts, utils.ts, index.ts. Breaks down UI logic into focused, reusable components with shared types and utilities.
NewLayoutMain UI Adjustment
apps/desktop/src/renderer/screens/main/components/NewLayout/NewLayoutMain.tsx
Minor visual styling (removes border-t border-neutral-700 from main container) and import reorganization (WorktreeProvider, TaskTabs placement). No behavioral change.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

  • Attention areas:
    • Verify that the new types.ts correctly captures all required properties for WorktreeWithTask (isPending, task metadata) and TaskTabsProps (all event handlers and state props).
    • Review WorktreeTab.tsx conditional rendering logic to ensure all three content states (pending, task-present, basic) are correctly handled and mutually exclusive.
    • Confirm PRActions.tsx tooltip and disabled-state logic align with canCreatePR and hasPR conditions.
    • Validate that the refactored TaskTabs.tsx properly composes all sub-components and preserves parent callback handling (onWorktreeSelect, onAddTask, onCreatePR, onMergePR, onModeChange).
    • Check that getStatusLabel utility in utils.ts covers all TaskStatus variants without gaps or duplicates.

Possibly related PRs

  • Pr button #52: Implements the end-to-end PR create/merge feature (UI through TaskTabs/NewLayoutMain and backend IPC/WorktreeManager support), directly related to this PR's PRActions component and PR callback handlers.
  • start task #49: Modifies NewLayoutMain.tsx PlanView prop updates, shares the same file as this PR's styling and import changes.
  • made pending #48: Adds isPending and pending-worktree UI/logic handling to TaskTabs and WorktreeWithTask, which this PR refactors into PendingWorktreeContent.tsx and the new types structure.

Poem

🐰 A warren of components, once tangled and tight,
Now nest in a folder, each one just right!
Sub-tabs and toggles, all split and refined—
A modular home where the UI's aligned.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-modal

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c736e4 and b909af9.

📒 Files selected for processing (15)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/NewLayoutMain.tsx (6 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs.tsx (0 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/AddTaskButton.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/BasicWorktreeContent.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/ModeToggle.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/PRActions.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/PendingWorktreeContent.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/SidebarToggle.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/TaskTabs.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/TaskWorktreeContent.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/WorktreeTab.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/WorktreeTabButton.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/index.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/types.ts (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/utils.ts (1 hunks)

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

@Kitenite Kitenite merged commit 4492b5e into main Nov 11, 2025
1 of 5 checks passed
@Kitenite Kitenite deleted the fix-modal branch November 11, 2025 23:26
@Kitenite Kitenite mentioned this pull request Nov 11, 2025
5 tasks
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