Repository navigation
sessions: improve Send Later scheduling and draft editing - #348610
Conversation
Open single send options directly, preserve the conversation model during scheduled edits, hide scheduling for sent-request edits, and keep scheduled drafts intact when opened. Retain picker anchors across rerenders and show minute-refreshed time remaining. Fixes #348482\nFixes #348484\nFixes #348494\nFixes #348497\nFixes #348507 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The registration snapshot is stale and causes a test failure, while the preview is blank on first open and Send Later remains available during request editing, producing an error.
3 open issues
What changed in this PR
This PR improves Send Later in the Agents Window, preserving scheduled drafts when opened and refining editing, timing, and preview behavior using shared chat and Quick Input components.
Changes:
- Opens the time picker directly for a single send option, preserves model settings during scheduled edits, and adds sent-request editing guards.
- Adds pinned, read-only scheduled-draft previews that follow schedule changes.
- Adds live countdown labels, preserves detached picker anchors, and expands tests and accessibility help.
| File | Description |
|---|---|
src/vs/workbench/test/browser/componentFixtures/sessions/scheduledChatEditor.fixture.ts |
Adds scheduled and completed preview fixtures. |
src/vs/workbench/contrib/sessions/test/browser/scheduledChatsService.test.ts |
Tests schedule preservation and preview reuse. |
src/vs/workbench/contrib/sessions/browser/scheduledChatsService.ts |
Opens editor previews without cancelling schedules. |
src/vs/workbench/contrib/sessions/browser/scheduledChatEditor.ts |
Adds the read-only scheduled-request editor. |
src/vs/workbench/contrib/chat/test/browser/widget/input/chatInputPart.test.ts |
Tests direct and multi-option send actions. |
src/vs/workbench/contrib/chat/test/browser/widget/chatWidget.test.ts |
Tests model inheritance during scheduled edits. |
src/vs/workbench/contrib/chat/test/browser/widget/chatListRenderer.test.ts |
Tests countdown updates and stable controls. |
src/vs/workbench/contrib/chat/common/model/chatViewModel.ts |
Exposes scheduled send timestamps. |
src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.ts |
Runs a lone secondary send action directly. |
src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts |
Initializes inline edits with conversation model settings. |
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts |
Refreshes countdown labels without rerendering messages. |
src/vs/sessions/services/sessions/browser/sessionsCoreServices.registration.ts |
Registers the scheduled-request editor. |
src/vs/sessions/contrib/chat/test/browser/sharedChatInputComposerActions.test.ts |
Tests editing-related Send Later visibility guards. |
src/vs/sessions/contrib/chat/browser/sharedChatInputComposer.contribution.ts |
Adds editing guards to Send Later. |
src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.ts |
Documents previews, countdowns, and updated interactions. |
src/vs/platform/quickinput/test/browser/quickinput.test.ts |
Tests picker positioning after anchor removal. |
src/vs/platform/quickinput/browser/quickInputController.ts |
Retains geometry for detached picker anchors. |
Review effort: Balanced
Initialize the chat widget as visible when its editor view is created. Let the fixtures exercise the same first-open lifecycle rather than explicitly making the view visible. Refs #348497 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: TylerLeonhardtMatched files:
Sandeep Somavarapu (@sandy081)Matched files:
Ladislau Szomoru (@lszomoru)Matched files:
|
Apply the repository formatter to the relative-time conditional so the changed-file hygiene check passes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep scheduled requests editable without cancelling their schedules. Save through the primary Send in control and clear the composer; reserve the dropdown for rescheduling. Preserve ordinary drafts, show relative scheduled times, and keep disabled submit controls visually consistent. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve saved-draft identity, cancellation and focus handling alongside scheduled draft editing. Capture the normalized scheduled target after restoration completes without allowing startup defaults to overwrite it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Demo of
|
Before (main) |
After (this pull request) |
|---|---|
![]() One click opens a menu containing Send Later; another click is needed to reach time presets. |
![]() One click on the send dropdown opens the Send Later time presets. |
Scheduled draft opens in the editable composer
Drafts show the time remaining
Before (main) |
After (this pull request) |
|---|---|
![]() The scheduled draft shows an absolute date and time, truncated by the sidebar width. |
![]() The scheduled draft stays in Drafts and shows Sends in 59 minutes. |
The change, on this pull request's build:
after.mp4
The same steps on main
before.mp4
Recorded by an agent on a build of this pull request merged with main, signed out, with a mock model. It can be wrong. Workflow run
Tip
Was this useful? React to this comment with 👍 or 👎.
On the VS Code team? Say what was wrong or missing.
Align the snapshot with the sent-request editing guards in the command palette and send dropdown. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Offer immediate sending in the scheduled draft time picker while preserving the future-time default and save-for-later primary action. Save current edits before dispatch, retain input on failure, and avoid flashing a terminal label while the composer clears. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Critical scheduled-draft restoration and preview-state bugs can overwrite or discard user edits, silently change execution settings, and block normal navigation when a request is no longer scheduled.
5 open issues
Preserve descriptor configuration when restoring without a local handoff · New Guard New Session while preview restoration is still opening · New Set the dirty-tracking baseline before restoring the preview · New Allow leaving a preview after its scheduled request is no longer active · New Handle rejected scheduled saves and notify the user · New
3 resolved since last review
Review effort: Max
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore complete descriptor settings, guard asynchronous restoration, and track edits even when restoration fails. Retain local changes when a schedule becomes unavailable and report rejected submit overrides without clearing input. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>








Fixes #348482
Fixes #348484
Fixes #348494
Fixes #348497
Fixes #348507
Fixes #348622
Changes
Validation
Latest Send Now and CI follow-up validation:
Earlier validation:
corepack pnpm run gulp compile-client— passed with zero compilation errors.corepack pnpm run valid-layers-check— passed.corepack pnpm run build-fast --client-only— passed; final test output was current.Live Code OSS Agents validation (macOS)
Manual checks