You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sessions: polish scheduled-message previews and inline editing - #348704
Adds a preview to the scheduled-message clock in the sessions list, with each message, the time remaining, and Edit, Send Now, and Cancel Schedule actions.
Scheduled messages keep their inline editor, now with Cancel and a timed Send split button such as "Send Today at 3:07 PM". The primary button saves for that time; the dropdown changes the time. Hover or focus the relative timestamp to see the exact local date and time, without seconds or a time-zone suffix.
This builds on #348610 and preserves its New Session composer, Send Now, model configuration, and scheduling fixes. Editing stays inside the scheduled prompt and never replaces the main composer's draft.
Try it
Enable chat.automations.enabled and sessions.sendLater.enabled, then schedule a message in an existing chat.
Hover over or click that session's clock. The clock stays in place when the row's actions appear.
Choose Edit to return to the original message. Use the timed Send button to save, its dropdown to reschedule, or Cancel to leave the schedule unchanged.
Hover or keyboard-focus a scheduled message's timestamp to see its exact local send time.
The preview also opens with Enter or Space when the clock is focused. Tab reaches the message actions, arrow keys move between them, and Escape closes the preview.
Show scheduled messages and their relative send times from the session clock, with the existing Edit, Send Now and Cancel Schedule actions. Reveal the original chat for inline editing without replacing its composer draft.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The scheduled-message preview has unresolved lifecycle and input-handling defects: row refreshes dismiss it, parent hover and touch handling interfere with activation, and Escape fails to restore keyboard focus.
Adds scheduled-message previews to the sessions list, building on #348610’s Send Later workflow so users can inspect and manage scheduled messages without first opening the chat.
Changes:
Adds clock-triggered previews with message text, relative send times, and Edit, Send Now, and Cancel Schedule actions.
Updates Edit to navigate to the original chat when needed while preserving the composer draft.
Adds regression tests and keyboard-accessibility guidance.
Use a timed Send split button when editing a scheduled prompt, and reveal local send times on hover or focus. Reuse the visibility-aware time updater and preserve the original composer draft.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep hidden scheduled-message toolbars out of pointer hit testing and position visible toolbars within the gap above their own message.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Elijah King (eli-w-king)
changed the title
sessions: preview scheduled messages from the sessions list
sessions: polish scheduled-message previews and inline editing
Nov 16, 2026
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The scheduled-message preview has unresolved interaction bugs: row hover overrides it, touch taps activate the session, keyboard dismissal loses focus, and row refreshes unexpectedly close it.
While a pinned preview is open, clicking or pressing Enter on another session's clock cannot open its preview. The current hover is locked, and the clock's propagation guards bypass outside-click dismissal. Force-hide the current hover before showing the newly requested one.
Click-opened preview is not focused, so Escape cannot dismiss it
After opening the preview by clicking the clock, Escape does not close it. This call leaves focus outside the card, while sticky: true prevents HoverService from installing its outside key handlers; the Escape handler lives on the hover itself. Focus the explicitly opened preview so Escape reaches that handler and Tab reaches its actions.
Keep the clock target stable across same-session renders, isolate its hover and touch events, and restore keyboard focus on dismissal. Cover the behavior with the real hover service, intersection observers and touch gestures.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Make native intersection-observer assertions independent of document scrolling from earlier tests.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
Five remaining issues reproduced in real, signed-in Windows Code OSS, with PR head 98ac0756be65c87b2bd0b144221dab2ae8f59dd4 merged locally onto pinned main 44d7d77b38739b0f07e3d7344b53e4754e1b269f (clean merge). Each inline comment includes reproduction steps, expected/actual behavior, and a code permalink.
The normal scheduling, inline save/cancel/reschedule, composer-draft preservation, new-session scheduled-draft, and one-time delivery flows worked. Focused Chromium tests passed on both main (85) and the merged candidate (96); the merged client type-check and targeted lint also passed. Three merged Electron layout tests exceeded the default five-second timeout but passed when isolated with a 30-second allowance.
These are separate from the earlier clock-refresh, parent-hover, touch, keyboard-opened Escape-restoration, and compact-chevron comments, whose fixes were verified at this head. No pre-existing or runtime-unverified issue is included below.
The reason will be displayed to describe this comment to others. Learn more.
[P2] Allow switching between explicitly opened clock previews
Repro
Enable chat.automations.enabled and sessions.sendLater.enabled.
In two existing sessions, A and B, schedule a message for later in each.
Click A's clock to open its preview.
Without dismissing it elsewhere, click B's clock.
Expected: B's scheduled-message preview opens. Actual: A's preview remains open with A's content; B's clock appears to do nothing. Reproduced in the merged Windows Code OSS build.
The preview is sticky/locked. The clock's mousedown propagation guard prevents the document's outside-click handler from dismissing the current hover, and showInstantHover then refuses to replace a locked hover. Please explicitly dismiss the existing sticky hover before opening a different clock's preview; activating the same clock could toggle it closed. A regression should use the real hover service and two clock targets.
The reason will be displayed to describe this comment to others. Learn more.
[P2] Make mouse-opened previews dismissible with Escape
Repro
With Automations and Send Later enabled, schedule a message in an existing session.
Click the session's clock to open the preview.
Press Escape without first clicking or tabbing into the preview.
Expected: The preview closes and focus returns to/remains on the clock. Actual: The preview stays open; focus is still on the clock. Reproduced in the merged Windows Code OSS build. The Enter/Space-opened path does close and restore focus correctly, so this is not the earlier keyboard-opened focus-restoration issue.
The click handler calls showHover(false), leaving focus outside the sticky hover. Sticky hovers do not install the outside key handlers, while the Escape handler is attached to the hover's own DOM subtree. Please focus the explicitly opened preview with a restorable focus target, or provide lifecycle-owned Escape handling for the pointer-opened path. Add a real click-then-Escape regression, not only Enter-then-Escape.
The reason will be displayed to describe this comment to others. Learn more.
[P2] Reveal the scheduled row when Edit targets an already-visible chat
Repro
Enable Automations, Send Later, and inline request editing.
In a long existing conversation, schedule a message so its scheduled row is at the bottom of the transcript.
Keep that chat open, focus the transcript, and press Ctrl+Home so the scheduled row is outside the rendered viewport.
Click the session's clock, hover the preview's message row to reveal its actions, and choose Edit.
Expected: The transcript reveals the selected scheduled message and focuses its inline editor, preserving the unrelated main-composer draft. Actual: No scheduled editor appears and the transcript stays at the top, even though the service has entered editing state. In the live repro there were zero rendered scheduled rows and zero visible scheduled editors after Edit.
The visibility check skips navigation when the chat widget is already visible, but visibility of the widget does not imply visibility of this particular virtualized row. Updating the scheduled requests preserves the non-bottom scroll position. Please reveal and focus the target scheduled row after entering edit mode, including this already-visible-chat path, without replacing the main composer input.
The reason will be displayed to describe this comment to others. Learn more.
[P2] Keep an action available for a message that is already being edited
Repro
With Automations and Send Later enabled, schedule a message in session A and enter its inline editor.
Leave the edit active and switch to session B.
Click A's clock and hover the message row in its preview.
Expected: The preview still offers a way to return to the active edit or otherwise manage it. Actual: The message remains in the preview, but every action disappears. The real Windows repro produced zero action buttons, even while the row was hovered.
While requestEditing is active, the service supplies Save / Change Send Time / Cancel Edit rather than Edit / Send Now / Cancel Schedule. Filtering exclusively through CARD_ACTION_IDS therefore produces an empty action bar. Please account for editing-state requests and retain a way back to their editor. If that uses editAction, the same-request early return in startEditing also needs to allow navigation back to the original conversation.
The reason will be displayed to describe this comment to others. Learn more.
[P2] Preserve keyboard focus when an action removes the last scheduled clock
Repro
With Automations and Send Later enabled, create exactly one scheduled message in an existing session.
Focus its clock with the keyboard and press Enter to open the preview.
Press Tab, then Right Arrow twice to reach Cancel Schedule, and press Enter.
Repeat with another scheduled message, using Right Arrow once to select Send Now instead.
Expected: After the action removes the clock, keyboard focus remains on a surviving control, such as the owning session row/list. Actual: Both Cancel Schedule and Send Now leave document.activeElement on document.body, so keyboard users lose their place. Send Now itself successfully dispatched the request once; this finding is about focus after the action.
hideHover(true) first restores focus to the clock for a keyboard-opened preview. The action then removes the last scheduled request, the indicator loses its visible class and becomes display: none, and the restored focus target disappears. Please provide a fallback focus target after the action when the clock is gone, without stealing focus if the action deliberately moved it elsewhere. Cover both last-message cancellation and dispatch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pr-demoA PR demo was recorded for this pull request
5 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a preview to the scheduled-message clock in the sessions list, with each message, the time remaining, and Edit, Send Now, and Cancel Schedule actions.
Scheduled messages keep their inline editor, now with Cancel and a timed Send split button such as "Send Today at 3:07 PM". The primary button saves for that time; the dropdown changes the time. Hover or focus the relative timestamp to see the exact local date and time, without seconds or a time-zone suffix.
This builds on #348610 and preserves its New Session composer, Send Now, model configuration, and scheduling fixes. Editing stays inside the scheduled prompt and never replaces the main composer's draft.
Try it
chat.automations.enabledandsessions.sendLater.enabled, then schedule a message in an existing chat.The preview also opens with Enter or Space when the clock is focused. Tab reaches the message actions, arrow keys move between them, and Escape closes the preview.