From 526b6a58c6febc5329a5b95b842899bf6f4d49e2 Mon Sep 17 00:00:00 2001
From: nullStack65 <112618179+nullStack65@users.noreply.github.com>
Date: Thu, 26 Nov 2026 08:45:34 +0000
Subject: [PATCH] feat(web): group sidebar bots into My Bots, Others, and
Closura
---
.../Sidebar.founder-inbox.browser.test.tsx | 7 +++--
apps/web/src/components/Sidebar.tsx | 14 ++++++++-
.../src/components/bots/botPresence.test.ts | 25 +++++++++-------
apps/web/src/components/bots/botPresence.ts | 30 +++++++++++--------
apps/web/src/i18n/translations/de.json | 4 +--
apps/web/src/i18n/translations/en.json | 4 +--
apps/web/src/i18n/translations/es.json | 4 +--
apps/web/src/i18n/translations/fr.json | 4 +--
apps/web/src/i18n/translations/ja.json | 4 +--
apps/web/src/i18n/translations/ko.json | 4 +--
apps/web/src/i18n/translations/pt-BR.json | 4 +--
apps/web/src/i18n/translations/ru.json | 4 +--
apps/web/src/i18n/translations/sv.json | 4 +--
apps/web/src/i18n/translations/zh.json | 4 +--
14 files changed, 69 insertions(+), 47 deletions(-)
diff --git a/apps/web/src/components/Sidebar.founder-inbox.browser.test.tsx b/apps/web/src/components/Sidebar.founder-inbox.browser.test.tsx
index 40e368b1baf06..c6976a5775ca4 100644
--- a/apps/web/src/components/Sidebar.founder-inbox.browser.test.tsx
+++ b/apps/web/src/components/Sidebar.founder-inbox.browser.test.tsx
@@ -142,17 +142,18 @@ it.each(["jeff", "kameron"] as const)(
,
);
const mine = screen.getByRole("region", { name: "My Bots" });
- const company = screen.getByRole("region", { name: "Shared Bots" });
+ const company = screen.getByRole("region", { name: "Closura" });
const jeff = owner === "jeff";
- // Asymmetric: Jeff never lists Kameron's private bots, while Kameron keeps Jeff's visible.
+ // Asymmetric: Jeff never lists Kameron's private bots, while Kameron sees Jeff's under Others.
for (const name of jeff ? ["CoS (Jeff)", "Personal Finance"] : ["CoS"]) {
await expect.element(mine.getByText(name, { exact: true })).toBeVisible();
}
if (jeff) {
await expect.element(screen.getByText("CoS", { exact: true })).not.toBeInTheDocument();
} else {
+ const others = screen.getByRole("region", { name: "Others" });
for (const name of ["CoS (Jeff)", "Personal Finance"]) {
- await expect.element(company.getByText(name, { exact: true })).toBeVisible();
+ await expect.element(others.getByText(name, { exact: true })).toBeVisible();
}
}
for (const name of shared) {
diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx
index 7a670b663e5ed..4d339c9407ebe 100644
--- a/apps/web/src/components/Sidebar.tsx
+++ b/apps/web/src/components/Sidebar.tsx
@@ -812,6 +812,7 @@ function partitionSidebarThreads(input: SidebarThreadPartitionInput) {
return {
botThreads: sortedBots,
myBotThreads: botGroups.mine,
+ otherBotThreads: botGroups.others,
sharedBotThreads: botGroups.shared,
pinnedThreads:
optimisticDrop?.section !== "pinned" || optimisticDrop.order === null
@@ -1511,6 +1512,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
workingShelfEnabled,
botThreads,
myBotThreads,
+ otherBotThreads,
sharedBotThreads,
pinnedThreads,
draggableThreadKeys,
@@ -3731,7 +3733,17 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
onContextMenu={handleThreadContextMenu}
/>
+ {
id,
source: { inbox: { owner, audience } },
});
- it("puts shared-inbox bots in their own group and leaves the rest as mine", () => {
+ it("puts company/shared/agent-only/open bots in Closura (shared) and personal bots in mine when viewer is unset", () => {
expect(
- partitionBotGroups([thread("shared", "shared"), thread("jeff", "jeff"), thread("open")]),
+ partitionBotGroups([
+ thread("shared", "shared"),
+ thread("agents", "agent-only"),
+ thread("jeff", "jeff"),
+ thread("open"),
+ ]),
).toEqual({
- shared: [thread("shared", "shared")],
- mine: [thread("jeff", "jeff"), thread("open")],
+ shared: [thread("shared", "shared"), thread("agents", "agent-only"), thread("open")],
+ mine: [thread("jeff", "jeff")],
+ others: [],
});
});
- it("keeps Jeff's personal bots in Kameron's lists beside his own and shared ones", () => {
+ it("puts Kameron's own in My Bots, Jeff's personal bots in Others, and company bots in Closura", () => {
const threads = [
thread("shared", "shared"),
thread("mine", "kameron"),
@@ -127,12 +133,8 @@ describe("partitionBotGroups", () => {
];
expect(partitionBotGroups(threads, "kameron")).toEqual({
mine: [thread("mine", "kameron")],
- shared: [
- thread("shared", "shared"),
- thread("other", "jeff"),
- thread("agents", "agent-only"),
- thread("open"),
- ],
+ others: [thread("other", "jeff")],
+ shared: [thread("shared", "shared"), thread("agents", "agent-only"), thread("open")],
});
});
@@ -150,6 +152,7 @@ describe("partitionBotGroups", () => {
];
expect(partitionBotGroups(threads, "jeff")).toEqual({
mine: [thread("cos-jeff", "jeff"), owned("kameron-jeff", "kameron", "jeff")],
+ others: [],
shared: [
thread("shared", "shared"),
thread("agents", "agent-only"),
diff --git a/apps/web/src/components/bots/botPresence.ts b/apps/web/src/components/bots/botPresence.ts
index d8dd9b123e4df..0a58b41612234 100644
--- a/apps/web/src/components/bots/botPresence.ts
+++ b/apps/web/src/components/bots/botPresence.ts
@@ -93,25 +93,31 @@ type BotInbox = {
};
/**
- * The two bot groups. Shared audience is Shared Bots. With a viewer, an Agents or missing inbox
- * and the other founder's bots are Shared Bots too; the viewer's own stay in My Bots. Jeff never
- * lists Kameron's private bots (`isHiddenFromFounder`), while Kameron lists Jeff's.
+ * The three bot groups:
+ * - `mine` ("My Bots"): the viewer's own personal bots (`audience === viewer`, or all personal bots when no viewer is set).
+ * - `others` ("Others"): the other founder's personal bots (shown for Kameron; Jeff never lists Kameron's private bots via `isHiddenFromFounder`).
+ * - `shared` ("Closura"): all company bots (`audience === "shared"`, `"agent-only"`, or missing).
*/
export function partitionBotGroups<
T extends { readonly source: { readonly inbox?: BotInbox | null } },
->(threads: readonly T[], viewer?: Founder): { readonly mine: T[]; readonly shared: T[] } {
+>(
+ threads: readonly T[],
+ viewer?: Founder,
+): { readonly mine: T[]; readonly others: T[]; readonly shared: T[] } {
const mine: T[] = [];
+ const others: T[] = [];
const shared: T[] = [];
for (const thread of threads) {
if (isHiddenFromFounder(thread.source.inbox, viewer)) continue;
const audience = thread.source.inbox?.audience;
- const sharedWithBoth =
- isSharedBotThread(thread) ||
- (viewer !== undefined &&
- (audience === "agent-only" ||
- audience == null ||
- ((audience === "kameron" || audience === "jeff") && audience !== viewer)));
- (sharedWithBoth ? shared : mine).push(thread);
+ const isPersonal = audience === "kameron" || audience === "jeff";
+ if (!isPersonal || isSharedBotThread(thread)) {
+ shared.push(thread);
+ } else if (viewer !== undefined && audience !== viewer) {
+ others.push(thread);
+ } else {
+ mine.push(thread);
+ }
}
- return { mine, shared };
+ return { mine, others, shared };
}
diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json
index 9bf5f655dfb12..88dc82c44c919 100644
--- a/apps/web/src/i18n/translations/de.json
+++ b/apps/web/src/i18n/translations/de.json
@@ -2597,7 +2597,8 @@
"e3ed00af71363d39": "Noch keine Threads in diesen Projekten",
"981053bcf95b3d3f": "Noch keine Threads in {project}",
"d978598ec5ca3ac4": "My Bots",
- "007c13b6a386b5be": "Shared Bots",
+ "87d943aa8f91b9a2": "Andere",
+ "8260a90361496410": "Closura",
"151767f20fa67c48": "Angeheftet",
"db8f17154d4f0cfa": "Aktiv",
"9578dc3e84f82081": "In Arbeit",
@@ -7432,7 +7433,6 @@
"c3d96c942dc3125d": "Der Link konnte nicht kopiert werden",
"05cf59d40e17ba63": "Review angefordert",
"e369d7ce5ff36689": "Verfasst",
- "87d943aa8f91b9a2": "Andere",
"e8c320d314d151e9": "Im Review",
"8c7976cc624d8d4f": "Verfasst",
"7ab39987db037952": "Merge-Bereitschaft",
diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json
index 487e8285554e7..6dacbbc09af0a 100644
--- a/apps/web/src/i18n/translations/en.json
+++ b/apps/web/src/i18n/translations/en.json
@@ -2597,7 +2597,8 @@
"e3ed00af71363d39": "No threads in these projects yet",
"981053bcf95b3d3f": "No threads in {project} yet",
"d978598ec5ca3ac4": "My Bots",
- "007c13b6a386b5be": "Shared Bots",
+ "87d943aa8f91b9a2": "Others",
+ "8260a90361496410": "Closura",
"151767f20fa67c48": "Pinned",
"db8f17154d4f0cfa": "Active",
"9578dc3e84f82081": "Working",
@@ -7440,7 +7441,6 @@
"c3d96c942dc3125d": "Could not copy the link",
"05cf59d40e17ba63": "Review requested",
"e369d7ce5ff36689": "Authored",
- "87d943aa8f91b9a2": "Others",
"e8c320d314d151e9": "Reviewing",
"8c7976cc624d8d4f": "Authored",
"7ab39987db037952": "Merge readiness",
diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json
index 2c669e2774561..6002bb2f67202 100644
--- a/apps/web/src/i18n/translations/es.json
+++ b/apps/web/src/i18n/translations/es.json
@@ -2597,7 +2597,8 @@
"e3ed00af71363d39": "Aún no hay hilos en estos proyectos",
"981053bcf95b3d3f": "Aún no hay hilos en {project}",
"d978598ec5ca3ac4": "My Bots",
- "007c13b6a386b5be": "Shared Bots",
+ "87d943aa8f91b9a2": "Otras",
+ "8260a90361496410": "Closura",
"151767f20fa67c48": "Fijados",
"db8f17154d4f0cfa": "Activos",
"9578dc3e84f82081": "En curso",
@@ -7433,7 +7434,6 @@
"c3d96c942dc3125d": "No se pudo copiar el enlace",
"05cf59d40e17ba63": "Revisión solicitada",
"e369d7ce5ff36689": "Creadas por mí",
- "87d943aa8f91b9a2": "Otras",
"e8c320d314d151e9": "Revisando",
"8c7976cc624d8d4f": "Creadas por mí",
"7ab39987db037952": "Lista para fusionar",
diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json
index 101deb929c383..5cbe3aa89deb2 100644
--- a/apps/web/src/i18n/translations/fr.json
+++ b/apps/web/src/i18n/translations/fr.json
@@ -2597,7 +2597,8 @@
"e3ed00af71363d39": "Pas encore de fil dans ces projets",
"981053bcf95b3d3f": "Pas encore de fil dans {project}",
"d978598ec5ca3ac4": "My Bots",
- "007c13b6a386b5be": "Shared Bots",
+ "87d943aa8f91b9a2": "Autres",
+ "8260a90361496410": "Closura",
"151767f20fa67c48": "Épinglés",
"db8f17154d4f0cfa": "Actifs",
"9578dc3e84f82081": "En cours",
@@ -7434,7 +7435,6 @@
"c3d96c942dc3125d": "Impossible de copier le lien",
"05cf59d40e17ba63": "Revue demandée",
"e369d7ce5ff36689": "Créées par moi",
- "87d943aa8f91b9a2": "Autres",
"e8c320d314d151e9": "En revue",
"8c7976cc624d8d4f": "Créées par moi",
"7ab39987db037952": "Prête à fusionner",
diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json
index 94b5b541683c3..5400f6de43ab3 100644
--- a/apps/web/src/i18n/translations/ja.json
+++ b/apps/web/src/i18n/translations/ja.json
@@ -2595,7 +2595,8 @@
"e3ed00af71363d39": "これらのプロジェクトにはまだスレッドがありません",
"981053bcf95b3d3f": "{project} にはまだスレッドがありません",
"d978598ec5ca3ac4": "My Bots",
- "007c13b6a386b5be": "Shared Bots",
+ "87d943aa8f91b9a2": "その他",
+ "8260a90361496410": "Closura",
"151767f20fa67c48": "ピン留め済み",
"db8f17154d4f0cfa": "アクティブ",
"9578dc3e84f82081": "作業中",
@@ -7399,7 +7400,6 @@
"c3d96c942dc3125d": "リンクをコピーできませんでした",
"05cf59d40e17ba63": "レビューを依頼されたもの",
"e369d7ce5ff36689": "作成したもの",
- "87d943aa8f91b9a2": "その他",
"e8c320d314d151e9": "レビュー中",
"8c7976cc624d8d4f": "作成したもの",
"7ab39987db037952": "マージの準備状況",
diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json
index 1eb91dfd62d12..722c9dfa778c0 100644
--- a/apps/web/src/i18n/translations/ko.json
+++ b/apps/web/src/i18n/translations/ko.json
@@ -2596,7 +2596,8 @@
"e3ed00af71363d39": "이 프로젝트들에 아직 스레드가 없습니다",
"981053bcf95b3d3f": "{project}에 아직 스레드가 없습니다",
"d978598ec5ca3ac4": "My Bots",
- "007c13b6a386b5be": "Shared Bots",
+ "87d943aa8f91b9a2": "기타",
+ "8260a90361496410": "Closura",
"151767f20fa67c48": "고정됨",
"db8f17154d4f0cfa": "활성",
"9578dc3e84f82081": "작업 중",
@@ -7402,7 +7403,6 @@
"c3d96c942dc3125d": "링크를 복사할 수 없습니다",
"05cf59d40e17ba63": "검토 요청됨",
"e369d7ce5ff36689": "작성함",
- "87d943aa8f91b9a2": "기타",
"e8c320d314d151e9": "검토 중",
"8c7976cc624d8d4f": "작성함",
"7ab39987db037952": "병합 준비 상태",
diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json
index 5e625ef3d9c43..5907cfa450de2 100644
--- a/apps/web/src/i18n/translations/pt-BR.json
+++ b/apps/web/src/i18n/translations/pt-BR.json
@@ -2597,7 +2597,8 @@
"e3ed00af71363d39": "Ainda não há threads nestes projetos",
"981053bcf95b3d3f": "Ainda não há threads em {project}",
"d978598ec5ca3ac4": "My Bots",
- "007c13b6a386b5be": "Shared Bots",
+ "87d943aa8f91b9a2": "Outros",
+ "8260a90361496410": "Closura",
"151767f20fa67c48": "Fixadas",
"db8f17154d4f0cfa": "Ativas",
"9578dc3e84f82081": "Trabalhando",
@@ -7433,7 +7434,6 @@
"c3d96c942dc3125d": "Não foi possível copiar o link",
"05cf59d40e17ba63": "Revisão solicitada",
"e369d7ce5ff36689": "De sua autoria",
- "87d943aa8f91b9a2": "Outros",
"e8c320d314d151e9": "Revisando",
"8c7976cc624d8d4f": "De sua autoria",
"7ab39987db037952": "Pronto para merge",
diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json
index e130cde5e2e17..34a9f25966295 100644
--- a/apps/web/src/i18n/translations/ru.json
+++ b/apps/web/src/i18n/translations/ru.json
@@ -2597,7 +2597,8 @@
"e3ed00af71363d39": "В этих проектах пока нет тредов",
"981053bcf95b3d3f": "В {project} пока нет тредов",
"d978598ec5ca3ac4": "My Bots",
- "007c13b6a386b5be": "Shared Bots",
+ "87d943aa8f91b9a2": "Другие",
+ "8260a90361496410": "Closura",
"151767f20fa67c48": "Закреплённые",
"db8f17154d4f0cfa": "Активные",
"9578dc3e84f82081": "В работе",
@@ -7433,7 +7434,6 @@
"c3d96c942dc3125d": "Не удалось скопировать ссылку",
"05cf59d40e17ba63": "Запрошено ревью",
"e369d7ce5ff36689": "Мои",
- "87d943aa8f91b9a2": "Другие",
"e8c320d314d151e9": "На ревью",
"8c7976cc624d8d4f": "Мои",
"7ab39987db037952": "Готовность к слиянию",
diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json
index 444065429ab34..52b210b22497f 100644
--- a/apps/web/src/i18n/translations/sv.json
+++ b/apps/web/src/i18n/translations/sv.json
@@ -2597,7 +2597,8 @@
"e3ed00af71363d39": "Inga trådar i de här projekten än",
"981053bcf95b3d3f": "Inga trådar i {project} än",
"d978598ec5ca3ac4": "My Bots",
- "007c13b6a386b5be": "Shared Bots",
+ "87d943aa8f91b9a2": "Andra",
+ "8260a90361496410": "Closura",
"151767f20fa67c48": "Fästa",
"db8f17154d4f0cfa": "Aktiva",
"9578dc3e84f82081": "Arbetar",
@@ -7439,7 +7440,6 @@
"c3d96c942dc3125d": "Kunde inte kopiera länken",
"05cf59d40e17ba63": "Granskning begärd",
"e369d7ce5ff36689": "Skapade av mig",
- "87d943aa8f91b9a2": "Andra",
"e8c320d314d151e9": "Granskar",
"8c7976cc624d8d4f": "Skapade av mig",
"7ab39987db037952": "Redo för merge",
diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json
index 7b625cc81b2aa..48ea59011d21d 100644
--- a/apps/web/src/i18n/translations/zh.json
+++ b/apps/web/src/i18n/translations/zh.json
@@ -2601,7 +2601,8 @@
"e3ed00af71363d39": "这些项目中暂无会话",
"981053bcf95b3d3f": "{project} 中暂无会话",
"d978598ec5ca3ac4": "My Bots",
- "007c13b6a386b5be": "Shared Bots",
+ "87d943aa8f91b9a2": "其他",
+ "8260a90361496410": "Closura",
"151767f20fa67c48": "已置顶",
"db8f17154d4f0cfa": "活跃",
"9578dc3e84f82081": "运行中",
@@ -7447,7 +7448,6 @@
"c3d96c942dc3125d": "无法复制链接",
"05cf59d40e17ba63": "已请求我审查",
"e369d7ce5ff36689": "我创建的",
- "87d943aa8f91b9a2": "其他",
"e8c320d314d151e9": "我审查的",
"8c7976cc624d8d4f": "我创建的",
"7ab39987db037952": "合并就绪状态",