Skip to content

Cap tab width at 300 pixels - #37523

Merged
AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/improve-tab-width
Nov 2, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/improve-tab-width

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 0

Problem

Tabs can grow too wide, leaving less room for other tabs in the bar.

Solution

Limit each tab to 300 pixels while keeping the existing minimum width and flexible sizing when space is tight.

ELI5

Tabs stay a comfortable size instead of stretching too far.

What Changed

Reduced the preferred tab width from 330 to 300 pixels and added a 300-pixel maximum.

Why

A fixed maximum keeps tabs from growing beyond the intended width while preserving their ability to share limited space.

Linked Issue

None.

Visual Proof

TODO: Attach before and after screenshots.

Testing

TODO: Document verification steps and platforms tested.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Risk

Level: Low

Tab sizing could behave unexpectedly in narrow or wide windows. A plain revert restores the previous sizing.

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Consider cross-platform, remote SSH, mobile, backwards compatibility, security, and performance during review.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8719ecc1-18df-4c90-9dd8-f7d324a15d12
Commits

Reviewing files that changed from the base of the PR and between 509461a and f61ac13.

Files selected for processing: 1
  • src/renderer/src/components/tab-bar/tab-width-rules.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

TAB_CONTAINER_WIDTH_CLASSES changes its fixed width from 330px to 300px and adds a matching 300px maximum width.

Merge Risk: Minimal · up to f61ac

The tab width adjustment is consistent with the intended behavior and is suitable to merge.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the problem, solution, user-facing effect, mechanism, and low risk. However, it is incomplete because the required linked issue is missing, visual proof is marked TODO for a U… Link the relevant issue, attach before-and-after visual proof or provide the required N/A explanation, document verification steps and tested platforms, and complete or explain the remaining testing and review checklist items.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: limiting tab width to 300 pixels.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Full details: Description check

Explanation

The description explains the problem, solution, user-facing effect, mechanism, and low risk. However, it is incomplete because the required linked issue is missing, visual proof is marked TODO for a UI change, testing steps and platforms are not documented, and required validation checklist items remain unchecked.

Resolution

Link the relevant issue, attach before-and-after visual proof or provide the required N/A explanation, document verification steps and tested platforms, and complete or explain the remaining testing and review checklist items.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@AmethystLiang
AmethystLiang merged commit ba45358 into main Nov 2, 2026
39 of 41 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