Skip to content

Commit 1291518

Browse files
committed
feat(ui): use bundled app icon as favicon; remove legacy vite/tauri icons\n\n- Remove <link rel=icon> pointing to /vite.svg in index.html\n- Programmatically set favicon to bundled asterisk-logo.png in src/main.tsx\n- Delete unused public icons: vite.svg and tauri.svg\n\nRationale: keeps assets bundled, avoids reliance on /public, and aligns app branding.
1 parent c305cfa commit 1291518

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<html lang="en" class="dark">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
65
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
76
<meta name="color-scheme" content="dark" />
87
<title>opcode - Claude Code Session Browser</title>

public/tauri.svg

Lines changed: 0 additions & 6 deletions
This file was deleted.

public/vite.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/main.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { analytics, resourceMonitor } from "./lib/analytics";
77
import { PostHogProvider } from "posthog-js/react";
88
import "./assets/shimmer.css";
99
import "./styles.css";
10+
import AppIcon from "./assets/nfo/asterisk-logo.png";
1011

1112
// Initialize analytics before rendering
1213
analytics.initialize();
@@ -25,6 +26,22 @@ resourceMonitor.startMonitoring(120000);
2526
}
2627
})();
2728

29+
// Set favicon to the new app icon (avoids needing /public)
30+
(() => {
31+
try {
32+
const existing = document.querySelector<HTMLLinkElement>('link[rel="icon"]');
33+
const link = existing ?? document.createElement("link");
34+
link.rel = "icon";
35+
link.type = "image/png";
36+
link.href = AppIcon;
37+
if (!existing) {
38+
document.head.appendChild(link);
39+
}
40+
} catch (_) {
41+
// Non-fatal if document/head is not available
42+
}
43+
})();
44+
2845
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
2946
<React.StrictMode>
3047
<PostHogProvider

0 commit comments

Comments
 (0)