Skip to content

feat(tabs): add content-sized top tabs with Chrome, Minimal and Tag styles - #696

Open
ventupx wants to merge 1 commit into
Kuddev:mainfrom
ventupx:contrib/top-tab-styles
Open

ventupx wants to merge 1 commit into
Kuddev:mainfrom
ventupx:contrib/top-tab-styles

Conversation

@ventupx

@ventupx ventupx commented Oct 21, 2026 •

Copy link
Copy Markdown

Result / 用户结果

Top tabs follow their title width, capped at 220 logical pixels. Appearance settings offer Chrome, Minimal and Tag treatments. Long names stay still and fade out at the trailing edge in every state; the shell indicator stays on the right and yields to hover-close. Chrome tabs use larger lower curves, overlapping feet and content padding without separator lines. The titlebar and terminal top inset are more compact.

Design / 设计边界

nebula_settings::TabStyle owns saved values/default/reset; top-tab layout owns shared geometry for rendering, overflow navigation and frozen drag snapshots. Presentation stays in the tab style/label modules. Changing the tab count invalidates stale drag snapshots. Sidebar ordering semantics stay intact. The optional OneDark treatment checks the existing stable theme identifier, so this branch builds independently of the separate theme proposal.

This focused branch starts from upstream 8d6295595e084a12f9c2fe159f65c2dcd332d866. It excludes fork release/version/package metadata. Under the repository's pr-size exclusions, it changes 1178 counted lines, within the 1500-line default.

Evidence / 验证依据

Executed on Windows against this branch:

  • python scripts/check_architecture.py --base upstream/main — passed; existing budgets unchanged.
  • python -m unittest scripts.tests.test_architecture_budgets scripts.tests.test_architecture_dependencies scripts.tests.test_architecture_governance — successful (55 tests, 3 platform-specific skips).
  • cargo test --manifest-path tools/i18n-contract/Cargo.toml --locked — 24 passed, 1 existing ignored test.
  • cargo test -p nebula-settings --locked — 101 passed.
  • cargo test -p nebula --test file_line_budget --locked — 2 passed.
  • cargo fmt --all -- --check and git diff --cached --check — passed.
  • cargo check -p nebula --bin pebrel --features gpui-test-support --tests --locked — passed.
  • cargo test -p nebula --bin pebrel --features gpui-test-support --locked --no-run — passed. Targeted GPUI tests use the same interaction-test feature as upstream CI and the filters below with -- --test-threads=1: 39 passed.

Filters: workspace::top_tabs::, workspace::settings_navigation::ui_tests::, workspace::window_titlebar::, tab_style_settings_tests::, terminal_grid_keeps_inset_coordinates, terminal::view::reading::tests::.

Regression coverage: Mixed-width navigation and dragging in both directions; all three rendered styles; CJK/long titles; static fade under selection/hover; padding and close hitboxes across Chrome overlaps; canceled stale drag snapshots; terminal pointer inset; keyboard persistence, reopen and Escape cancellation.

Localization: New style labels/descriptions use typed IDs in English and Simplified Chinese, with the existing English fallback elsewhere.

Visual/platform scope: the integrated changes were manually reviewed in a Windows preview before this split. These branch checks exercise rendered hitboxes/state and keyboard input where applicable; new screenshot captures and a DPI matrix were not run for this head. Linux/macOS current-head validation is left to upstream CI. The earlier full integrated-source validation passed 24 jobs at 6e86ea5c3ff29671043dfc62a788f1d4fde80732; that is supplemental evidence, not a check result for this PR head.

Runtime cost: Overflow glyphs are shaped once per label paint and reused across 24 bounded fade bands. Fading adds no animation/timer; no dedicated allocation or frame-time benchmark is claimed.

Required Review / 必须确认

  • Followed CONTRIBUTING.md, docs/architecture.md, and docs/project-constraints.md.
  • Split by responsibility; no duplicate behavior authority.
  • Architecture check against the upstream target passes; budgets were not inflated.
  • Relevant success/failure/cancellation regressions are covered; platform and visual limitations are stated above.
  • New messages use typed i18n IDs and matching placeholders, with explicit fallback where untranslated.
  • Governance-rule changes: not applicable; none included. Maintainer review and required upstream checks remain necessary before merge.

@ventupx
ventupx requested a review from Kuddev as a code owner October 21, 2026 07:25
@ventupx
ventupx force-pushed the contrib/top-tab-styles branch from 10547db to 05d4318 Compare October 21, 2026 07:37
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