Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Sidebar: reread Show all after no list was mounted; pt-br labels
AdityaUmaledf159fcba85c
diff --git a/src/components/Sidebar.pinned-show-all.dom.test.ts b/src/components/Sidebar.pinned-show-all.dom.test.tsindex 62b18c65a3..6b0509435d 100644--- a/src/components/Sidebar.pinned-show-all.dom.test.ts+++ b/src/components/Sidebar.pinned-show-all.dom.test.ts@@ -76,6 +76,18 @@ describe("a bot's Show all threads", () => {expect(saved()).toEqual([]);await unmount();});++ it("reads a change another window saved while no list was showing", async () => {+ await mount();+ await click("Show all 11 threads");+ await unmount();++ localStorage.setItem(SIDEBAR_SHOW_ALL_KEY, "[]"); // another window picked Show fewer meanwhile+ await mount();+ expect(host.textContent).not.toContain("Loose chat 0");+ expect(button("Show all 11 threads")).toBeTruthy();+ await unmount();+ });});describe("a collapsed folder", () => {diff --git a/src/lib/sidebar-preferences.ts b/src/lib/sidebar-preferences.tsindex e4c7871fc3..f9a764ba0b 100644--- a/src/lib/sidebar-preferences.ts+++ b/src/lib/sidebar-preferences.ts@@ -465,6 +465,8 @@ let showAllBots: ReadonlySet<string> | null = null;const showAllListeners = new Set<() => void>();function currentShowAllBots(): ReadonlySet<string> {+ // With no list mounted, no storage listener kept the cache current: another window may have changed it.+ if (showAllListeners.size === 0) showAllBots = null;showAllBots ??= new Set(loadStringList(SIDEBAR_SHOW_ALL_KEY));return showAllBots;}diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex 5d4d4cdca4..80fc68e41e 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -3087,6 +3087,8 @@"task.collapseNamed": "Recolher conversas: {name}","task.expandNamed": "Expandir conversas: {name}","task.showAll": "Ver todas as {count} conversas",+ "task.showFewer": "Ver menos conversas",+ "task.pinned": "Fixada","task.bulk.select": "Selecionar conversas","task.bulk.done": "Concluir","task.bulk.selectAll": "Selecionar tudo",