chore(ai-sessions): drop the sidebar draft cue

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019N8x51GqABUEFvg52V6aYo
This commit is contained in:
hugocasa
2026-08-31 23:52:09 +02:00
co-authored by Claude Fable 5
parent 0c6568a189
commit 054b65cdba
@@ -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)}
<MenuItem
class={twMerge(
menuItemBase,
@@ -758,19 +747,12 @@
>
{session.summary ?? 'Untitled session'}
</span>
{#if draft || unread > 0}
<span class="ml-auto shrink-0 inline-flex items-center gap-1">
{#if draft}
<PencilLine class="w-3 h-3 text-tertiary" aria-label="Unsent draft" />
{/if}
{#if unread > 0}
<span
class="inline-flex items-center justify-center rounded-full bg-surface-accent-primary text-white font-medium leading-none min-w-4 h-4 px-1 text-[10px]"
aria-label="{unread} unread message{unread === 1 ? '' : 's'}"
>
{unread > 9 ? '9+' : unread}
</span>
{/if}
{#if unread > 0}
<span
class="ml-auto shrink-0 inline-flex items-center justify-center rounded-full bg-surface-accent-primary text-white font-medium leading-none min-w-4 h-4 px-1 text-[10px]"
aria-label="{unread} unread message{unread === 1 ? '' : 's'}"
>
{unread > 9 ? '9+' : unread}
</span>
{/if}
</MenuItem>
@@ -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)}
<div
class={twMerge(
@@ -1032,19 +1013,12 @@
/>
{/if}
<span class="truncate flex-1">{session.summary ?? 'Untitled session'}</span>
{#if draft || unread > 0}
<span class="shrink-0 inline-flex items-center gap-1">
{#if draft}
<PencilLine class="w-3 h-3 text-tertiary" aria-label="Unsent draft" />
{/if}
{#if unread > 0}
<span
class="inline-flex items-center justify-center rounded-full bg-surface-accent-primary text-white font-medium leading-none min-w-4 h-4 px-1 text-[10px]"
aria-label="{unread} unread message{unread === 1 ? '' : 's'}"
>
{unread > 9 ? '9+' : unread}
</span>
{/if}
{#if unread > 0}
<span
class="shrink-0 inline-flex items-center justify-center rounded-full bg-surface-accent-primary text-white font-medium leading-none min-w-4 h-4 px-1 text-[10px]"
aria-label="{unread} unread message{unread === 1 ? '' : 's'}"
>
{unread > 9 ? '9+' : unread}
</span>
{/if}
</button>