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(channels): restore settings and delivery (#136)

Leo217ff7202f92
diff --git a/apps/server/src/orchestration/runtimeLayer.test.ts b/apps/server/src/orchestration/runtimeLayer.test.ts
new file mode 100644
index 000000000..05490de9d
--- /dev/null
+++ b/apps/server/src/orchestration/runtimeLayer.test.ts
@@ -0,0 +1,29 @@
+import { assert, it } from "@effect/vitest";
+import * as NodeServices from "@effect/platform-node/NodeServices";
+import * as Effect from "effect/Effect";
+import * as Layer from "effect/Layer";
+
+import * as ChannelDeliveryStore from "../channels/ChannelDeliveryStore.ts";
+import * as ServerConfig from "../config.ts";
+import { SqlitePersistenceMemory } from "../persistence/Layers/Sqlite.ts";
+import * as RepositoryIdentityResolver from "../project/RepositoryIdentityResolver.ts";
+import { OrchestrationLayerLive } from "./runtimeLayer.ts";
+
+it.effect("provides channel delivery storage to the server runtime", () =>
+ Effect.gen(function* () {
+ const store = yield* ChannelDeliveryStore.ChannelDeliveryStore;
+
+ assert.isFunction(store.claim);
+ }).pipe(
+ Effect.provide(
+ OrchestrationLayerLive.pipe(
+ Layer.provideMerge(RepositoryIdentityResolver.layer),
+ Layer.provideMerge(SqlitePersistenceMemory),
+ Layer.provideMerge(
+ ServerConfig.layerTest(process.cwd(), { prefix: "runtime-layer-test-" }),
+ ),
+ Layer.provideMerge(NodeServices.layer),
+ ),
+ ),
+ ),
+);
diff --git a/apps/server/src/orchestration/runtimeLayer.ts b/apps/server/src/orchestration/runtimeLayer.ts
index d2ba891bd..50098aaff 100644
--- a/apps/server/src/orchestration/runtimeLayer.ts
+++ b/apps/server/src/orchestration/runtimeLayer.ts
@@ -36,6 +36,7 @@ export const OrchestrationInfrastructureLayerLive = Layer.mergeAll(
ProjectionBotRepositoryLive,
ProjectionGroupRepositoryLive,
BotUsageLedgerLive,
+ ChannelDeliveryStoreLive,
MemoryRepositoriesLive,
// Shared background-liveness and plan-progress registries: written by
// runtime ingestion, read by the snapshot query. provideMerge feeds the
diff --git a/apps/web/src/components/settings/SettingsDialog.test.ts b/apps/web/src/components/settings/SettingsDialog.test.ts
new file mode 100644
index 000000000..d95019db9
--- /dev/null
+++ b/apps/web/src/components/settings/SettingsDialog.test.ts
@@ -0,0 +1,11 @@
+import { describe, expect, it } from "vite-plus/test";
+
+import { SETTINGS_NAV_ITEMS } from "./SettingsDialog";
+
+describe("settings dialog navigation", () => {
+ it("shows Bot channels as a navigation tab", () => {
+ expect(SETTINGS_NAV_ITEMS).toContainEqual(
+ expect.objectContaining({ section: "channels", label: "Bot channels" }),
+ );
+ });
+});
diff --git a/apps/web/src/components/settings/SettingsDialog.tsx b/apps/web/src/components/settings/SettingsDialog.tsx
index 953653c8b..2965b5ebd 100644
--- a/apps/web/src/components/settings/SettingsDialog.tsx
+++ b/apps/web/src/components/settings/SettingsDialog.tsx
@@ -6,6 +6,7 @@ import {
HardDriveIcon,
KeyboardIcon,
Link02Icon,
+ Message01Icon,
PaintBrush01Icon,
SecurityCheckIcon,
Settings02Icon,
@@ -76,7 +77,7 @@ const SECTION_PANELS: Readonly<Record<SettingsSection, ComponentType>> = {
};
/** Sections with a nav row. Anything else is reached from a link inside a panel. */
-const NAV_ITEMS: ReadonlyArray<{
+export const SETTINGS_NAV_ITEMS: ReadonlyArray<{
readonly section: SettingsSection;
readonly label: string;
readonly icon: IconSvgElement;
@@ -84,6 +85,7 @@ const NAV_ITEMS: ReadonlyArray<{
{ section: "general", label: "General", icon: Settings02Icon },
{ section: "appearance", label: "Appearance", icon: PaintBrush01Icon },
{ section: "providers", label: "Providers", icon: BotIcon },
+ { section: "channels", label: "Bot channels", icon: Message01Icon },
{ section: "browser", label: "Browser", icon: BrowserIcon },
{ section: "sandbox", label: "Sandbox", icon: HardDriveIcon },
{ section: "voice", label: "Voice", icon: CallIcon },
@@ -114,7 +116,7 @@ export function SettingsDialog() {
aria-label="Settings sections"
className="flex w-52 shrink-0 flex-col gap-0.5 border-e bg-muted/30 p-2 max-sm:w-full max-sm:flex-row max-sm:overflow-x-auto max-sm:border-e-0 max-sm:border-b"
>
- {NAV_ITEMS.map((item) => {
+ {SETTINGS_NAV_ITEMS.map((item) => {
const isActive = section === item.section;
return (
<button