diff --git a/desktop/src/pages/ActiveSession.test.tsx b/desktop/src/pages/ActiveSession.test.tsx
index c1ac306d..00a9a4cb 100644
--- a/desktop/src/pages/ActiveSession.test.tsx
+++ b/desktop/src/pages/ActiveSession.test.tsx
@@ -958,6 +958,63 @@ describe('ActiveSession task polling', () => {
expect(useTabStore.getState().activeTabId).toBe(terminalTab?.sessionId)
})
+ it('keeps the docked terminal usable on a new empty session', () => {
+ const sessionId = 'empty-terminal-session'
+
+ useSessionStore.setState({
+ sessions: [{
+ id: sessionId,
+ title: 'Empty Terminal Session',
+ createdAt: '2026-04-10T00:00:00.000Z',
+ modifiedAt: '2026-04-10T00:00:00.000Z',
+ messageCount: 0,
+ projectPath: '/tmp/project-root',
+ workDir: '/tmp/project-root',
+ workDirExists: true,
+ }],
+ activeSessionId: sessionId,
+ isLoading: false,
+ error: null,
+ })
+ useTabStore.setState({
+ tabs: [{ sessionId, title: 'Empty Terminal Session', type: 'session', status: 'idle' }],
+ activeTabId: sessionId,
+ })
+ useChatStore.setState({
+ sessions: {
+ [sessionId]: {
+ messages: [],
+ chatState: 'idle',
+ connectionState: 'connected',
+ streamingText: '',
+ streamingToolInput: '',
+ activeToolUseId: null,
+ activeToolName: null,
+ activeThinkingId: null,
+ pendingPermission: null,
+ pendingComputerUsePermission: null,
+ tokenUsage: { input_tokens: 0, output_tokens: 0 },
+ streamingResponseChars: 0,
+ elapsedSeconds: 0,
+ statusVerb: '',
+ slashCommands: [],
+ agentTaskNotifications: {},
+ elapsedTimer: null,
+ },
+ },
+ })
+ useTerminalPanelStore.getState().openPanel(sessionId)
+
+ render(
{memberInfo?.status === 'running'
? `${memberInfo.role} ${t('teams.working')}`
@@ -431,11 +438,15 @@ export function ActiveSession() {
>
) : (
<>
-
-
+
{t('empty.subtitle')}
> @@ -543,7 +554,7 @@ export function ActiveSession() {