Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Train fix (#7882): thread previews only in Advanced, where nothing is read in Simple
milind-soni209e2620d994
diff --git a/screenshots/issue-6929/after-1440-daylight.png b/screenshots/issue-6929/after-1440-daylight.pngdeleted file mode 100644index 27c7edef39..0000000000Binary files a/screenshots/issue-6929/after-1440-daylight.png and /dev/null differdiff --git a/screenshots/issue-6929/after-1440-midnight.png b/screenshots/issue-6929/after-1440-midnight.pngdeleted file mode 100644index 03785174f5..0000000000Binary files a/screenshots/issue-6929/after-1440-midnight.png and /dev/null differdiff --git a/screenshots/issue-6929/after-390-daylight.png b/screenshots/issue-6929/after-390-daylight.pngdeleted file mode 100644index 7fd484fb19..0000000000Binary files a/screenshots/issue-6929/after-390-daylight.png and /dev/null differdiff --git a/screenshots/issue-6929/after-390-midnight.png b/screenshots/issue-6929/after-390-midnight.pngdeleted file mode 100644index 9cc7647a85..0000000000Binary files a/screenshots/issue-6929/after-390-midnight.png and /dev/null differdiff --git a/screenshots/issue-6929/before-1440-daylight.png b/screenshots/issue-6929/before-1440-daylight.pngdeleted file mode 100644index 4ad6a4893e..0000000000Binary files a/screenshots/issue-6929/before-1440-daylight.png and /dev/null differdiff --git a/screenshots/issue-6929/before-1440-midnight.png b/screenshots/issue-6929/before-1440-midnight.pngdeleted file mode 100644index 7afdafd13e..0000000000Binary files a/screenshots/issue-6929/before-1440-midnight.png and /dev/null differdiff --git a/screenshots/issue-6929/before-390-daylight.png b/screenshots/issue-6929/before-390-daylight.pngdeleted file mode 100644index ce218789a9..0000000000Binary files a/screenshots/issue-6929/before-390-daylight.png and /dev/null differdiff --git a/screenshots/issue-6929/before-390-midnight.png b/screenshots/issue-6929/before-390-midnight.pngdeleted file mode 100644index d3da273d4f..0000000000Binary files a/screenshots/issue-6929/before-390-midnight.png and /dev/null differdiff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsxindex aeb4e2c7fc..b41af22bf2 100644--- a/src/components/Sidebar.tsx+++ b/src/components/Sidebar.tsx@@ -39,7 +39,7 @@ import { GroupThreadList } from "./SidebarGroupThreadList";import { useOwnerOrAdmin } from "@/lib/use-owner-or-admin";import { draggedFolder, FOLDER_DRAG_TYPE, moveFolder, placeFolder } from "@/lib/folder-order";import { folderUnreadThreadIds, markFolderRead } from "@/lib/folder-read";-import { HelperThreadGroup, isArchived, orderedThreadList, partitionHelperThreads, SidebarThreadRow, stampClock, threadRecency, threadRowActions, UngroupedThreadList, useRelativeNow, useRevealedThreadRow, useSnoozeExpiry, visibleSidebarThreads } from "./SidebarThreadRow"; import { SidebarConversationRow } from "./SidebarConversationRow";+import { HelperThreadGroup, isArchived, orderedThreadList, partitionHelperThreads, stampClock, threadRecency, threadRowActions, UngroupedThreadList, useRelativeNow, useRevealedThreadRow, useSnoozeExpiry, visibleSidebarThreads } from "./SidebarThreadRow"; import { SidebarConversationRow } from "./SidebarConversationRow";import { setSidebarDensity, useSidebarDensity, usePinnedCircles, useSidebarShowAllThreads, useUniversalPins, type SidebarDensity } from "@/lib/sidebar-preferences";import {ATTENTION_SECTION_ID,@@ -1350,7 +1350,7 @@ export const Sidebar = memo(function Sidebar({ open, onClose, collapseToIcons =<BotListItem {...botRow(unsectionedChief)} /></div>))}- {!q && density !== "icons" && <SidebarRecentConversations bots={sideLists.bots} groups={sideLists.groups} routineRuns={state.routineRuns} viewerEmail={viewerEmail} welcoming={welcoming} selectedId={state.activeView === "chat" && state.newChat?.botId !== state.selectedId ? state.selectedId : null} onOpen={(target) => { if (openThread(dispatch, target, state, showThreads) && phone) onClose(); }} />}+ {advanced && !q && density !== "icons" && <SidebarRecentConversations bots={sideLists.bots} groups={sideLists.groups} routineRuns={state.routineRuns} viewerEmail={viewerEmail} welcoming={welcoming} selectedId={state.activeView === "chat" && state.newChat?.botId !== state.selectedId ? state.selectedId : null} onOpen={(target) => { if (openThread(dispatch, target, state, showThreads) && phone) onClose(); }} />}{sectionIds.map((id, index) => {const sectionName = userSectionName(id), editable = oneList?.mirror ? null : sectionName;const sectionChiefItems = sectionNamediff --git a/src/components/SidebarConversationRow.tsx b/src/components/SidebarConversationRow.tsxindex 86a4bea314..ceeaf4a4af 100644--- a/src/components/SidebarConversationRow.tsx+++ b/src/components/SidebarConversationRow.tsx@@ -1,11 +1,20 @@import { useRef, type ComponentProps } from "react";+import { useAdvancedMode } from "@/lib/interface-mode";import { useOnScreen } from "@/lib/on-screen";import { currentTaskBot, type Bot, type InstanceInfo } from "@/state/store";import { useSidebarRecentMessages } from "./bot-panel/Conversations";import { lastLine } from "./sidebar-preview";import { SidebarThreadRow } from "./SidebarThreadRow";-export function SidebarConversationRow({ bot, instances, generation, ...props }: ComponentProps<typeof SidebarThreadRow> & { bot: Bot; instances: InstanceInfo[]; generation: number }) {+type Props = ComponentProps<typeof SidebarThreadRow> & { bot: Bot; instances: InstanceInfo[]; generation: number };++/** Advanced mode: a thread row with a line of its latest message, read once the row is on screen. Simple mode keeps the+ * plain row and reads nothing. */+export function SidebarConversationRow({ bot, instances, generation, ...props }: Props) {+ return useAdvancedMode() ? <PreviewedThreadRow bot={bot} instances={instances} generation={generation} {...props} /> : <SidebarThreadRow {...props} />;+}++function PreviewedThreadRow({ bot, instances, generation, ...props }: Props) {const ref = useRef<HTMLDivElement>(null);const onScreen = useOnScreen(ref);const messages = useSidebarRecentMessages(bot, props.task, onScreen, generation);