Collapsing htab groups gives flex to remaining tab bar items#13101
Merged
johnturcoo merged 1 commit intoJun 28, 2026
Conversation
peicodes
approved these changes
Jun 26, 2026
c139c45 to
3a3f0c1
Compare
Base automatically changed from
johnturco/app-4768-htab-groups-inconsistent-header-sizes-cause-several-bugs-in
to
master
June 27, 2026 19:07
fbb2b66 to
b9f65af
Compare
dagmfactory
pushed a commit
that referenced
this pull request
Jun 30, 2026
## Description When a horizontal tab group collapses, give the space it frees back to the other tabs so they grow to fill it (Chrome-style), instead of parking that space at the end of the bar. ## How it works In `render_tab_bar_contents`, removed the `collapsed_group_flex_giveback` that re-added each collapsed group's freed flex (its members + 2 edge spacers) to the trailing spacer. The trailing spacer is now just `Shrinkable::new(0.5, …)`, so when a collapsed group drops from `header + members + 2 spacers` of flex down to a single header slot, the freed flex redistributes across the remaining flex children — the other tabs widen to reclaim it. ## Linked Issue https://linear.app/warpdotdev/issue/APP-4788/give-back-flex-to-other-tabs-when-a-tab-group-is-collapsed ## Testing <!-- How did you test this change? What automated tests did you add? If you didn't add any new tests, what's your justification for not adding any? Manual testing is required for changes that can be manually tested, and almost all changes can be manually tested. If your change can be manually tested, please include screenshots or a screen recording that show it working end to end. You can run the app locally using `./script/run` - see AGENTS.md for more details on how to get set up. --> - [x] I have manually tested my changes locally with `./script/run` ### Screenshots / Videos [Demo of before](https://www.loom.com/share/6f6226b5583643bba1501cfb053f154b) [Demo of after](https://www.loom.com/share/c270e24984654594a3072bae636668e1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When a horizontal tab group collapses, give the space it frees back to the other tabs so they grow to fill it (Chrome-style), instead of parking that space at the end of the bar.
How it works
In
render_tab_bar_contents, removed thecollapsed_group_flex_givebackthat re-added each collapsed group's freed flex (its members + 2 edge spacers) to the trailing spacer. The trailing spacer is now justShrinkable::new(0.5, …), so when a collapsed group drops fromheader + members + 2 spacersof flex down to a single header slot, the freed flex redistributes across the remaining flex children — the other tabs widen to reclaim it.Linked Issue
https://linear.app/warpdotdev/issue/APP-4788/give-back-flex-to-other-tabs-when-a-tab-group-is-collapsed
Testing
./script/runScreenshots / Videos
Demo of before
Demo of after