@openchambery/web 1.19.5-beta.8 → 1.19.5-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AgentAvatar-ojjyVOTA.js → AgentAvatar-BceI_qBC.js} +1 -1
- package/dist/assets/{AssistantView-Z3w0qidH.js → AssistantView-D5uRIhdd.js} +1 -1
- package/dist/assets/{ChatContainer-f0iiI77k.js → ChatContainer-vRoWqx9I.js} +26 -26
- package/dist/assets/ContextPanel-BsZ6pucf.js +285 -0
- package/dist/assets/{DiagramView-Bft1-Ixf.js → DiagramView-tg_cF9bP.js} +1 -1
- package/dist/assets/{FadeInOnReveal-Cy3sf2M5.js → FadeInOnReveal-Cj9ZC3Ab.js} +1 -1
- package/dist/assets/{Icon-BLWVqBee.js → Icon-Du1LX11Q.js} +1 -1
- package/dist/assets/MarkdownRendererImpl-CUbq7MnV.js +7 -0
- package/dist/assets/{MobileDetailNavigation-Ba7z2Yuy.js → MobileDetailNavigation-C3FPxLXw.js} +1 -1
- package/dist/assets/{MobileShareBridge-Be2_HO6w.js → MobileShareBridge-CwfVGh1E.js} +2 -2
- package/dist/assets/{MobileSurface-B3T7Jjao.js → MobileSurface-D7DvzqGV.js} +1 -1
- package/dist/assets/{MultiRunWindow-koO06fZJ.js → MultiRunWindow-DeM0arSL.js} +1 -1
- package/dist/assets/{OnboardingScreen-DepjqS6L.js → OnboardingScreen-Czusf7rR.js} +1 -1
- package/dist/assets/{OverlayScrollbar-GQgJusKL.js → OverlayScrollbar-oOLMqq2s.js} +1 -1
- package/dist/assets/{SettingsView-Cbx02C3a.js → SettingsView-3mxG03Kg.js} +6 -6
- package/dist/assets/{SettingsWindow-PLcPq5ST.js → SettingsWindow-CKVr8vEW.js} +1 -1
- package/dist/assets/{TerminalView-Bbnxr6Yi.js → TerminalView-B2vNAAGI.js} +1 -1
- package/dist/assets/{ToolOutputDialog-DHIdKwti.js → ToolOutputDialog-FY1p6ABd.js} +1 -1
- package/dist/assets/{appThemeRegistry-SZqCMH4S.js → appThemeRegistry-CxYhYWfx.js} +2 -2
- package/dist/assets/{button-CeCkEpvn.js → button-p6vbd3r6.js} +1 -1
- package/dist/assets/{clipboard-Dau-Ml0S.js → clipboard-Ca2PSbr_.js} +1 -1
- package/dist/assets/{collapsible-B-aagADh.js → collapsible-Cimoz0kx.js} +1 -1
- package/dist/assets/{desktopHosts-BrrYPqKq.js → desktopHosts-DceeVBky.js} +1 -1
- package/dist/assets/{desktopRelayRestore-DR60DATT.js → desktopRelayRestore-B0MRdR5y.js} +1 -1
- package/dist/assets/{diagram-Cxma_IKI.js → diagram-DX_MPRs3.js} +1 -1
- package/dist/assets/{dialog-BsoksSPq.js → dialog-B2ieeCSR.js} +1 -1
- package/dist/assets/{fileQueries-BJKLdYos.js → fileQueries-BDld6h3B.js} +1 -1
- package/dist/assets/{gitApi-C6JSZhRm.js → gitApi-CIStyhfQ.js} +3 -3
- package/dist/assets/{input-CyG05w-V.js → input-gaFVNq1P.js} +1 -1
- package/dist/assets/insertionBoundaries-DKaP2akF.js +4 -0
- package/dist/assets/{main-BNl9icid.js → main-4AJr41lz.js} +2 -2
- package/dist/assets/main-BXQdBQ0u.js +29 -0
- package/dist/assets/{markdown-worker-C7TuaOUy.js → markdown-worker-CoO82KYF.js} +4 -4
- package/dist/assets/{markdownTheme-H7_7lbuh.js → markdownTheme-St8zxDvJ.js} +1 -1
- package/dist/assets/{miniChat-D3Vj4bki.js → miniChat-xTsSFILb.js} +2 -2
- package/dist/assets/mobile-BCQf1Sdm.js +2 -0
- package/dist/assets/multirun-BGtjVyHw.js +4 -0
- package/dist/assets/{persistence-DE9RnVcA.js → persistence-CLUawIlm.js} +1 -1
- package/dist/assets/{platform-MjT8iqKB.js → platform-BrncW9ab.js} +1 -1
- package/dist/assets/{projectMeta-CRGKGPNc.js → projectMeta-DPKKf4Of.js} +2 -2
- package/dist/assets/{radio-RSR1M3tE.js → radio-CkwG8Ru_.js} +1 -1
- package/dist/assets/renderElectronMiniChatApp-BLlVyeOM.js +2 -0
- package/dist/assets/renderMobileApp-CCjMtagc.js +25 -0
- package/dist/assets/{runtimeConfig-QnEB1ojv.js → runtimeConfig-HOGA9fV1.js} +1 -1
- package/dist/assets/runtimeEndpointReset-pH89Ln7s.js +4 -0
- package/dist/assets/{shikiHighlight-BB3Jr5bN.js → shikiHighlight-CYGn2J0U.js} +1 -1
- package/dist/assets/{sortable-tabs-strip-DZO7_VTc.js → sortable-tabs-strip-CxLE1X9x.js} +1 -1
- package/dist/assets/{src-CD7-ovJ5.css → src-Bd_0IB9v.css} +1 -1
- package/dist/assets/{terminalApi-Bnx0KvaV.js → terminalApi-D2OzR0I3.js} +1 -1
- package/dist/assets/{tooltip-B__x-HDJ.js → tooltip-D1a6rKLA.js} +1 -1
- package/dist/assets/{url-CTuw7Rjf.js → url-zwuNq3GS.js} +1 -1
- package/dist/assets/{useAppFontEffects-BYAihjof.js → useAppFontEffects-Bs2vXOZc.js} +4 -4
- package/dist/assets/{useAssistantUIStore-D2K7ksGj.js → useAssistantUIStore-D699Sbdb.js} +1 -1
- package/dist/assets/{useDesktopWindowControlsLayout-BmORROEN.js → useDesktopWindowControlsLayout-BF-8wlNn.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-D3iFMWXN.js → useEffectiveDirectory-VgouJnIr.js} +1 -1
- package/dist/assets/{useFontPreferences-CWZnNRjz.js → useFontPreferences-F2QPNE2V.js} +1 -1
- package/dist/assets/{useMobileNavigationStore-CA6zYa4p.js → useMobileNavigationStore-KGRUWzjR.js} +8 -8
- package/dist/assets/{useSessionAutoCleanup-CtycUt11.js → useSessionAutoCleanup-Bw0QGMfA.js} +1 -1
- package/dist/assets/{useUIStore-DOxLVeGb.js → useUIStore-BXjMQrel.js} +1 -1
- package/dist/assets/{useWorkerHighlightedLines--45j18dY.js → useWorkerHighlightedLines-CGgUFz01.js} +1 -1
- package/dist/assets/{utils-C2R0YoC5.js → utils-D94hxQYq.js} +1 -1
- package/dist/index.html +9 -9
- package/dist/mini-chat.html +9 -9
- package/dist/mobile.html +9 -9
- package/package.json +1 -1
- package/server/index.js +0 -3
- package/server/lib/notifications/DOCUMENTATION.md +2 -2
- package/server/lib/notifications/push-runtime.js +4 -14
- package/server/lib/notifications/runtime.js +11 -20
- package/server/lib/notifications/runtime.test.js +4 -6
- package/dist/assets/ContextPanel-BsYlbdoS.js +0 -285
- package/dist/assets/MarkdownRendererImpl-CEfp1NzP.js +0 -7
- package/dist/assets/insertionBoundaries-rKeC9-eK.js +0 -4
- package/dist/assets/main-iCRPhhnY.js +0 -29
- package/dist/assets/mobile-6mt3nA3g.js +0 -2
- package/dist/assets/multirun-B0nIqgF4.js +0 -4
- package/dist/assets/renderElectronMiniChatApp-DxvEP5C4.js +0 -2
- package/dist/assets/renderMobileApp-Dl3lyk4g.js +0 -23
- package/dist/assets/runtimeEndpointReset-D1JL05wn.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Xt as e}from"./persistence-
|
|
1
|
+
import{Xt as e}from"./persistence-CLUawIlm.js";import{n as t}from"./vendor-class-variance-authority-BLUaYARZ.js";import{t as n}from"./vendor-tailwind-merge-BicNWLTg.js";function r(...e){return n(t(e))}var i=()=>typeof navigator>`u`?!1:/Macintosh|Mac OS X/.test(navigator.userAgent||``),a=()=>typeof navigator>`u`?!1:/Windows/.test(navigator.userAgent||``),o=()=>i()?`common.revealPath.finder`:a()?`common.revealPath.fileExplorer`:`common.revealPath.fileManager`,s=t=>i()&&e()?t.metaKey:t.ctrlKey,c=()=>i()&&e()?`⌘`:`Ctrl`,l=(e,t)=>{let n=e??``,r=Math.max(16,t?.maxLength??45);if(n.length<=r)return n;let i=n.split(`/`);if(i.length<=1)return n;let a=i.pop()??``;if(!a)return n;let o=Math.max(0,r-(a.length+2));if(o<=0)return`…/${a}`;let s=``;for(let e of i){if(!e)continue;let t=s?`${s}/${e}`:e;if(t.length>o)break;s=t}if(!s){let e=i[0]??``;s=e?e.slice(0,o):``}return s?`${s}…/${a}`:`…/${a}`},u=e=>e?e===`/`?`/`:e.replace(/\/+$/,``):``;function d(e,t){if(!e)return``;let n=u(e);if(n===`/`)return`/`;let r=t?u(t):void 0;if(r&&r!==`/`){if(n===r)return`~`;if(n.startsWith(`${r}/`)){let e=n.slice(r.length+1);return e?`~/${e}`:`~`}}return n}function f(e,t){if(!e)return`/`;let n=u(e);if(!n||n===`/`)return`/`;let r=t?u(t):void 0;return r&&r!==`/`&&n===r?`~`:n.split(`/`).pop()||n||`/`}export{o as a,l as c,c as i,f as n,s as o,d as r,i as s,r as t};
|
package/dist/index.html
CHANGED
|
@@ -552,25 +552,25 @@
|
|
|
552
552
|
opacity: 0.72;
|
|
553
553
|
}
|
|
554
554
|
</style>
|
|
555
|
-
<script type="module" crossorigin src="/assets/main-
|
|
555
|
+
<script type="module" crossorigin src="/assets/main-4AJr41lz.js"></script>
|
|
556
556
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-C0FnF6B9.js">
|
|
557
557
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-CnHfUmDN.js">
|
|
558
558
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-B4dlGEM2.js">
|
|
559
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
559
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-BXjMQrel.js">
|
|
560
560
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
561
561
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-DLPElpoQ.js">
|
|
562
562
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BWz0ose6.js">
|
|
563
|
-
<link rel="modulepreload" crossorigin href="/assets/persistence-
|
|
564
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-
|
|
565
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-
|
|
563
|
+
<link rel="modulepreload" crossorigin href="/assets/persistence-CLUawIlm.js">
|
|
564
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-DceeVBky.js">
|
|
565
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-B0MRdR5y.js">
|
|
566
566
|
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-sdk-C07HQypa.js">
|
|
567
567
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js">
|
|
568
|
-
<link rel="modulepreload" crossorigin href="/assets/platform-
|
|
569
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
568
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-BrncW9ab.js">
|
|
569
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-D2OzR0I3.js">
|
|
570
570
|
<link rel="modulepreload" crossorigin href="/assets/types-BuiqMmh_.js">
|
|
571
571
|
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-DCowZ2ab.js">
|
|
572
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
573
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
572
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-HOGA9fV1.js">
|
|
573
|
+
<link rel="stylesheet" crossorigin href="/assets/src-Bd_0IB9v.css">
|
|
574
574
|
</head>
|
|
575
575
|
<body class="h-full bg-background text-foreground">
|
|
576
576
|
<!-- Keep the startup layer outside #root. React replaces every child of
|
package/dist/mini-chat.html
CHANGED
|
@@ -74,25 +74,25 @@
|
|
|
74
74
|
}
|
|
75
75
|
</style>
|
|
76
76
|
|
|
77
|
-
<script type="module" crossorigin src="/assets/miniChat-
|
|
77
|
+
<script type="module" crossorigin src="/assets/miniChat-xTsSFILb.js"></script>
|
|
78
78
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-C0FnF6B9.js">
|
|
79
79
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-CnHfUmDN.js">
|
|
80
80
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-B4dlGEM2.js">
|
|
81
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
81
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-BXjMQrel.js">
|
|
82
82
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-DLPElpoQ.js">
|
|
84
84
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BWz0ose6.js">
|
|
85
|
-
<link rel="modulepreload" crossorigin href="/assets/persistence-
|
|
86
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-
|
|
87
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-
|
|
85
|
+
<link rel="modulepreload" crossorigin href="/assets/persistence-CLUawIlm.js">
|
|
86
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-DceeVBky.js">
|
|
87
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-B0MRdR5y.js">
|
|
88
88
|
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-sdk-C07HQypa.js">
|
|
89
89
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js">
|
|
90
|
-
<link rel="modulepreload" crossorigin href="/assets/platform-
|
|
91
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
90
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-BrncW9ab.js">
|
|
91
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-D2OzR0I3.js">
|
|
92
92
|
<link rel="modulepreload" crossorigin href="/assets/types-BuiqMmh_.js">
|
|
93
93
|
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-DCowZ2ab.js">
|
|
94
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
95
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
94
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-HOGA9fV1.js">
|
|
95
|
+
<link rel="stylesheet" crossorigin href="/assets/src-Bd_0IB9v.css">
|
|
96
96
|
</head>
|
|
97
97
|
<body class="h-full bg-background text-foreground">
|
|
98
98
|
<div id="root" class="h-full">
|
package/dist/mobile.html
CHANGED
|
@@ -63,25 +63,25 @@
|
|
|
63
63
|
})();
|
|
64
64
|
</script>
|
|
65
65
|
|
|
66
|
-
<script type="module" crossorigin src="/assets/mobile-
|
|
66
|
+
<script type="module" crossorigin src="/assets/mobile-BCQf1Sdm.js"></script>
|
|
67
67
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-C0FnF6B9.js">
|
|
68
68
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-CnHfUmDN.js">
|
|
69
69
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-B4dlGEM2.js">
|
|
70
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
70
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-BXjMQrel.js">
|
|
71
71
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
72
72
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-DLPElpoQ.js">
|
|
73
73
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BWz0ose6.js">
|
|
74
|
-
<link rel="modulepreload" crossorigin href="/assets/persistence-
|
|
75
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-
|
|
76
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-
|
|
74
|
+
<link rel="modulepreload" crossorigin href="/assets/persistence-CLUawIlm.js">
|
|
75
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-DceeVBky.js">
|
|
76
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-B0MRdR5y.js">
|
|
77
77
|
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-sdk-C07HQypa.js">
|
|
78
78
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js">
|
|
79
|
-
<link rel="modulepreload" crossorigin href="/assets/platform-
|
|
80
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
79
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-BrncW9ab.js">
|
|
80
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-D2OzR0I3.js">
|
|
81
81
|
<link rel="modulepreload" crossorigin href="/assets/types-BuiqMmh_.js">
|
|
82
82
|
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-DCowZ2ab.js">
|
|
83
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
84
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
83
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-HOGA9fV1.js">
|
|
84
|
+
<link rel="stylesheet" crossorigin href="/assets/src-Bd_0IB9v.css">
|
|
85
85
|
</head>
|
|
86
86
|
<body class="h-full bg-background text-foreground">
|
|
87
87
|
<div id="root" class="h-full"></div>
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -342,8 +342,6 @@ const updateUiVisibility = (token, visible, platform) => {
|
|
|
342
342
|
if (visible === true) clearPendingPushBadge();
|
|
343
343
|
return pushRuntime.updateUiVisibility(token, visible, platform);
|
|
344
344
|
};
|
|
345
|
-
const isAnyUiVisible = (...args) => pushRuntime.isAnyUiVisible(...args);
|
|
346
|
-
const isAnyInteractiveClientVisible = (...args) => pushRuntime.isAnyInteractiveClientVisible(...args);
|
|
347
345
|
const isUiVisible = (...args) => pushRuntime.isUiVisible(...args);
|
|
348
346
|
const ensurePushInitialized = (...args) => pushRuntime.ensurePushInitialized(...args);
|
|
349
347
|
const setPushInitialized = (...args) => pushRuntime.setPushInitialized(...args);
|
|
@@ -664,7 +662,6 @@ const notificationTriggerRuntime = createNotificationTriggerRuntime({
|
|
|
664
662
|
sendPushToAllUiSessions,
|
|
665
663
|
sendApnsToAllUiSessions,
|
|
666
664
|
sendLiveActivityEnd,
|
|
667
|
-
isAnyInteractiveClientVisible,
|
|
668
665
|
buildOpenCodeUrl,
|
|
669
666
|
getOpenCodeAuthHeaders,
|
|
670
667
|
});
|
|
@@ -52,7 +52,7 @@ This module provides notification message preparation utilities for the web serv
|
|
|
52
52
|
- session meta cache for child-session and small-model suppression
|
|
53
53
|
- template resolution and fallback behavior
|
|
54
54
|
- native notification fanout and web push payload fanout
|
|
55
|
-
- push
|
|
55
|
+
- push always fans out to every subscribed surface; another client's visibility never suppresses delivery
|
|
56
56
|
|
|
57
57
|
### Push runtime API (push-runtime.js)
|
|
58
58
|
- `createPushRuntime(dependencies)`: creates runtime for web push and UI visibility state.
|
|
@@ -62,7 +62,7 @@ This module provides notification message preparation utilities for the web serv
|
|
|
62
62
|
- `setPushInitialized(value)`
|
|
63
63
|
- `addOrUpdatePushSubscription(uiSessionToken, subscription, userAgent)`
|
|
64
64
|
- `removePushSubscription(uiSessionToken, endpoint)`
|
|
65
|
-
- `sendPushToAllUiSessions(payload
|
|
65
|
+
- `sendPushToAllUiSessions(payload)`
|
|
66
66
|
- `updateUiVisibility(token, visible)`
|
|
67
67
|
- `isAnyUiVisible()`
|
|
68
68
|
- `isUiVisible(token)`
|
|
@@ -221,8 +221,7 @@ export const createPushRuntime = (deps) => {
|
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
223
|
|
|
224
|
-
const sendPushToAllUiSessions = async (payload
|
|
225
|
-
const requireNoSse = options.requireNoSse === true;
|
|
224
|
+
const sendPushToAllUiSessions = async (payload) => {
|
|
226
225
|
const store = await readPushSubscriptionsFromDisk();
|
|
227
226
|
const sessions = store.subscriptionsBySession || {};
|
|
228
227
|
const subscriptionsByEndpoint = new Map();
|
|
@@ -239,14 +238,6 @@ export const createPushRuntime = (deps) => {
|
|
|
239
238
|
}
|
|
240
239
|
|
|
241
240
|
await Promise.all(Array.from(subscriptionsByEndpoint.values()).map(async (sub) => {
|
|
242
|
-
if (requireNoSse) {
|
|
243
|
-
// Mobile PWA subscriptions follow the same presence model as native push: suppress only
|
|
244
|
-
// when an interactive (desktop/web) client is visible. The phone PWA's own foreground is
|
|
245
|
-
// handled in the service worker (focused-client check), so it won't double-notify.
|
|
246
|
-
// Non-mobile (desktop/web) subscriptions keep the existing any-visible gate.
|
|
247
|
-
const suppressed = isMobilePlatform(sub.platform) ? isAnyInteractiveClientVisible() : isAnyUiVisible();
|
|
248
|
-
if (suppressed) return;
|
|
249
|
-
}
|
|
250
241
|
await sendPushToSubscription(sub, payload);
|
|
251
242
|
}));
|
|
252
243
|
};
|
|
@@ -278,10 +269,9 @@ export const createPushRuntime = (deps) => {
|
|
|
278
269
|
return false;
|
|
279
270
|
};
|
|
280
271
|
|
|
281
|
-
// True when at least one NON-mobile client (desktop/web/vscode) is currently visible.
|
|
282
|
-
//
|
|
283
|
-
//
|
|
284
|
-
// phone's own (a backgrounded WKWebView can't report "hidden" before iOS suspends it).
|
|
272
|
+
// True when at least one NON-mobile client (desktop/web/vscode) is currently visible.
|
|
273
|
+
// Not a push gate — delivery always fans out. Kept as a visibility query for tests and
|
|
274
|
+
// diagnostics. Deliberately based on the desktop's visibility, never the phone's own.
|
|
285
275
|
const isAnyInteractiveClientVisible = () => {
|
|
286
276
|
const now = Date.now();
|
|
287
277
|
pruneUiVisibility(now);
|
|
@@ -12,7 +12,6 @@ export const createNotificationTriggerRuntime = (deps) => {
|
|
|
12
12
|
sendPushToAllUiSessions,
|
|
13
13
|
sendApnsToAllUiSessions,
|
|
14
14
|
sendLiveActivityEnd,
|
|
15
|
-
isAnyInteractiveClientVisible,
|
|
16
15
|
buildOpenCodeUrl,
|
|
17
16
|
getOpenCodeAuthHeaders,
|
|
18
17
|
} = deps;
|
|
@@ -68,25 +67,17 @@ export const createNotificationTriggerRuntime = (deps) => {
|
|
|
68
67
|
};
|
|
69
68
|
|
|
70
69
|
// Fan a notification out to every delivery channel: browser web-push (full templated
|
|
71
|
-
// payload) and native iOS APNs (generic model-based text). Both share the dedup tag
|
|
72
|
-
//
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}),
|
|
83
|
-
interactiveVisible
|
|
84
|
-
? Promise.resolve()
|
|
85
|
-
: Promise.resolve(sendApnsToAllUiSessions?.(toApnsGenericPayload(payload), options)).catch((error) => {
|
|
86
|
-
console.warn('[APNs] fanout failed:', error?.message ?? error);
|
|
87
|
-
}),
|
|
88
|
-
]);
|
|
89
|
-
};
|
|
70
|
+
// payload) and native iOS APNs (generic model-based text). Both share the dedup tag;
|
|
71
|
+
// a failure in one channel must not block the other. Visibility on any other client
|
|
72
|
+
// never suppresses delivery — every subscribed surface gets the push.
|
|
73
|
+
const fanoutPush = (payload, options) => Promise.all([
|
|
74
|
+
Promise.resolve(sendPushToAllUiSessions?.(payload, options)).catch((error) => {
|
|
75
|
+
console.warn('[Push] web-push fanout failed:', error?.message ?? error);
|
|
76
|
+
}),
|
|
77
|
+
Promise.resolve(sendApnsToAllUiSessions?.(toApnsGenericPayload(payload), options)).catch((error) => {
|
|
78
|
+
console.warn('[APNs] fanout failed:', error?.message ?? error);
|
|
79
|
+
}),
|
|
80
|
+
]);
|
|
90
81
|
|
|
91
82
|
let getIsWindowFocused = typeof deps.getIsWindowFocused === 'function'
|
|
92
83
|
? deps.getIsWindowFocused
|
|
@@ -28,7 +28,6 @@ const createRuntime = (overrides = {}) => {
|
|
|
28
28
|
sendPushToAllUiSessions,
|
|
29
29
|
sendApnsToAllUiSessions,
|
|
30
30
|
sendLiveActivityEnd,
|
|
31
|
-
isAnyInteractiveClientVisible: () => false,
|
|
32
31
|
buildOpenCodeUrl: (path) => `http://opencode.test${path}`,
|
|
33
32
|
getOpenCodeAuthHeaders: () => ({}),
|
|
34
33
|
getIsWindowFocused: () => false,
|
|
@@ -224,14 +223,13 @@ describe('notification trigger live activity end', () => {
|
|
|
224
223
|
expect(sendApnsToAllUiSessions).not.toHaveBeenCalled();
|
|
225
224
|
});
|
|
226
225
|
|
|
227
|
-
it('
|
|
226
|
+
it('still sends native push when another client is visible', async () => {
|
|
228
227
|
vi.stubGlobal('fetch', vi.fn(async () => rootSessionResponse()));
|
|
229
|
-
const { runtime, sendLiveActivityEnd, sendApnsToAllUiSessions } = createRuntime(
|
|
230
|
-
isAnyInteractiveClientVisible: () => true,
|
|
231
|
-
});
|
|
228
|
+
const { runtime, sendLiveActivityEnd, sendApnsToAllUiSessions, sendPushToAllUiSessions } = createRuntime();
|
|
232
229
|
await runtime.maybeSendPushForTrigger(completionPayload());
|
|
233
230
|
expect(sendLiveActivityEnd).toHaveBeenCalledWith({ sessionId: 'ses_root', status: 'complete' });
|
|
234
|
-
expect(
|
|
231
|
+
expect(sendPushToAllUiSessions).toHaveBeenCalledTimes(1);
|
|
232
|
+
expect(sendApnsToAllUiSessions).toHaveBeenCalledTimes(1);
|
|
235
233
|
});
|
|
236
234
|
|
|
237
235
|
it('suppresses live activity end for child and small-model sessions', async () => {
|