Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

fix(release): restore stable build and dispatch (#110)

Leocb4c2dd95ffe
diff --git a/.depot/workflows/release.yml b/.depot/workflows/release.yml
index 713d1e374..d9a08e71b 100644
--- a/.depot/workflows/release.yml
+++ b/.depot/workflows/release.yml
@@ -3,6 +3,7 @@
name: Stable release
on:
+ workflow_dispatch:
push:
branches: [main]
paths:
@@ -194,7 +195,7 @@ jobs:
run: |
args=(--platform "${{ matrix.platform }}" --target "${{ matrix.target }}" --arch "${{ matrix.arch }}" --build-version "$RELEASE_VERSION" --verbose)
if test "$SIGNED" = true; then args+=(--signed); fi
- vp run dist:desktop:artifact -- "${args[@]}"
+ vp run dist:desktop:artifact "${args[@]}"
- name: Notarize and verify macOS DMG
if: matrix.platform == 'mac' && env.SIGNED == 'true'
diff --git a/apps/web/src/components/roster/BotDetailsPanel.tsx b/apps/web/src/components/roster/BotDetailsPanel.tsx
index 7ca4e6361..14f021747 100644
--- a/apps/web/src/components/roster/BotDetailsPanel.tsx
+++ b/apps/web/src/components/roster/BotDetailsPanel.tsx
@@ -43,6 +43,7 @@ import { Switch } from "../ui/switch";
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
import { AvatarPickerDialog } from "./AvatarPickerDialog";
import { BotAvatarView } from "./BotAvatarView";
+import { BotBrowserPreview } from "./BotBrowserPreview";
import { BotChannelsSheet } from "./BotChannelsSheet";
import { BotModelPicker } from "./BotModelPicker";
import { BotUsageSection } from "./BotUsageSection";
diff --git a/apps/web/src/components/roster/GroupThreadLanding.tsx b/apps/web/src/components/roster/GroupThreadLanding.tsx
index b0902729a..7767d1aaa 100644
--- a/apps/web/src/components/roster/GroupThreadLanding.tsx
+++ b/apps/web/src/components/roster/GroupThreadLanding.tsx
@@ -21,6 +21,7 @@ import { BotInboxAlertStack } from "./BotInboxAlertStack";
import { BotAvatarView } from "./BotAvatarView";
import { BotConversationScrollArea } from "./BotConversationScrollArea";
import { DelegationCard } from "./DelegationCard";
+import { GroupMemberStack } from "./GroupMemberStack";
import { visibleBotChatMessages } from "./botConversationPresentation";
import { BotPromptComposer } from "./BotPromptComposer";
import { BotMessageAttachments } from "./BotMessageAttachments";
diff --git a/apps/web/src/components/roster/roster.logic.test.ts b/apps/web/src/components/roster/roster.logic.test.ts
index 306030b75..c29210c47 100644
--- a/apps/web/src/components/roster/roster.logic.test.ts
+++ b/apps/web/src/components/roster/roster.logic.test.ts
@@ -3,6 +3,10 @@ import { describe, expect, it } from "vite-plus/test";
import {
blinkDelayMs,
+ buildGroupedRosterSections,
+ buildRosterSections,
+ buildRosterStrip,
+ buildRosterTiles,
filterRosterBots,
filterRosterGroups,
DEFAULT_BLOB_COLOR,
diff --git a/apps/web/src/components/roster/roster.logic.ts b/apps/web/src/components/roster/roster.logic.ts
index 44765bfac..eb55de71c 100644
--- a/apps/web/src/components/roster/roster.logic.ts
+++ b/apps/web/src/components/roster/roster.logic.ts
@@ -154,6 +154,70 @@ export function resolveLatestRosterMessage(
return latest.at >= fallback.at ? latest : fallback;
}
+export interface RosterSection {
+ id: "pinned" | "unpinned";
+ name: "Pinned" | "Bots";
+ bots: Bot[];
+}
+
+function lastMessageSortValue(
+ bot: Bot,
+ lastMessageByBotId: Readonly<Record<string, RosterLastMessage>>,
+): number | null {
+ const at = lastMessageByBotId[bot.id]?.at;
+ if (at === undefined) return null;
+ return parseTimestampDate(at)?.getTime() ?? null;
+}
+
+export function compareRosterBots(
+ a: Bot,
+ b: Bot,
+ lastMessageByBotId: Readonly<Record<string, RosterLastMessage>>,
+): number {
+ const aAt = lastMessageSortValue(a, lastMessageByBotId);
+ const bAt = lastMessageSortValue(b, lastMessageByBotId);
+ if (aAt !== null && bAt !== null && aAt !== bAt) return bAt - aAt;
+ if (aAt !== null && bAt === null) return -1;
+ if (aAt === null && bAt !== null) return 1;
+ return a.name.localeCompare(b.name, undefined, { sensitivity: "base" });
+}
+
+type RosterSectionsInput = readonly Bot[] | { bots: readonly Bot[] };
+
+function isPreviousRosterSectionsInput(
+ input: RosterSectionsInput,
+): input is { bots: readonly Bot[] } {
+ return !Array.isArray(input);
+}
+
+export function buildRosterSections(input: RosterSectionsInput): RosterSection[] {
+ const bots = isPreviousRosterSectionsInput(input) ? input.bots : input;
+ const visibleBots = bots.filter((bot) => bot.archivedAt === null);
+ const pinned = visibleBots.filter((bot) => bot.pinned);
+ const unpinned = visibleBots.filter((bot) => !bot.pinned);
+ return [
+ ...(pinned.length > 0 ? [{ id: "pinned", name: "Pinned", bots: pinned } as const] : []),
+ ...(unpinned.length > 0 ? [{ id: "unpinned", name: "Bots", bots: unpinned } as const] : []),
+ ];
+}
+
+export const ROSTER_TILE_LIMIT = 5;
+
+export function buildRosterStrip(
+ bots: readonly Bot[],
+ _lastMessageByBotId: Readonly<Record<string, RosterLastMessage>>,
+): Bot[] {
+ const visible = bots.filter((bot) => bot.archivedAt === null);
+ return [...visible.filter((bot) => bot.pinned), ...visible.filter((bot) => !bot.pinned)];
+}
+
+export function buildRosterTiles(
+ bots: readonly Bot[],
+ _lastMessageByBotId: Readonly<Record<string, RosterLastMessage>>,
+): Bot[] {
+ return bots.filter((bot) => bot.archivedAt === null && bot.pinned).slice(0, ROSTER_TILE_LIMIT);
+}
+
export function filterRosterBots(bots: readonly Bot[], query: string): Bot[] {
const needle = query.trim().toLowerCase();
if (needle.length === 0) return [...bots];
@@ -165,6 +229,37 @@ export function filterRosterBots(bots: readonly Bot[], query: string): Bot[] {
);
}
+export function isCurrentGroupPerson(
+ authorPersonId: string | null | undefined,
+ currentPersonId: string | null | undefined,
+ hostPersonId: string | null | undefined,
+): boolean {
+ const resolvedAuthorPersonId = authorPersonId ?? hostPersonId;
+ return resolvedAuthorPersonId != null && resolvedAuthorPersonId === currentPersonId;
+}
+
+export function groupContainsBot(group: Group, botId: string): boolean {
+ return group.members.some((member) => isGroupBotMember(member) && member.botId === botId);
+}
+
+export function groupBotMembers(group: Group, bots: ReadonlyArray<Bot>): ReadonlyArray<Bot> {
+ const memberIds = new Set<string>(
+ group.members.filter(isGroupBotMember).map((member) => member.botId),
+ );
+ return bots.filter((bot) => memberIds.has(bot.id));
+}
+
+export function groupPersonMembers(group: Group): ReadonlyArray<GroupPersonMembership> {
+ return group.members.filter(isGroupPersonMember);
+}
+
+export interface RosterGroupSection {
+ readonly id: string;
+ readonly name: string;
+ readonly group?: Group | null;
+ readonly bots: ReadonlyArray<Bot>;
+}
+
export function filterRosterGroups(
groups: readonly Group[],
bots: readonly Bot[],
@@ -179,6 +274,25 @@ export function filterRosterGroups(
);
}
+const BOT_DRAG_PREFIX = "bot:";
+const GROUP_DROP_PREFIX = "group:";
+
+export function rosterBotDragId(botId: string): string {
+ return `${BOT_DRAG_PREFIX}${botId}`;
+}
+
+export function rosterGroupDropId(groupId: string): string {
+ return `${GROUP_DROP_PREFIX}${groupId}`;
+}
+
+export function parseRosterBotDragId(id: string): string | null {
+ return id.startsWith(BOT_DRAG_PREFIX) ? id.slice(BOT_DRAG_PREFIX.length) || null : null;
+}
+
+export function parseRosterGroupDropId(id: string): string | null {
+ return id.startsWith(GROUP_DROP_PREFIX) ? id.slice(GROUP_DROP_PREFIX.length) || null : null;
+}
+
/**
* Assigned groups first, then every bot without a group under Unassigned.
* A matching group keeps every member so stacked avatars stay visible.