webhelm 1.0.28 → 1.0.29
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/README.md
CHANGED
|
@@ -47,10 +47,13 @@ The Actions checkout is `~/.local/webhelm`, with site modules at `~/.local/webhe
|
|
|
47
47
|
|
|
48
48
|
## Optional site Keep Alive (Extension)
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Only a Session in the **WebHelm** Workspace can use the Extension's **Keep Alive** toggle on an HTTPS page to
|
|
51
51
|
register that website's **origin**. The website stays in the popup's Keep Alive
|
|
52
|
-
Sites list even after the original Session ends.
|
|
53
|
-
|
|
52
|
+
Sites list even after the original Session ends. Custom/other Workspace
|
|
53
|
+
Sessions have no Keep Alive toggle. A green dot and website name mean that
|
|
54
|
+
the Platform last confirmed login; gray means not confirmed or not logged in
|
|
55
|
+
(hover to see the exact status). Click a website to open/focus it in the
|
|
56
|
+
existing managed Chrome profile and sign in again. The × control
|
|
54
57
|
clears the registration. Credentials, cookies, URL query strings, and browser
|
|
55
58
|
Session IDs are never copied into the registry. Site registration does **not**
|
|
56
59
|
keep a WebHelm Session or Tab permanently leased.
|
package/package.json
CHANGED
|
@@ -56,6 +56,8 @@ export function createControlRpc({control, manager, summarizeWorkspaces, schedul
|
|
|
56
56
|
if (!state.connected) throw Error('WebHelm daemon is not responding');
|
|
57
57
|
const session = state.sessions.find(s => s.session_id === args.sessionId);
|
|
58
58
|
if (!session || !validTabId(session.tabId)) throw Error('Session tab is no longer leased');
|
|
59
|
+
if (session.workspace !== 'WebHelm')
|
|
60
|
+
throw Error('Keep Alive can be enabled only from a WebHelm Session');
|
|
59
61
|
const tab = await chromeApi.tabs.get(session.tabId);
|
|
60
62
|
const id = siteOrigin(tab.url || '');
|
|
61
63
|
return setKeptSite(chromeApi,id,Boolean(args.enabled));
|
|
@@ -33,14 +33,13 @@
|
|
|
33
33
|
.session-info strong { display:block; font-size:12px; }
|
|
34
34
|
.session-info span { display:block; color:light-dark(var(--muted),#acb8c9); font-size:11px; }
|
|
35
35
|
.session-row button { width:auto; padding:5px 9px; font-size:11px; }
|
|
36
|
-
#keepalive-list { max-height:160px; overflow-y:auto; border-bottom:1px solid light-dark(var(--border),#334155); padding
|
|
37
|
-
.keepalive-row { display:flex; align-items:center; gap:
|
|
38
|
-
.keepalive-
|
|
39
|
-
.keepalive-
|
|
40
|
-
.keepalive-row .
|
|
41
|
-
.keepalive-
|
|
42
|
-
.keepalive-
|
|
43
|
-
.keepalive-status[data-status="login_required"] { color:#ae3849; }
|
|
36
|
+
#keepalive-list { max-height:160px; overflow-y:auto; border-bottom:1px solid light-dark(var(--border),#334155); padding:3px 0 5px; font-size:11px; color:light-dark(var(--muted),#acb8c9); }
|
|
37
|
+
.keepalive-row { display:flex; align-items:center; gap:7px; min-height:25px; padding:2px 0; }
|
|
38
|
+
.keepalive-status { flex:0 0 7px; width:7px; height:7px; border-radius:50%; background:light-dark(#8893a1,#8995a5); }
|
|
39
|
+
.keepalive-status[data-status="alive"] { background:#23915c; }
|
|
40
|
+
.keepalive-row .keepalive-name { flex:1; min-width:0; color:light-dark(var(--muted),#acb8c9); font-size:11px; font-weight:500; }
|
|
41
|
+
.keepalive-row .keepalive-name.is-logged-in { color:#23915c; }
|
|
42
|
+
.keepalive-row .keepalive-remove { flex:0 0 19px; width:19px; padding:1px; border:0; background:transparent; color:light-dark(var(--muted),#acb8c9); font-size:16px; font-weight:400; line-height:18px; }
|
|
44
43
|
.session-row button.site-enabled { color:#23915c; }
|
|
45
44
|
#queue-list { border-top:1px solid light-dark(var(--border),#334155); padding-top:6px; margin-top:2px; }
|
|
46
45
|
.queue-platform { padding:5px 0; }
|
|
@@ -49,26 +49,32 @@ function renderKeptSites(sites, busy, connected) {
|
|
|
49
49
|
const target = el('keepalive-list');
|
|
50
50
|
target.replaceChildren();
|
|
51
51
|
if (!sites.length) {
|
|
52
|
-
target.textContent='
|
|
52
|
+
target.textContent='Enable Keep Alive from a WebHelm Session.';
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
const labels={alive:'Logged in',login_required:'Login required',unknown:'Login
|
|
56
|
-
error:'
|
|
55
|
+
const labels={alive:'Logged in',login_required:'Login required',unknown:'Login not confirmed',
|
|
56
|
+
error:'Heartbeat failed',unsupported:'No heartbeat action',pending:'Checking login'};
|
|
57
57
|
for (const site of sites) {
|
|
58
58
|
const row=document.createElement('div'); row.className='keepalive-row';
|
|
59
|
-
const
|
|
59
|
+
const loggedIn=site.status==='alive';
|
|
60
|
+
const statusText=labels[site.status] || labels.pending;
|
|
61
|
+
const status=document.createElement('span'); status.className='keepalive-status';
|
|
62
|
+
status.dataset.status=loggedIn?'alive':'inactive';
|
|
63
|
+
status.title=statusText;
|
|
64
|
+
status.setAttribute('aria-hidden','true');
|
|
60
65
|
const name=actionButton(new URL(site.url).hostname,false,async()=>{
|
|
61
66
|
try {await rpc('workspace.control.site.open',{siteId:site.id});}
|
|
62
67
|
catch(error){el('message').textContent=error.message;}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
details.append(name,status);
|
|
68
|
-
row.append(details,actionButton('Remove',false,async()=>{
|
|
68
|
+
},`tab-title keepalive-name ${loggedIn?'is-logged-in':''}`);
|
|
69
|
+
name.title=`${statusText} · Click to open site`;
|
|
70
|
+
name.setAttribute('aria-label',`${new URL(site.url).hostname}: ${statusText}. Open site`);
|
|
71
|
+
const remove=actionButton('×',false,async()=>{
|
|
69
72
|
try {await rpc('workspace.control.site.remove',{siteId:site.id});lastSignature='';refresh();}
|
|
70
73
|
catch(error){el('message').textContent=error.message;}
|
|
71
|
-
})
|
|
74
|
+
},'keepalive-remove');
|
|
75
|
+
remove.title=`Remove ${new URL(site.url).hostname} from Keep Alive`;
|
|
76
|
+
remove.setAttribute('aria-label',remove.title);
|
|
77
|
+
row.append(status,name,remove);
|
|
72
78
|
target.append(row);
|
|
73
79
|
}
|
|
74
80
|
}
|
|
@@ -76,7 +82,7 @@ function renderKeptSites(sites, busy, connected) {
|
|
|
76
82
|
function renderWorkspaces(workspaces, busy, connected) {
|
|
77
83
|
const signature = JSON.stringify(workspaces.map(w => [
|
|
78
84
|
w.name,w.initialized,w.available,w.poolSize,w.idleTabs,w.leasedTabs,w.sessions.map(s => [s.session_id,s.tab_title,s.tabId,s.tab_url]),
|
|
79
|
-
])) + ':' + busy + ':' + connected;
|
|
85
|
+
])) + ':' + JSON.stringify(currentSites.map(site=>site.id)) + ':' + busy + ':' + connected;
|
|
80
86
|
if (signature === lastSignature) return;
|
|
81
87
|
lastSignature = signature;
|
|
82
88
|
const target = el('workspace-list');
|
|
@@ -113,7 +119,7 @@ function renderWorkspaces(workspaces, busy, connected) {
|
|
|
113
119
|
details.append(title);
|
|
114
120
|
const siteId=originForTab(session.tab_url);
|
|
115
121
|
sessionRow.append(details);
|
|
116
|
-
if (siteId) {
|
|
122
|
+
if (workspace.name === 'WebHelm' && siteId) {
|
|
117
123
|
const enabled=currentSites.some(site=>site.id===siteId);
|
|
118
124
|
sessionRow.append(actionButton(enabled?'On':'Keep Alive',busy||!connected,async()=>{
|
|
119
125
|
try {
|