From 3f2813d16f822e8ba9fa42fca499d7e0d91c901e Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 15 Apr 2026 22:35:39 -0400 Subject: [PATCH] feat(chat): Phase D empty-state + overlay context sidebar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Empty-state rethink: replace "Start a conversation." with a richer landing showing recent conversations (top 5 as resume links) and a voice-mode entry button. Gated to full variant only; widget/briefing keep the simple message. Context sidebar: switch from grid column (4-col layout) to absolute overlay on the right gutter (3-col layout). The reading column is now always symmetrically centered regardless of whether the sidebar is visible — eliminates the leftward shift that occurred when context notes appeared. Co-Authored-By: Claude Opus 4.6 --- frontend/src/components/ChatPanel.vue | 167 ++++++++++++++++++++++++-- 1 file changed, 155 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/ChatPanel.vue b/frontend/src/components/ChatPanel.vue index 7327d85..6ce9ef4 100644 --- a/frontend/src/components/ChatPanel.vue +++ b/frontend/src/components/ChatPanel.vue @@ -182,6 +182,27 @@ function toggleSection(key: SectionKey) { watch(() => store.currentConversation?.id, () => loadCollapsed(), { immediate: true }) +// ── Empty-state (full variant, fresh/empty conversation) ───────────────────── +const showEmptyState = computed( + () => + props.variant === 'full' + && !props.briefingMode + && !props.projectId + && !store.streaming + && (store.currentConversation?.messages.length ?? 0) === 0 +) + +const recentConversations = computed(() => { + const currentId = store.currentConversation?.id + return store.conversations + .filter((c) => c.id !== currentId && c.message_count > 0) + .slice(0, 5) +}) + +function startVoiceMode() { + window.dispatchEvent(new CustomEvent('voice:ptt-toggle')) +} + // ── Send ────────────────────────────────────────────────────────────────────── const inputBarRef = ref | null>(null) @@ -298,7 +319,7 @@ defineExpose({ focus, prefill, send, contextCount, sidebarOpen, toggleContextSid