Skip to content

fix: conversation not showing (empty state)#2111

Merged
Davidknp merged 1 commit into
mainfrom
david/eng-1340-new-conversations-stay-empty-after-creation
May 19, 2026
Merged

fix: conversation not showing (empty state)#2111
Davidknp merged 1 commit into
mainfrom
david/eng-1340-new-conversations-stay-empty-after-creation

Conversation

@Davidknp
Copy link
Copy Markdown
Collaborator

No description provided.

@Davidknp Davidknp marked this pull request as ready for review May 19, 2026 10:14
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 19, 2026

Greptile Summary

This PR fixes a bug where the "No conversations yet" empty state was incorrectly shown even when a conversation exists but its ConversationStore hadn't finished loading, caused by hasConversationTabs relying on resolvedTabs which filters out not-yet-ready conversations.

  • conversations-panel.tsx: Removes the hasConversationTabs guard and the entire inline empty-state UI; the panel now unconditionally renders its wrapper and shows the terminal only when a session is ready.
  • pane-renderer.ts: Replaces activeDescriptor with a resolvedTabs-based lookup, adding a fallback to resolvedTabs[0] when the active tab is a conversation that has been filtered out.
  • create-conversation-modal.tsx: Drops initialSize pre-calculation (getConversationsPaneSize) from the conversation creation payload.

Confidence Score: 4/5

The change is safe to merge; it correctly eliminates the stale empty-state flash and the unneeded dimension pre-measurement.

The core fix is sound and well-scoped. The two concerns are: (1) removing the empty-state CTA leaves a blank panel when no conversation has been started yet, which may surprise first-time users; (2) the resolvedTabs[0] fallback in pane-renderer.ts can briefly switch the view to a file/diff tab while a conversation is loading when mixed tabs are open.

pane-renderer.ts deserves a second look around the fallback logic on line 24; conversations-panel.tsx should be verified to confirm there is another discoverable way to create a first conversation.

Important Files Changed

Filename Overview
src/renderer/features/tasks/conversations/conversations-panel.tsx Removes the empty-state guard (hasConversationTabs) and the "Create conversation" inline UI; the panel now always renders a plain wrapper and shows the PTY terminal only when a session is ready.
src/renderer/features/tasks/conversations/create-conversation-modal.tsx Removes the getConversationsPaneSize helper and the initialSize field from the conversation creation call. Clean removal with no outstanding issues.
src/renderer/features/tasks/view/pane-renderer.ts Switches from activeDescriptor (raw entries map) to resolvedTabs as the source of truth; falls back to resolvedTabs[0] when no tab is marked active — see comment about the implicit tab-switch side-effect.

Sequence Diagram

sequenceDiagram
    participant User
    participant TabManager
    participant resolvePaneRenderer
    participant ConversationsPanel

    Note over TabManager: Conversation tab open,<br/>ConversationStore loading

    TabManager->>resolvePaneRenderer: resolvedTabs (conversation filtered out if store not ready)
    resolvePaneRenderer->>resolvePaneRenderer: "find(t => t.isActive) undefined"
    resolvePaneRenderer->>resolvePaneRenderer: fallback to resolvedTabs[0] OR return null
    alt resolvedTabs is empty
        resolvePaneRenderer-->>User: null (nothing rendered)
    else resolvedTabs has file/diff tabs
        resolvePaneRenderer-->>User: file / diff renderer (unexpected switch)
    else resolvedTabs has conversation (store ready)
        resolvePaneRenderer-->>ConversationsPanel: "kind = pty-agent"
        ConversationsPanel->>ConversationsPanel: "activeSessionId = null"
        ConversationsPanel-->>User: empty div (no terminal, no CTA)
    end
Loading
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
src/renderer/features/tasks/view/pane-renderer.ts:24
**Unexpected view switch when active conversation tab is still loading**

When the active tab is a conversation whose `ConversationStore` isn't ready yet, it is filtered out of `resolvedTabs`, so `resolvedTabs.find((t) => t.isActive)` returns `undefined`. The fallback `resolvedTabs[0]` then picks the first *other* resolved tab — which may be a file or diff tab — causing the pane to momentarily render a file editor even though the user's intent was to view the conversation. In the old code this scenario would have produced `{ kind: 'pty-agent' }`, keeping the conversation panel visible. The impact is a transient but perceptible UI jump during conversation load when mixed tabs are open.

### Issue 2 of 2
src/renderer/features/tasks/conversations/conversations-panel.tsx:119-143
**No affordance when the panel is genuinely empty**

The old empty-state UI (icon + "No conversations yet" label + "Create conversation" button) has been removed entirely. Now, when `ConversationsPanel` is rendered but no session is ready, users see a blank container with no guidance and no action to take. This will affect new tasks where no conversation has been created yet — the panel is visible but gives no signal about what to do next. If conversation creation is reachable exclusively from the sidebar or a toolbar shortcut, this may be fine, but it's worth confirming there's at least one discoverable entry point for first-time users.

Reviews (1): Last reviewed commit: "fix: conversation not showing (empty sta..." | Re-trigger Greptile

if (resolvedTabs.length === 0) return null;
// Fall back to the first resolved tab when no tab is marked active (e.g. the
// raw activeTabId points to a conversation entry that was filtered out).
const activeTab = resolvedTabs.find((t) => t.isActive) ?? resolvedTabs[0];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Unexpected view switch when active conversation tab is still loading

When the active tab is a conversation whose ConversationStore isn't ready yet, it is filtered out of resolvedTabs, so resolvedTabs.find((t) => t.isActive) returns undefined. The fallback resolvedTabs[0] then picks the first other resolved tab — which may be a file or diff tab — causing the pane to momentarily render a file editor even though the user's intent was to view the conversation. In the old code this scenario would have produced { kind: 'pty-agent' }, keeping the conversation panel visible. The impact is a transient but perceptible UI jump during conversation load when mixed tabs are open.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/renderer/features/tasks/view/pane-renderer.ts
Line: 24

Comment:
**Unexpected view switch when active conversation tab is still loading**

When the active tab is a conversation whose `ConversationStore` isn't ready yet, it is filtered out of `resolvedTabs`, so `resolvedTabs.find((t) => t.isActive)` returns `undefined`. The fallback `resolvedTabs[0]` then picks the first *other* resolved tab — which may be a file or diff tab — causing the pane to momentarily render a file editor even though the user's intent was to view the conversation. In the old code this scenario would have produced `{ kind: 'pty-agent' }`, keeping the conversation panel visible. The impact is a transient but perceptible UI jump during conversation load when mixed tabs are open.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +119 to +143
<div className="flex min-h-0 flex-1 flex-col">
{activeSessionId && activeSession?.status === 'ready' && activeSession.pty ? (
<div ref={terminalContainerRef} className="relative flex h-full min-h-0 flex-1">
<TerminalSearchOverlay
isOpen={isSearchOpen}
fullWidth
searchQuery={searchQuery}
searchStatus={searchStatus}
searchInputRef={searchInputRef}
onQueryChange={handleSearchQueryChange}
onStep={stepSearch}
onClose={closeSearch}
/>
<PtyPane
ref={terminalRef}
sessionId={activeSessionId}
pty={activeSession.pty}
className="h-full w-full"
onEnterPress={onEnterPress}
onInterruptPress={onInterruptPress}
mapShiftEnterToCtrlJ
remoteConnectionId={remoteConnectionId}
/>
</div>
) : null}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 No affordance when the panel is genuinely empty

The old empty-state UI (icon + "No conversations yet" label + "Create conversation" button) has been removed entirely. Now, when ConversationsPanel is rendered but no session is ready, users see a blank container with no guidance and no action to take. This will affect new tasks where no conversation has been created yet — the panel is visible but gives no signal about what to do next. If conversation creation is reachable exclusively from the sidebar or a toolbar shortcut, this may be fine, but it's worth confirming there's at least one discoverable entry point for first-time users.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/renderer/features/tasks/conversations/conversations-panel.tsx
Line: 119-143

Comment:
**No affordance when the panel is genuinely empty**

The old empty-state UI (icon + "No conversations yet" label + "Create conversation" button) has been removed entirely. Now, when `ConversationsPanel` is rendered but no session is ready, users see a blank container with no guidance and no action to take. This will affect new tasks where no conversation has been created yet — the panel is visible but gives no signal about what to do next. If conversation creation is reachable exclusively from the sidebar or a toolbar shortcut, this may be fine, but it's worth confirming there's at least one discoverable entry point for first-time users.

How can I resolve this? If you propose a fix, please make it concise.

@Davidknp Davidknp merged commit be5d0cf into main May 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant