Skip to content

feat(tabs): redesign tab layout — floating browser-style cards#175

Open
BunsDev wants to merge 2 commits into
mainfrom
feat/tabs-worldclass-active-state
Open

feat(tabs): redesign tab layout — floating browser-style cards#175
BunsDev wants to merge 2 commits into
mainfrom
feat/tabs-worldclass-active-state

Conversation

@BunsDev

@BunsDev BunsDev commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary

Redesigns the terminal tab layout for the live NewTabStyling path (the default-feature path in OSS builds), moving from abutting square separators to a calmer, modern floating-card layout. The previous strip distinguished the active tab only by a faint background fill and divided every tab with hard 1px separators.

Layout changes (app/src/tab.rs)

Aspect Before After
Shape Square tabs, hard 1px separator between every tab Rounded-top cards (6px), flat bottom that merges into the content area
Idle tab Separator border Fully transparent & borderless — quiet, uncluttered
Hover Background fill only Soft fill + subtle top/side outline (open bottom)
Active Faint fill Fill + accent underline along the flat bottom edge + outline — unmistakable
Spacing Tabs abut (no gap) 2px gap between cards + roomier 10px inner padding (was 8px)

The active-tab accent underline is a theme.accent() bar pinned to the bottom edge as a ParentBySize overlay, so it adds no height and never reflows the strip — tab height stays 34px and drag/drop + ghost layout are unaffected. It now lands on the card's flat bottom, reading like a browser/editor active tab connected to its content.

Design-system compliance

  • All colors from existing theme accessors (theme.accent(), internal_colors::fg_overlay_*). These overlays are translucent (foreground @ 5–10%) and stack correctly over the strip's fg_overlay_1 background, so hover/active stay clearly visible. No hardcoded colors, no new primitives.
  • Reuses the CornerRadius::with_top and ParentBySize overlay idioms already used elsewhere in the codebase.
  • Legacy (flag-off) path is untouched.

Verification

  • cargo check -p warp-app --bin cast-codes --features guiclean (full compile of the rendering code under the pinned 1.92 toolchain, Metal shaders built).
  • rustfmt --check app/src/tab.rs — clean.
  • ✅ No tests assert tab styling/dimensions; is_first_tab separator logic fully removed (no dangling refs).
  • ℹ️ Local cargo clippy surfaces a pre-existing unnecessary_unwrap lint in crates/warpui_core (double_click_handler) — unrelated to this change (untouched code; a stricter local clippy-driver 0.1.95 vs the pinned 1.92). CI's clippy (which passed on recent PRs over the same code) is the authoritative check.
  • This is a visual change; a live preview needs a full .app build — happy to run it on request.

🤖 Generated with Claude Code

…eedback

Elevate tab-state legibility in the live new-tab-styling path:

- Active tab now carries a full-width 2px accent underline pinned to its
  bottom edge, visually connecting it to the content area below (the
  editor/terminal convention used by VS Code, Zed, Windows Terminal). It is
  a pure `ParentBySize` overlay, so it adds no height and never reflows the
  strip — tab height stays 34px and drag/drop layout is unaffected.
- Inactive tabs now brighten their border on hover (fg_overlay_1 ->
  fg_overlay_2) to match the existing background lift, giving clear cursor
  feedback instead of a background-only change.

Both reuse existing theme accessors (theme.accent(), internal_colors); no
hardcoded colors and no new design primitives. Legacy (flag-off) path is
untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 30, 2026 03:31

Copilot AI 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.

Pull request overview

Updates the tab container rendering to make the active tab state more visually distinct (accent underline) and improve hover feedback, targeting the NewTabStyling feature-flag path.

Changes:

  • Brightens tab border color on hover (in the NewTabStyling branch) for clearer pointer feedback.
  • Adds a feature-flagged active-tab accent underline as an overlay (no layout reflow).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/tab.rs
Comment on lines +1630 to +1634
// Mark the active tab with a full-width accent underline pinned to its
// bottom edge, visually connecting it to the content area below. The bar
// is a pure overlay (`ParentBySize` stretches it to the tab width) so it
// adds no height and never reflows the strip.
let tab_element: Box<dyn Element> = if FeatureFlag::NewTabStyling.is_enabled() && is_active
Reshape the new-tab-styling strip from abutting square separators into a
calmer, modern floating-card layout:

- Rounded-top cards (6px) with a flat bottom that merges into the content
  area below — the browser/editor tab silhouette.
- Replace the per-tab separator borders with a small 2px gap between tabs;
  idle tabs are now fully transparent and borderless for an uncluttered
  strip.
- Active/hovered cards get a subtle top+side outline (open bottom); the
  active tab additionally keeps its accent underline along the flat edge,
  making the selected tab unmistakable.
- Roomier inner horizontal padding (8 -> 10px) for better text rhythm.

All colors come from existing theme accessors (theme.accent(),
internal_colors::fg_overlay_*), which are translucent and stack correctly
over the strip background. Legacy (flag-off) path is untouched.

Verified: cargo check -p warp-app --bin cast-codes --features gui (clean).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@BunsDev BunsDev changed the title feat(tabs): world-class active-tab state — accent underline + hover feedback feat(tabs): redesign tab layout — floating browser-style cards Jun 30, 2026
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.

2 participants