Skip to content

feat: remove dashboard tab limit, scroll horizontally instead#53

Merged
Charlie85270 merged 1 commit into
mainfrom
feat/unlimited-dashboard-tabs
May 5, 2026
Merged

feat: remove dashboard tab limit, scroll horizontally instead#53
Charlie85270 merged 1 commit into
mainfrom
feat/unlimited-dashboard-tabs

Conversation

@Charlie85270

@Charlie85270 Charlie85270 commented May 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Drops the 6-tab cap in useTabManager (UI tooltip even said "max 5"), so users can create unlimited dashboard boards.
  • Removes the canCreateTab prop / gated + button in CustomTabBar; the existing overflow-x-auto scrollbar-none container handles horizontal scrolling when tabs overflow.
  • No CSS changes needed — tabs already had whitespace-nowrap shrink-0, so they scroll cleanly side-to-side without a visible scrollbar.

Test plan

  • Open the dashboard, create more than 6 named boards in a row — none are blocked.
  • Keep adding boards until the bar overflows the viewport; confirm horizontal scroll works (trackpad / shift+wheel) and no scrollbar is visible.
  • Reload the app and confirm all created boards are restored from localStorage.
  • Delete a board and confirm the active-tab fallback still picks the next neighbor.
  • Drag-reorder still works with many tabs.

Summary by CodeRabbit

  • Improvements
    • Unlimited board creation: The maximum board creation limit has been entirely removed. Users can now create boards without restrictions. Previously, users were limited to a maximum of 5 boards.
    • Enhanced interface: The "Create new board" button has been simplified with clearer labeling, no restriction indicators, and is always available to users.

Drops the 6-tab cap (UI said "max 5") in useTabManager and the gated
create button in CustomTabBar. The tab bar already scrolls horizontally
via overflow-x-auto, so any number of boards is now supported.
@vercel

vercel Bot commented May 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dorothy Ready Ready Preview, Comment May 5, 2026 2:25pm

Request Review

@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR removes the five-tab limit for custom terminal boards. The MAX_TABS constant and its enforcement check are deleted from the hook, the canCreateTab flag is removed from the hook's return and the component's props, and the create button now renders unconditionally with a simplified title.

Changes

Tab Creation Limit Removal

Layer / File(s) Summary
Constraint Removal
src/components/TerminalsView/hooks/useTabManager.ts
Removed MAX_TABS constant and the guard that prevented creating tabs beyond the limit; simplified createTab state updater to allow unlimited tabs.
Hook Return Update
src/components/TerminalsView/hooks/useTabManager.ts
Removed canCreateTab derived boolean from the object returned by useTabManager.
Props Simplification
src/components/TerminalsView/components/CustomTabBar.tsx
Removed canCreateTab: boolean from CustomTabBarProps interface and function parameter destructuring.
UI Rendering Update
src/components/TerminalsView/components/CustomTabBar.tsx
Create button and its dialog now render unconditionally instead of being guarded by canCreateTab; button title changed from "Create new board (max 5)" to "Create new board".
Integration
src/components/TerminalsView/index.tsx
Removed canCreateTab={tabManager.canCreateTab} prop from CustomTabBar component invocation.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 ✨ Five tabs became infinite dreams,
As limits unraveled at the seams!
The create button springs forever free,
No guards to hold what could be.
Simpler code hops by with cheer—
Now boards multiply far and near! 🌙

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing the dashboard tab limit and implementing horizontal scrolling instead of a cap-based UI.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/unlimited-dashboard-tabs

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

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (1)
src/components/TerminalsView/components/CustomTabBar.tsx (1)

132-132: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Create dialog will be clipped by the overflow-x-auto container

Per the CSS spec, when overflow-x is set to anything other than visible, overflow-y is implicitly promoted from visible to auto as well. This means the overflow-x-auto wrapper on line 132 clips all overflow on both axes. The absolute top-full dialog (line 194) extends below that container and will therefore be hidden/clipped once the tab bar is scrolled.

Before this PR the tab count was capped at 5–6, so the bar almost never actually overflowed and the clip was harmless. Now that unlimited tabs are allowed the overflow path is common and the dialog will routinely be invisible.

Two practical fixes:

Option A – move the + button outside the scroll region (zero-dependency, straightforward):

♻️ Proposed layout restructure
- <div className="flex items-center gap-0.5 py-1 !rounded-none bg-secondary border-b border-border overflow-x-auto scrollbar-none">
-   {tabs.map(...)}
-
-   {/* Create tab button + dialog */}
-   <div className="relative shrink-0">
-     <button ...>
-     {showCreateDialog && <div ref={createDialogRef} className="absolute ...">...</div>}
-   </div>
- </div>
+ <div className="flex items-center !rounded-none bg-secondary border-b border-border">
+   {/* Scrollable tab strip */}
+   <div className="flex items-center gap-0.5 py-1 overflow-x-auto scrollbar-none flex-1 min-w-0">
+     {tabs.map(...)}
+   </div>
+
+   {/* Create button lives OUTSIDE the overflow container */}
+   <div className="relative shrink-0 py-1">
+     <button ...>
+     {showCreateDialog && <div ref={createDialogRef} className="absolute top-full right-0 mt-1 ...">...</div>}
+   </div>
+ </div>

Option B – render the dialog in a portal (works without changing the layout, but requires importing createPortal and computing position with getBoundingClientRect).

Option A is simpler and aligns better with the overall layout intent.

Also applies to: 182-223

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/TerminalsView/components/CustomTabBar.tsx` at line 132, The
tab bar's overflow-x-auto wrapper in CustomTabBar.tsx clips the create-dialog
(absolute top-full) when tabs scroll; fix by moving the "+" button and its
associated dialog markup out of the scrolling container so the dialog is not a
child of the overflow-x-auto element: locate the div with className "flex
items-center gap-0.5 py-1 !rounded-none bg-secondary border-b border-border
overflow-x-auto scrollbar-none" and keep only the scrollable tab list inside it
(e.g. Tab elements / map over tabs), then place the Add/Plus button component
(the element that opens the create dialog and the dialog itself) as a sibling
after that div inside the CustomTabBar root container so its absolute-positioned
menu is not clipped; adjust surrounding flex/wrapping styles to preserve visual
layout and remove overflow-related clipping without introducing portals.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/components/TerminalsView/components/CustomTabBar.tsx`:
- Line 132: The tab bar's overflow-x-auto wrapper in CustomTabBar.tsx clips the
create-dialog (absolute top-full) when tabs scroll; fix by moving the "+" button
and its associated dialog markup out of the scrolling container so the dialog is
not a child of the overflow-x-auto element: locate the div with className "flex
items-center gap-0.5 py-1 !rounded-none bg-secondary border-b border-border
overflow-x-auto scrollbar-none" and keep only the scrollable tab list inside it
(e.g. Tab elements / map over tabs), then place the Add/Plus button component
(the element that opens the create dialog and the dialog itself) as a sibling
after that div inside the CustomTabBar root container so its absolute-positioned
menu is not clipped; adjust surrounding flex/wrapping styles to preserve visual
layout and remove overflow-related clipping without introducing portals.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3a3d7fb6-d208-4ae4-821f-e4d28311e7d2

📥 Commits

Reviewing files that changed from the base of the PR and between c198ba3 and 9d1fa32.

📒 Files selected for processing (3)
  • src/components/TerminalsView/components/CustomTabBar.tsx
  • src/components/TerminalsView/hooks/useTabManager.ts
  • src/components/TerminalsView/index.tsx
💤 Files with no reviewable changes (2)
  • src/components/TerminalsView/index.tsx
  • src/components/TerminalsView/hooks/useTabManager.ts

@Charlie85270 Charlie85270 merged commit 8b28b57 into main May 5, 2026
4 checks passed
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