Skip to content

Polish agent sessions list UI#293523

Merged
daviddossett merged 9 commits intomicrosoft:mainfrom
daviddossett:main
Feb 7, 2026
Merged

Polish agent sessions list UI#293523
daviddossett merged 9 commits intomicrosoft:mainfrom
daviddossett:main

Conversation

@daviddossett
Copy link
Collaborator

@daviddossett daviddossett commented Feb 6, 2026

  • Show description alongside diff badge with dot separator
  • Use regular foreground color for active selection, descriptionForeground for inactive
  • Remove background/outlines from diff badge
  • Bump read indicator opacity to 20%
CleanShot 2026-02-06 at 12 18 21@2x

- Show description alongside diff badge with dot separator
- Use regular foreground for active selection, descriptionForeground for inactive
- Remove background/outlines from diff badge
- Bump read indicator opacity to 20%
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

UI polish for the Agent Sessions list in the Chat workbench contribution, aiming to tighten spacing, improve visual hierarchy, and refine selection/read-indicator styling.

Changes:

  • Updates list layout/typography (padding, row height, icon sizing), and adjusts how title/status/description/diff/badge are arranged and displayed.
  • Adds “mouse vs keyboard focus” tracking to suppress focus outlines on mouse interaction while preserving keyboard navigation affordances.
  • Tweaks color tokens/usage (read indicator opacity; theme disabledForeground change).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css Adjusts padding for the sessions “new” button container and section.
src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css Refines list row styling (padding, border radius), toolbar/status visibility rules, and details row layout (separator + fade mask).
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts Updates rendering layout (status moved), row height, section labels, and introduces compact time/duration formatting helpers.
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.ts Adds DOM listeners to toggle a mouse-focused class for focus-outline behavior.
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.ts Increases read-indicator opacity from 15% to 20%.
extensions/theme-2026/themes/2026-dark.json Changes disabledForeground color token value.
Comments suppressed due to low confidence (1)

src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts:823

  • compactTimeAgo returns months as '{0}m', which is ambiguous with minutes (also m) and contradicts the doc comment examples (“3mo”, “4wk”, “1yr”). Please use distinct units for months/weeks/years (or update the comment), so the UI can’t display confusing values like 2m that could mean minutes or months.
/**
 * Returns a compact relative time string without spaces between number and unit.
 * e.g. "1m", "2h", "1d", "4wk", "3mo", "1yr"
 */
function compactTimeAgo(date: number): string {
	const seconds = Math.round((Date.now() - date) / 1000);
	if (seconds < MINUTE) {
		return localize('compact.now', 'now');
	}
	if (seconds < HOUR) {
		const value = Math.round(seconds / MINUTE);
		return localize('compact.minutes', '{0}m', value);
	}
	if (seconds < COMPACT_DAY) {
		const value = Math.round(seconds / HOUR);
		return localize('compact.hours', '{0}h', value);
	}
	if (seconds < COMPACT_WEEK) {
		const value = Math.round(seconds / COMPACT_DAY);
		return localize('compact.days', '{0}d', value);
	}
	if (seconds < COMPACT_MONTH) {
		const value = Math.round(seconds / COMPACT_WEEK);
		return localize('compact.weeks', '{0}w', value);
	}
	if (seconds < COMPACT_YEAR) {
		const value = Math.round(seconds / COMPACT_MONTH);
		return localize('compact.months', '{0}m', value);
	}
	const value = Math.round(seconds / COMPACT_YEAR);
	return localize('compact.years', '{0}y', value);

@daviddossett daviddossett marked this pull request as ready for review February 6, 2026 20:35
@vs-code-engineering
Copy link

vs-code-engineering bot commented Feb 6, 2026

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.ts
  • src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.ts
  • src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts
  • src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css

Add useCompactUnits option to fromNow() and getDurationString() for
single-letter compact units (5m, 2h, 3d) and remove custom functions
from agentSessionsViewer.
* useFullTimeWords is ignored.
*/
export function getDurationString(ms: number, useFullTimeWords?: boolean) {
export function getDurationString(ms: number, useFullTimeWords?: boolean, useCompactUnits?: boolean) {
Copy link
Member

@TylerLeonhardt TylerLeonhardt Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably have:

  • combined useFullTimeWords?: boolean, useCompactUnits?: boolean into a displayOptions object
  • then do this instead of a separate section for useCompactUnits:
	if (seconds < 1) {
		return useFullTimeWords
			? localize('duration.m.full', '{0} minutes', Math.round(ms / (1000 * minute)))
			:  useCompactUnits
				? localize('duration.compact.m', '{0}m', Math.round(ms / (1000 * minute)))
				: localize('duration.m', '{0} mins', Math.round(ms / (1000 * minute)));
	}

(or use an if/else instead of nested ternary)

esp since there is some overlap like ms & s

but this is fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please please please add tests since this is in base.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up pulling out the date stuff to minimize PR scope. I'll try this in a follow up!

TylerLeonhardt
TylerLeonhardt previously approved these changes Feb 6, 2026
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 6, 2026
@daviddossett daviddossett merged commit 0ed85cc into microsoft:main Feb 7, 2026
17 checks passed
@bpasero
Copy link
Member

bpasero commented Feb 7, 2026

Recorded some findings/regressions in #293602

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants