Skip to content

Swap tab groups to render icon only to match tabs#13105

Merged
johnturcoo merged 1 commit into
masterfrom
johnturco/app-4777-tab-group-header-icon-collage-is-clipped-when-many-tabs-open
Jun 28, 2026
Merged

Swap tab groups to render icon only to match tabs#13105
johnturcoo merged 1 commit into
masterfrom
johnturco/app-4777-tab-group-header-icon-collage-is-clipped-when-many-tabs-open

Conversation

@johnturcoo

@johnturcoo johnturcoo commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description

When tabs shrink to a certain size in the horizontal tab bar, they stop displaying the tab name and just show their icon. This PR modifies tab group headers to follow the same behavior.

How it works

  • Wrapped the group header in a SizeConstraintSwitch that swaps the full layout (collage + name) for a compact, icon-only collage below COMPACT_TAB_WIDTH_THRESHOLD (42px) — the same mechanism and threshold TabComponent already uses, so headers and tabs go compact at the same width.
  • The compact collage renders at the tab's compact icon size (TAB_INDICATOR_HEIGHT, 14px), centered

Linked Issue

https://linear.app/warpdotdev/issue/APP-4777/tab-group-header-icon-collage-is-clipped-when-many-tabs-open

Testing

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

Demo before

Demo after

@cla-bot cla-bot Bot added the cla-signed label Jun 26, 2026
@oz-for-oss

oz-for-oss Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@johnturcoo

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@johnturcoo johnturcoo requested a review from peicodes June 26, 2026 21:35

@oz-for-oss oz-for-oss Bot left a comment

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.

Overview

This PR makes horizontal tab group headers switch from the full collage-and-title layout to an icon-only collage at the same width threshold used by tabs. The attached before/after Loom links satisfy the repo's visual-evidence requirement, and I did not find security findings or spec-drift concerns because no approved spec context was provided.

Concerns

  • The new responsive header is still laid out as a non-flex child of the group row, so it receives an unbounded horizontal constraint and the SizeConstraintSwitch cannot observe the finite tab slot width it is meant to compare against.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/workspace/view.rs
.finish();

// Go compact at the same width as a tab, so headers and tabs shrink in step.
let content = SizeConstraintSwitch::new(

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.

⚠️ [IMPORTANT] This header is added to render_horizontal_tab_group as a normal Flex child, and Flex lays non-flex children out with an unbounded main-axis constraint. With constraint.max.x() infinite, WidthLessThan(COMPACT_TAB_WIDTH_THRESHOLD) never matches; the default full row also uses MainAxisSize::Max, which tries to expand to infinity. Make the header a finite flex slot (for example by wrapping it in Shrinkable::new(1.0, ...) at the group-row call site) before switching on width.

@johnturcoo johnturcoo force-pushed the johnturco/app-4768-htab-groups-inconsistent-header-sizes-cause-several-bugs-in branch from c139c45 to 3a3f0c1 Compare June 27, 2026 17:52
Base automatically changed from johnturco/app-4768-htab-groups-inconsistent-header-sizes-cause-several-bugs-in to master June 27, 2026 19:07
@johnturcoo johnturcoo force-pushed the johnturco/app-4777-tab-group-header-icon-collage-is-clipped-when-many-tabs-open branch from 4787e90 to a036ec2 Compare June 28, 2026 01:19
@johnturcoo johnturcoo enabled auto-merge (squash) June 28, 2026 01:30
@johnturcoo johnturcoo merged commit ad73053 into master Jun 28, 2026
25 checks passed
@johnturcoo johnturcoo deleted the johnturco/app-4777-tab-group-header-icon-collage-is-clipped-when-many-tabs-open branch June 28, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants