Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(chat): keep dark brand logos readable and swap strip labels at once

Manas Raghuwanshi587bc918ed2d
diff --git a/apps/screenpipe-app-tauri/components/chat/standalone/connect-apps-nudge.tsx b/apps/screenpipe-app-tauri/components/chat/standalone/connect-apps-nudge.tsx
index 4c4b5a24a..2b8137892 100644
--- a/apps/screenpipe-app-tauri/components/chat/standalone/connect-apps-nudge.tsx
+++ b/apps/screenpipe-app-tauri/components/chat/standalone/connect-apps-nudge.tsx
@@ -63,7 +63,7 @@ export function ConnectAppsNudge({
className="group/connect flex min-w-[8.5rem] flex-1 items-center justify-between gap-3 rounded-md px-2.5 py-1.5 text-left text-muted-foreground transition-colors duration-150 ease-out hover:bg-foreground hover:text-background focus-visible:bg-foreground focus-visible:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-signal focus-visible:ring-offset-1 focus-visible:ring-offset-background motion-reduce:transition-none"
>
<span className="truncate font-mono text-[10px] font-semibold normal-case tracking-[0.12em]">
- Connect apps for better answers
+ {ui("Connect apps for better answers")}
</span>
<ArrowRight className="h-3.5 w-3.5 shrink-0 transition-transform duration-150 group-hover/connect:translate-x-0.5 motion-reduce:transform-none motion-reduce:transition-none" />
</button>
@@ -108,10 +108,13 @@ export function ConnectAppsNudge({
/>
</button>
</TooltipTrigger>
+ {/* Moving to the next logo swaps the label at once.
+ Fading here showed the old label fading out beside
+ the new one; only the first label fades in. */}
<TooltipContent
side="top"
sideOffset={6}
- className="rounded-md px-2.5 py-1.5 text-[11px] font-normal"
+ className="rounded-md px-2.5 py-1.5 text-[11px] font-normal data-[state=closed]:!animate-none data-[state=instant-open]:!animate-none"
>
{label}
</TooltipContent>
diff --git a/apps/screenpipe-app-tauri/components/settings/__tests__/integration-icon-keys.test.ts b/apps/screenpipe-app-tauri/components/settings/__tests__/integration-icon-keys.test.ts
index 733223096..5fc6d0526 100644
--- a/apps/screenpipe-app-tauri/components/settings/__tests__/integration-icon-keys.test.ts
+++ b/apps/screenpipe-app-tauri/components/settings/__tests__/integration-icon-keys.test.ts
@@ -60,6 +60,32 @@ describe("INK_INTEGRATION_ICONS", () => {
});
});
+// Brand colours are fixed, so a dark mark (Sentry's #362D59) all but vanishes
+// on the dark canvas. Logos drawn with flat fills must reach 3:1 against it
+// somewhere, or carry the light plate dark mode gives such marks.
+describe("brand marks in dark mode", () => {
+ const luminance = (hex: string) => {
+ const full = hex.length === 4 ? hex.replace(/\w/g, "$&$&") : hex;
+ const [r, g, b] = [1, 3, 5].map((i) => {
+ const c = parseInt(full.slice(i, i + 2), 16) / 255;
+ return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
+ });
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
+ };
+ // The dark card, #141414: the lightest surface these logos sit on.
+ const contrastOnDark = (hex: string) => (luminance(hex) + 0.05) / (luminance("#141414") + 0.05);
+
+ it("keeps every flat-colour logo readable on the dark canvas", () => {
+ const unreadable = [...INTEGRATION_ICON_KEYS].filter((icon) => {
+ const markup = renderToStaticMarkup(createElement(IntegrationIcon, { icon, className: "" }));
+ const fills = [...markup.matchAll(/fill="(#[0-9a-f]{3}|#[0-9a-f]{6})"/gi)].map((m) => m[1]);
+ if (fills.length === 0 || /<img|dark:bg-white/.test(markup)) return false;
+ return Math.max(...fills.map(contrastOnDark)) < 3;
+ });
+ expect(unreadable).toEqual([]);
+ });
+});
+
describe("isMcpOAuthProviderTileConnected", () => {
it("treats an enabled MCP provider server as a connected tile", () => {
expect(isMcpOAuthProviderTileConnected("linear", false, { linear: true })).toBe(true);
diff --git a/apps/screenpipe-app-tauri/components/settings/connections-section.tsx b/apps/screenpipe-app-tauri/components/settings/connections-section.tsx
index fe812c20d..d838fc5f9 100644
--- a/apps/screenpipe-app-tauri/components/settings/connections-section.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/connections-section.tsx
@@ -500,6 +500,10 @@ function GrokLogo({ className }: { className?: string }) {
);
}
+// Brand marks too dark to read on a dark surface sit on a light plate in dark
+// mode instead of being recoloured.
+const DARK_MARK_PLATE = "dark:rounded-sm dark:bg-white dark:p-0.5";
+
// Source of truth for integration glyphs; INTEGRATION_ICON_KEYS derives from it.
const INTEGRATION_ICONS: Record<string, React.ReactNode> = {
claude: <ClaudeLogo />,
@@ -581,7 +585,7 @@ const INTEGRATION_ICONS: Record<string, React.ReactNode> = {
krisp: <img src="/images/krisp.svg" alt="Krisp" className="w-5 h-5 dark:invert" />,
plaud: <img src="/images/plaud.png" alt="Plaud" className="w-5 h-5 dark:invert" />,
excalidraw: <img src="/images/excalidraw.svg" alt="Excalidraw" className="w-5 h-5" />,
- odoo: <img src="/images/odoo.svg" alt="Odoo" className="w-5 h-5" />,
+ odoo: <img src="/images/odoo.svg" alt="Odoo" className={`w-5 h-5 ${DARK_MARK_PLATE}`} />,
perplexity: <img src="/images/perplexity.svg" alt="Perplexity" className="w-5 h-5" />,
posthog: <img src="/images/posthog.svg" alt="PostHog" className="w-5 h-5" />,
n8n: <img src="/images/n8n.png" alt="n8n" className="w-5 h-5 rounded" />,
@@ -661,7 +665,7 @@ const INTEGRATION_ICONS: Record<string, React.ReactNode> = {
</svg>
),
zendesk: (
- <svg viewBox="0 0 24 24" className="w-5 h-5" fill="#03363D">
+ <svg viewBox="0 0 24 24" className={`w-5 h-5 ${DARK_MARK_PLATE}`} fill="#03363D">
<path d="M11.088 3v14.61L0 3h11.088zm1.824 0c0 3.384 2.742 6.13 6.124 6.13A6.127 6.127 0 0 0 24 3H12.912zM0 21c0-3.384 2.742-6.13 6.124-6.13A6.127 6.127 0 0 0 11.088 21H0zm12.912 0V6.39L24 21H12.912z"/>
</svg>
),
@@ -702,7 +706,7 @@ const INTEGRATION_ICONS: Record<string, React.ReactNode> = {
</svg>
),
sentry: (
- <svg viewBox="0 0 24 24" className="w-5 h-5" fill="#362D59">
+ <svg viewBox="0 0 24 24" className={`w-5 h-5 ${DARK_MARK_PLATE}`} fill="#362D59">
<path d="M13.91 2.505c-.873-1.448-2.972-1.448-3.844 0L6.904 7.92a15.478 15.478 0 0 1 8.53 12.811h-2.221A13.301 13.301 0 0 0 5.784 9.814l-2.926 5.06a7.65 7.65 0 0 1 4.435 5.848H2.194a.365.365 0 0 1-.298-.534l1.413-2.402a5.16 5.16 0 0 0-1.614-.913L.296 19.275a2.182 2.182 0 0 0 .812 2.999 2.24 2.24 0 0 0 1.086.288h6.983a9.322 9.322 0 0 0-3.845-8.318l1.11-1.922a11.47 11.47 0 0 1 4.95 10.24h5.915a17.242 17.242 0 0 0-7.885-15.28l2.244-3.845a.37.37 0 0 1 .504-.13c.255.14 9.75 16.708 9.928 16.9a.365.365 0 0 1-.327.543h-2.287c.029.612.029 1.223 0 1.831h2.297a2.206 2.206 0 0 0 1.922-3.31z"/>
</svg>
),