Skip to content

Commit 37af608

Browse files
committed
🤖 fix: keep web app icons under path prefix
Use relative manifest and icon URLs so the server-injected base href keeps Coder path-app prefixes for HTML, manifest, and dynamic favicon updates.
1 parent d528877 commit 37af608

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
/>
99
<meta name="description" content="Parallel agentic development with Electron + React" />
1010
<meta name="theme-color" content="#1e1e1e" />
11-
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials" vite-ignore />
12-
<link rel="icon" href="/favicon.ico" data-theme-icon vite-ignore />
13-
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" vite-ignore />
11+
<link rel="manifest" href="manifest.json" crossorigin="use-credentials" vite-ignore />
12+
<link rel="icon" href="favicon.ico" data-theme-icon vite-ignore />
13+
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png" vite-ignore />
1414
<title>mux - coder multiplexer</title>
1515
<style>
1616
body {

public/manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
"name": "mux - coder multiplexer",
33
"short_name": "mux",
44
"description": "Parallel agentic development with Electron + React",
5-
"start_url": "/",
5+
"start_url": ".",
66
"display": "standalone",
77
"background_color": "#1e1e1e",
88
"theme_color": "#1e1e1e",
99
"orientation": "any",
1010
"icons": [
1111
{
12-
"src": "/icon-192.png",
12+
"src": "icon-192.png",
1313
"sizes": "192x192",
1414
"type": "image/png",
1515
"purpose": "any maskable"
1616
},
1717
{
18-
"src": "/icon-512.png",
18+
"src": "icon-512.png",
1919
"sizes": "512x512",
2020
"type": "image/png",
2121
"purpose": "any maskable"
@@ -27,7 +27,7 @@
2727
"name": "New Workspace",
2828
"short_name": "New",
2929
"description": "Create a new workspace",
30-
"url": "/?action=new",
30+
"url": "?action=new",
3131
"icons": []
3232
}
3333
]

src/browser/contexts/ThemeContext.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ const THEME_COLORS: Record<ThemeMode, string> = {
6666
"flexoki-dark": "#100f0f",
6767
};
6868

69+
// Keep hrefs relative so a server-injected <base> preserves path-app prefixes.
6970
const FAVICON_BY_SCHEME: Record<"light" | "dark", string> = {
70-
light: "/favicon.ico",
71-
dark: "/favicon-dark.ico",
71+
light: "favicon.ico",
72+
dark: "favicon-dark.ico",
7273
};
7374

7475
/** Map theme mode to CSS color-scheme value */

0 commit comments

Comments
 (0)