Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(conversations): correct thread filter to include new chat threads

Steven Enamakel48001d6c32bd
diff --git a/app/src/components/layout/shell/useNewChat.test.tsx b/app/src/components/layout/shell/useNewChat.test.tsx
index 2fedc069f1..9781d494bc 100644
--- a/app/src/components/layout/shell/useNewChat.test.tsx
+++ b/app/src/components/layout/shell/useNewChat.test.tsx
@@ -157,7 +157,7 @@ describe('useNewChat', () => {
});
});
- it('does not reuse a blank non-General thread (task / subconscious / parented)', async () => {
+ it('does not reuse a blank non-General thread (task / parented)', async () => {
// A blank task thread (parentThreadId) is hidden from the General tab, so
// New Chat must not land on it — create a fresh general chat instead.
mockThreads = [{ id: 'task-1', messageCount: 0, parentThreadId: 'parent' }];
diff --git a/app/src/components/layout/shell/useNewChat.ts b/app/src/components/layout/shell/useNewChat.ts
index d4658695f8..c61bb4b7c8 100644
--- a/app/src/components/layout/shell/useNewChat.ts
+++ b/app/src/components/layout/shell/useNewChat.ts
@@ -48,7 +48,7 @@ import { chatThreadPath } from '../../../utils/chatRoutes';
*
* Only **General**-tab threads are reuse candidates (same
* `isThreadVisibleInTab(..., GENERAL_TAB_VALUE)` filter the `/chat` landing
- * uses), so New Chat never lands on a hidden task/subconscious/parented
+ * uses), so New Chat never lands on a hidden task/parented
* session.
*/
export function useNewChat(): () => void {
diff --git a/app/src/features/conversations/Conversations.tsx b/app/src/features/conversations/Conversations.tsx
index 3fc57ada9a..5b44d9ba5b 100644
--- a/app/src/features/conversations/Conversations.tsx
+++ b/app/src/features/conversations/Conversations.tsx
@@ -290,8 +290,8 @@ const Conversations = ({
keywords: ['agent', 'process', 'source', 'timeline', 'run'],
});
// Thread-list filtering is fixed to the General bucket — the in-sidebar
- // General/Subconscious/Tasks chips were removed. Subconscious reflections and
- // task/worker threads have dedicated surfaces (Intelligence, Tasks board).
+ // General/Tasks chips were removed. Task/worker threads have a dedicated
+ // surface (Tasks board).
const selectedLabel = GENERAL_TAB_VALUE;
const [sendError, setSendError] = useState<ChatSendError | null>(null);
// Recorded by the slice for *every* create path (#5156) — including the shell's
@@ -666,7 +666,7 @@ const Conversations = ({
// via redux-persist on the `thread` slice, and kept in-memory across
// in-app navigation — whenever it still exists server-side. This must
// run BEFORE the General-only default below: a non-General active
- // session (task / worker / subconscious / meeting) is filtered out of
+ // session (task / worker / meeting) is filtered out of
// `visibleThreads`, so without this branch, navigating away from the
// Chat tab and back would drop the active thread and either resume an
// unrelated General thread or spawn a fresh chat — losing the
diff --git a/app/src/features/conversations/utils/threadFilter.test.ts b/app/src/features/conversations/utils/threadFilter.test.ts
index 9c4199f536..8be93ea944 100644
--- a/app/src/features/conversations/utils/threadFilter.test.ts
+++ b/app/src/features/conversations/utils/threadFilter.test.ts
@@ -4,7 +4,6 @@ import type { Thread } from '../../../types/thread';
import {
GENERAL_TAB_VALUE,
isThreadVisibleInTab,
- SUBCONSCIOUS_TAB_VALUE,
TASKS_TAB_VALUE,
} from './threadFilter';
@@ -43,9 +42,6 @@ describe('isThreadVisibleInTab', () => {
});
it('excludes threads that belong to explicit non-General buckets', () => {
- expect(
- isThreadVisibleInTab(thread({ labels: [SUBCONSCIOUS_TAB_VALUE] }), GENERAL_TAB_VALUE)
- ).toBe(false);
expect(isThreadVisibleInTab(thread({ labels: [TASKS_TAB_VALUE] }), GENERAL_TAB_VALUE)).toBe(
false
);
@@ -60,29 +56,6 @@ describe('isThreadVisibleInTab', () => {
});
});
- describe('Subconscious bucket', () => {
- it('keeps canonical and legacy subconscious-generated threads', () => {
- expect(
- isThreadVisibleInTab(thread({ labels: [SUBCONSCIOUS_TAB_VALUE] }), SUBCONSCIOUS_TAB_VALUE)
- ).toBe(true);
- expect(
- isThreadVisibleInTab(thread({ labels: ['from_reflection'] }), SUBCONSCIOUS_TAB_VALUE)
- ).toBe(true);
- expect(
- isThreadVisibleInTab(thread({ labels: ['subconscious_tick'] }), SUBCONSCIOUS_TAB_VALUE)
- ).toBe(true);
- });
-
- it('excludes ordinary and task threads', () => {
- expect(
- isThreadVisibleInTab(thread({ labels: [GENERAL_TAB_VALUE] }), SUBCONSCIOUS_TAB_VALUE)
- ).toBe(false);
- expect(
- isThreadVisibleInTab(thread({ labels: [TASKS_TAB_VALUE] }), SUBCONSCIOUS_TAB_VALUE)
- ).toBe(false);
- });
- });
-
describe('Tasks bucket', () => {
it('keeps tasks-labelled, legacy agent-task, and legacy worker-labeled threads', () => {
expect(isThreadVisibleInTab(thread({ labels: [TASKS_TAB_VALUE] }), TASKS_TAB_VALUE)).toBe(
@@ -106,13 +79,10 @@ describe('isThreadVisibleInTab', () => {
expect(isThreadVisibleInTab(thread({ labels: ['Meetings'] }), TASKS_TAB_VALUE)).toBe(true);
});
- it('excludes ordinary and subconscious threads', () => {
+ it('excludes ordinary threads', () => {
expect(isThreadVisibleInTab(thread({ labels: [GENERAL_TAB_VALUE] }), TASKS_TAB_VALUE)).toBe(
false
);
- expect(
- isThreadVisibleInTab(thread({ labels: [SUBCONSCIOUS_TAB_VALUE] }), TASKS_TAB_VALUE)
- ).toBe(false);
});
});
});
diff --git a/app/src/features/conversations/utils/threadFilter.ts b/app/src/features/conversations/utils/threadFilter.ts
index a9371bb256..9545e6cbac 100644
--- a/app/src/features/conversations/utils/threadFilter.ts
+++ b/app/src/features/conversations/utils/threadFilter.ts
@@ -1,9 +1,7 @@
import type { Thread } from '../../../types/thread';
export const GENERAL_TAB_VALUE = 'general';
-export const SUBCONSCIOUS_TAB_VALUE = 'subconscious';
export const TASKS_TAB_VALUE = 'tasks';
-const LEGACY_SUBCONSCIOUS_LABELS = ['from_reflection', 'subconscious_tick'];
const LEGACY_TASK_LABELS = ['agent-task', 'worker'];
/** Labels that identify meeting transcript threads (now folded into Tasks). */
const MEETINGS_LABELS = ['meetings', 'Meetings'];
@@ -12,10 +10,6 @@ function hasAnyLabel(thread: Thread, labels: readonly string[]): boolean {
return Boolean(thread.labels?.some(label => labels.includes(label)));
}
-function isSubconsciousThread(thread: Thread): boolean {
- return hasAnyLabel(thread, [SUBCONSCIOUS_TAB_VALUE, ...LEGACY_SUBCONSCIOUS_LABELS]);
-}
-
function isTaskThread(thread: Thread): boolean {
return Boolean(
thread.parentThreadId ||
@@ -31,16 +25,11 @@ function isTaskThread(thread: Thread): boolean {
* Rules:
* - Tasks includes `tasks`-labelled threads, legacy worker/sub-agent threads,
* and meeting transcript threads.
- * - Subconscious includes new and legacy reflection/tick-generated threads.
* - General is the fallback bucket for everything else.
*/
export function isThreadVisibleInTab(thread: Thread, selectedLabel: string): boolean {
- const isSubconscious = isSubconsciousThread(thread);
const isTask = isTaskThread(thread);
- if (selectedLabel === SUBCONSCIOUS_TAB_VALUE) return isSubconscious;
if (selectedLabel === TASKS_TAB_VALUE) return isTask;
- if (selectedLabel === GENERAL_TAB_VALUE) {
- return !isSubconscious && !isTask;
- }
+ if (selectedLabel === GENERAL_TAB_VALUE) return !isTask;
return Boolean(thread.labels?.includes(selectedLabel));
}