Repository navigation
Add regression tests for single-item Activity Bar overflow - #345329
Merged
SteVen Batten (sbatten) merged 2 commits intoOct 31, 2026
Merged
SteVen Batten (sbatten) merged 2 commits into
SteVen Batten (sbatten) merged 2 commits into
Conversation
Covers #187737: the composite bar never hides exactly one view behind the Additional Views overflow across classic, compact, modern and floating-panel layouts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain, although the tests were not independently run during this review.
No open issues 🎉
What changed in this PR
Adds regression tests for Activity Bar overflow behavior related to #187737, locking in the existing equal-size layout behavior without changing production code.
Changes:
- Checks overflow boundaries and sweeps heights to ensure exactly one view never overflows.
- Verifies overflow menu contents, active-view visibility, and promotion of a selected hidden view.
- Checks rendered item sizes and spacing across classic, compact, and floating layouts.
No actionable findings remain. Tests were not independently run during this review.
| File | Description |
|---|---|
src/vs/workbench/test/browser/parts/compositeBar.test.ts |
Adds overflow, menu interaction, and rendered-layout regression tests. |
Review effort: Balanced
SteVen Batten (sbatten)
marked this pull request as ready for review
October 31, 2026 15:57
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
🤖 Fixed the CI compile failure (TS2554 at compositeBar.test.ts:201): the test now passes an action to |
TylerLeonhardt
approved these changes
Oct 31, 2026
SteVen Batten (sbatten)
deleted the
agents/avoid-single-item-overflow-activity-bar
branch
October 31, 2026 16:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #187737
The current composite bar already avoids an "Additional Views" overflow with a single item: each action is the same size as the overflow control, so once views overflow one slot goes to the overflow control and at least two views are always hidden. This PR adds regression tests (
src/vs/workbench/test/browser/parts/compositeBar.test.ts, suite "CompositeBar overflow") that lock that in across classic, compact, modern, modern compact, modern sidebar-right and modern compact-density layouts. They sweep heights to check that exactly one hidden view never happens, that the overflow menu shows every hidden view, and that a selected overflow view is promoted back into the bar. There are no production changes.Runtime screenshots across all six layouts confirmed the same behavior: at fit−1, two views are hidden (Run and Debug, Extensions), no height leaves exactly one view hidden, and selecting Extensions promotes it back into the bar.
How to test
./scripts/test.sh --run src/vs/workbench/test/browser/parts/compositeBar.test.ts --run src/vs/workbench/test/browser/parts/activitybarPart.test.ts --run src/vs/workbench/test/browser/parts/compositeBarActions.test.ts: passed (40 passing, 1 pending)npm run eslint -- src/vs/workbench/test/browser/parts/compositeBar.test.ts: passed (no problems)