SIGN IN SIGN UP

tab: Keep the segmented indicator's shadow inside the clip (#2831)

## Description

The segmented `TabBar` indicator paints a shadow, but `#tabs` and
`#tabs-inner` clip exactly on its edges, so the horizontal blur was
sliced off on both sides. The vertical blur survived only because the
24px pill sits inside a 32px tab.

Both containers now expand outward with a negative margin and push their
content back with an equal padding, so the clip rect has room while
every tab keeps its exact position and size. `on_prepaint` reports the
container's content origin while taffy resolves an absolute child's
`left` from the border box, so the indicator adds that padding to stay
aligned with its tab.

The indicator also moves off `Styled::shadow_sm` onto a
`raised_shadow()` helper with Tailwind's radii halved — the conversion
`popover_shadow` and `toast_shadow` already make, since GPUI's shader
reads the blur radius as the gaussian's deviation while CSS defines it
as twice that.

`paddings` is non-zero only for `Segmented`, so both changes are a no-op
for the other four variants.

## Screenshot

| Before                       | After                       |
| ---------------------------- | --------------------------- |
| <img width="162" height="65" alt="image"
src="https://github.com/user-attachments/assets/3b5fe403-ffae-4689-8a74-0f8ed709e862"
/> | <img width="145" height="55" alt="image"
src="https://github.com/user-attachments/assets/b4066b2a-6155-4052-a0ac-830ce3191d29"
/> |

## How to Test

`cargo run -p gpui-component-story` and open the Tabs story. In
**Segmented Tabs** and **Dynamic Tabs**, the active pill's shadow is now
complete on all four sides, reads as a compact line rather than a haze,
and the pill still lines up exactly with its tab.

Geometry was checked with a temporary probe test (removed before
commit):

- the selected tab and the indicator report identical bounds (`origin.x
= 4px`, `58x32`)
- tab bounds are byte-identical to `main` for all five variants

`cargo test -p gpui-component --lib tab::` passes (10 tests). `cargo
clippy -p gpui-component --lib` reports no new warnings.

## AI Assistance

The code changes and this description were generated by Claude Code,
then reviewed and tested locally (`cargo check`, `clippy`, `tab::`
tests, and a visual check in the story app).

## Checklist

- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) document and
followed the guidelines.
- [ ] Reviewed the changes in this PR and confirmed AI generated code
(If any) is accurate.
- [ ] Passed `cargo run` for story tests related to the changes.
- [ ] Tested macOS, Windows and Linux platforms performance (if the
change is platform-specific)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
C
Cookie committed
9e0699261a210d221c66d6a8e77c6df989e26046
Parent: d5821f2
Committed by GitHub <noreply@github.com> on 8/26/2026, 1:51:39 AM