From 9c62bcb49ceb9f4d277b3fc29c1670cdb623e988 Mon Sep 17 00:00:00 2001 From: north-star-info Date: Thu, 5 Nov 2026 21:51:22 +0000 Subject: [PATCH 1/4] Keep the companion reachable and make its icon grey MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The companion shortcut went blank once RunContainer's window was closed, and the installed icon kept the old green because its URL never changed. Closing the window with the companion on now keeps the app in the notification area, the page keeps the last app list and explains when the PC is unreachable, and icon URLs carry a version so iOS refetches them. 🤖 Generated with Codebuff Co-Authored-By: Codebuff --- public/companion/companion.css | 81 ++++++++++----- public/companion/companion.js | 78 ++++++++++++-- public/companion/icons/icon-180.png | Bin 2496 -> 2482 bytes public/companion/icons/icon-192.png | Bin 2864 -> 2838 bytes public/companion/icons/icon-512.png | Bin 9940 -> 9828 bytes public/companion/index.html | 20 +++- public/companion/manifest-nightly.webmanifest | 6 +- public/companion/manifest.webmanifest | 6 +- public/main.js | 82 ++++++++++++++- scripts/build-app-icon.js | 2 +- scripts/build-companion-icons.js | 9 +- src/components/ContainerManager.jsx | 31 ++---- src/services/companionAssets.test.js | 97 ++++++++++++++++++ 13 files changed, 344 insertions(+), 68 deletions(-) create mode 100644 src/services/companionAssets.test.js diff --git a/public/companion/companion.css b/public/companion/companion.css index d5d680b..c51e833 100644 --- a/public/companion/companion.css +++ b/public/companion/companion.css @@ -3,11 +3,11 @@ --bg: #080b10; --bg-soft: #0d1219; --panel: rgba(18, 24, 33, 0.86); - --line: rgba(79, 216, 180, 0.18); - --line-strong: rgba(79, 216, 180, 0.42); - --accent: #3fcfaa; - --accent-soft: rgba(63, 207, 170, 0.14); - --accent-text: #d6fbf1; + --line: rgba(176, 186, 200, 0.18); + --line-strong: rgba(176, 186, 200, 0.42); + --accent: #9aa3b0; + --accent-soft: rgba(154, 163, 176, 0.14); + --accent-text: #e6e9ee; --text: #e8eefc; --muted: #93a4bf; --danger: #ff7d7d; @@ -27,7 +27,7 @@ html, body { height: 100%; } body { margin: 0; background: - radial-gradient(1100px 620px at 78% -8%, rgba(63, 207, 170, 0.13), transparent 62%), + radial-gradient(1100px 620px at 78% -8%, rgba(154, 163, 176, 0.10), transparent 62%), radial-gradient(820px 520px at -12% 108%, rgba(38, 120, 255, 0.12), transparent 60%), linear-gradient(180deg, #0a0f15, #070a0e 62%); color: var(--text); @@ -43,8 +43,8 @@ body { inset: 0; pointer-events: none; background-image: - linear-gradient(rgba(120, 200, 180, 0.05) 1px, transparent 1px), - linear-gradient(90deg, rgba(120, 200, 180, 0.05) 1px, transparent 1px); + linear-gradient(rgba(176, 186, 200, 0.05) 1px, transparent 1px), + linear-gradient(90deg, rgba(176, 186, 200, 0.05) 1px, transparent 1px); background-size: 46px 46px; mask-image: radial-gradient(720px 520px at 50% 0%, #000 20%, transparent 78%); -webkit-mask-image: radial-gradient(720px 520px at 50% 0%, #000 20%, transparent 78%); @@ -59,23 +59,23 @@ body.nightly { } /* Daylight. The dark surface reads as flat grey on a bright screen, so the light theme - is a real palette rather than a lighter shade of the same one: pale mint paper, dark - ink, and the same teal accent for anything actionable. */ + is a real palette rather than a lighter shade of the same one: neutral paper, dark + ink, and the same grey accent for anything actionable. */ body[data-theme="light"] { color-scheme: light; --bg: #f1f6f5; --bg-soft: #ffffff; --panel: rgba(255, 255, 255, 0.92); - --line: rgba(11, 70, 59, 0.16); - --line-strong: rgba(11, 70, 59, 0.42); - --accent: #0f8c6f; - --accent-soft: rgba(15, 140, 111, 0.12); - --accent-text: #073c31; + --line: rgba(55, 65, 81, 0.16); + --line-strong: rgba(55, 65, 81, 0.42); + --accent: #4b5563; + --accent-soft: rgba(75, 85, 99, 0.12); + --accent-text: #1f2937; --text: #0c1a17; --muted: #4d625d; --danger: #b42318; background: - radial-gradient(1100px 620px at 78% -8%, rgba(15, 140, 111, 0.12), transparent 62%), + radial-gradient(1100px 620px at 78% -8%, rgba(75, 85, 99, 0.10), transparent 62%), radial-gradient(820px 520px at -12% 108%, rgba(38, 120, 255, 0.08), transparent 60%), linear-gradient(180deg, #f8fbfa, #eaf2f0 62%); } @@ -89,8 +89,8 @@ body[data-theme="light"].nightly { body[data-theme="light"] .halo { background-image: - linear-gradient(rgba(11, 70, 59, 0.07) 1px, transparent 1px), - linear-gradient(90deg, rgba(11, 70, 59, 0.07) 1px, transparent 1px); + linear-gradient(rgba(55, 65, 81, 0.07) 1px, transparent 1px), + linear-gradient(90deg, rgba(55, 65, 81, 0.07) 1px, transparent 1px); } body[data-theme="light"] input { @@ -109,7 +109,7 @@ body[data-theme="light"] .app-card { } body[data-theme="light"] .stage { - background: radial-gradient(700px 420px at 50% 0%, rgba(15, 140, 111, 0.08), transparent 70%), #ffffff; + background: radial-gradient(700px 420px at 50% 0%, rgba(75, 85, 99, 0.08), transparent 70%), #ffffff; } body[data-theme="light"] .stage-note, @@ -122,7 +122,7 @@ body[data-theme="light"] .primary { } body[data-theme="light"] .mark { - box-shadow: 0 10px 24px -16px rgba(11, 70, 59, 0.5); + box-shadow: 0 10px 24px -16px rgba(31, 41, 55, 0.45); } .screen { @@ -214,8 +214,8 @@ button:disabled { opacity: 0.55; } width: 100%; margin-top: 4px; padding: 15px 18px; - border: 1px solid rgba(140, 233, 208, 0.5); - background: linear-gradient(180deg, rgba(63, 207, 170, 0.92), rgba(40, 166, 136, 0.95)); + border: 1px solid rgba(214, 219, 227, 0.5); + background: linear-gradient(180deg, rgba(154, 163, 176, 0.95), rgba(107, 116, 128, 0.96)); color: #04120e; font-weight: 700; font-size: 16.5px; @@ -309,7 +309,7 @@ body.nightly .primary { place-items: center; border-radius: 11px; border: 1px solid var(--line); - background: rgba(63, 207, 170, 0.08); + background: rgba(154, 163, 176, 0.08); color: var(--accent-text); font-weight: 700; font-size: 16px; @@ -360,7 +360,7 @@ body.nightly .primary { border: 1px solid var(--line); border-radius: 18px; background: - radial-gradient(700px 420px at 50% 0%, rgba(63, 207, 170, 0.07), transparent 70%), + radial-gradient(700px 420px at 50% 0%, rgba(154, 163, 176, 0.07), transparent 70%), #05080c; overflow: hidden; box-shadow: 0 26px 70px -50px #000; @@ -423,6 +423,39 @@ body.nightly .primary { .screen { max-width: 980px; margin: 0 auto; } } +/* First-open sheet: explains Add to Home Screen once. */ +.install-tip[hidden] { display: none; } +.install-tip { + position: fixed; + inset: 0; + z-index: 10; + display: flex; + align-items: flex-end; + justify-content: center; + padding: 16px; + background: rgba(0, 0, 0, 0.45); +} +.install-card { + width: 100%; + max-width: 430px; + padding: 22px; + padding-bottom: calc(22px + var(--safe-bottom)); + border: 1px solid var(--line); + border-radius: 22px; + background: var(--panel); + box-shadow: 0 30px 80px -50px #000; +} +.install-card strong { display: block; margin-bottom: 10px; font-size: 18px; } +.install-card .steps { margin-bottom: 16px; } + +/* Shown while the PC is unreachable: the list is last-known, not live. */ +body.offline .hint { color: var(--danger); } +body.offline .app-card:disabled { opacity: 0.72; } + +@media (min-width: 700px) { + .screen { max-width: 980px; margin: 0 auto; } +} + @media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } } diff --git a/public/companion/companion.js b/public/companion/companion.js index 385cb7e..b0c9670 100644 --- a/public/companion/companion.js +++ b/public/companion/companion.js @@ -10,6 +10,10 @@ const TOKEN_KEY = 'rc-companion-token'; const DEVICE_KEY = 'rc-companion-device'; const THEME_KEY = 'rc-companion-theme'; + const APPS_KEY = 'rc-companion-apps'; + // iOS keeps a home-screen icon until its URL changes, so the icon URLs carry a + // version. Bumping it is how a shortcut that already exists picks up a new icon. + const ICON_VERSION = '2'; const screens = { pair: document.getElementById('screen-pair'), @@ -45,7 +49,7 @@ quality: 'auto', retry: 0, retryTimer: null, - retry: 0, + offline: false, }; function show(name) { @@ -66,9 +70,9 @@ const favicon = document.getElementById('app-favicon'); const manifest = document.getElementById('app-manifest'); const mark = document.getElementById('app-mark'); - if (icon) icon.href = `${base}/icon-180.png`; - if (favicon) favicon.href = `${base}/icon-192.png`; - if (mark) mark.src = `${base}/icon-192.png`; + if (icon) icon.href = `${base}/icon-180.png?v=${ICON_VERSION}`; + if (favicon) favicon.href = `${base}/icon-192.png?v=${ICON_VERSION}`; + if (mark) mark.src = `${base}/icon-192.png?v=${ICON_VERSION}`; if (manifest) manifest.href = nightly ? '/manifest-nightly.webmanifest' : '/manifest.webmanifest'; } @@ -221,6 +225,7 @@ state.connected = true; state.retry = 0; setPill(connection, 'Connected', 'live'); + setOffline(false); }); socket.addEventListener('message', (event) => { @@ -236,6 +241,7 @@ socket.addEventListener('close', () => { state.connected = false; if (state.socket === socket) state.socket = null; + setOffline(true); setPill(connection, 'Reconnecting…', 'bad'); if (screens.pair.hidden && !screens.apps.hidden) scheduleReconnect(); else if (screens.view.hidden) scheduleReconnect(); @@ -260,6 +266,8 @@ function handleMessage(payload) { if (payload.type === 'hello' || payload.type === 'apps') { state.apps = Array.isArray(payload.apps) ? payload.apps : []; + saveAppsCache(state.apps); + setOffline(false); renderApps(); return; } @@ -383,25 +391,54 @@ return (name || '?').trim().charAt(0).toUpperCase() || '?'; } + // The PC can be off, asleep, or simply not running. The last list it sent is kept so a + // shortcut opened on the home screen shows what this PC has instead of an empty page. + function saveAppsCache(apps) { + try { + localStorage.setItem(APPS_KEY, JSON.stringify({ at: Date.now(), apps: Array.isArray(apps) ? apps : [] })); + } catch (error) { /* private mode */ } + } + + function readAppsCache() { + try { + const parsed = JSON.parse(localStorage.getItem(APPS_KEY) || 'null'); + return Array.isArray(parsed?.apps) ? parsed.apps : []; + } catch (error) { + return []; + } + } + + function setOffline(offline) { + const next = Boolean(offline); + if (state.offline === next) return; + state.offline = next; + document.body.classList.toggle('offline', next); + renderApps(); + } + function renderApps() { appList.textContent = ''; const apps = state.apps.filter((app) => app && app.id); if (apps.length === 0) { const empty = document.createElement('li'); empty.className = 'empty'; - empty.textContent = 'No apps yet. Add one on the PC, then start it there.'; + empty.textContent = state.offline + ? 'This PC is not reachable. Open RunContainer on the PC; it keeps running in the notification area while the companion is on.' + : 'No apps yet. Add one on the PC, then start it there.'; appList.appendChild(empty); appsHint.hidden = true; return; } appsHint.hidden = false; - appsHint.textContent = 'Apps that are running can be opened here.'; + appsHint.textContent = state.offline + ? 'Last known list. Open RunContainer on the PC to use these apps.' + : 'Apps that are running can be opened here.'; for (const app of apps) { const item = document.createElement('li'); const button = document.createElement('button'); button.type = 'button'; button.className = 'app-card'; - button.disabled = !app.running; + button.disabled = !app.running || state.offline; const glyph = document.createElement('span'); glyph.className = 'glyph'; @@ -411,7 +448,9 @@ const title = document.createElement('strong'); title.textContent = app.name; const status = document.createElement('span'); - status.textContent = app.running ? 'Running — tap to open' : `${app.status} — start it on the PC`; + status.textContent = state.offline + ? `${app.status} — PC offline` + : app.running ? 'Running — tap to open' : `${app.status} — start it on the PC`; meta.append(title, status); const chevron = document.createElement('span'); chevron.className = 'chev'; @@ -465,15 +504,22 @@ if (result.ok && result.body) { applyChannel(result.body.channel); state.apps = result.body.apps || []; + saveAppsCache(state.apps); + setOffline(false); renderApps(); } } catch (error) { + setOffline(true); setPill(connection, 'PC not reachable', 'bad'); } } async function open() { show('apps'); + // A fresh launch from the home screen has no live list yet, so show the last one the + // PC sent while the real state is fetched. + if (state.apps.length === 0) state.apps = readAppsCache(); + renderApps(); await refresh(); connectSocket(); } @@ -536,6 +582,22 @@ // ------------------------------------------------------------------- start --- + // First open in a Safari tab: explain Add to Home Screen once. Hidden once the page is + // already installed (standalone), and never shown again after it is dismissed. + const INSTALL_KEY = 'rc-companion-install-seen'; + const installTip = document.getElementById('install-tip'); + const standalone = Boolean(window.navigator.standalone) + || (window.matchMedia && window.matchMedia('(display-mode: standalone)').matches); + let seenInstall = false; + try { seenInstall = localStorage.getItem(INSTALL_KEY) === '1'; } catch (error) { /* private mode */ } + if (installTip && !standalone && !seenInstall) { + installTip.hidden = false; + document.getElementById('install-dismiss').addEventListener('click', () => { + installTip.hidden = true; + try { localStorage.setItem(INSTALL_KEY, '1'); } catch (error) { /* private mode */ } + }); + } + applyTheme(preferredTheme()); for (const button of document.querySelectorAll('.theme-toggle')) { button.addEventListener('click', toggleTheme); diff --git a/public/companion/icons/icon-180.png b/public/companion/icons/icon-180.png index df9a8c8e255fba338f21928f35188bdf9f4542b9..1074160f384116fa1b6801a45fd6f16deb9f6a21 100644 GIT binary patch delta 2230 zcmYLLc|4Tc8=rRuQyL^&XzaVOWmlLGxu^&+k*=kgvfYaa!;I<@6=IB?7dLVlGL|A- z_oAC^jQ!e`H4|CpTEp+H{`j5G^T%_Z^DO6iKIij2-xdM7K(ZVu+}h%TmG| zPJ*$$8jo*Y>N!=ctRRjNvi}PH<}xE!s9gFN<+1If3}HRd3=J2Y-5pfnd*%sO4t|TH zwKn7RmXpip@hjU+m3-Tai=S&N7ISJxaFHvkRf@yxV?%|!vQlKrV<11A@CYUb=$OHt zoy5v=FpmK`kc9*jlO~4_4Y2gs1KF>)-)?oYk%`?~R`|s|J_a!sm9pY(KI)*C<_{RX zQn-1)e){bfCLK|sHnEZ(y^rLi_+f5zEzpgzk<7Wl;={G|)PteG0EDY&2Xf;#BAkg} z?_6V1O`}9AFffPWl)yRJU2aekpqm8h2dDvd(kZ0Mx$2x22Aps(4%GX-nr~f*aXzni z)INf>kDu!r)CxTd;&~-lUk<;DNI5F(IyU=rE!DCV_mWKijNMdCCt^IV^RNfm!k+W* zJbiZ?e*#~x{yRB+xPIl#WX4?ZZnFwli)h|vO&h$i@7S)QOQAK3vcOfdIMISz&EbpD zB+|my7xTqgxo@Xj5{LB8ADu$u5%Sp`q4WYjx=Jdi|m3^#WaY=YB_nptK;E)wTNll&s(Mji@#wugO* zyAHaGKVvXF)b@6+_@-3OX^+GfV`7{W`+R;@Tww5f3W_~=AEw^CoteK%RO^&4lYR)Z z8V!oUecp-43Jnmb(AVr$ympst4lzRUT)u5=v>}7d-+$sgs;Om!s83 zpBhz54%?1wQS)Nm!aNMr?t ziu(ke5cgCOWl~86Nxj@E=G0#tZRG*nCIfSXZCDsv?yuJTc-E#DRU^M$K7~6oNyQut zsvF+XW@gzMvM&s2CZ>+3kccJ}fhr+1!3Lh2s^FhT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NOrj|~AK0k%$RVC-tYLK$7e3WYX|pxYpHl7dLaidjS=L_NsF-bcNA~dJoQOOm5tTULK$Z zb7hn>?@kj4&zyJKTK*3AciQ-LVCI`+lA;?ke)DX0vhXWfu9chf_Ij1Diasu_w+?@x z`%{P%sHuIBP&Di8JDV@Sg!n(Mp>g8*>>-WR+l`gC1!{a@1LA-V+@sv+XH(&f5u_Vd z?;aI@Ge~#JAy1fU!h^Fl8e_~7bHBYahTE){#0;k8mFnN7$V?8rNIJu-N}PINazcIJ zVZp~am*wN&i>rWzf$2=L3$}f83@0YdZq`Y0h-nvDX3kj4*tNiMap{C$(g9gDxwq1I> zXPJT1?%Jx@%d`1xl=!gbF8*_dB2#HBW^lGp&%o%k?|jgcfq7hy_fpjSeoxsrsbZ?Q zY+xNyN6LqN+#!9g=0>?m5#Q!UXR5U}LjYPVY`(d|Z+z7HX*~agG)$=3*FGBD*@Jsr zEoTQBLlnQzn5q&Zmd*P*cS#w0DJU) zwYH&*^k-4jf}%V`7$9okhZsPF0l@lysi3K}DPDJdJln#@%?m(=qn*oc1#`~wpP BA6fta diff --git a/public/companion/icons/icon-192.png b/public/companion/icons/icon-192.png index 70c1e2cf0231273193414c358f99cc626e1bcb0a..694b58842d1993dc8265459bad21173cca4f9b6c 100644 GIT binary patch literal 2838 zcmaJDc{~(a_s&>HmI+z2OtK|JizSVz$Qsk2lx@spdxnt6BSuLiMkwoGD!Y+Mc$PPo zY$Z#@m?(;nA-iXq!Z+Su-#_2?`<;95Irl90oO^%go|A~Svk(!I69NE;SXr83xNGa~ z5aj31m`?-&0E9kUnVojLIr@VfkmP=8U;Kcs;692FQ84^D&hZ`ZX{qOU z7|b{D4E^;^_>+JSlaAWSIdbi2+1t9#XHmQ>N{S8f!gix2AKpe!%(^Nql3wN2FdF-7 zHr@T7A76<4{`Epx!yki!)*wS16!D@oA?W{w$_=WJ6cp{FX0un`uFZBUZL{CA*G8g^ zs@&)&wpk-FXjq&!O|!1Eiz%182c@cD^ke|Vl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BVwIhfR}uzIVxDlfV^keA;o@EVOoR|{jW`6 z#QyN^Ipkx8u5{!3c2n%1`b~RCMvRo~!SsoXs%P)Wk_4$cnJxak)`5wJI{eMDTMzA`AzgmE_7d&A4_=yN{6fHiPK}}MEy<$v_j=xEq zze{~+mv)7n#n5e=rS9iduR{jnc~hQ29HhD{)fx9eKYzEEVO9Tf*NgW$e|~W-4ohUjr5mMFbK^e%O zF0BGn`LySTRW#g7(YckhVECdS5oRS{>#><4T08s=TRr9&XX~+vO}17R%a?QID&8*H z`1CLC;Xh@fZV&vvpKM`1T4-zDl(x`8FS%w#5~X$ZYKSlVIY8Eu48KqX8@#(V=nmsJ z^&J74KTg&i8w z1U7MlAoAm)gVfDsUJw-&>9Eg`o9&0Ze}OsNExj|*`--=7{^i?T1tqwJqXGw`P{5uG z__azQ9H#5uZtLR(MA9ssSnPBc#3nP#e=o}lSH11g7*#hE)_q@p^UN`j`USs|hEG&R zqLov4U`%`Jhj?N}F-@Uz0|Wo3m}+$-Xp;7KrkED$1Nkl(`bIoJwK;t}=820B7l?i% zUI5cY_6<`g!VcQFC=hdlh|``2tW5ATh|ISdrgbAnm_Tb;s_)MgbTN+es8Z4M7+^Yl zJ{ZdPu_D)LS${ifuIS{n z{f488E(g&Eak~sWBPG)UY^qjNm``<- z5n7wHGs5yFbtj4zmW)3Zr8usch1$nexlw1$Fs=FR`?Ur2O0t(c&ckoq{ z2LA<^qSD6Vs(d^|-#?Xv3H349OzSDVy#>Nlm&)cS%w)_c-PZZ{XCG#1X4%G_djG!4 u`X3)zF&}6BFYmg3J - - + + + RunContainer — Companion @@ -22,7 +24,7 @@
- +

Connect to your PC

This is the RunContainer companion. It shows an app that is running on your Windows PC @@ -106,6 +108,18 @@

Apps on this PC

+ + diff --git a/public/companion/manifest-nightly.webmanifest b/public/companion/manifest-nightly.webmanifest index 299b747..feb14bf 100644 --- a/public/companion/manifest-nightly.webmanifest +++ b/public/companion/manifest-nightly.webmanifest @@ -10,19 +10,19 @@ "theme_color": "#0b0f14", "icons": [ { - "src": "/icons/nightly/icon-180.png", + "src": "/icons/nightly/icon-180.png?v=2", "sizes": "180x180", "type": "image/png", "purpose": "any" }, { - "src": "/icons/nightly/icon-192.png", + "src": "/icons/nightly/icon-192.png?v=2", "sizes": "192x192", "type": "image/png", "purpose": "any" }, { - "src": "/icons/nightly/icon-512.png", + "src": "/icons/nightly/icon-512.png?v=2", "sizes": "512x512", "type": "image/png", "purpose": "any" diff --git a/public/companion/manifest.webmanifest b/public/companion/manifest.webmanifest index fa8242e..6bc833d 100644 --- a/public/companion/manifest.webmanifest +++ b/public/companion/manifest.webmanifest @@ -10,19 +10,19 @@ "theme_color": "#0b0f14", "icons": [ { - "src": "/icons/icon-180.png", + "src": "/icons/icon-180.png?v=2", "sizes": "180x180", "type": "image/png", "purpose": "any" }, { - "src": "/icons/icon-192.png", + "src": "/icons/icon-192.png?v=2", "sizes": "192x192", "type": "image/png", "purpose": "any" }, { - "src": "/icons/icon-512.png", + "src": "/icons/icon-512.png?v=2", "sizes": "512x512", "type": "image/png", "purpose": "any" diff --git a/public/main.js b/public/main.js index 0a02432..9fe5b53 100644 --- a/public/main.js +++ b/public/main.js @@ -1,4 +1,4 @@ -const { app, BrowserWindow, dialog, ipcMain, shell, session, desktopCapturer } = require('electron'); +const { app, BrowserWindow, dialog, ipcMain, shell, session, desktopCapturer, Tray, Menu, nativeImage } = require('electron'); const fs = require('fs'); const path = require('path'); const { execFile, spawn, spawnSync } = require('child_process'); @@ -3893,6 +3893,79 @@ function createWindow() { const showFallback = setTimeout(showWindow, 4000); if (showFallback.unref) showFallback.unref(); mainWindow.webContents.once('did-finish-load', showWindow); + // With the companion on, closing the window keeps RunContainer running in the + // notification area. The phone's home-screen shortcut points at this PC, so quitting + // on close would leave it pointing at nothing. With the companion off, closing quits + // exactly as it did before. + mainWindow.on('close', (event) => { + if (isQuitting) return; + if (!loadCompanionState().enabled) return; + const activeTray = ensureTray(); + // No tray means no way back to the window, so closing behaves as usual instead. + if (!activeTray) return; + event.preventDefault(); + mainWindow.hide(); + showTrayHintOnce(); + }); +} + +let tray = null; +let isQuitting = false; +let trayHintShown = false; + +function ensureTray() { + if (tray && !tray.isDestroyed()) return tray; + const iconPath = path.join(__dirname, PRODUCT_ICON); + let image = nativeImage.createFromPath(iconPath); + if (image.isEmpty()) image = nativeImage.createEmpty(); + try { + tray = new Tray(image); + } catch (error) { + appendLog(path.join(app.getPath('userData'), 'runcontainer-error.log'), `The notification-area icon could not be created: ${error.message}`); + tray = null; + return null; + } + tray.setToolTip(`${PRODUCT_NAME} is still running so the iPhone companion stays reachable.`); + tray.setContextMenu(Menu.buildFromTemplate([ + { label: `Open ${PRODUCT_NAME}`, click: () => showMainWindow() }, + { type: 'separator' }, + { label: 'Stop the companion and quit', click: () => { isQuitting = true; app.quit(); } }, + ])); + tray.on('click', () => showMainWindow()); + return tray; +} + +function destroyTray() { + if (!tray) return; + try { + if (!tray.isDestroyed()) tray.destroy(); + } catch (error) { + // A tray that is already gone needs no cleanup. + } + tray = null; +} + +function showMainWindow() { + if (!mainWindow || mainWindow.isDestroyed()) { + createWindow(); + return; + } + if (!mainWindow.isVisible()) mainWindow.show(); + mainWindow.focus(); +} + +// Said once, because the window disappearing can otherwise look like a quit. +function showTrayHintOnce() { + if (trayHintShown || !tray) return; + trayHintShown = true; + try { + tray.displayBalloon({ + title: PRODUCT_NAME, + content: 'Still running so the iPhone companion stays reachable. Right-click this icon to quit.', + }); + } catch (error) { + // Balloons are not available on every shell; the tooltip already says it. + } } app.whenReady().then(() => { @@ -3955,6 +4028,8 @@ app.whenReady().then(() => { let quittingAfterCompanionWeb = false; app.on('before-quit', (event) => { + // The close handler must not turn a real quit into a hide. + isQuitting = true; // A funnel outlives the window unless it is closed first, so quitting waits for that // one command. The guard stops the second quit from waiting again. if (!quittingAfterCompanionWeb && loadCompanionState().webEnabled) { @@ -3971,6 +4046,7 @@ app.on('before-quit', (event) => { // Closing RunContainer closes the companion's server and the small input helper, so // nothing of the remote session outlives the window it belonged to. stopCompanionInput(); + destroyTray(); if (companionServer) { try { companionServer.stop(); } catch (error) { /* quitting */ } companionServer = null; @@ -3992,6 +4068,7 @@ app.on('window-all-closed', () => { app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) createWindow(); + else showMainWindow(); }); ipcMain.handle('open-file-dialog', async () => { @@ -5743,6 +5820,8 @@ async function startCompanionServer() { if (!server.currentPairingCode()) server.issuePairingCode(); companionServer = server; saveCompanionState({ enabled: true, port }); + // The companion is on, so the window may be closed without stopping it. + ensureTray(); emitCompanionStatus(); // The funnel points at a port, and the port can change when another program took the // saved one, so it is re-opened against the port the server actually got. @@ -5781,6 +5860,7 @@ async function stopCompanionServer() { companionServer = null; } saveCompanionState({ enabled: false }); + destroyTray(); emitCompanionStatus(); return { ok: true, status: companionStatus() }; } diff --git a/scripts/build-app-icon.js b/scripts/build-app-icon.js index 707a5a4..0d2805f 100644 --- a/scripts/build-app-icon.js +++ b/scripts/build-app-icon.js @@ -73,7 +73,7 @@ function sampleColor(px, py, accent = ACCENT, opaque = false) { } function renderRgba(size, options = {}) { - const accent = options.nightly ? NIGHTLY_ACCENT : ACCENT; + const accent = options.accent || (options.nightly ? NIGHTLY_ACCENT : ACCENT); const opaque = Boolean(options.opaque); const data = Buffer.alloc(size * size * 4); const scale = UNIT / size; diff --git a/scripts/build-companion-icons.js b/scripts/build-companion-icons.js index 86ba5ce..a6fcede 100644 --- a/scripts/build-companion-icons.js +++ b/scripts/build-companion-icons.js @@ -16,6 +16,11 @@ const ROOT = path.join(__dirname, '..'); const COMPANION_DIR = path.join(ROOT, 'public', 'companion'); const ICON_DIR = path.join(COMPANION_DIR, 'icons'); const SIZES = [180, 192, 512]; +// The stable home-screen icon is grey so it reads as a neutral bookmark; nightly keeps its blue. +const STABLE_ACCENT = [0x9a, 0xa3, 0xb0]; +// iOS keeps an installed home-screen icon until its URL changes, so icon URLs carry +// this version. Bump it whenever the artwork or accent changes. +const ICON_VERSION = '2'; const DESIGNS = [ { nightly: false, dir: ICON_DIR, manifest: path.join(COMPANION_DIR, 'manifest.webmanifest') }, @@ -24,7 +29,7 @@ const DESIGNS = [ function manifestFor(design) { const icons = SIZES.map((size) => ({ - src: `${design.nightly ? '/icons/nightly' : '/icons'}/icon-${size}.png`, + src: `${design.nightly ? '/icons/nightly' : '/icons'}/icon-${size}.png?v=${ICON_VERSION}`, sizes: `${size}x${size}`, type: 'image/png', purpose: 'any', @@ -51,7 +56,7 @@ function build() { files.push({ path: filePath, label: path.relative(ROOT, filePath).replace(/\\/g, '/'), - data: encodePng(size, renderRgba(size, { nightly: design.nightly, opaque: true })), + data: encodePng(size, renderRgba(size, { nightly: design.nightly, opaque: true, accent: design.nightly ? undefined : STABLE_ACCENT })), }); } files.push({ diff --git a/src/components/ContainerManager.jsx b/src/components/ContainerManager.jsx index a09d08a..9e19c8d 100644 --- a/src/components/ContainerManager.jsx +++ b/src/components/ContainerManager.jsx @@ -1514,10 +1514,7 @@ export default function ContainerManager() { {companion?.running ? ( <> - - On. The phone shows an app that is running here and sends your taps and typing back to it; nothing is - installed on the phone. - + On. The phone shows an app running here. Nothing is installed on the phone. {companionLinkUrl(companion) ? (
Scan this with the iPhone camera -
    -
  1. Point the camera at the code and tap the link it offers.
  2. -
  3. - Tap Share, then Add to Home Screen. From then on it opens - like an app. -
  4. -
  5. Type the pairing code below and give the phone a name.
  6. -
+ + Then tap Share and Add to Home Screen. The page also explains this when it opens. +
- The code works once and expires after five minutes. The phone keeps its place until you forget it. + The code works once and expires after five minutes. {companion.connected > 0 ? ` ${companion.connected} phone${companion.connected === 1 ? '' : 's'} connected now.` : ''} {companion.urls?.length > 0 && ( @@ -1639,14 +1630,8 @@ export default function ContainerManager() { ) : ( <> - - Off. Turn it on to use an app from an iPhone: the phone shows an app that is already running here and - sends your taps and typing to it. Nothing is installed on the phone. - - - You need the PC switched on and the phone on the same Wi-Fi, or on a private network such as Tailscale - when you are away. It is experimental, and it shows one app window rather than your screen. - + Off. Turn it on to use a running app from an iPhone. Nothing is installed on the phone. + Needs the PC on and the phone on the same Wi-Fi. )}
diff --git a/src/services/companionAssets.test.js b/src/services/companionAssets.test.js new file mode 100644 index 0000000..fdb1ff2 --- /dev/null +++ b/src/services/companionAssets.test.js @@ -0,0 +1,97 @@ +// The phone's shortcut is a web page, so its icon, its palette and its offline state are +// static files. These checks catch the cases that only show up on a phone: a stale icon +// iOS never refetches, green left in the stylesheet, and an empty page when the PC is off. +const fs = require('fs'); +const path = require('path'); +const zlib = require('zlib'); + +const ROOT = path.join(__dirname, '..', '..'); +const COMPANION = path.join(ROOT, 'public', 'companion'); + +function pixelColours(file) { + const buffer = fs.readFileSync(file); + let offset = 8; + let width = 0; + let height = 0; + const idat = []; + while (offset < buffer.length) { + const length = buffer.readUInt32BE(offset); + const type = buffer.toString('ascii', offset + 4, offset + 8); + const data = buffer.subarray(offset + 8, offset + 8 + length); + if (type === 'IHDR') { + width = data.readUInt32BE(0); + height = data.readUInt32BE(4); + } + if (type === 'IDAT') idat.push(data); + offset += length + 12; + } + const raw = zlib.inflateSync(Buffer.concat(idat)); + const bpp = 4; + const stride = width * bpp; + const colours = []; + let previous = Buffer.alloc(stride); + for (let y = 0; y < height; y += 1) { + const start = y * (stride + 1); + const filter = raw[start]; + const line = Buffer.from(raw.subarray(start + 1, start + 1 + stride)); + for (let i = 0; i < stride; i += 1) { + const left = i >= bpp ? line[i - bpp] : 0; + const up = previous[i]; + const upLeft = i >= bpp ? previous[i - bpp] : 0; + if (filter === 1) line[i] = (line[i] + left) & 0xff; + else if (filter === 2) line[i] = (line[i] + up) & 0xff; + else if (filter === 3) line[i] = (line[i] + ((left + up) >> 1)) & 0xff; + else if (filter === 4) { + const p = left + up - upLeft; + const pa = Math.abs(p - left); + const pb = Math.abs(p - up); + const pc = Math.abs(p - upLeft); + line[i] = (line[i] + (pa <= pb && pa <= pc ? left : pb <= pc ? up : upLeft)) & 0xff; + } + } + for (let x = 0; x < stride; x += 4) colours.push(`${line[x]},${line[x + 1]},${line[x + 2]}`); + previous = line; + } + return colours; +} + +describe('companion appearance', () => { + it('draws the home-screen icon in grey, not the desktop green', () => { + const colours = pixelColours(path.join(COMPANION, 'icons', 'icon-180.png')); + expect(colours).toContain('154,163,176'); + expect(colours).not.toContain('63,207,170'); + expect(colours).not.toContain('79,216,180'); + }); + + it('gives icon URLs a version so an installed shortcut refetches them', () => { + const html = fs.readFileSync(path.join(COMPANION, 'index.html'), 'utf8'); + expect(html).toMatch(/apple-touch-icon[^>]+icon-180\.png\?v=/); + expect(html).toMatch(/rel="icon"[^>]+icon-192\.png\?v=/); + const script = fs.readFileSync(path.join(COMPANION, 'companion.js'), 'utf8'); + expect(script).toMatch(/icon-180\.png\?v=\$\{ICON_VERSION\}/); + for (const manifest of ['manifest.webmanifest', 'manifest-nightly.webmanifest']) { + expect(fs.readFileSync(path.join(COMPANION, manifest), 'utf8')).toMatch(/icon-\d+\.png\?v=/); + } + }); + + it('has no green left in the companion page styles', () => { + const css = fs.readFileSync(path.join(COMPANION, 'companion.css'), 'utf8'); + expect(css).not.toMatch(/3fcfaa|2bb390|0f8c6f|4fd8b4|120,\s*200,\s*180|140,\s*233,\s*208/i); + }); + + it('keeps the last app list so the shortcut is not empty when the PC is off', () => { + const script = fs.readFileSync(path.join(COMPANION, 'companion.js'), 'utf8'); + expect(script).toMatch(/rc-companion-apps/); + expect(script).toMatch(/readAppsCache\(\)/); + expect(script).toMatch(/setOffline\(true\)/); + }); + + it('keeps RunContainer running when its window is closed and the companion is on', () => { + const main = fs.readFileSync(path.join(ROOT, 'public', 'main.js'), 'utf8'); + expect(main).toMatch(/mainWindow\.on\('close'/); + expect(main).toMatch(/if \(isQuitting\) return;/); + expect(main).toMatch(/if \(!loadCompanionState\(\)\.enabled\) return;/); + expect(main).toMatch(/event\.preventDefault\(\);/); + expect(main).toMatch(/function ensureTray\(\)/); + }); +}); From 122b0fe13045d3d0a7b8642ac6a8eda153d8c253 Mon Sep 17 00:00:00 2001 From: north-star-info Date: Thu, 5 Nov 2026 22:34:34 +0000 Subject: [PATCH 2/4] Version the companion's stylesheet and fix the install sheet layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The icon URLs were versioned but the stylesheet and script were not, so a page that had been open before kept its old palette. The install sheet's title rule also applied to the tags inside its steps, which broke them onto their own lines. 🤖 Generated with Codebuff Co-Authored-By: Codebuff --- public/companion/companion.css | 6 ++++-- public/companion/index.html | 4 ++-- src/services/companionAssets.test.js | 8 ++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/public/companion/companion.css b/public/companion/companion.css index c51e833..b089928 100644 --- a/public/companion/companion.css +++ b/public/companion/companion.css @@ -442,10 +442,12 @@ body.nightly .primary { padding-bottom: calc(22px + var(--safe-bottom)); border: 1px solid var(--line); border-radius: 22px; - background: var(--panel); + /* Opaque, so the pairing form does not show through the sheet. */ + background: var(--bg-soft); box-shadow: 0 30px 80px -50px #000; } -.install-card strong { display: block; margin-bottom: 10px; font-size: 18px; } +/* Only the sheet's own title; the steps also use and must stay inline. */ +.install-card > strong { display: block; margin-bottom: 10px; font-size: 18px; } .install-card .steps { margin-bottom: 16px; } /* Shown while the PC is unreachable: the list is last-known, not live. */ diff --git a/public/companion/index.html b/public/companion/index.html index ffa0f80..c70d76a 100644 --- a/public/companion/index.html +++ b/public/companion/index.html @@ -16,7 +16,7 @@ changes, so the old green icon would otherwise stay on the phone forever. --> - + RunContainer — Companion @@ -120,6 +120,6 @@

Apps on this PC

- + diff --git a/src/services/companionAssets.test.js b/src/services/companionAssets.test.js index fdb1ff2..69008c8 100644 --- a/src/services/companionAssets.test.js +++ b/src/services/companionAssets.test.js @@ -67,6 +67,8 @@ describe('companion appearance', () => { const html = fs.readFileSync(path.join(COMPANION, 'index.html'), 'utf8'); expect(html).toMatch(/apple-touch-icon[^>]+icon-180\.png\?v=/); expect(html).toMatch(/rel="icon"[^>]+icon-192\.png\?v=/); + expect(html).toMatch(/href="\/companion\.css\?v=/); + expect(html).toMatch(/src="\/companion\.js\?v=/); const script = fs.readFileSync(path.join(COMPANION, 'companion.js'), 'utf8'); expect(script).toMatch(/icon-180\.png\?v=\$\{ICON_VERSION\}/); for (const manifest of ['manifest.webmanifest', 'manifest-nightly.webmanifest']) { @@ -79,6 +81,12 @@ describe('companion appearance', () => { expect(css).not.toMatch(/3fcfaa|2bb390|0f8c6f|4fd8b4|120,\s*200,\s*180|140,\s*233,\s*208/i); }); + it('keeps the install sheet title rule off the inline s in its steps', () => { + const css = fs.readFileSync(path.join(COMPANION, 'companion.css'), 'utf8'); + expect(css).toContain('.install-card > strong'); + expect(css).not.toMatch(/^\.install-card strong \{/m); + }); + it('keeps the last app list so the shortcut is not empty when the PC is off', () => { const script = fs.readFileSync(path.join(COMPANION, 'companion.js'), 'utf8'); expect(script).toMatch(/rc-companion-apps/); From 94d1e9544886ddd07de4d9d8263bf62af25dfac6 Mon Sep 17 00:00:00 2001 From: north-star-info Date: Thu, 5 Nov 2026 23:00:14 +0000 Subject: [PATCH 3/4] Describe the companion staying in the notification area MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closing RunContainer's window no longer stops the companion, so the README now says where the app keeps running and how to quit it. 🤖 Generated with Codebuff Co-Authored-By: Codebuff --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0671a48..dcb61ff 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ RunContainer tries to show the app in a separate RunContainer window. Depending ## From an iPhone -The iPhone companion shows an app that is already running on the PC. Scan the QR code in Settings with the phone camera, then **Share → Add to Home Screen**; it opens like an app, with no port to type. With Tailscale signed in, Settings can open a real `https://…ts.net` address through Funnel, so it also works away from home. Apps keep running on the PC, and pairing is required. +The iPhone companion shows an app that is already running on the PC. Scan the QR code in Settings with the phone camera, then **Share → Add to Home Screen**; it opens like an app, with no port to type. With Tailscale signed in, Settings can open a real `https://…ts.net` address through Funnel, so it also works away from home. Apps keep running on the PC, and pairing is required. While the companion is on, closing RunContainer's window leaves it running in the notification area, so the Home Screen shortcut keeps working; right-click that icon to reopen the window or to stop the companion and quit. ## Keeping apps apart From 64589902544ab827d38118568819e159efad5351 Mon Sep 17 00:00:00 2001 From: north-star-info Date: Thu, 5 Nov 2026 23:07:05 +0000 Subject: [PATCH 4/4] Release 0.9.9 with the companion keeping its connection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The companion's grey icon and page, its notification-area survival when the window closes, and its cached app list all needed a version of their own so installed copies can reach them. 🤖 Generated with Codebuff Co-Authored-By: Codebuff --- package-lock.json | 4 ++-- package.json | 2 +- src/components/ContainerManager.jsx | 2 +- src/data/updates.js | 11 +++++++++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f2523a8..16b8688 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "RunContainer", - "version": "0.9.8", + "version": "0.9.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "RunContainer", - "version": "0.9.8", + "version": "0.9.9", "dependencies": { "electron-squirrel-startup": "^1.0.1", "qrcode-generator": "^1.4.4" diff --git a/package.json b/package.json index 02446ee..a9d6860 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "RunContainer", "productName": "RunContainer", - "version": "0.9.8", + "version": "0.9.9", "description": "A Windows-based container management application for running applications in a sandboxed environment.", "main": "public/main.js", "scripts": { diff --git a/src/components/ContainerManager.jsx b/src/components/ContainerManager.jsx index 9e19c8d..f27a39f 100644 --- a/src/components/ContainerManager.jsx +++ b/src/components/ContainerManager.jsx @@ -44,7 +44,7 @@ function useBootAnimation() { // Used only until the main process reports the version from package.json. // Shown only for the moment before the main process reports the real version; the // test asserts that it tracks package.json, so it must be bumped with the release. -const APP_VERSION_FALLBACK = "0.9.8"; +const APP_VERSION_FALLBACK = "0.9.9"; // "4m 07s" - how long a setup has been running, for the one place a long wait // needs to be explained rather than look frozen. function formatElapsed(ms) { diff --git a/src/data/updates.js b/src/data/updates.js index d09d654..c8aa535 100644 --- a/src/data/updates.js +++ b/src/data/updates.js @@ -3,6 +3,17 @@ // badge is filled in at runtime from package.json via the main process. export const UPDATES = [ + { + version: '0.9.9', + date: '2026-11-05', + title: 'The iPhone companion stays reachable', + changes: [ + 'The companion is grey now: its Home Screen icon, pairing screen and app list match, instead of borrowing the desktop app\u2019s green. The desktop app keeps its own colour.', + 'Closing RunContainer\u2019s window no longer stops the companion. While it is on, the app keeps running in the notification area, so a Home Screen shortcut still reaches this PC; right-click that icon to reopen the window or to stop the companion and quit.', + 'If the PC is asleep or RunContainer is not running, the shortcut shows the last list of apps it knew about and says the PC is unreachable, rather than an empty page.', + 'The companion page, its styles and its icons carry a version now, so an update reaches a shortcut that was added earlier instead of serving the old page.', + ], + }, { version: '0.9.8', date: '2026-10-30',