Skip to content

sessions: fix external application badge From setting and row height - #343783

Merged
Benjamin Christopher Simmonds (benibenj) merged 1 commit into
mainfrom
benibenj/agents/fix-chat-session-badge-height
Oct 23, 2026
Merged

Benjamin Christopher Simmonds (benibenj) merged 1 commit into
mainfrom
benibenj/agents/fix-chat-session-badge-height

Conversation

@benibenj

Copy link
Copy Markdown
Contributor

Fixes three problems with the external application badge in the Agents window Sessions list.

Changes

  • The showFrom setting was ignored. The setting was named sessions.list.externalApplicationBadge.showFrom, which nests it under sessions.list.externalApplicationBadge, which is itself a setting. The configuration model can't have a setting that is also a parent of another setting, so it dropped the value and logged Conflict in settings file … Ignoring sessions.list.externalApplicationBadge.showFrom as sessions.list.externalApplicationBadge is "title". As a result, the "From" prefix could never be turned off. This PR renames the setting to sessions.list.externalApplicationBadgeShowFrom.
  • Rows changed height on hover. The title badge was a fixed 17px, but quick-chat (no workspace), compact, and comparison rows have a 16px title line. Showing the badge made those rows 1px taller, and the row shrank back when hovering hid the badge. The badge is now sized to its row's line height (1lh).
  • New default. sessions.list.externalApplicationBadgeShowFrom now defaults to false.

Notes for reviewers

  • There is no migration from the old setting name, because its value never took effect. Any ExP treatment that targets the old key needs to switch to the new one.
  • The existing tests didn't catch the conflict because TestConfigurationService stores keys flat. This PR adds a registry test that no sessions.* setting is nested under another one.
  • The badge screenshot fixtures now render without "From" by default. The old "without From" fixture is now SessionsList_ExternalApplicationBadgeWithFrom, so both variants are still covered. Screenshot baselines will need updating.

How to test

  1. In the Agents window, have a session that was created outside VS Code (for example from Copilot CLI) and a chat without a workspace.
  2. With the default settings, the badge shows only the application name. Setting "sessions.list.externalApplicationBadgeShowFrom": true adds the "From" prefix, and the renderer log no longer reports a settings conflict.
  3. Hover a quick-chat row that shows the badge. The row height does not change.

Validation

  • npm run test-browser-no-install -- --run src/vs/sessions/contrib/sessions/test/browser/sessions.contribution.test.ts --run src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts --browser chromium: passed, 373 tests. The new row-height test fails without the CSS fix (17px at rest, 16px on hover).
  • npm run eslint -- <changed .ts files>: passed.
  • npm run stylelint -- src/vs/sessions/contrib/sessions/browser/media/sessionsList.css: passed.
  • npm run typecheck-client: no errors in the changed files. The only error was in src/vs/platform/terminal/node/terminalProcess.ts, because the local node_modules has a stale node-pty (1.2.0-beta.15, but ^1.2.0-beta.18 is required). It is unrelated to this change.

The showFrom setting was nested under sessions.list.externalApplicationBadge, which is itself a setting, so the configuration model ignored it and the 'From' prefix could not be turned off. Rename it to sessions.list.externalApplicationBadgeShowFrom and default it to false.

The title badge had a fixed 17px height, which grew 16px quick-chat, compact, and comparison title rows by 1px until hover hid the badge. Size it to its row's line height instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🟢 Approval recommended

The focused fixes are consistent across both list implementations, include regression coverage, and have no unresolved blocking findings.

No open issues 🎉

What changed in this PR

This PR fixes external application badge configuration and hover-related row-height changes in the Agents window Sessions list.

Changes:

  • Renames the conflicting “From” prefix setting and consistently defaults it to false.
  • Sizes title badges to the row’s line height to prevent hover-induced resizing.
  • Adds regression tests and updates screenshot fixtures to cover both prefix variants.

No blocking issues were identified. Screenshot baselines still need updating, as noted in the PR description.

File Description
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsList.test.ts Updates default badge expectations and adds hover-height coverage.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsList.fixture.ts Updates visual expectations and retains explicit “From” coverage.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessions.contribution.test.ts Tests the new default and guards against nested setting conflicts.
src/​vs/​sessions/​contrib/​sessions/​browser/​views/​sessionsList.ts Aligns renderer and list configuration fallbacks with the new default.
src/​vs/​sessions/​contrib/​sessions/​browser/​sessions.contribution.ts Registers the renamed setting with a false default.
src/​vs/​sessions/​contrib/​sessions/​browser/​media/​sessionsList.css Matches title badge height to the inherited line height.
src/​vs/​sessions/​common/​sessionConfig.ts Renames the setting key and documents the nesting constraint.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 77b44cf3 Current: 792f76a1

Changed (8)

sessions/artifactDetails/CommentsInformation/Light
Before After
before after
sessions/sessionsList/SessionsList_ExternalApplicationBadge/Light
Before After
before after
sessions/sessionsList/SessionsList_ExternalApplicationBadgeDetails/Light
Before After
before after
sessions/sessionsList/SessionsList_ExternalApplicationBadgeQuickChat/Light
Before After
before after
sessions/sessionsList/SessionsList_ExternalApplicationBadgeQuickChatDetails/Light
Before After
before after
sessions/sessionsList/SessionsList_ExternalApplicationBadgeLongLabel/Light
Before After
before after
sessions/sessionsList/SessionsList_ExternalApplicationBadgeHovered/Light
Before After
before after
sessions/sessionsList/SessionsList_ExternalApplicationBadgeFocused/Light
Before After
before after

Added (1)

sessions/sessionsList/SessionsList_ExternalApplicationBadgeWithFrom/Light

current

Removed (1)

sessions/sessionsList/SessionsList_ExternalApplicationBadgeWithoutFrom/Light

baseline

@benibenj
Benjamin Christopher Simmonds (benibenj) merged commit 520e628 into main Oct 23, 2026
60 checks passed
@benibenj
Benjamin Christopher Simmonds (benibenj) deleted the benibenj/agents/fix-chat-session-badge-height branch October 23, 2026 13:27
@vs-code-engineering vs-code-engineering Bot added this to the 1.144.0 milestone Oct 23, 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.

3 participants