mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-09 20:02:22 +01:00
* Refine Agents prompt with responsive session options Add a centered, collapsible session-options tray above the prompt, align picker controls, and compact labels progressively as space narrows. Move agent and mode controls into the prompt and cover layout, animation, keyboard navigation, and provider selections with regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Left-align the Agents session options tray Preserve the existing prompt inset and responsive disclosure behavior, and assert stable left alignment for expanded and collapsed desktop layouts while retaining the phone layout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Refine Agents prompt with responsive session options Add a centered, collapsible session-options tray above the prompt, align picker controls, and compact labels progressively as space narrows. Move agent and mode controls into the prompt and cover layout, animation, keyboard navigation, and provider selections with regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Left-align the Agents session options tray Preserve the existing prompt inset and responsive disclosure behavior, and assert stable left alignment for expanded and collapsed desktop layouts while retaining the phone layout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: harden new session options disclosure Persist disclosure and repository-scoped harness choices, surface non-default launch configuration in one accessible disclosure, and keep the experimental layout fully gated. Add privacy-safe telemetry and focused unit and component fixture coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: fix new session options experiment boundaries Restore the legacy composer layout outside the experiment, use the selected repository for harness persistence, and gate Agent placement and accessibility guidance on the effective layout. Fix the browser-specific repository label assertion and add focused regression coverage.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: fix new session component fixture checks Make fixture assertions respect the effective composer layout and account for bordered picker groups, then accept the reviewed Ubuntu screenshot baselines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: fix new session fixture CI Apply the repository formatter to the fixture assertions and accept the reviewed Ubuntu screenshot baselines for the intended composer layout changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: gate session options accessibility help to the experimental layout The session options tray and its Hide/Show disclosure only exist in the experimental composer layout. In the legacy layout the repository and harness controls render below the input with no disclosure toggle, so the unconditional help paragraph contradicted the legacy control and Sync Changes guidance for screen reader users. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: remember the new session options expanded state Persist whether the session options tray is expanded to profile storage and restore it when a composer is created, so a user who trusts their defaults can keep the composer collapsed across sessions instead of it re-expanding every time. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: refine experimental new session composer disclosure and tip Keep the session options expanded (no disclosure toggle) while a screen reader is active so the pickers never leave the accessibility tree, and adapt the accessibility help accordingly. Left-align the options tray with the input's edge, and demote the getting-started tip to a standalone notice below the input (like the migration notice) so it no longer sits between the pickers and the field. All gated on the experimental layout, which requires the unified workspace picker. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: add collapsed icon rail and fix composer tip and corner radii Add an experimental setting that keeps the collapsed session options as an always-available icon rail (labels hidden) instead of hiding them, so the pickers stay reachable without taking real estate. Give the demoted getting-started tip a full border and rounded corners as a standalone card, and square the input's top-left corner where the options tray joins it. All scoped to the experimental composer, which requires the unified workspace picker. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: fix prompt picker over-compaction and tip hover overlap The primary picker responsive layout measured against the config container alone, so in the experimental layout the reparented Agent/Mode controls in the sibling container to its left always fell outside the measured lane and forced every picker to compact to icons even with room. Measure against the whole toolbar so the pickers keep their labels until the row is genuinely full. Also increase the demoted tip's top gap so its floating hover actions clear the input above. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: give the session options tab a shoulder like connected tabs The collapsed session options read as a tab joined to the input, so flare its bottom-right corner into the input surface with the same shoulder radius (cornerRadius-small + strokeThickness) and pseudo-element technique the connected editor tabs use, instead of a hard step. The left edge stays flush with the input, so only the right side needs a shoulder. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: stop the workspace picker flickering shut on a touch tap A touch or trackpad tap fires a Gesture Tap and then a browser ghost click; both toggled the workspace picker, so a single tap opened and immediately re-closed it. Split the combined tap/click listener so a click within a short window of a tap on the same trigger is treated as that ghost click and ignored. Deliberate mouse clicks have no preceding tap, so double-click toggling still works. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: make the collapsed icons setting ExP-controllable with a trigger Add experiment: { mode: 'auto' } so ExP can set the collapsed-session-options icons default, matching the composer layout setting. Because the setting only affects a collapsed tray, log a settings experiment trigger when the composer reaches the collapsed state, before reading the setting, so both arms count and the many users who never collapse do not dilute the scorecard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: center the model picker separator dot between its values The dot's own margin-right doubled with the value label's margin-left, so the separator sat 6px from the model name but 12px from the configuration value, hugging the name. Drop the redundant margin so the gap is symmetric, and assert the symmetry in the fixture. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: make tray compaction fixtures platform-robust The NewSessionOptionsExpandedNarrow and NewSessionPromptPickersCompact fixtures asserted an exact label-visibility sequence at hardcoded pixel widths. Those breakpoints were calibrated on macOS and drift on CI Ubuntu as font metrics shift the widths at which labels collapse to icons, so the assertions failed in CI while passing locally. Assert the width-independent invariants instead: visible labels always form a left-aligned prefix (compaction runs right to left), narrowing only ever hides labels until the tray fully compacts, and widening restores them left to right until every label is visible again. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Hover-to-preview session options in the new-session composer Hovering or focusing the collapsed workspace picker row transiently expands the session options so they can be previewed, and collapses them again a few seconds after both pointer and focus leave. The preview overlays the persisted expanded/collapsed choice via a separate transient observable, so it never overwrites the user's remembered state. Also default the experimental collapsedSessionOptionsShowIcons setting to false so collapsing hides the pickers rather than keeping an icon rail. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Polish new-session composer: drop separator dots, duplicate heading, fix disclosure - Remove the separator dots from the combined model ("Auto Balance") and mode ("Interactive | Manual permissions") pickers that this branch introduced. - Revert the always-on "What should we build?" heading this branch added; it duplicated the existing setting-gated welcome phrases (which already live in main) and stacked a second heading above the composer. - Fix the expand/collapse disclosure fighting the hover-to-preview behavior: the toggle now acts on the state the user actually sees, and an explicit collapse while hovering is honored (and not immediately re-expanded) until the pointer leaves and hovers again. - Update fixtures accordingly; all 74 render without error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address code review: stale a11y heading text and unguarded config error toast - Remove the reference to the removed "What should we build?" heading from the new-session accessibility help; the composer's only heading is the dynamic welcome phrase, so no fixed heading text can be asserted. - Guard the session config-value setter's error toast with isCancellationError so benign aborts (e.g. a session switch) no longer surface a modal error, matching the silent best-effort sibling call sites while still reporting real protocol/checkout failures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Gate composer layout changes on the setting; align in-session input Issue 1 - keep the disabled layout unchanged: the new-session composer's toolbar restyling leaked into the legacy layout because several rules were scoped only to .new-chat-widget-container, not the .experimental-new-session-composer gate. In particular the session-controls group kept its experimental styling after being moved below the input. Gate those rules on the experimental class, and make the disclosure chevron honor its [hidden] attribute (the base .monaco-text-button display rule was overriding it, so the chevron showed when the feature was off). Issue 2 - align the in-session chat input with the new composer: apply the experimental-session-composer class to the in-session chat view when the setting is enabled, activating the existing CSS that right-aligns the agent/model controls and lifts the context-usage widget into the input's top-right corner. Also drive the NewChatInSessionWidget (start-new-topic composer) off the same setting so its controls match the new-session composer. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Never auto-collapse the hover preview while focus is inside the options row The collapse timer tracked focus with a boolean that desynced when focus moved into a picker or a picker opened a dropdown overlay (whose in-row trigger stays aria-expanded while the focused element is the overlay outside the row). The tray could then collapse out from under the user mid-interaction. Compute the interaction state live instead: stay open while the pointer is over the row, the active element is within the row, or any picker opened from the row is still expanded (excluding the disclosure toggle's own aria-expanded). Re-check the same condition when the timer fires, so focus that lands in a picker after the timer was scheduled still cancels the collapse. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Align the in-session chat input with the new-session composer Add a renderSecondaryControlsInInput option to ChatInputPart (threaded through ChatWidget view options) that lifts the secondary controls into the input to match the Agents new-session composer: the mode/permissions pickers lead the input toolbar row, and the context-usage widget becomes a direct child of the input container so the existing experimental-session-composer CSS can position it in the input's top-right corner. The sessions chat view enables it when the experimental composer layout setting is on, and makes .chat-input-container the positioning context for the usage widget. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Keep the reparented context-usage widget out of flow to avoid width mismatch Follow-up hardening for the in-session usage-widget placement. #337149 moved the context-usage widget into the composer by reserving flow space, which expanded the container past the editor cap and required the #337490 width fix. Avoid that class of issue here: - The widget is positioned absolutely, so it never reserves flow space or widens the input. The sessions chat also does not use the compact render style, so the toolbar width reservation that includes the usage widget never runs for it. - Bind the absolute positioning to a .chat-secondary-controls-in-input marker class added by ChatInputPart at the moment it reparents the widget, instead of the reactive composer class. This makes the out-of-flow guarantee intrinsic to the reparent, so the widget can never briefly render in-flow and widen the input if the reactive class lags. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Drop hover-to-expand; keep add-context first in the in-session input row - Remove the hover/focus preview for the new-session options tray. The tray now simply defaults to expanded and stays that way until the user collapses it via the disclosure chevron, which is already persisted and remembered. This deletes the transient _hoverExpanded overlay, its pointer/focus tracking, and the auto-collapse timer, restoring the toggle to a plain expand/collapse. - In the in-session input, insert the relocated mode/permissions pickers after the add-context toolbar instead of prepending them, so the add-context button stays first (matching the composer order: Add Context, then mode/permissions, then the execute controls). The button no longer shifts when the controls move into the input row. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Reserve editor space for the lifted usage widget (reuse prior trailing-space API) Reuse the context-usage placement mechanism from the earlier composer work (microsoft/vscode#337149): placeContextUsageWidget() to reparent and setInputEditorTrailingSpace() / inputEditorTrailingSpace to reserve room at the editor's trailing edge, with a fixed CONTEXT_USAGE_WIDGET_TRAILING_SPACE (72) instead of an ad-hoc live measurement. The reserved width is subtracted from the editor width so the first line of text never slides under the widget. This does not reintroduce the split-composer width mismatch fixed in microsoft/vscode#337490: the widget stays absolutely positioned and out of flow (bound to the .chat-secondary-controls-in-input marker the reparent adds), so it never widens the input, and the split-width cap handling that #337490 added (lifting the centered-content cap to infinity for split Sessions) remains in place in the sessions chat view. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Align usage widget with send button; make config pickers prefer opening below - Nudge the lifted context-usage widget's right edge to line up with the send button below it (right: 6px, matching the send button's offset). - Give the agent-host session config pickers a preferredAnchorPosition of BELOW so the tall, dynamic branch picker opens downward like the short pickers (isolation, harness) instead of flipping above, keeping the pickers aligned. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Force the session config pickers to open below their trigger The branch picker still flipped above because preferredAnchorPosition only prefers a side and falls back to the opposite when the tall, dynamic branch list does not fit below (placement 'overlap' picks whichever side has more space). Use the fixed anchorPosition: BELOW instead so the branch and isolation pickers always open downward like the short pickers, scrolling within the space below when the list is long. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Match in-session control order to the composer (model right-aligned) Align the experimental in-session input toolbar row with the new-session composer: "+ Add Context", then the mode/permissions pickers, then a right-aligned model picker, then the execute controls. The model picker is a MenuId.ChatInput item nested inside the add-context toolbar (before the mode/permissions container), so CSS order/margin can't reach it in place. ChatInputPart relocates the model element to a right-aligned slot in the toolbar row and re-applies it on every toolbar rebuild (the menu recreates the item). The toolbar tracks items by index, so relocating the element does not break responsive compaction. Flex order/margin on the row keeps the add-context toolbar compact on the left so only the model's margin creates the gap. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix in-session relocated model picker styling Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert in-session composer layout wiring Align with prior PR revert behavior by removing in-session secondary-control relocation and context-usage reparenting hooks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Restore reverted in-session toolbar behavior Bring back the in-session experimental composer behavior that was removed in #337753: class-gated toolbar alignment, lifted context-usage widget, and input trailing-space reservation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Place in-session permissions next to agent picker In running-session experimental composer mode, render secondary controls in the input toolbar row so ordering is +, agent picker, then permissions; keep execute controls right-aligned. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Right-align in-session model picker Move the in-session model picker into a dedicated right-side slot so the running-session row orders as +, agent, permissions, then model near execute controls. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix in-session model relocation gap Relocate the full model action container instead of only the inner picker element so no empty placeholder width remains in the left toolbar cluster. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Stabilize in-session model and permissions layout Keep permissions cluster from over-compacting and keep relocated model chip rendering at full width in the right slot for running-session experimental composer layout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Keep relocated model picker expanded When rendering secondary controls in the in-session toolbar row, keep the model picker out of responsive compact/minimal mode so its right-side label does not collapse into separators. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Match relocated model slot to session toolbar styling Apply the same split-label sizing semantics used by the new-session config toolbar to the relocated in-session model slot, and hide config summary dots that were consuming left-row space. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert "Match relocated model slot to session toolbar styling" This reverts commit0d9a9cad27. * Revert "Keep relocated model picker expanded" This reverts commite57156bb4b. * Revert "Stabilize in-session model and permissions layout" This reverts commit12c8dff37b. * Revert "Fix in-session model relocation gap" This reverts commitf5346c7d86. * Revert "Right-align in-session model picker" This reverts commitd80fab08e7. * Revert "Place in-session permissions next to agent picker" This reverts commit01bc28500a. * Revert "Restore reverted in-session toolbar behavior" This reverts commit5a997b5e90. * sessions: copy in-session composer behavior from #337149 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: move running session approvals into input Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: keep chat agent picker first Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: keep running chat controls left-aligned Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: keep model picker on right in chat Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: fix agent-host CI regressions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: align running permissions chip with model Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: restore model-thinking divider in chat inputs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: restore in-session permissions separator Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Rohan Malpani <romalpan@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
VS Code Tests
Contents
This folder contains the various test runners for VS Code. Please refer to the documentation within for how to run them: