From 054b65cdba7969f258ffd51e690f0b5abf240fc4 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Mon, 31 Aug 2026 23:52:09 +0200 Subject: [PATCH] chore(ai-sessions): drop the sidebar draft cue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cue read manager.instructions as the user's unsent text, but the composer's draft is AIChatInput-local state the picker cannot see, and with the field now owned by sendRequestImpl it is non-empty only inside a send — where the status dot already says streaming. The one state that could still light it is text leaked by a pre-flight refusal, so the cue could only ever surface an artifact. Removed per the PR's conveniences rule rather than re-pointed at state that does not exist. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019N8x51GqABUEFvg52V6aYo --- .../components/sessions/SessionPicker.svelte | 50 +++++-------------- 1 file changed, 12 insertions(+), 38 deletions(-) diff --git a/frontend/src/lib/components/sessions/SessionPicker.svelte b/frontend/src/lib/components/sessions/SessionPicker.svelte index 560cb07e2b..1eb73e6d2c 100644 --- a/frontend/src/lib/components/sessions/SessionPicker.svelte +++ b/frontend/src/lib/components/sessions/SessionPicker.svelte @@ -14,7 +14,6 @@ ListChecks, MessageSquare, Pencil, - PencilLine, Plus, Rows3, Trash2 @@ -88,15 +87,6 @@ return unreadCountFor(session.id, getRuntime(session.id)) } - // Whether the session holds a prompt handed to a send and not yet consumed - // (`instructions` carries the send in flight; the composer's typed text is - // AIChatInput-local and unreadable here). Read directly rather than via the - // derived chat status so the cue survives streaming/needs-confirmation. - function hasDraft(session: Session): boolean { - const rt = getRuntime(session.id) - return !!rt && rt.manager.instructions.trim().length > 0 - } - // Sessions share the beta opt-out gate with the global AI chat — when the // user opted out, the sidebar section is hidden entirely. const globalEnabled = isGlobalAiEnabled() @@ -734,7 +724,6 @@ {@const isSelected = sessionActive && session.id === sessionState.currentSessionId} {@const unread = unreadFor(session)} - {@const draft = hasDraft(session)} {session.summary ?? 'Untitled session'} - {#if draft || unread > 0} - - {#if draft} - - {/if} - {#if unread > 0} - - {unread > 9 ? '9+' : unread} - - {/if} + {#if unread > 0} + + {unread > 9 ? '9+' : unread} {/if} @@ -952,7 +934,6 @@ {@const isSelected = sessionActive && session.id === sessionState.currentSessionId} {@const isEditing = editingId === session.id} {@const unread = unreadFor(session)} - {@const draft = hasDraft(session)} {@const isChecked = selectedIds.includes(session.id)}
{/if} {session.summary ?? 'Untitled session'} - {#if draft || unread > 0} - - {#if draft} - - {/if} - {#if unread > 0} - - {unread > 9 ? '9+' : unread} - - {/if} + {#if unread > 0} + + {unread > 9 ? '9+' : unread} {/if}