Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Train fix for #6111: drop the unwired Inbox open-row and unread-dot props
milind-sonidec8e7c23c6c
diff --git a/src/components/SidebarBotActivity.tsx b/src/components/SidebarBotActivity.tsxindex a319861b2f..d86e2cfc36 100644--- a/src/components/SidebarBotActivity.tsx+++ b/src/components/SidebarBotActivity.tsx@@ -7,7 +7,6 @@ import { t } from "@/lib/i18n";import { isArchived, orderedSidebarThreads, orderedThreadList, threadRecency, threadUpdatedLabel } from "./SidebarThreadRow";import type { SidebarDensity } from "@/lib/sidebar-preferences";import { localizedTaskTitle } from "@/lib/task-title";-import { rowSelectedSurface } from "./SidebarRowMarkers";export function sidebarBotActivityTasks(bot: Bot, queued: Record<string, unknown[]>, archivedApprovals = false): Array<Task & { queued: boolean }> {const tasks = bot.tasks ?? [{@@ -73,20 +72,6 @@ export type AttentionThread =| { kind: "bot"; botId: string; botName: string; task: Task & { queued: boolean } }| { kind: "group"; groupId: string; groupName: string; groupThreadId: string; task: Task & { queued: boolean } };-/** The conversation the chat window has open, matched against the rows these lists render. */-export type OpenThread =- | { kind: "bot"; botId: string; threadId: string }- | { kind: "group"; groupId: string; threadId: string };--export function isOpenThread(entry: AttentionThread, open: OpenThread | undefined): boolean {- if (!open || entry.task.threadId !== open.threadId) return false;- if (entry.kind === "bot") return open.kind === "bot" && entry.botId === open.botId;- return open.kind === "group" && entry.groupId === open.groupId;-}--/** LOCAL: the row of the conversation the chat window has open. A tint, a left accent bar and an inset outline read as one mark at a glance. */-export const openThreadRow = rowSelectedSurface;-export function attentionOwnerName(entry: AttentionThread): string {return entry.kind === "bot" ? entry.botName : entry.groupName;}@@ -171,30 +156,20 @@ export function crossBotPinnedThreads(bots: Bot[], groups: Group[], queued: Reco: { kind: "bot", botId: botId!, botName: botName!, task });}-export function AttentionThreadRows({ entries, onJump, inset = false, unreadDot = false, current }: {- entries: AttentionThread[]; onJump: (entry: AttentionThread) => void; inset?: boolean;- /** LOCAL: mark an unread conversation with a dot and a heavier title, the way the Inbox's own rows are marked. */- unreadDot?: boolean;- /** LOCAL: the conversation the chat window has open, tinted like a selected sidebar row. */- current?: OpenThread;-}) {+export function AttentionThreadRows({ entries, onJump, inset = false }: { entries: AttentionThread[]; onJump: (entry: AttentionThread) => void; inset?: boolean }) {return <>{entries.map((entry) => {const { Icon, colorClass, label: status } = attentionRowStatus(entry.task);const name = attentionOwnerName(entry);const label = t("attention.item", { title: entry.task.title, name, status });- const unread = unreadDot && entry.task.unread === true;- const open = isOpenThread(entry, current);return <button key={`${entry.kind}-${entry.kind === "bot" ? entry.botId : entry.groupId}-${entry.task.threadId}`} type="button" aria-label={label} title={label}- aria-current={open ? "page" : undefined} data-open-thread={open || undefined}onClick={() => onJump(entry)}- className={cn("flex w-full items-center gap-2.5 text-left text-[13px] text-ink hover:bg-menu-hover", inset ? "rounded-md px-2 py-1.5" : "px-3.5 py-2", open && openThreadRow)}>+ className={cn("flex w-full items-center gap-2.5 text-left text-[13px] text-ink hover:bg-menu-hover", inset ? "rounded-md px-2 py-1.5" : "px-3.5 py-2")}><Icon size={inset ? 16 : 15} aria-hidden="true" className={cn("shrink-0", colorClass)} /><span className="min-w-0 flex-1">- <span className={cn("block truncate", unread && "font-medium text-ink")}>{entry.task.title}</span>+ <span className="block truncate">{entry.task.title}</span><span className="block truncate text-[11px] text-ink-secondary">{name} · {status}</span></span>- {unread && <span data-attention-unread-dot aria-hidden="true" className="size-1.5 shrink-0 rounded-full bg-accent" />}</button>;})}</>;diff --git a/src/components/SidebarRowMarkers.tsx b/src/components/SidebarRowMarkers.tsxindex a2d78a7808..d16cbce459 100644--- a/src/components/SidebarRowMarkers.tsx+++ b/src/components/SidebarRowMarkers.tsx@@ -8,8 +8,8 @@ export function rowSurface(selected: boolean): string {: "[--row:var(--color-panel)] max-md:[--row:var(--color-app)] hover:[--row:color-mix(in_srgb,var(--color-raised)_50%,var(--color-panel))]";}-/** LOCAL: the conversation the chat window has open. A tint, a left accent bar and an inset outline, the same mark the Inbox- * uses, because `raised` sits only a shade away from `panel` on both the dark and the light skins. */+/** The conversation the chat window has open. A tint, a left accent bar and an inset outline,+ * because `raised` sits only a shade away from `panel` on both the dark and the light skins. */export const rowSelectedSurface = "bg-accent/15 shadow-[inset_3px_0_0_0_var(--color-accent)] ring-1 ring-inset ring-accent/30 hover:bg-accent/20";export type RowActivity = "working" | "teammate" | "queued";