sessions: share the session hover between the sessions list and chat pills - #332495
Merged
Benjamin Christopher Simmonds (benibenj) merged 2 commits intoAug 25, 2026
Conversation
…pills The sessions list hover was built as an ad-hoc markdown string: it showed the source repository rather than the worktree a session actually works in, never said "Worktree", listed no pull requests, and named only the provider. It was also unusable anywhere else. Replace it with a SessionSummaryHoverWidget in the workbench layer that renders provider-neutral ISessionSummaryHoverData, plus a small per-window registry so agent-host-session:// pills in chat output show the same hover. Each window adapts its own data source onto that shape - the Agents window from an ISession, the editor window from an IChatSessionItem - and omits what it cannot answer. The hover now reads: title / workspace, worktree, branch and diff stats / one line per pull request the session created, in its live state color / session type and provider. Rules only appear between blocks that exist, so it stays about as compact as before while carrying more. To support the pull request block, IGitHubPullRequestRef gained title and createdByThisSession, populated by the agent-host provider from the artifacts the agent recorded; secondary pull requests now also pick up their last-known state icon from the icon cache. Adds component fixtures covering both data sources and the empty cases.
Benjamin Christopher Simmonds (benibenj)
enabled auto-merge (squash)
August 25, 2026 07:52
Copilot started reviewing on behalf of
Benjamin Christopher Simmonds (benibenj)
August 25, 2026 07:52
View session
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Sandeep Somavarapu (@sandy081)Matched files:
Ladislau Szomoru (@lszomoru)Matched files:
|
Contributor
Screenshot ChangesBase: Added (18) |
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces a shared session-summary hover for session lists and chat pills, with richer workspace, worktree, change, pull-request, and provider information.
Changes:
- Adds a reusable hover widget and provider registry.
- Integrates the hover into Agents and editor windows.
- Enriches Agent Host pull-request metadata and visual fixtures.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/test/browser/componentFixtures/sessions/sessionHover.fixture.ts |
Adds hover visual fixtures. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatRichLink.ts |
Adds rich session-pill hovers. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownDecorationsRenderer.ts |
Injects the hover service. |
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts |
Registers the shared service. |
src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHoverService.ts |
Implements hover-provider resolution. |
src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHover.ts |
Implements the shared widget. |
src/vs/workbench/contrib/chat/browser/agentSessions/media/sessionSummaryHover.css |
Styles the hover layout. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.ts |
Adapts editor session items. |
src/vs/sessions/services/sessions/common/session.ts |
Extends pull-request references. |
src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts |
Uses the shared list hover. |
src/vs/sessions/contrib/sessions/browser/sessionHoverContent.ts |
Adapts Agents sessions. |
src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts |
Populates PR titles, ownership, and icons. |
src/vs/sessions/contrib/providers/agentHost/browser/agentHostSessionArtifacts.ts |
Collects PR artifact titles. |
src/vs/sessions/contrib/chat/test/browser/openSessionLinkOpener.test.ts |
Tests Agents-window hover resolution. |
src/vs/sessions/contrib/chat/browser/openSessionLinkOpener.contribution.ts |
Registers the Agents-window provider. |
Review details
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 15/15 changed files
- Comments generated: 5
- Review effort level: Balanced
Hygiene rejected the new stylesheet on two counts, both introduced by the follow-up that moved icons onto the first line of a wrapping row: - Comment continuation lines were indented with spaces to align under the opening `/*`. The indentation rule only accepts tabs (or a leading ` *`), so those lines now start at the enclosing indentation. - `--session-summary-hover-line-height` was a locally-defined custom property, which stylelint reports as an unknown variable. It only ever held one value, so both sites now use the literal instead. The icon keeps an explicit `line-height`: codicon.css sets `font: ... 16px/1` whose shorthand carries `line-height: 1`, and at equal specificity that would otherwise leave the glyph box shorter than the text line it aligns to. Computed geometry is unchanged from the version verified in the component explorer.
Martin Aeschlimann (aeschli)
approved these changes
Aug 25, 2026
Benjamin Christopher Simmonds (benibenj)
merged commit Aug 25, 2026
5aaf097
into
main
27 checks passed
Benjamin Christopher Simmonds (benibenj)
deleted the
benibenj/agents/hover-widget-structure-improvements
branch
August 25, 2026 08:32
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.
The sessions list hover was an ad-hoc markdown string. It showed the source repository rather than the worktree a session actually works in, never used the word "Worktree", listed no pull requests, and named only the provider. It also could not be reused anywhere else.
What changed
A shared
SessionSummaryHoverWidgetin the workbench layer renders provider-neutralISessionSummaryHoverData, plus a small per-windowISessionSummaryHoverServiceregistry soagent-host-session://pills in chat output show the same hover. Each window adapts its own data source onto that shape and omits what it cannot answer:ISession-> hover data (sessionHoverContent.ts), the richest source.IChatSessionItem-> hover data, which carries no worktree or pull requests, so those rows are simply absent.New layout
Separators only appear between blocks that exist, so a session with no pull requests gets one rule and a quick chat none. Despite carrying more information, it stays about as compact as before.
Supporting model change
IGitHubPullRequestRefgainedtitleandcreatedByThisSession. The agent-host provider populates both: titles come from the PR artifact labels the agent recorded, andcreatedByThisSessionis the "main eligible" set (PRs the agent created plus PRs found for the session branch), excluding ones inherited from the checkout or merely referenced. Only pull requests the session produced are listed. Secondary PRs now also pick up their last-known state icon fromIPullRequestIconCache, since only the main PR is polled live.Validation
tsc --noEmitclean, eslint clean, stylelint clean,valid-layers-checkpassesOpenSessionLinkOpenerContribution,LocalAgentHostSessionsProvider,SessionsLifecycleTracker), including a new test that the pill hover data resolves through the registered providersessions/sessionHover) cover both data sources plus the empty cases, verified visually in the component explorer