Skip to content

sessions: select focused presentation services at startup - #345367

Merged
Osvaldo Ortega (osortega) merged 5 commits into
mainfrom
osortega/agents/mobile-stack/01-presentation
Nov 3, 2026
Merged

Osvaldo Ortega (osortega) merged 5 commits into
mainfrom
osortega/agents/mobile-stack/01-presentation

Conversation

@osortega

@osortega Osvaldo Ortega (osortega) commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Scope - entry-selected presentation

First independently reviewable slice of the experimental mobile Agents work from
#340360. This draft targets main; #345368 supplies the concrete mobile
workbench on top.

  • Give repository selection, session-list presentation, and chat edit rendering
    small, required contracts. Normal entries register their existing UI;
    shared components no longer choose a mobile callback or desktop fallback.
  • Pass composer font sizing and new-session chrome as component options.
    Register clipboard attachments separately from model/mode presentation,
    through the existing chat context-item mechanism.
  • Keep shared session/provider behavior in the existing services rather than
    copying it into a second implementation.
  • Preserve ordinary inline naming, repository authentication/cancellation,
    compare-editor lifetime, and external-edit opening. Empty clipboard selection
    now reports that there is no image instead of creating an invalid attachment.
  • Keep default implementations out of shared contracts. No experimental mobile
    implementation is imported or registered in this draft.

This PR does not add a mobile entry point, ship mobile styles, change publication,
add a hostname, or activate the experimental workbench. Normal editor and Agents
entry points retain their existing defaults.

Validation

Run in an isolated checkout of this draft, without the mobile implementation,
on Node 24.22.1:

  • npm run typecheck-client: passed.
  • npm run -s precommit: passed through the normal commit hook (41 applicable files).
  • npm run valid-layers-check: passed.
  • npm run transpile-client: passed.
  • Browser command below: 1,266 passed; 4 pre-existing pending tests.
Exact browser test commands
npm run test-browser-no-install -- \
  --run src/vs/workbench/contrib/chat/test/browser/widget/chatEditPresentation.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/actions/chatContext.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/widget/input/chatInputPart.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/widget/chatPhoneInputPresenter.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/widget/chatWidget.test.ts \
  --run src/vs/sessions/services/presentation/test/browser/sessionsListPresentation.test.ts \
  --run src/vs/sessions/contrib/chat/test/browser/chatView.test.ts \
  --run src/vs/sessions/contrib/chat/test/browser/sharedChatInputComposer.test.ts \
  --run src/vs/sessions/contrib/chat/test/browser/newChatInSessionWidget.test.ts \
  --run src/vs/sessions/contrib/chat/test/browser/newChatWidget.test.ts \
  --run src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts \
  --run src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts \
  --run src/vs/sessions/test/browser/mobileDiffView.test.ts \
  --browser chromium --reporter dot
# 1,266 passed; 4 pending

The review also checked chat inputs created outside a chat view. Automation
prompts now receive the same entry-owned metrics through explicit component
options. Clipboard registration retains its original AfterRestored phase.

npm run test-browser-no-install -- \
  --run src/vs/sessions/contrib/automations/test/browser/automationDialog.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/widget/chatEditPresentation.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/actions/chatContext.test.ts \
  --browser chromium --reporter dot
# 219 passed after the review adjustments.

No live phone/sign-in flow, publication, or deployment was exercised.

Keep the existing workbench presentation by default while allowing isolated entries to adapt session headers, pickers, chat edits and layout. Preserve provider-owned repository authentication and scoped model configuration.

Co-authored-by: Copilot <[email protected]>

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.

🟡 Changes recommended

Unresolved issues permit blank names and post-disposal renames, break edit-row fixtures through a missing service, and leave input metrics stale when presenter enablement changes.

4 open issues
What changed in this PR

This PR extracts optional presentation hooks from the experimental mobile Agents workbench into shared Sessions and chat components. It prepares for a separate mobile implementation without registering that implementation or activating a new entry point.

Changes:

  • Add presentation hooks for session lists, naming, repository selection, composer controls, model pickers, and edit views.
  • Allow entry points to customize workbench construction, viewport classification, and part presentation while retaining existing defaults.
  • Add regression coverage and update fixture services and mobile architecture documentation.
File Description
src/​vs/​workbench/​test/​browser/​componentFixtures/​fixtureUtils.ts Extend the input-presenter fixture stub.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​input/​modelPicker/​modelPickerActionItem.test.ts Test custom presentation for both picker buttons.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​chatPhoneInputPresenter.test.ts Test defaults, enablement, and picker identity.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​chatEditPhonePresenter.test.ts Test edit-presenter fallback and lifetime.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​modelPicker/​modelPickerWidget.ts Delegate eligible picker opening to custom presentation.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​modelPicker/​modelPickerActionItem.ts Add an optional picker-opening hook.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​chatPhoneInputPresenter.ts Extend composer presentation and session-picker contracts.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​chatInputPart.ts Consume custom editor metrics and action items.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​chatTextEditContentPart.ts Allow custom text-edit rendering.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​chatExternalEditContentPart.ts Allow custom diff opening.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​chatEditPhonePresenter.ts Introduce an optional edit-presenter service.
src/​vs/​workbench/​contrib/​chat/​browser/​actions/​chatContext.ts Support deferring clipboard reads until selection.
src/​vs/​sessions/​test/​browser/​layoutPolicy.test.ts Test default and fixed viewport classification.
src/​vs/​sessions/​services/​presentation/​test/​browser/​sessionsPresentation.test.ts Verify no-op presentation defaults.
src/​vs/​sessions/​services/​presentation/​browser/​sessionsPresentation.ts Define Sessions presentation hooks and defaults.
src/​vs/​sessions/​services/​presentation/​browser/​chatPhoneInputContext.ts Relocate shared phone-input context helpers.
src/​vs/​sessions/​services/​agentHostFilter/​test/​browser/​agentHostFilterService.test.ts Cover host-selection stability.
src/​vs/​sessions/​services/​agentHostFilter/​browser/​agentHostFilterService.ts Make automatic host preference overridable.
src/​vs/​sessions/​MOBILE.md Document optional presentation ownership.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​testSessionsList.ts Mark scroll accessors as overrides.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsListTestUtils.ts Register default presentation in list tests.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsListFixtureUtils.ts Register default presentation in list fixtures.
src/​vs/​sessions/​contrib/​sessions/​browser/​views/​sessionsView.ts Add header and list-decoration hooks.
src/​vs/​sessions/​contrib/​sessions/​browser/​views/​sessionsList.ts Add row-height and naming hooks.
src/​vs/​sessions/​contrib/​sessions/​browser/​mobile/​mobileOverlayContribution.ts Pass custom text reading to diff overlays.
src/​vs/​sessions/​contrib/​providers/​copilotChatSessions/​test/​browser/​copilotChatSessionsProvider.test.ts Test repository presentation after authentication.
src/​vs/​sessions/​contrib/​providers/​copilotChatSessions/​browser/​copilotChatSessionsProvider.ts Delegate repository UI while preserving provider handling.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​mobileChatPhoneInputTarget.test.ts Update the context-helper import.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​mobile/​mobileChatPhoneInputPresenter.ts Use relocated helpers and optional model selection.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​mobile/​mobileChatInputConfigPicker.ts Use the shared context-helper location.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​mobile/​mobileAgentHostModePicker.ts Use the shared context-helper location.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​newChatWidget.test.ts Cover custom header placement.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​modelPicker.test.ts Supply the presenter dependency in tests.
src/​vs/​sessions/​contrib/​chat/​browser/​noAgentHostEmptyState.ts Allow overriding empty-state icon visibility.
src/​vs/​sessions/​contrib/​chat/​browser/​newChatWidget.ts Render an optional new-session header.
src/​vs/​sessions/​contrib/​chat/​browser/​modelPicker.ts Integrate unified presentation and picker registration.
src/​vs/​sessions/​browser/​workbenchFactory.ts Define the workbench factory contract.
src/​vs/​sessions/​browser/​workbench.ts Expose layout-policy and titlebar construction hooks.
src/​vs/​sessions/​browser/​web.main.ts Accept a custom workbench factory.
src/​vs/​sessions/​browser/​web.factory.ts Forward the optional factory through bootstrap.
src/​vs/​sessions/​browser/​parts/​sessionsParts.ts Honor an explicit initial viewport class.
src/​vs/​sessions/​browser/​parts/​mobile/​mobileTitlebarPart.ts Extract overridable title and account-sheet presentation.
src/​vs/​sessions/​browser/​parts/​mobile/​contributions/​mobileDiffView.ts Support custom text readers and display load errors.
src/​vs/​sessions/​browser/​parts/​customViewGridParts.ts Honor an explicit initial viewport class.
src/​vs/​sessions/​browser/​paneCompositePartService.ts Honor an explicit initial viewport class.
src/​vs/​sessions/​browser/​layoutPolicy.ts Support fixed viewport classification.
src/​vs/​platform/​actionWidget/​test/​browser/​tabbedActionListWidget.test.ts Adapt the toggle callback to return void.
src/​vs/​platform/​actionWidget/​browser/​actionList.ts Allow asynchronous inline-toggle callbacks.

Review effort: Balanced

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Base: 498770fb Current: 6c80a4fc

No screenshot changes.

Use required entry-selected repository, list and edit presentations. Keep input sizing in component options and clipboard behavior in entry registrations, preserving ordinary UI and async lifetimes.

Co-authored-by: Copilot <[email protected]>
@osortega Osvaldo Ortega (osortega) changed the title sessions: add opt-in presentation hooks for the mobile workbench sessions: select focused presentation services at startup Nov 1, 2026
Bring in current main, including the sticky request bubble test fix from #345320. Preserve both presentation and pinned canvas services.

Co-authored-by: Copilot <[email protected]>
Normalize new-group and rename results at the shared list boundary, with coverage for whitespace and disposed lists. Register the default chat edit presentation in fixture services and support its editor-open requests.

Co-authored-by: Copilot <[email protected]>
Merge main at 498770f. Preserve reactive chat font sizing and live height calculation while honoring explicit presentation metrics, with regression coverage for mobile overrides.

Co-authored-by: Copilot <[email protected]>
@osortega
Osvaldo Ortega (osortega) marked this pull request as ready for review November 3, 2026 03:44
@osortega
Osvaldo Ortega (osortega) merged commit 96a55fc into main Nov 3, 2026
55 checks passed
@osortega
Osvaldo Ortega (osortega) deleted the osortega/agents/mobile-stack/01-presentation branch November 3, 2026 05:03
@vs-code-engineering vs-code-engineering Bot added this to the 1.146.0 milestone Nov 3, 2026
@Julet12

Julet12 commented Nov 3, 2026

Copy link
Copy Markdown

Hi I think it is good for a starter

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.

4 participants