Skip to content

feat: enhance sessions view with find widget and header actions#307679

Draft
romalpani wants to merge 5 commits intomicrosoft:mainfrom
romalpani:romalpan-dev-sessions-minor
Draft

feat: enhance sessions view with find widget and header actions#307679
romalpani wants to merge 5 commits intomicrosoft:mainfrom
romalpani:romalpan-dev-sessions-minor

Conversation

@romalpani
Copy link
Copy Markdown

@romalpani romalpani commented Apr 3, 2026

Enhance the sessions view with find widget and header actions.
Changes include:

  • new, compact "New" button that's not wide like before and sits neatly in the header
  • reuses the find control with some UI modifications to fit in place smoothly
  • moved the filter button to the sessions list header too

Fixes #307524

In the demo video below (light theme is current, dark theme is proposed).

CleanShot.2026-04-02.at.11.58.00.mp4

Copilot AI review requested due to automatic review settings April 3, 2026 17:36
Copy link
Copy Markdown
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

This PR enhances the Sessions view in the Agents/Sessions window by moving key controls into an in-view header row and embedding the tree find widget into that header, supported by a small extension to the base tree find-widget plumbing.

Changes:

  • Add a custom header row to the Sessions view with icon actions (Find, Filter) and a compact “New” button, and integrate the tree’s find widget into the header area.
  • Extend the base AbstractTree find controller to optionally render the find widget into a provided external container (instead of overlaying inside the tree).
  • Update Sessions list configuration and CSS to support the embedded find widget and refreshed header/button styling.

Reviewed changes

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

Show a summary per file
File Description
src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts Removes Sessions view title menu contributions for Find/Filter, shifting entry points to the view header UI.
src/vs/sessions/contrib/sessions/browser/views/sessionsView.ts Builds the new Sessions header row, wires header actions, and toggles header vs. embedded find widget visibility.
src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts Adds support for an external find-widget container and customizes find widget styles for the Sessions tree.
src/vs/sessions/contrib/sessions/browser/media/sessionsViewPane.css Adds styling for the new header row, embedded find widget layout, and compact “New” button.
src/vs/base/browser/ui/tree/abstractTree.ts Adds findWidgetContainer option to render the tree find widget into a caller-provided container and avoid padding changes in that mode.

romalpani and others added 2 commits April 3, 2026 13:31
Resolve Copilot review comments on the sessions view header actions
and compact "New" button styling:

- Register hover delegate for disposal: `createInstantHoverDelegate()`
  returns an owned object that must be disposed by the consumer. Wrap
  it with `this._register()` instead of passing it inline to ActionBar.

- Anchor filter context menu to the correct element: use
  `actionBar.viewItems` and `BaseActionViewItem.element` to get the
  filter button's actual DOM element, instead of anchoring to the
  entire ActionBar container which caused misaligned menu positioning.

- Fix compact "New" button border visibility: the Button constructor
  sets an inline `border` style when `buttonSecondaryBorder` is
  provided, which overrides CSS declarations. Pass an empty string for
  `buttonSecondaryBorder` to prevent the inline style, and let the CSS
  rule handle the border with a `color-mix` fallback for themes where
  `--vscode-button-border` is undefined.

- Remove `!important` from border rule: drop `.default-colors` from
  the selector since inline style suppression makes it unnecessary,
  and use `var(--vscode-button-border, color-mix(...))` for a subtle
  always-visible border that adapts to both light and dark themes.
@hawkticehurst hawkticehurst removed their request for review April 3, 2026 21:48
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.

Agents-app session filter and search misplaced, new session button too wide

3 participants