Skip to content

Add a consistent empty state to the Agents Search tab - #334966

Merged
Lee Murray (mrleemurray) merged 6 commits into
mainfrom
mrleemurray/fix-334630-search-empty-state
Sep 8, 2026
Merged

Add a consistent empty state to the Agents Search tab#334966
Lee Murray (mrleemurray) merged 6 commits into
mainfrom
mrleemurray/fix-334630-search-empty-state

Conversation

@mrleemurray

@mrleemurray Lee Murray (mrleemurray) commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #334630

Summary

Give the Agents Window Search tab the same empty-state treatment as the other tabs, instead of leaving the results area blank.

  • Reuse the shared Sessions heading and description: Search / Search for text in your files.
  • Keep the contribution entirely in the Sessions layer; regular VS Code Search is unchanged.
  • Follow the current results model and layout, preserving query controls, populated results, the existing “No Results” text, and restored-query messages. The empty state adds no tab stops and does not intercept pointer input or move focus.
  • Add six real-editor regression tests and extend the real Search editor fixtures with empty, compact, narrow, populated, no-results, and restored-query states.

Validation

  • 9 targeted tests passed in Chromium and Electron, including the existing Sessions editor/empty-state tests.
  • Client typecheck, targeted ESLint/import-layer checks, stylelint, and commit hygiene passed.
  • Verified nine empty-state fixtures across dark, light, and dark high contrast; confirmed centering, containment, and unchanged query controls. Also checked populated/no-results/restored-query fixtures, query-clearing preservation, and native Tab through the query controls.
  • Visual and interaction validation used real-component browser fixtures, not a full desktop walkthrough.

Manual testing

  1. Open a new Search tab in the Agents Window. The heading and description should be centered below the query controls.
  2. Run searches with and without matches. Existing results and “No Results” should replace the initial empty state. Clearing the query must not hide existing results.
  3. Check compact/narrow layouts and high-contrast themes; navigate the query controls using Tab. The empty-state text must not introduce a focus stop.

Screenshots

Real Search editor fixtures; high contrast shows the query field focused.

Dark Light
Search empty state in the dark theme Search empty state in the light theme

High contrast — query focused

Search empty state with the query focused in dark high contrast

Reuse the shared Sessions empty-state treatment for empty Search results while preserving query controls, restored results, and keyboard navigation. Add lifecycle regression tests and themed fixtures.

Fixes #334630

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 7, 2026 18:55

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 reviewed changes have no unresolved approval-blocking issues.

Pull request overview

Adds a Sessions-scoped empty state to the Agents Search tab while preserving existing controls and result behavior.

Changes:

  • Adds a reactive, non-interactive empty-state overlay.
  • Adds behavioral tests and visual fixtures across layouts and states.
  • Keeps the implementation isolated to the Sessions layer.
File summaries
File Description
src/vs/sessions/contrib/search/test/browser/searchEditorEmptyState.test.ts Tests visibility, layout, focus, and disposal.
src/vs/sessions/contrib/search/test/browser/searchEditor.fixture.ts Adds Search editor visual scenarios.
src/vs/sessions/contrib/search/browser/searchEditorEmptyState.contribution.ts Implements the empty-state contribution.
src/vs/sessions/contrib/search/browser/search.contribution.ts Registers the contribution in Sessions.
src/vs/sessions/contrib/search/browser/media/searchEditorEmptyState.css Centers and isolates the overlay.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@boedysutris-ctrl

boedysutris-ctrl commented Sep 7, 2026 via email

Copy link
Copy Markdown

@boedysutris-ctrl boedysutris-ctrl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@boedysutris-ctrl

Copy link
Copy Markdown

mrleemurray/fix-334630-search-empty-state

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: f3e4cb8b Current: 83fd663c

3 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details.

Added (15)

sessions/searchEditor/Empty/Dark

current

sessions/searchEditor/Empty/Light

current

sessions/searchEditor/Empty/DarkHighContrast

current

sessions/searchEditor/EmptyCompact/Dark

current

sessions/searchEditor/EmptyCompact/Light

current

sessions/searchEditor/EmptyCompact/DarkHighContrast

current

sessions/searchEditor/EmptyNarrow/Dark

current

sessions/searchEditor/EmptyNarrow/Light

current

sessions/searchEditor/EmptyNarrow/DarkHighContrast

current

sessions/searchEditor/Results/Dark

current

sessions/searchEditor/Results/Light

current

sessions/searchEditor/NoResults/Dark

current

sessions/searchEditor/NoResults/Light

current

sessions/searchEditor/RestoredQuery/Dark

current

sessions/searchEditor/RestoredQuery/Light

current

Exercise fractional content widths to reproduce the 1/128-pixel flex centering difference seen in macOS CI. Compare center offsets at CSS-pixel precision while keeping dimensions and pointer behavior exact. Production UI and screenshot baselines are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: mrleemurray <25487940+mrleemurray@users.noreply.github.com>
Co-authored-by: mrleemurray <25487940+mrleemurray@users.noreply.github.com>
@mrleemurray
Lee Murray (mrleemurray) merged commit d9b459b into main Sep 8, 2026
33 checks passed
@mrleemurray
Lee Murray (mrleemurray) deleted the mrleemurray/fix-334630-search-empty-state branch September 8, 2026 13:18
@vs-code-engineering vs-code-engineering Bot added this to the 1.138.0 milestone Sep 8, 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.

Search tab needs empty state

9 participants