Repository navigation
Fix tab bar width shift on surface focus - #6812
Conversation
Bump vendor/bonsplit to include manaflow-ai/bonsplit#155: reserve the tab shortcut-hint slot based on tabShortcutHintsEnabled alone, not focus. Previously focusing a pane/surface grew every ⌃/⌘-digit tab ~11pt and shifted the whole tab bar (regression from the modifier-hold fix #6786). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe PR updates the ChangesVendor Bonsplit Pointer Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11138e1f2c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1 +1 @@ | |||
| Subproject commit 8ca85b6a688072acc6e21171dfebba302dc82020 | |||
| Subproject commit 1c67762d49b286d6394e6c22ebe1cf3d36172d84 | |||
There was a problem hiding this comment.
Point bonsplit at a main-branch commit
AGENTS.md says submodule commits must be pushed to the submodule remote main before committing the parent pointer. I checked manaflow-ai/bonsplit's commits/main history and it still ends at 8ca85b6, while this gitlink now points at 1c67762 two commits ahead of main; if that temporary PR/branch ref is deleted, fresh checkouts can no longer fetch this SHA and cmux builds break. Please merge/push the bonsplit commits to main first, then update this pointer.
Useful? React with 👍 / 👎.
Greptile SummaryThis PR bumps the
Confidence Score: 5/5Safe to merge — the only change is a submodule pointer bump delivering a focused UI layout bug fix with accompanying regression tests. The parent-repo diff is a single submodule line. The bonsplit change decouples a layout width from a transient focus flag, which is the correct architectural fix. No cmux-owned Swift, TypeScript, or configuration files are modified. The dependency is a local SwiftPM path package so no lockfile churn is expected. Bonsplit ships two regression tests that red→green on the exact failure mode, and the full bonsplit suite passes. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["tabShortcutHintsEnabled (global setting)"] --> B["reservedShortcutHintSlotWidth\n(layout width — focus-independent)"]
A --> C["allowsShortcutHints\n= tabShortcutHintsEnabled && isFocused"]
D["isFocused"] --> C
B --> E["TabItemView measured width\n(constant, no focus jump)"]
C --> F["Hint pill opacity\n(0 when unfocused or modifier not held)"]
E --> G["Tab bar layout stable"]
F --> H["Visual hint visibility only"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["tabShortcutHintsEnabled (global setting)"] --> B["reservedShortcutHintSlotWidth\n(layout width — focus-independent)"]
A --> C["allowsShortcutHints\n= tabShortcutHintsEnabled && isFocused"]
D["isFocused"] --> C
B --> E["TabItemView measured width\n(constant, no focus jump)"]
C --> F["Hint pill opacity\n(0 when unfocused or modifier not held)"]
E --> G["Tab bar layout stable"]
F --> H["Visual hint visibility only"]
Reviews (4): Last reviewed commit: "Bump vendor/bonsplit to main (01751ef): ..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@vendor/bonsplit`:
- Line 1: The vendor/bonsplit submodule pointer is referencing an unreachable
commit, so update the submodule SHA to one that is already pushed and available
on the remote main branch. Make sure the intended changes in the bonsplit repo
are merged or otherwise present on the remote, verify the commit exists there,
then revise the vendor/bonsplit pointer in this PR to that valid commit.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2e949387-a2b1-46a2-a3ae-360cd510f187
📒 Files selected for processing (1)
vendor/bonsplit
| @@ -1 +1 @@ | |||
| Subproject commit 8ca85b6a688072acc6e21171dfebba302dc82020 | |||
| Subproject commit 1c67762d49b286d6394e6c22ebe1cf3d36172d84 | |||
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🔴 Critical
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
submodule_path="vendor/bonsplit"
new_sha="$(git ls-tree HEAD "$submodule_path" | awk '$2 == "commit" { print $3 }')"
remote_url="$(git config -f .gitmodules --get submodule.vendor/bonsplit.url)"
test -n "$new_sha"
test -n "$remote_url"
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
git -C "$tmp" init -q
git -C "$tmp" remote add origin "$remote_url"
git -C "$tmp" fetch -q --filter=blob:none origin main
git -C "$tmp" merge-base --is-ancestor "$new_sha" origin/mainRepository: manaflow-ai/cmux
Length of output: 216
🏁 Script executed:
#!/bin/bash
# Check if the SHA exists in local git history for the submodule
git log --oneline -1 vendor/bonsplit || echo "No local history for submodule"
# Try to show the git submodule status
git submodule status vendor/bonssplit 2>/dev/null || git submodule status vendor/bonsplitRepository: manaflow-ai/cmux
Length of output: 283
🌐 Web query:
Is commit 1c67762d49b286d6394e6c22ebe1cf3d36172d84 in manaflow-ai/bonsplit main branch?
💡 Result:
Commit 1c67762d49b286d6394e6c22ebe1cf3d36172d84 is not in the main branch of the manaflow-ai/bonsplit repository. An extensive review of the repository's commit history, pull requests, and related submodule references—such as the recent updates tracked in the manaflow-ai/cmux repository—yields no evidence of this commit hash [1][2][3][4]. Based on the available data, this hash does not correspond to any known activity or code revision within the manaflow-ai/bonsplit project [5][6][7].
Citations:
- 1: manaflow-ai/bonsplit@505181f
- 2: Tahoe 26 Liquid Glass: hide tab bar when tabBarHeight is 0; fix split divider position bonsplit#95
- 3: https://github.com/manaflow-ai/bonsplit/pulls
- 4: Update bonsplit for tab title font size clamp #2856
- 5: https://github.com/manaflow-ai/bonsplit
- 6: https://github.com/manaflow-ai/bonsplit/graphs/commit-activity
- 7: https://github.com/manaflow-ai
Critical: Submodule pointer references an unreachable commit
The updated vendor/bonsplit pointer to 1c67762d49b286d6394e6c22ebe1cf3d36172d84 references a commit that does not exist on the remote main branch of manaflow-ai/bonsplit. This violates the submodule safety policy requiring commits to be pushed to the remote before the parent repository references them.
The PR will fail for other developers and CI when attempting to fetch the submodule.
- Push the intended changes to the
manaflow-ai/bonsplitrepository on a branch and merge tomain(or the intended target branch). - Verify the new commit SHA exists on the remote.
- Update the
vendor/bonsplitsubmodule pointer in this PR to the valid, pushed commit SHA.
🤖 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 `@vendor/bonsplit` at line 1, The vendor/bonsplit submodule pointer is
referencing an unreachable commit, so update the submodule SHA to one that is
already pushed and available on the remote main branch. Make sure the intended
changes in the bonsplit repo are merged or otherwise present on the remote,
verify the commit exists there, then revise the vendor/bonsplit pointer in this
PR to that valid commit.
Source: Coding guidelines
This comment has been minimized.
This comment has been minimized.
# Conflicts: # vendor/bonsplit
Points at bonsplit bf9c0b1 (PR #155): the tab shortcut-hint pill now overlays the close-button slot instead of reserving its own width, so tabs carrying a ⌃/⌘ digit are no wider than tabs without one. Still focus/hold-independent, so the tab bar never shifts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…int fix bonsplit #155 (overlay the tab shortcut-hint pill instead of reserving its width) is now merged to bonsplit main, so point at the durable main commit rather than the feature branch. This also advances bonsplit to current main, which includes the already-merged pinned-browser icon-only commits (#156/#157); those are inert in cmux until the separate pinned-surfaces cmux wiring lands. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Focusing a surface/pane shifted the tab bar horizontally: every tab carrying a ⌃/⌘ shortcut digit (tabs 1-8 and the last tab) grew ~11pt when its pane gained focus and shrank when it lost focus.
Cause: the modifier-hold layout-shift fix (#6786 / bonsplit #154) moved the reserved shortcut-hint slot width onto
allowsShortcutHints = isFocused && tabShortcutHintsEnabled. That stopped the width from changing on modifier-hold, but left it gated on focus, so the trailing slot collapsed from the wide hint-pill width to the bare accessory width on any unfocused pane.Fix (bonsplit manaflow-ai/bonsplit#155): reserve the hint slot based on
tabShortcutHintsEnabledalone (focus-independent).TabItemViewnow takestabShortcutHintsEnabled+isFocusedseparately; width routes throughreservedShortcutHintSlotWidth(which ignores focus), while hint visibility still derivesallowsShortcutHints. Neither focus nor modifier-hold changes measured tab width now; both only change the hint pill's opacity.Principled fix: the reserved layout width is now a pure function of the global hints setting, decoupled from the transient focus/hold visibility state that was never supposed to drive layout.
Regression test (red→green, bonsplit):
testTabShortcutHintSlotWidthDoesNotChangeWithFocusasserts the slot width is identical focused vs unfocused (was 29 vs 18);testTabShortcutHintSlotWidthCollapsesWhenHintsDisabledcovers hints-off. Full bonsplit suite 152 passing.🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
Tab-bar layout and shortcut-hint presentation only; no security, data, or core infrastructure changes.
Overview
Fixes a tab bar horizontal jump when switching pane focus: tabs that show ⌃/⌘ digit shortcuts (1–8 and the last tab) were ~11pt wider while focused because the reserved shortcut-hint slot was sized with
allowsShortcutHints = isFocused && tabShortcutHintsEnabled.The change decouples layout from focus: reserved hint-slot width follows
tabShortcutHintsEnabledonly (viareservedShortcutHintSlotWidth), whileTabItemViewstill takesisFocusedseparately so hint pills only show when focused. Focus and modifier-hold now affect opacity/visibility, not measured tab width.vendor/bonsplitis bumped to pick up bonsplit#155, including regression tests that slot width stays the same focused vs unfocused and collapses when hints are off.Reviewed by Cursor Bugbot for commit 7c63c05. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Fixes tab bar width shifts on pane focus by overlaying the shortcut-hint pill in the close-button slot. Tab widths stay constant on focus and modifier-hold; only the hint pill’s opacity changes.
Bug Fixes
Dependencies
vendor/bonsplitto main withmanaflow-ai/bonsplit#155(overlay hint fix); also pulls in icon-only pinned-browser updates (#156,#157), inert here.Written for commit 7c63c05. Summary will update on new commits.
Summary by CodeRabbit