Skip to content

fix(tabs): restore the header height and clear the scroll fades - #6965

Closed
waleedlatif1 wants to merge 1 commit into
stagingfrom
tabs-codex-v2
Closed

fix(tabs): restore the header height and clear the scroll fades#6965
waleedlatif1 wants to merge 1 commit into
stagingfrom
tabs-codex-v2

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Restore the resource header to its pre-port height (43px + 1px border). Porting to the shared strip had taken it to 34px while growing the tabs to 30px, which left roughly a pixel and a half of air above and below a tab instead of the ~10px it had before — the header read cramped
  • Fix reveal-on-select: scrolling a partly-hidden tab into view parked it flush with the container edge, which is exactly where the scroll fade sits, so the tab you just clicked arrived half-faded and still looked cut off. Reveal now insets by the fade width, and clamps at the scroll extremes where no fade is drawn (so the first and last tabs still sit flush)
  • Cap floating tabs at 160px instead of 200px so no single tab dominates the row
  • The reveal fix is in the shared TabStrip, so the browser and terminal strips get it too

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Selecting a partly-hidden tab scrolled it flush against the container edge,
which is exactly where the fade gradient sits, so it arrived half-faded and
still looked cut off. Reveal now insets by the fade width and clamps at the
scroll extremes, where no gradient is drawn.

The header also went back to its pre-port 43px: the port had taken it to 34px
while growing the tabs to 30px, leaving about a pixel and a half of air instead
of ten. Floating tabs cap at 160px so no single tab dominates the row.
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 22, 2026 2:42am

Request Review

@cursor

cursor Bot commented Aug 22, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI geometry and scroll-into-view tweaks in the tab strip only; no auth, data, or API changes.

Overview
Restores the resource header to 43px (plus the strip’s 1px bottom border) so tabs and overlaid controls share the same vertical band instead of looking cramped after the shared-strip port.

Selecting a partly hidden tab now scrolls it clear of the 16px edge fade, not flush under the gradient. First/last tabs still sit flush because the target is clamped at scroll extremes where no fade is drawn. The same TabStrip change applies to browser and terminal strips.

Floating tabs in the resource header cap at 160px via --tab-strip-max-tab-width so one long label cannot dominate the row.

Reviewed by Cursor Bugbot for commit b1672f6. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR restores the resource header’s intended height and narrows its floating tabs while improving selected-tab reveal behavior around scroll-edge fades.

  • Sets the resource header content band to 43px with a 44px bordered strip.
  • Adds a configurable maximum width for floating tabs and sets resource tabs to 160px.
  • Insets active-tab reveal targets by the fade width while clamping at scroll extremes.
  • Extends DOM coverage for inset reveal and last-tab clamping.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code failure identified.

The revised dimensions remain internally consistent, and the fade-aware reveal calculation correctly clamps targets to valid scroll bounds while preserving flush positioning at either extreme.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tab-controls.ts Restores resource-header geometry and configures a 160px floating-tab width without introducing a concrete layout defect.
packages/emcn/src/components/tab-strip/tab-strip.tsx Adds configurable floating-tab width and fade-aware active-tab reveal with bounded scroll targets.
packages/emcn/src/components/tab-strip/tab-strip.dom.test.tsx Updates reveal expectations and verifies that the final tab clamps to the maximum scroll position.

Reviews (1): Last reviewed commit: "improvement(tabs): restore the header he..." | Re-trigger Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

Superseded by the branch off the current staging tip — same reveal fix plus the header spacing regression.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b1672f6. Configure here.

tabLeft < viewLeft
? tabLeft - EDGE_FADE_PX
: tabRight > viewRight
? tabRight - node.clientWidth + EDGE_FADE_PX

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reveal scrolls wrong for wide tabs

Medium Severity

revealActiveTab always shrinks the visible band by EDGE_FADE_PX on both sides and prefers the left branch. When a tab’s left edge sits in the left fade zone but its right edge is past the real viewport (common for attached/floating tabs once the scrollport is only slightly wider than the tab), it scrolls left to clear the fade and leaves the tab more clipped on the right. The old physical-overflow check would have scrolled right instead.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b1672f6. Configure here.

@waleedlatif1
waleedlatif1 deleted the tabs-codex-v2 branch August 22, 2026 18:45
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