Skip to content

AI-powered virtual executive team — a single coherent executive persona backed by 8 specialist agents (FastAPI + Next.js).

feat(ui): show each chat's app logo instead of a channel pill (#536)

Rufus3a9e2e99fbdb
diff --git a/packages/core/openexecutive/guide/prebuilt/chat.json b/packages/core/openexecutive/guide/prebuilt/chat.json
index e9628880..569e0e1a 100644
--- a/packages/core/openexecutive/guide/prebuilt/chat.json
+++ b/packages/core/openexecutive/guide/prebuilt/chat.json
@@ -1,7 +1,7 @@
{
"section_id": "chat",
"title": "Chat & Briefing",
- "markdown": "**What it is:** Where you talk to the Executive in plain language. The app opens on **Home**, a quick read of what's happened across the company and what needs you, and you drop into a chat whenever you want to ask or decide something. Every conversation is kept on the **Chats** page.\n\n**What it does:**\n\n- Hold a natural conversation with the Executive, which quietly pulls in whichever specialists a question needs.\n- Keep every chat with its full history, so you can pick up where you left off.\n- See each reply under the Executive's name, the one it goes by in mail and chat.\n- Attach files to a message: up to 5 per message, 20 MB each (PNG, JPEG, GIF and WebP images, PDF, Word, text, Markdown, CSV). The Executive reads them for that message.\n- Stop a reply while it is still coming. Whatever has been written is kept and marked *Stopped by you*. (Escape works too.)\n- Add to a reply while it works: type and send, and your message joins the answer in progress (*Sent while it works*, then *👀 Seen, taking it into this answer*).\n- Redo your last turn in a web chat: **Try again** under the last reply asks the same question again, and **Edit** under your last message lets you change it. Sending an edit replaces that message and its answer.\n- Turn on **Committee review** for a question that matters: a slower pass where reviewers challenge the draft answer before you see it.\n- Continue any item on Home straight into a chat thread, with the context already filled in.\n- Choose **Show agent activity** in the **⋯** menu at the top right to watch what's happening behind a reply: which specialists were consulted and which tools ran.\n- See what an answer drew on: click **Sources (N)** under a reply to list the documents and web pages it looked at (your own documents, the built-in knowledge and any web pages), with links where there are any.\n- Copy a reply with **Copy**, and rate it with 👍 (**Helpful**) or 👎 (**Not helpful**).\n\n**How to use:**\n\n1. Click **New chat** at the top of the sidebar (on a phone, the **+** in the middle of the bar at the bottom), or type into the **Ask your Executive anything…** box on Home. Click **Home** any time to get back.\n2. Type your question and press **Enter** to send. **Shift + Enter** starts a new line. When the box is empty, a greyed-out suggested follow-up may appear; press **Tab** or **→** to use it (on a phone, tap **Use suggestion**).\n3. To include a file, click the **+** next to the message box, choose **Attach files or photos** and pick up to 5 files. Drag-and-drop isn't supported in chat. Attachments are read for that message only. To make a document permanently available, add it on the **Knowledge** page.\n4. For a decision that matters, click the **+** next to the message box and choose **Committee review (slower, reviewed)** before sending. A **Committee review on** chip appears above the box. It stays on for each message you send until you click the chip (or choose **Turn off committee review** in the **+** menu). While it works you see *Drafting → Committee review → Revising*.\n5. Changed your mind mid-answer? Click the stop button (next to the message box while a reply is streaming) or press **Esc**.\n6. In an open chat, the **⋯** menu at the top right has **Pin** / **Unpin**, **Rename**, **Share**, **Download** and **Show agent activity**. Deleting is on the **Chats** page.\n7. If part of an answer couldn't be completed (say, the finance side), you still get the rest, with a short note under it. Ask again to fill in the missing part.\n8. When something you asked for needs your approval (a meeting the Executive set up for you to approve, or actions it suggested from your email), its card appears right under the reply: **Approve**, **Edit** (for a meeting: its title, start and end) and **Dismiss**. After **Approve** a meeting's card says *Booked. It's on your calendar.* The same card also waits under **Needs you** on Today until you answer it in either place. Saying *ok* in the chat doesn't book it; tap **Approve**. Things the Executive raises on its own come only to Today.\n\n**Chats page:** click **Chats** in the sidebar (on a phone, **Chats** in the bar at the bottom). It lists every conversation you own: web chats and the ones that came in through Slack, Telegram, Discord, Email and Google Chat. You only see your own chats here, plus the ones someone shared with you.\n\n- **Channel tabs:** **All** and **Web** are always there. A tab for Slack, Telegram, Discord, Email or Google Chat appears once you have a chat from it. Each tab shows its count. Chats from other channels carry the channel's name on the row.\n- **Groups:** chats are grouped into **Pinned**, **Today**, **Yesterday**, **Previous 7 Days**, **Previous 30 Days** and **Older** (collapsed until you click it). Each group shows 20 chats, then **Show N more**. Each row shows the title, when it was last active and how many messages it has.\n- **Date or Topic:** the **Date** / **Topic** switch at the right of the channel tabs, under the search box changes how the list is grouped, and the page remembers your choice. **Topic** groups your chats by what they are about (a hire, a customer, a project), whichever app they came from. Every new chat is filed under a topic when it gets its title. The first time you open **Topic**, your earlier chats are grouped from their titles, and the page says *Grouping your earlier chats by topic…* until that's done. **Pinned** stays at the top. A topic with only one chat, and chats with no lasting topic, go under **Other** (collapsed until you click it). Related topics sit under one **area** (one property, deal or client), each header shows the day it was last active, and an open topic shows its three newest chats with **Show more** for the rest. Topics with a chat this week are listed under **Active this week**; quieter ones fold into **Quiet for a week**, **Quiet for 2 weeks** and **Quiet for a month or more**, and a new chat brings a topic back up. In **Topic**, the search box also finds topic and area names.\n- **Topic ⋯ menu:** **Rename topic**, **Merge into…** (moves its chats into another topic), **Pin topic** / **Unpin topic** and **Ungroup** (its chats stay, under **Other**). Renaming a topic to the name of another one merges them. An area's ⋯ menu has **Rename area** and **Ungroup area** (its topics stand on their own, and stay so). Only you see your topics.\n- **Search:** type in **Search titles and messages**. It searches the titles and message text of your own chats (up to 50 results). Each result shows *title match* or how many messages matched, with a snippet that highlights your words. Open a result found in its messages and the chat shows a bar with *match 1 of N* and arrows to step through the matches. Search does not cover chats shared with you.\n- **Row ⋯ menu** (your own chats): **Pin** / **Unpin**, **Rename**, **Move to topic**, **Share**, **Download** and **Delete chat**.\n - **Move to topic** files the chat under one of your topics, a new one, or **No topic**. Your choice sticks: the Executive never moves that chat again, and a topic you renamed, pinned or moved a chat into is never merged on its own.\n - **Pin** moves the chat to the **Pinned** group at the top. Only you see your pins.\n - **Rename** gives the chat a name (up to 120 characters). The automatic title never replaces a name you set.\n - **Download** saves the whole chat as a Markdown (.md) file: each message under who wrote it (the person's name or *Executive*), with each reply's sources listed under it.\n - **Delete chat** asks *Delete this chat? This cannot be undone.* Deleting removes the chat and its messages from Open Executive and ends any sharing of it. Messages in Slack, Telegram or Discord stay in those apps.\n- **New chat** at the top right starts a new web chat.\n\n**Sharing a chat:**\n\n- **Who you can share with:** team members on your **People** list. Contacts, archived people and yourself are not offered. If no one else is on your team, the panel says *There's no one else on your team to share with yet.*\n- **How:** in an open chat, choose **Share** in the **⋯** menu or the **Share** button in the bar above the conversation; on the **Chats** page, the chat's row **⋯** menu has **Share** too. The panel *Share this chat with:* says *They join the chat and can write in it with you.* and lists your team with a checkbox each. Tick the people, then click **Save**. It confirms *Shared.* Only the chat's owner can share it. There is no share link: access goes to the named people only.\n- **What they get:** they join the chat and write in it with you. It appears on their **Chats** page under **Shared with you**, with *<your name> added you* and when. They are not notified. Their row **⋯** menu has **Download** and **Leave chat**.\n- **Working in it together:** a bar above the conversation shows everyone's initials and *You and <name>* (or *You and N others*). Each person's message shows their name; your own stay on the right. The Executive sees who wrote each message and answers whoever wrote the latest. Everyone with the chat open sees a new message and the Executive's reply as it is written, and *<name> is typing…* above the message box. One turn runs at a time: while the Executive answers someone else, the box says *The Executive is answering <name>…* and Send waits. A chat left open in a background tab catches up when you come back to it.\n- **What only the owner can do:** rename, pin, rate replies (👍/👎), share, delete. **Try again** and **Edit** work only on your own last message, and not for the people you shared with. They don't see your ratings or your pin.\n- **What stays out of a shared chat:** everyone in it reads every reply, so it is not a private conversation. **Act as me** is off there, the Executive won't read anyone's own mail there, and your private items on Today (your mail, people waiting on you, new senders) are not brought into it.\n- **Sending from a shared chat:** once someone else writes in it, the Executive's next reply won't send email, message people, post to the company or a department, book or cancel meetings, set follow-ups, run or schedule workflows or change contacts, even when that reply is to the chat's owner. It says so, and the owner can ask again in their following message.\n- **Which chats can't be shared:** a chat in which the Executive read or drafted in your own mailbox (**Act as me**) stays yours alone. Saving a share on it fails with *This chat read your own mail, so it stays yours alone.* If a chat you already shared later reads your mail, it disappears from everyone's **Shared with you** list and they can no longer open it. This can't be undone. A conversation from Slack, Telegram, Discord, Email or Google Chat can't be shared: *Only a chat started here can be shared.*\n- **Leaving and removing:** someone you shared with can leave from the **Leave** button in the bar or **Leave chat** in the row menu; you can add them again. To remove people, open **Share**, untick them and click **Save** (with nobody ticked it says *Not shared with anyone.*). Someone removed, or who leaves, sees *You're no longer in this chat.* and later *This chat isn't shared with you any more.* if they open it. Archiving someone on **People** takes them out of every chat. Deleting the chat ends it for everyone (*This chat was deleted.*).\n- **Records:** each change to who is in a chat, including someone leaving, is written to the audit log.\n\n**Example prompts:**\n\n- \"Here's our Q3 board deck. What questions should I expect from the board?\" *(with the PDF attached)*\n- \"Should we raise prices 10% for new customers? I want the finance and marketing view.\" *(with Committee review on)*\n- \"What changed across the company this week that I should know about?\"\n\n*Tip: this is the front door. Almost everything else in the app is something the Executive references or acts on from here.*",
+ "markdown": "**What it is:** Where you talk to the Executive in plain language. The app opens on **Home**, a quick read of what's happened across the company and what needs you, and you drop into a chat whenever you want to ask or decide something. Every conversation is kept on the **Chats** page.\n\n**What it does:**\n\n- Hold a natural conversation with the Executive, which quietly pulls in whichever specialists a question needs.\n- Keep every chat with its full history, so you can pick up where you left off.\n- See each reply under the Executive's name, the one it goes by in mail and chat.\n- Attach files to a message: up to 5 per message, 20 MB each (PNG, JPEG, GIF and WebP images, PDF, Word, text, Markdown, CSV). The Executive reads them for that message.\n- Stop a reply while it is still coming. Whatever has been written is kept and marked *Stopped by you*. (Escape works too.)\n- Add to a reply while it works: type and send, and your message joins the answer in progress (*Sent while it works*, then *👀 Seen, taking it into this answer*).\n- Redo your last turn in a web chat: **Try again** under the last reply asks the same question again, and **Edit** under your last message lets you change it. Sending an edit replaces that message and its answer.\n- Turn on **Committee review** for a question that matters: a slower pass where reviewers challenge the draft answer before you see it.\n- Continue any item on Home straight into a chat thread, with the context already filled in.\n- Choose **Show agent activity** in the **⋯** menu at the top right to watch what's happening behind a reply: which specialists were consulted and which tools ran.\n- See what an answer drew on: click **Sources (N)** under a reply to list the documents and web pages it looked at (your own documents, the built-in knowledge and any web pages), with links where there are any.\n- Copy a reply with **Copy**, and rate it with 👍 (**Helpful**) or 👎 (**Not helpful**).\n\n**How to use:**\n\n1. Click **New chat** at the top of the sidebar (on a phone, the **+** in the middle of the bar at the bottom), or type into the **Ask your Executive anything…** box on Home. Click **Home** any time to get back.\n2. Type your question and press **Enter** to send. **Shift + Enter** starts a new line. When the box is empty, a greyed-out suggested follow-up may appear; press **Tab** or **→** to use it (on a phone, tap **Use suggestion**).\n3. To include a file, click the **+** next to the message box, choose **Attach files or photos** and pick up to 5 files. Drag-and-drop isn't supported in chat. Attachments are read for that message only. To make a document permanently available, add it on the **Knowledge** page.\n4. For a decision that matters, click the **+** next to the message box and choose **Committee review (slower, reviewed)** before sending. A **Committee review on** chip appears above the box. It stays on for each message you send until you click the chip (or choose **Turn off committee review** in the **+** menu). While it works you see *Drafting → Committee review → Revising*.\n5. Changed your mind mid-answer? Click the stop button (next to the message box while a reply is streaming) or press **Esc**.\n6. In an open chat, the **⋯** menu at the top right has **Pin** / **Unpin**, **Rename**, **Share**, **Download** and **Show agent activity**. Deleting is on the **Chats** page.\n7. If part of an answer couldn't be completed (say, the finance side), you still get the rest, with a short note under it. Ask again to fill in the missing part.\n8. When something you asked for needs your approval (a meeting the Executive set up for you to approve, or actions it suggested from your email), its card appears right under the reply: **Approve**, **Edit** (for a meeting: its title, start and end) and **Dismiss**. After **Approve** a meeting's card says *Booked. It's on your calendar.* The same card also waits under **Needs you** on Today until you answer it in either place. Saying *ok* in the chat doesn't book it; tap **Approve**. Things the Executive raises on its own come only to Today.\n\n**Chats page:** click **Chats** in the sidebar (on a phone, **Chats** in the bar at the bottom). It lists every conversation you own: web chats and the ones that came in through Slack, Telegram, Discord, Email and Google Chat. You only see your own chats here, plus the ones someone shared with you.\n\n- **Channel tabs:** **All** and **Web** are always there. A tab for Slack, Telegram, Discord, Email or Google Chat appears once you have a chat from it. Each tab shows its app's logo and its count. Every chat ends with the logo of where it came from: the Open Executive mark for web chats, the app's own logo for Slack, Telegram, Discord and Google Chat, and an envelope for Email.\n- **Groups:** chats are grouped into **Pinned**, **Today**, **Yesterday**, **Previous 7 Days**, **Previous 30 Days** and **Older** (collapsed until you click it). Each group shows 20 chats, then **Show N more**. Each row shows the title, when it was last active and how many messages it has.\n- **Date or Topic:** the **Date** / **Topic** switch at the right of the channel tabs, under the search box changes how the list is grouped, and the page remembers your choice. **Topic** groups your chats by what they are about (a hire, a customer, a project), whichever app they came from. Every new chat is filed under a topic when it gets its title. The first time you open **Topic**, your earlier chats are grouped from their titles, and the page says *Grouping your earlier chats by topic…* until that's done. **Pinned** stays at the top. A topic with only one chat, and chats with no lasting topic, go under **Other** (collapsed until you click it). Related topics sit under one **area** (one property, deal or client), each header shows the day it was last active, and an open topic shows its three newest chats with **Show more** for the rest. Topics with a chat this week are listed under **Active this week**; quieter ones fold into **Quiet for a week**, **Quiet for 2 weeks** and **Quiet for a month or more**, and a new chat brings a topic back up. In **Topic**, the search box also finds topic and area names.\n- **Topic ⋯ menu:** **Rename topic**, **Merge into…** (moves its chats into another topic), **Pin topic** / **Unpin topic** and **Ungroup** (its chats stay, under **Other**). Renaming a topic to the name of another one merges them. An area's ⋯ menu has **Rename area** and **Ungroup area** (its topics stand on their own, and stay so). Only you see your topics.\n- **Search:** type in **Search titles and messages**. It searches the titles and message text of your own chats (up to 50 results). Each result shows *title match* or how many messages matched, with a snippet that highlights your words. Open a result found in its messages and the chat shows a bar with *match 1 of N* and arrows to step through the matches. Search does not cover chats shared with you.\n- **Row ⋯ menu** (your own chats): **Pin** / **Unpin**, **Rename**, **Move to topic**, **Share**, **Download** and **Delete chat**.\n - **Move to topic** files the chat under one of your topics, a new one, or **No topic**. Your choice sticks: the Executive never moves that chat again, and a topic you renamed, pinned or moved a chat into is never merged on its own.\n - **Pin** moves the chat to the **Pinned** group at the top. Only you see your pins.\n - **Rename** gives the chat a name (up to 120 characters). The automatic title never replaces a name you set.\n - **Download** saves the whole chat as a Markdown (.md) file: each message under who wrote it (the person's name or *Executive*), with each reply's sources listed under it.\n - **Delete chat** asks *Delete this chat? This cannot be undone.* Deleting removes the chat and its messages from Open Executive and ends any sharing of it. Messages in Slack, Telegram or Discord stay in those apps.\n- **New chat** at the top right starts a new web chat.\n\n**Sharing a chat:**\n\n- **Who you can share with:** team members on your **People** list. Contacts, archived people and yourself are not offered. If no one else is on your team, the panel says *There's no one else on your team to share with yet.*\n- **How:** in an open chat, choose **Share** in the **⋯** menu or the **Share** button in the bar above the conversation; on the **Chats** page, the chat's row **⋯** menu has **Share** too. The panel *Share this chat with:* says *They join the chat and can write in it with you.* and lists your team with a checkbox each. Tick the people, then click **Save**. It confirms *Shared.* Only the chat's owner can share it. There is no share link: access goes to the named people only.\n- **What they get:** they join the chat and write in it with you. It appears on their **Chats** page under **Shared with you**, with *<your name> added you* and when. They are not notified. Their row **⋯** menu has **Download** and **Leave chat**.\n- **Working in it together:** a bar above the conversation shows everyone's initials and *You and <name>* (or *You and N others*). Each person's message shows their name; your own stay on the right. The Executive sees who wrote each message and answers whoever wrote the latest. Everyone with the chat open sees a new message and the Executive's reply as it is written, and *<name> is typing…* above the message box. One turn runs at a time: while the Executive answers someone else, the box says *The Executive is answering <name>…* and Send waits. A chat left open in a background tab catches up when you come back to it.\n- **What only the owner can do:** rename, pin, rate replies (👍/👎), share, delete. **Try again** and **Edit** work only on your own last message, and not for the people you shared with. They don't see your ratings or your pin.\n- **What stays out of a shared chat:** everyone in it reads every reply, so it is not a private conversation. **Act as me** is off there, the Executive won't read anyone's own mail there, and your private items on Today (your mail, people waiting on you, new senders) are not brought into it.\n- **Sending from a shared chat:** once someone else writes in it, the Executive's next reply won't send email, message people, post to the company or a department, book or cancel meetings, set follow-ups, run or schedule workflows or change contacts, even when that reply is to the chat's owner. It says so, and the owner can ask again in their following message.\n- **Which chats can't be shared:** a chat in which the Executive read or drafted in your own mailbox (**Act as me**) stays yours alone. Saving a share on it fails with *This chat read your own mail, so it stays yours alone.* If a chat you already shared later reads your mail, it disappears from everyone's **Shared with you** list and they can no longer open it. This can't be undone. A conversation from Slack, Telegram, Discord, Email or Google Chat can't be shared: *Only a chat started here can be shared.*\n- **Leaving and removing:** someone you shared with can leave from the **Leave** button in the bar or **Leave chat** in the row menu; you can add them again. To remove people, open **Share**, untick them and click **Save** (with nobody ticked it says *Not shared with anyone.*). Someone removed, or who leaves, sees *You're no longer in this chat.* and later *This chat isn't shared with you any more.* if they open it. Archiving someone on **People** takes them out of every chat. Deleting the chat ends it for everyone (*This chat was deleted.*).\n- **Records:** each change to who is in a chat, including someone leaving, is written to the audit log.\n\n**Example prompts:**\n\n- \"Here's our Q3 board deck. What questions should I expect from the board?\" *(with the PDF attached)*\n- \"Should we raise prices 10% for new customers? I want the finance and marketing view.\" *(with Committee review on)*\n- \"What changed across the company this week that I should know about?\"\n\n*Tip: this is the front door. Almost everything else in the app is something the Executive references or acts on from here.*",
"mermaid": null,
"generated_at": "2026-10-17T22:00:00Z"
}
diff --git a/packages/ui/scripts/channelLogos.test.mjs b/packages/ui/scripts/channelLogos.test.mjs
new file mode 100644
index 00000000..dbbf218c
--- /dev/null
+++ b/packages/ui/scripts/channelLogos.test.mjs
@@ -0,0 +1,18 @@
+import assert from "node:assert/strict";
+import test from "node:test";
+import { CHANNEL_LOGO_SVG, channelLogoSrc } from "../src/lib/channelLogos.ts";
+import { CHANNEL_ORDER } from "../src/lib/sessionChannel.ts";
+
+test("every channel has a logo", () => {
+ for (const channel of CHANNEL_ORDER) {
+ assert.match(CHANNEL_LOGO_SVG[channel], /^<svg xmlns="http:\/\/www\.w3\.org\/2000\/svg" viewBox="[\d. ]+">/, channel);
+ assert.match(CHANNEL_LOGO_SVG[channel], /<\/svg>$/, channel);
+ }
+ assert.deepEqual(Object.keys(CHANNEL_LOGO_SVG).sort(), [...CHANNEL_ORDER].sort());
+});
+
+test("a logo is an svg data URL", () => {
+ const src = channelLogoSrc("telegram");
+ assert.ok(src.startsWith("data:image/svg+xml;utf8,"));
+ assert.equal(decodeURIComponent(src.slice("data:image/svg+xml;utf8,".length)), CHANNEL_LOGO_SVG.telegram);
+});
diff --git a/packages/ui/src/app/chats/page.tsx b/packages/ui/src/app/chats/page.tsx
index c450fb70..f48728fb 100644
--- a/packages/ui/src/app/chats/page.tsx
+++ b/packages/ui/src/app/chats/page.tsx
@@ -6,6 +6,7 @@ import Link from "next/link";
import Icon from "@/components/Icon";
import { buttonClass } from "@/components/ui/Button";
import ChatHistory, { ChatRow, type ChatsView } from "@/components/sessions/ChatHistory";
+import { ChannelLogo } from "@/components/sessions/ChannelLogo";
import { useSessions } from "@/components/sessions/SessionsContext";
import {
listChatTopics,
@@ -276,6 +277,7 @@ export default function ChatsPage() {
: "border-line text-fg-muted hover:text-fg hover:bg-surface-overlay"
}`}
>
+ {t !== "all" && <ChannelLogo channel={t} className="w-4 h-4 mr-1.5 -mt-0.5 align-middle" />}
{t === "all" ? "All" : CHANNEL_LABELS[t]}
<span className="ml-1.5 text-fg-subtle">{count}</span>
</button>
diff --git a/packages/ui/src/components/sessions/ChannelLogo.tsx b/packages/ui/src/components/sessions/ChannelLogo.tsx
new file mode 100644
index 00000000..a4574861
--- /dev/null
+++ b/packages/ui/src/components/sessions/ChannelLogo.tsx
@@ -0,0 +1,25 @@
+import { channelLogoSrc } from "@/lib/channelLogos";
+import { CHANNEL_LABELS, type SessionChannel } from "@/lib/sessionChannel";
+
+/** The app a chat came from, as its logo. `label` reads it out; leave it off
+ * where the channel's name is already written beside it. */
+export function ChannelLogo({
+ channel,
+ label = false,
+ className = "w-4 h-4",
+}: {
+ channel: SessionChannel;
+ label?: boolean;
+ className?: string;
+}) {
+ return (
+ // eslint-disable-next-line @next/next/no-img-element -- a data URL, nothing for next/image to optimize
+ <img
+ src={channelLogoSrc(channel)}
+ alt={label ? CHANNEL_LABELS[channel] : ""}
+ title={label ? CHANNEL_LABELS[channel] : undefined}
+ aria-hidden={label ? undefined : true}
+ className={`inline-block flex-shrink-0 object-contain ${className}`}
+ />
+ );
+}
diff --git a/packages/ui/src/components/sessions/ChatHistory.tsx b/packages/ui/src/components/sessions/ChatHistory.tsx
index f481784e..3d23cc04 100644
--- a/packages/ui/src/components/sessions/ChatHistory.tsx
+++ b/packages/ui/src/components/sessions/ChatHistory.tsx
@@ -23,7 +23,8 @@ import {
import { downloadChat } from "@/lib/downloadChat";
import { formatRelativeTime } from "@/lib/relativeTime";
import { highlightParts, matchLabel } from "@/lib/chatSearch";
-import { CHANNEL_LABELS, sessionChannel, sessionTitle } from "@/lib/sessionChannel";
+import { sessionChannel, sessionTitle } from "@/lib/sessionChannel";
+import { ChannelLogo } from "@/components/sessions/ChannelLogo";
import {
activeLabel,
groupSessionsByDate,
@@ -690,11 +691,7 @@ export function ChatRow({
>
<span className="flex items-center gap-2 min-w-0">
<span className="text-base font-medium text-fg truncate">{sessionTitle(session)}</span>
- {channel !== "web" && (
- <span className="flex-shrink-0 text-[11px] font-medium uppercase tracking-wide text-fg-muted ring-1 ring-line rounded-md px-1.5 py-0.5 leading-none">
- {CHANNEL_LABELS[channel]}
- </span>
- )}
+ <ChannelLogo channel={channel} label />
</span>
<span className="block text-sm text-fg-subtle mt-0.5">
{sharedWithYou ? (
diff --git a/packages/ui/src/lib/channelLogos.ts b/packages/ui/src/lib/channelLogos.ts
new file mode 100644
index 00000000..fa8162f7
--- /dev/null
+++ b/packages/ui/src/lib/channelLogos.ts
@@ -0,0 +1,25 @@
+import type { SessionChannel } from "@/lib/sessionChannel";
+
+// Each channel's own app logo, shown after a chat's title and on the filter
+// tabs on /chats, so where a chat came from reads at a glance. Web chats get
+// the Open Executive mark. Email has no one app (people write from any mail
+// app), so it gets a plain envelope. The SVGs are inlined as data URLs: no
+// extra requests, and their gradient ids can't clash on a page of many rows.
+export const CHANNEL_LOGO_SVG: Record<SessionChannel, string> = {
+ web:
+ "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><rect width=\"48\" height=\"48\" rx=\"11\" fill=\"#4F46E5\"/><circle cx=\"24\" cy=\"24\" r=\"14\" fill=\"none\" stroke=\"#fff\" stroke-width=\"2.2\" opacity=\"0.85\"/><circle cx=\"24\" cy=\"10\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"33\" cy=\"13.28\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"37.79\" cy=\"21.57\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"36.12\" cy=\"31\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"28.79\" cy=\"37.16\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"19.21\" cy=\"37.16\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"11.88\" cy=\"31\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"10.21\" cy=\"21.57\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"15\" cy=\"13.28\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"24\" cy=\"10\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"33\" cy=\"13.28\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"37.79\" cy=\"21.57\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"36.12\" cy=\"31\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"28.79\" cy=\"37.16\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"19.21\" cy=\"37.16\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"11.88\" cy=\"31\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"10.21\" cy=\"21.57\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"15\" cy=\"13.28\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"24\" cy=\"24\" r=\"6\" fill=\"#fff\"/></svg>",
+ slack:
+ "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\"><path fill=\"#E01E5A\" d=\"M53.841 161.32c0 14.832-11.987 26.82-26.819 26.82S.203 176.152.203 161.32c0-14.831 11.987-26.818 26.82-26.818H53.84zm13.41 0c0-14.831 11.987-26.818 26.819-26.818s26.819 11.987 26.819 26.819v67.047c0 14.832-11.987 26.82-26.82 26.82c-14.83 0-26.818-11.988-26.818-26.82z\"/><path fill=\"#36C5F0\" d=\"M94.07 53.638c-14.832 0-26.82-11.987-26.82-26.819S79.239 0 94.07 0s26.819 11.987 26.819 26.819v26.82zm0 13.613c14.832 0 26.819 11.987 26.819 26.819s-11.987 26.819-26.82 26.819H26.82C11.987 120.889 0 108.902 0 94.069c0-14.83 11.987-26.818 26.819-26.818z\"/><path fill=\"#2EB67D\" d=\"M201.55 94.07c0-14.832 11.987-26.82 26.818-26.82s26.82 11.988 26.82 26.82s-11.988 26.819-26.82 26.819H201.55zm-13.41 0c0 14.832-11.988 26.819-26.82 26.819c-14.831 0-26.818-11.987-26.818-26.82V26.82C134.502 11.987 146.489 0 161.32 0s26.819 11.987 26.819 26.819z\"/><path fill=\"#ECB22E\" d=\"M161.32 201.55c14.832 0 26.82 11.987 26.82 26.818s-11.988 26.82-26.82 26.82c-14.831 0-26.818-11.988-26.818-26.82V201.55zm0-13.41c-14.831 0-26.818-11.988-26.818-26.82c0-14.831 11.987-26.818 26.819-26.818h67.25c14.832 0 26.82 11.987 26.82 26.819s-11.988 26.819-26.82 26.819z\"/></svg>",
+ telegram:
+ "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\"><defs><linearGradient id=\"logosTelegram0\" x1=\"50%\" x2=\"50%\" y1=\"0%\" y2=\"100%\"><stop offset=\"0%\" stop-color=\"#2AABEE\"/><stop offset=\"100%\" stop-color=\"#229ED9\"/></linearGradient></defs><path fill=\"url(#logosTelegram0)\" d=\"M128 0C94.06 0 61.48 13.494 37.5 37.49A128.04 128.04 0 0 0 0 128c0 33.934 13.5 66.514 37.5 90.51C61.48 242.506 94.06 256 128 256s66.52-13.494 90.5-37.49c24-23.996 37.5-56.576 37.5-90.51s-13.5-66.514-37.5-90.51C194.52 13.494 161.94 0 128 0\"/><path fill=\"#FFF\" d=\"M57.94 126.648q55.98-24.384 74.64-32.152c35.56-14.786 42.94-17.354 47.76-17.441c1.06-.017 3.42.245 4.96 1.49c1.28 1.05 1.64 2.47 1.82 3.467c.16.996.38 3.266.2 5.038c-1.92 20.24-10.26 69.356-14.5 92.026c-1.78 9.592-5.32 12.808-8.74 13.122c-7.44.684-13.08-4.912-20.28-9.63c-11.26-7.386-17.62-11.982-28.56-19.188c-12.64-8.328-4.44-12.906 2.76-20.386c1.88-1.958 34.64-31.748 35.26-34.45c.08-.338.16-1.598-.6-2.262c-.74-.666-1.84-.438-2.64-.258c-1.14.256-19.12 12.152-54 35.686c-5.1 3.508-9.72 5.218-13.88 5.128c-4.56-.098-13.36-2.584-19.9-4.708c-8-2.606-14.38-3.984-13.82-8.41c.28-2.304 3.46-4.662 9.52-7.072\"/></svg>",
+ discord:
+ "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 199\"><path fill=\"#5865F2\" d=\"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18\"/></svg>",
+ email:
+ "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><rect width=\"48\" height=\"48\" rx=\"11\" fill=\"#0EA5E9\"/><rect x=\"10\" y=\"14\" width=\"28\" height=\"20\" rx=\"3\" fill=\"#fff\"/><path d=\"M11 16l13 10l13-10\" fill=\"none\" stroke=\"#0EA5E9\" stroke-width=\"2.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>",
+ google_chat:
+ "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 311 320\"><g fill=\"none\" stroke-width=\"2\"><path stroke=\"#7e916f\" d=\"m76.37.51l.01 76.47\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#1375eb\" d=\"M76.38 76.98L0 76.96\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#f3801d\" d=\"M235.08 1.09q-.16.06-.27.13q-.17.09-.17.28l-.02 75.51\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#7eb426\" d=\"M234.62 77.01h-.05\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#91a080\" d=\"m76.41 77.01l-.03-.03\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#75783e\" d=\"m310.53 76.77l-75.91.24\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#138495\" d=\"M76.43 182.69L0 182.67\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#00983a\" d=\"m76.44 259.13l-.01-38.28\" vector-effect=\"non-scaling-stroke\"/></g><path fill=\"#0066da\" d=\"m76.37.51l.01 76.47L0 76.96V20.77q.85-5.96 3.53-10.01Q10.14.74 22.75.67Q49.41.53 76.37.51\"/><path fill=\"#fbbc04\" d=\"m76.37.51l157.42.02a1.61 1.57-26.7 0 1 .92.29l.37.27q-.16.06-.27.13q-.17.09-.17.28l-.02 75.51h-.05l-158.16.01l-.03-.03Z\"/><path fill=\"#ea4335\" d=\"m235.08 1.09l75.45 75.68l-75.91.24l.02-75.51q0-.19.17-.28q.11-.07.27-.13\"/><path fill=\"#2684fc\" d=\"m0 76.96l76.38.02l.03.03l.02 105.68L0 182.67Z\"/><path fill=\"#00ac47\" d=\"m310.53 76.77l.47.34v161.9q-2.66 14.53-15.06 18.77q-4.42 1.52-13.03 1.5q-55.89-.09-112.92-.17q-8.28-.01-16.8.12q-.47.01-.8.34q-27.9 27.77-56 56.02c-2.87 2.89-6.12 4.5-10.24 3.89q-5.76-.85-8.49-5.94q-1.15-2.16-1.17-7.88q-.07-23.19-.05-46.53l-.01-38.28l37.78-37.78a1.79 1.77 22.3 0 1 1.26-.52l118.3.04a.83.83 0 0 0 .83-.83l-.03-104.75h.05Z\"/><path fill=\"#00832d\" d=\"M76.43 182.69v38.16l.01 38.28q-23.97.14-47.53.09q-9.82-.02-14.15-1.54Q2.62 253.44 0 238.88v-56.21Z\"/></svg>",
+};
+
+export function channelLogoSrc(channel: SessionChannel): string {
+ return `data:image/svg+xml;utf8,${encodeURIComponent(CHANNEL_LOGO_SVG[channel])}`;
+}