Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.
Python agent-orchestrationaiai-agentschatopsdiscordlangchainmcpmicrosoft-teamsmulti-agentopen-sourceopenaiself-hostedslack
fix(console): a bridged room's description is labelled and optional
raullopez-sandbox55c7761d0f6d
diff --git a/console/apps/switch-console-desktop/src/renderer/features/switch-servers/CreateRoomModal.tsx b/console/apps/switch-console-desktop/src/renderer/features/switch-servers/CreateRoomModal.tsxindex 693c8385a..9618dcad8 100644--- a/console/apps/switch-console-desktop/src/renderer/features/switch-servers/CreateRoomModal.tsx+++ b/console/apps/switch-console-desktop/src/renderer/features/switch-servers/CreateRoomModal.tsx@@ -183,7 +183,7 @@ export const CreateRoomModal = observer(function CreateRoomModal({workspaceId !== null &&startingAgentState !== 'pending' &&!nowhere &&- canCreate({ bridgeId: selectedBridge?.id ?? null, name, description }) &&+ canCreate({ name }) &&!isSubmitting;async function handleSubmit() {@@ -320,24 +320,30 @@ export const CreateRoomModal = observer(function CreateRoomModal({{/* A bridged room's own settings; a Switch Console room has none to start with. */}{selectedBridge && (- <section className="flex flex-col gap-3">- <Input- placeholder="What this room is for"- aria-label="Description"- value={description}- onChange={(e) => {- setDescription(e.target.value);- setError(null);- }}- />- <Textarea- placeholder="Optional guidance shown to agents when they enter the room"- aria-label="Instructions"- value={instructions}- onChange={(e) => setInstructions(e.target.value)}- rows={3}- />- </section>+ <>+ <Field>+ <FieldLabel htmlFor="new-room-description">Description (optional)</FieldLabel>+ <Input+ id="new-room-description"+ placeholder="What this room is for"+ value={description}+ onChange={(e) => {+ setDescription(e.target.value);+ setError(null);+ }}+ />+ </Field>+ <Field>+ <FieldLabel htmlFor="new-room-instructions">Instructions (optional)</FieldLabel>+ <Textarea+ id="new-room-instructions"+ placeholder="Guidance shown to agents when they enter the room"+ value={instructions}+ onChange={(e) => setInstructions(e.target.value)}+ rows={3}+ />+ </Field>+ </>)}{nowhere && (diff --git a/console/apps/switch-console-desktop/src/renderer/features/switch-servers/create-room-modal.test.ts b/console/apps/switch-console-desktop/src/renderer/features/switch-servers/create-room-modal.test.tsindex 49e1cbaf1..edf3a5e56 100644--- a/console/apps/switch-console-desktop/src/renderer/features/switch-servers/create-room-modal.test.ts+++ b/console/apps/switch-console-desktop/src/renderer/features/switch-servers/create-room-modal.test.ts@@ -84,4 +84,31 @@ describe('CreateRoomModal', () => {client.setQueryData(['chat-agent-candidates', 'srv', 'ws', null], ['a1']);expect(render(client)).toContain('aria-label="Remove agent-one"');});+ it('labels a bridged room’s description and instructions as optional', () => {+ flags.group_chats = false;+ try {+ const client = new QueryClient();+ client.setQueryData(+ ['remote-bridges', 'ws'],+ [+ {+ id: 'b1',+ displayName: 'Discord',+ type: 'discord',+ status: 'active',+ canCreateChannels: true,+ },+ ]+ );+ const html = render(client);+ expect(html).toMatch(+ /<label[^>]*for="new-room-description"[^>]*>Description \(optional\)<\/label>/+ );+ expect(html).toMatch(+ /<label[^>]*for="new-room-instructions"[^>]*>Instructions \(optional\)<\/label>/+ );+ } finally {+ flags.group_chats = true;+ }+ });});diff --git a/console/apps/switch-console-desktop/src/renderer/features/switch-servers/room-create-request.test.ts b/console/apps/switch-console-desktop/src/renderer/features/switch-servers/room-create-request.test.tsindex b83d24ada..5398e585a 100644--- a/console/apps/switch-console-desktop/src/renderer/features/switch-servers/room-create-request.test.ts+++ b/console/apps/switch-console-desktop/src/renderer/features/switch-servers/room-create-request.test.ts@@ -61,11 +61,9 @@ describe('roomCreateRequest', () => {});describe('canCreate', () => {- it('asks a chat only for a name, a bridged room for a description too', () => {- expect(canCreate({ bridgeId: null, name: 'x', description: '' })).toBe(true);- expect(canCreate({ bridgeId: 'b1', name: 'x', description: '' })).toBe(false);- expect(canCreate({ bridgeId: 'b1', name: 'x', description: 'd' })).toBe(true);- expect(canCreate({ bridgeId: null, name: ' ', description: 'd' })).toBe(false);+ it('asks only for a name, a bridged room included', () => {+ expect(canCreate({ name: 'x' })).toBe(true);+ expect(canCreate({ name: ' ' })).toBe(false);});});diff --git a/console/apps/switch-console-desktop/src/renderer/features/switch-servers/room-create-request.ts b/console/apps/switch-console-desktop/src/renderer/features/switch-servers/room-create-request.tsindex 75677cc33..64a3c93c2 100644--- a/console/apps/switch-console-desktop/src/renderer/features/switch-servers/room-create-request.ts+++ b/console/apps/switch-console-desktop/src/renderer/features/switch-servers/room-create-request.ts@@ -66,9 +66,9 @@ export function roomCreateRequest(form: {};}-/** A chat needs only a name; a bridged room also needs a description. */-export function canCreate(form: { bridgeId: string | null; name: string; description: string }) {- return form.name.trim() !== '' && (form.bridgeId === null || form.description.trim() !== '');+/** A room needs only a name; a bridged room's description is optional, as its channel topic is. */+export function canCreate(form: { name: string }) {+ return form.name.trim() !== '';}/**