Skip to content

update tabs ui#76

Merged
Kitenite merged 2 commits intomainfrom
tabs-ui
Nov 13, 2025
Merged

update tabs ui#76
Kitenite merged 2 commits intomainfrom
tabs-ui

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Nov 12, 2025

Summary by CodeRabbit

  • Style
    • Refined task tabs layout: clearer visual separation with updated dividers, tighter spacing, and adjusted selected/unselected tab borders.
    • Updated tab button visuals: revised border and background states for selected and unselected tabs.
    • Smaller animated carousel control: reduced size and adjusted movement for a tighter UI.
    • Simplified mode navigation: compact native buttons with streamlined hover/active states and removed tooltip overlays.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 12, 2025

Walkthrough

Refactors TaskTabs rendering to add conditional 1px dividers between tabs and updates WorktreeTabButton border/background states; replaces hasPR check with optional chaining. Also reduces ModeCarousel button size and simplifies ModeNavigation by removing Tooltip/Button libs and using native buttons with adjusted styling.

Changes

Cohort / File(s) Summary
Task Tabs & Tab Button
apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/TaskTabs.tsx, apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/WorktreeTabButton.tsx
TaskTabs now renders tabs in a split structure with per-item wrappers that may render a 1px divider based on current and previous selection state; container gap reduced from 1 to 0. hasPR replaced with selectedWorktree?.prUrl. WorktreeTabButton styling updated: base border classes moved, selected/unselected border/background classes adjusted.
ModeCarousel — Animated Background
apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/AnimatedBackground/AnimatedBackground.tsx
Button size reduced (36→32), removed explicit width style, updated translation math/comments and container sizing/styling to a smaller square with adjusted rounding and background opacity.
ModeCarousel — Mode Navigation
apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/ModeNavigation/ModeNavigation.tsx
Replaced external Button/Tooltip UI with native button elements per mode, removed tooltip content and related imports, reduced button/icon size, and simplified container and active/inactive styling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Verify divider rendering logic in TaskTabs.tsx for edge cases (first/last tab, selection transitions).
  • Confirm visual correctness of new border rules in WorktreeTabButton.tsx across themes and hover/active states.
  • Check ModeCarousel layout/translation math after button-size change and ensure accessibility/keyboard focus for native buttons.

Possibly related PRs

  • Pr button #52 — Related Worktree/PR UI changes; introduces or modifies Worktree.prUrl usage referenced by this diff.
  • carousel #74 — Modifies Sidebar ModeCarousel components and may overlap with AnimatedBackground/ModeNavigation changes.
  • buttons #75 — Also touches ModeCarousel UI/button/tooltip behavior and could conflict with the tooltip removal and sizing adjustments.

Poem

🐰 I hopped the tabs with careful paws,

Placed tiny dividers, neat little laws.
Borders trimmed and buttons small,
I smoothed the gaps — I fixed it all.
A rabbit's tweak, both spry and sly. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is completely empty; no sections from the template were filled out by the author. Add a comprehensive description including changes summary, related issues, type of change, testing details, and any relevant notes about the UI modifications.
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.
Title check ❓ Inconclusive The title 'update tabs ui' is vague and generic; it lacks specificity about which tabs or what kind of UI updates were made. Provide a more descriptive title that specifies the nature of the UI updates, such as 'refactor task tabs layout with divider structure' or similar.
✨ 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 tabs-ui

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

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

🧹 Nitpick comments (1)
apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/WorktreeTabButton.tsx (1)

32-32: Remove redundant border-r utility.

The border-x utility already applies borders to both left and right sides, making border-r redundant.

Apply this diff to remove the redundancy:

-						? "bg-neutral-900 text-white border-t border-x border-r border-neutral-700 -mb-px"
+						? "bg-neutral-900 text-white border-t border-x border-neutral-700 -mb-px"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 35540ac and 36024b1.

📒 Files selected for processing (2)
  • apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/TaskTabs.tsx (2 hunks)
  • apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/WorktreeTabButton.tsx (1 hunks)
🔇 Additional comments (2)
apps/desktop/src/renderer/screens/main/components/Layout/TaskTabs/TaskTabs.tsx (2)

24-24: LGTM! Cleaner hasPR computation.

The optional chaining simplifies the logic while maintaining the same boolean behavior when converted at line 74.


43-63: LGTM! Well-structured divider implementation.

The refactored rendering logic correctly implements conditional dividers between consecutive unselected tabs. The logic is clear and handles edge cases properly:

  • Line 43: gap-0 appropriately replaces automatic spacing with manual dividers
  • Lines 48-49: Divider condition correctly identifies when a separator is needed
  • Lines 52-61: Clean wrapper structure maintains proper React key usage

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

🧹 Nitpick comments (1)
apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/ModeNavigation/ModeNavigation.tsx (1)

36-39: Optional: Simplify conditional className logic.

The inline template literal with conditional logic works but could be more readable using a utility function like clsx or cn.

Example refactor:

className={cn(
  "relative z-10 h-8 w-8 rounded-sm flex items-center justify-center transition-colors duration-150",
  isActive ? "text-neutral-100" : "text-neutral-600 hover:text-neutral-500"
)}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 36024b1 and 6b2dc61.

📒 Files selected for processing (2)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/AnimatedBackground/AnimatedBackground.tsx (2 hunks)
  • apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/ModeNavigation/ModeNavigation.tsx (3 hunks)
🔇 Additional comments (5)
apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/AnimatedBackground/AnimatedBackground.tsx (3)

12-15: LGTM! Button size calculation is correct.

The button width reduction from 36px to 32px is correctly reflected in the constant and the math checks out: buttonWidth (32) + gap (4) = totalButtonWidth (36). The comment accurately documents that 32px corresponds to Tailwind's h-8 w-8 classes.


17-23: LGTM! Animation calculation is correct.

The comment and transform logic correctly reflect the new button dimensions. For 2 modes, the background will translate from 0px to 36px (totalButtonWidth = 32 + 4), which matches the updated comment.


25-38: LGTM! Styling is consistent with the size reduction.

The animated background element styling has been correctly updated to match the new button dimensions:

  • h-8 w-8 (32px × 32px) aligns with the buttonWidth constant
  • Square dimensions are appropriate for highlighting square mode buttons
  • The rounded-sm adjustment provides a subtle visual refinement
apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/ModeNavigation/ModeNavigation.tsx (2)

20-20: LGTM! Simplified container styling.

The simplified Tailwind classes provide clean centering and spacing without the extra visual chrome.


32-42: Consider restoring tooltips for better UX.

Removing tooltips entirely means users lose helpful context when hovering over mode buttons. Consider adding native HTML title attributes as a lightweight alternative, or restoring a tooltip library for better UX.

Verify that the removal of tooltips aligns with design requirements and doesn't negatively impact user experience, especially for new users unfamiliar with the icon meanings.

Comment on lines +32 to +42
<button
key={mode}
type="button"
onClick={() => onModeSelect(mode)}
className={`relative z-10 h-8 w-8 rounded-sm flex items-center justify-center transition-colors duration-150 ${isActive
? "text-neutral-100"
: "text-neutral-600 hover:text-neutral-500"
}`}
>
<Icon className="w-3.5 h-3.5" />
</button>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add accessible labels to icon-only buttons.

These buttons lack accessible text for screen readers. Each button must include an aria-label describing its purpose (e.g., "Switch to tasks mode", "Switch to files mode").

Apply this diff to add accessibility:

 <button
 	key={mode}
 	type="button"
+	aria-label={`Switch to ${mode} mode`}
 	onClick={() => onModeSelect(mode)}
 	className={`relative z-10 h-8 w-8 rounded-sm flex items-center justify-center transition-colors duration-150 ${isActive
 		? "text-neutral-100"
 		: "text-neutral-600 hover:text-neutral-500"
 		}`}
 >
📝 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
<button
key={mode}
type="button"
onClick={() => onModeSelect(mode)}
className={`relative z-10 h-8 w-8 rounded-sm flex items-center justify-center transition-colors duration-150 ${isActive
? "text-neutral-100"
: "text-neutral-600 hover:text-neutral-500"
}`}
>
<Icon className="w-3.5 h-3.5" />
</button>
<button
key={mode}
type="button"
aria-label={`Switch to ${mode} mode`}
onClick={() => onModeSelect(mode)}
className={`relative z-10 h-8 w-8 rounded-sm flex items-center justify-center transition-colors duration-150 ${isActive
? "text-neutral-100"
: "text-neutral-600 hover:text-neutral-500"
}`}
>
<Icon className="w-3.5 h-3.5" />
</button>
🤖 Prompt for AI Agents
In
apps/desktop/src/renderer/screens/main/components/Sidebar/components/ModeCarousel/components/ModeNavigation/ModeNavigation.tsx
around lines 32 to 42, the icon-only buttons lack accessible labels; add an
aria-label to each button describing the action (for example construct a label
like `Switch to ${mode} mode` or map mode keys to human-readable strings) and
pass it to the <button> as aria-label={label}; ensure the label is meaningful
for screen readers and update any typing if needed so TypeScript accepts the new
prop.

@Kitenite Kitenite merged commit 216f61e into main Nov 13, 2025
2 of 5 checks passed
@Kitenite Kitenite deleted the tabs-ui branch November 13, 2025 05:18
@Kitenite Kitenite mentioned this pull request Nov 13, 2025
This was referenced Nov 14, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Nov 24, 2025
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