webhelm 1.0.36 → 1.0.38
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/package.json +1 -1
- package/runtime/chatgpt/chatgpt-queue.mjs +3 -3
- package/runtime/chatgpt/lifecycle-common.mjs +14 -0
- package/runtime/chatgpt/submission-script.mjs +6 -11
- package/runtime/extension/manifest.json +1 -1
- package/runtime/extension/popup-data.mjs +27 -3
- package/runtime/extension/popup.html +9 -7
- package/runtime/extension/popup.mjs +81 -75
package/package.json
CHANGED
|
@@ -313,9 +313,9 @@ export class ChatGPTQueue extends DurableQueueCore {
|
|
|
313
313
|
delay: this.intervalMs / 1000,
|
|
314
314
|
receipt: receipt.diagnostic,
|
|
315
315
|
});
|
|
316
|
-
} else if (
|
|
317
|
-
//
|
|
318
|
-
//
|
|
316
|
+
} else if (receipt?.verified_by === "stop-button-visible") {
|
|
317
|
+
// Post-click Stop confirms the reply started; no fixed 60s gap is needed.
|
|
318
|
+
// The next turn is re-probed; RUNNING still blocks overlapping sends.
|
|
319
319
|
this.transition(item.id, owner, "SENDING", "SENT", {
|
|
320
320
|
delay: 0, receipt: receipt.verified_by,
|
|
321
321
|
});
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { waitUntilStable } from "./readiness.mjs";
|
|
2
2
|
export const SEND_ENABLED_JS =
|
|
3
3
|
`(() => { const buttons=[...document.querySelectorAll('button[data-testid="send-button"],button[aria-label="Send prompt"],button[aria-label="Send"],form button[type="submit"]')]; const b=buttons.find(e=>e.getClientRects().length>0); return !!b && !b.disabled && b.getAttribute('aria-disabled') !== 'true'; })()`;
|
|
4
|
+
// Only post-click Stop visibility acknowledges queue submission.
|
|
5
|
+
// The same selector family is used to detect ongoing generation before a send.
|
|
6
|
+
export const STOP_VISIBLE_JS = `(() => {
|
|
7
|
+
const visible = b => !!b?.getClientRects().length && getComputedStyle(b).visibility !== 'hidden';
|
|
8
|
+
return [...document.querySelectorAll('button')].some(b => {
|
|
9
|
+
if (!visible(b)) return false;
|
|
10
|
+
const label=(b.getAttribute('aria-label')||'').trim().toLowerCase();
|
|
11
|
+
const title=(b.getAttribute('title')||'').trim().toLowerCase();
|
|
12
|
+
const testId=(b.getAttribute('data-testid')||'').trim().toLowerCase();
|
|
13
|
+
return ['stop generating','stop answering','stop response','stop'].includes(label) ||
|
|
14
|
+
['stop generating','stop answering'].includes(title) ||
|
|
15
|
+
['stop-button','stop-generating-button'].includes(testId);
|
|
16
|
+
});
|
|
17
|
+
})()`;
|
|
4
18
|
export const CLICK_SEND_JS =
|
|
5
19
|
`(() => { const visible=e=>!!e&&!!e.getClientRects().length; const running=[...document.querySelectorAll('button')].some(b=>{ if(!visible(b))return false; const l=(b.getAttribute('aria-label')||'').trim().toLowerCase(),t=(b.getAttribute('title')||'').trim().toLowerCase(),d=(b.getAttribute('data-testid')||'').trim().toLowerCase(); return ['stop generating','stop answering','stop response','stop'].includes(l)||['stop generating','stop answering'].includes(t)||['stop-button','stop-generating-button'].includes(d); }); if(running)return false; const b=document.querySelector('button[data-testid="send-button"],button[aria-label="Send prompt"],button[aria-label="Send"],form button[type="submit"]'); if(!b||b.disabled||b.getAttribute('aria-disabled')==='true')return false; b.click(); return true; })()`;
|
|
6
20
|
export function targetUrl(
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { PROBE_JS } from "./chatgpt-probe.mjs";
|
|
2
|
-
import { SEND_ENABLED_JS } from "./lifecycle-common.mjs";
|
|
2
|
+
import { SEND_ENABLED_JS, STOP_VISIBLE_JS } from "./lifecycle-common.mjs";
|
|
3
3
|
|
|
4
4
|
/** Source executed inside a caller-owned WebHelm Session, never a separate tab. */
|
|
5
5
|
export function submissionScript(item) {
|
|
6
|
-
const prompt = item.message.slice(0, 120);
|
|
7
6
|
const selectorJS = "(() => { const selector=\'button[aria-label=\"Send\"],button[data-testid=\"send-button\"],button[aria-label=\"Send prompt\"],form button[type=\"submit\"]\'; for(const b of document.querySelectorAll(\'[data-webhelm-queue-send]\'))b.removeAttribute(\'data-webhelm-queue-send\'); for(const b of document.querySelectorAll(selector)){if(!b.getClientRects().length||b.disabled||b.getAttribute(\'aria-disabled\')===\'true\')continue;b.setAttribute(\'data-webhelm-queue-send\',\'1\');return \'[data-webhelm-queue-send=\"1\"]\';} return null; })()";
|
|
8
|
-
const userTurnsJS = "(() => [...document.querySelectorAll('h4[data-conversation-role=\"user\"]')].filter(h=>(h.parentElement?.innerText||'').includes(" +
|
|
9
|
-
JSON.stringify(prompt) + ")).length)()";
|
|
10
7
|
return [
|
|
11
8
|
"return await (async()=>{",
|
|
12
9
|
"const gate=await js("+JSON.stringify(PROBE_JS)+");",
|
|
@@ -21,16 +18,14 @@ export function submissionScript(item) {
|
|
|
21
18
|
" return {diagnostic:'pre_send_gate_not_ready'};",
|
|
22
19
|
"const selector=await js("+JSON.stringify(selectorJS)+");",
|
|
23
20
|
"if(!selector)return {diagnostic:'send_control_not_found'};",
|
|
24
|
-
"const before=(await js("+JSON.stringify(userTurnsJS)+"))||0;",
|
|
25
21
|
"await click(selector);",
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
" if(
|
|
29
|
-
"
|
|
30
|
-
" return {verified_by:'send-button-disabled'};",
|
|
22
|
+
// Stay below the WebHelm 30-second Session exec deadline on a missing Stop.
|
|
23
|
+
"for(let i=0;i<60;i++){",
|
|
24
|
+
" if(await js("+JSON.stringify(STOP_VISIBLE_JS)+"))",
|
|
25
|
+
" return {verified_by:'stop-button-visible'};",
|
|
31
26
|
" await sleep(250);",
|
|
32
27
|
"}",
|
|
33
|
-
"return {diagnostic:'
|
|
28
|
+
"return {diagnostic:'post_submit_stop_not_observed_no_resend'};",
|
|
34
29
|
"})()",
|
|
35
30
|
].join("\n");
|
|
36
31
|
}
|
|
@@ -59,19 +59,43 @@ export function compactQueue(items, {expanded=false,maxHeads=8}={}) {
|
|
|
59
59
|
const threads=new Map();
|
|
60
60
|
for (const [index,item] of all.entries()) {
|
|
61
61
|
const key=threadKey(item);
|
|
62
|
-
if (!threads.has(key)) threads.set(key,{head:item,index,count:0});
|
|
62
|
+
if (!threads.has(key)) threads.set(key,{head:item,index,count:0,items:[]});
|
|
63
63
|
threads.get(key).count++;
|
|
64
|
+
threads.get(key).items.push(item);
|
|
64
65
|
}
|
|
65
66
|
const heads=[...threads.values()].sort((a,b)=>
|
|
66
67
|
(priority[a.head.state]??5)-(priority[b.head.state]??5)||a.index-b.index);
|
|
67
|
-
const visible=expanded ?
|
|
68
|
+
const visible=expanded ? heads.flatMap(x=>x.items) : heads.slice(0,Math.max(1,maxHeads)).map(x=>x.head);
|
|
69
|
+
const headFor=new Map(heads.flatMap(x=>x.items.map(item=>[item.id,x.head])));
|
|
68
70
|
const behind=new Map(heads.map(x=>[x.head.id,x.count-1]));
|
|
69
71
|
const uncertain=all.filter(x=>x.state==='UNCERTAIN').length;
|
|
70
72
|
const blocked=all.filter(x=>x.state==='BLOCKED').length;
|
|
71
|
-
return {visible,total:all.length,threads:threads.size,behind,
|
|
73
|
+
return {visible,total:all.length,threads:threads.size,behind,headFor,
|
|
72
74
|
hidden:all.length-visible.length,uncertain,blocked};
|
|
73
75
|
}
|
|
74
76
|
|
|
77
|
+
// Statuses describe what the user can do, not internal retry counters.
|
|
78
|
+
// A later QUEUED item cannot be sent until earlier items in the same thread resolve.
|
|
79
|
+
export function queueStatusText(item,{head=item,remaining=0}={}) {
|
|
80
|
+
const state=String(item.state||'QUEUED').toUpperCase();
|
|
81
|
+
const following=head.id!==item.id;
|
|
82
|
+
let message;
|
|
83
|
+
if(following && ['UNCERTAIN','BLOCKED'].includes(head.state))
|
|
84
|
+
message=head.state==='UNCERTAIN' ? 'Waiting — previous send unconfirmed' : 'Waiting — previous message blocked';
|
|
85
|
+
else if(following) message='Waiting behind earlier message';
|
|
86
|
+
else message=({
|
|
87
|
+
UNCERTAIN:'Send unconfirmed — open thread to check',
|
|
88
|
+
BLOCKED:'Blocked — needs attention',
|
|
89
|
+
SENDING:'Sending',
|
|
90
|
+
CHECKING:'Checking delivery',
|
|
91
|
+
WAITING:'Waiting to send',
|
|
92
|
+
QUEUED:'Queued to send',
|
|
93
|
+
})[state]||state.toLowerCase();
|
|
94
|
+
if(!following && remaining>0)
|
|
95
|
+
message+=' · '+remaining+' later message'+(remaining===1?'':'s')+' waiting';
|
|
96
|
+
return message;
|
|
97
|
+
}
|
|
98
|
+
|
|
75
99
|
// Keep hidden groups out of the toolbar even if a running older worker has
|
|
76
100
|
// not yet reloaded its control RPC. Do not mutate the persisted configuration.
|
|
77
101
|
export const WORKSPACE_STORAGE_KEY='browserWorkspaceManager.v1';
|
|
@@ -45,15 +45,17 @@
|
|
|
45
45
|
#queue-list { border-top:1px solid light-dark(var(--border),#334155); margin-top:6px; padding-top:4px; max-height:240px; }
|
|
46
46
|
.queue-platform { padding:3px 0; }
|
|
47
47
|
.queue-platform + .queue-platform { border-top:1px solid light-dark(var(--border),#334155); }
|
|
48
|
-
.queue-platform-
|
|
49
|
-
.queue-
|
|
50
|
-
|
|
51
|
-
.queue-
|
|
52
|
-
.queue-
|
|
53
|
-
.queue-info
|
|
48
|
+
.queue-platform-title { display:block; font-size:11px; }
|
|
49
|
+
.queue-thread { padding:3px 0 3px 6px; }
|
|
50
|
+
.queue-thread + .queue-thread { border-top:1px solid light-dark(var(--border),#334155); }
|
|
51
|
+
.queue-thread-id { display:block; font-size:10px; font-family:ui-monospace,monospace; font-weight:500; color:light-dark(var(--muted),#acb8c9); overflow-wrap:anywhere; }
|
|
52
|
+
.queue-row { display:flex; align-items:center; gap:5px; padding:2px 0 2px 9px; }
|
|
53
|
+
.queue-info { min-width:0; flex:1; display:flex; gap:4px; align-items:baseline; overflow:hidden; }
|
|
54
|
+
.queue-meta { flex-shrink:0; white-space:nowrap; color:light-dark(var(--muted),#acb8c9); font-size:9px; }
|
|
55
|
+
.queue-unconfirmed .queue-title { color:light-dark(var(--warning),#f7a4ad); }
|
|
54
56
|
.queue-row button.queue-remove { flex:0 0 20px; width:20px; height:20px; padding:0; border:0; background:transparent; color:light-dark(var(--muted),#acb8c9); font-size:16px; font-weight:400; line-height:18px; }
|
|
55
57
|
button.tab-title, button.queue-title { flex:1; min-width:0; width:100%; padding:0; border:0; border-radius:2px; background:transparent; color:inherit; text-align:left; font-size:12px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
|
|
56
|
-
button.queue-title { font-size:10px; }
|
|
58
|
+
button.queue-title { flex:1; min-width:0; width:auto; font-size:10px; }
|
|
57
59
|
button.tab-title:hover, button.queue-title:hover { text-decoration:underline; }
|
|
58
60
|
button.tab-title:disabled, button.queue-title:disabled { cursor:default; text-decoration:none; }
|
|
59
61
|
.session-info, .queue-info { overflow:hidden; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {readKeptSites, setStoredSite,
|
|
1
|
+
import {readKeptSites, setStoredSite, readMenuWorkspaces} from './popup-data.mjs';
|
|
2
2
|
const el = id => document.getElementById(id);
|
|
3
3
|
el('extension-version').textContent = `v${chrome.runtime.getManifest().version}`;
|
|
4
4
|
let confirming = false;
|
|
@@ -9,12 +9,12 @@ let lastSiteSignature = '';
|
|
|
9
9
|
let currentSites = [];
|
|
10
10
|
let refreshRunning = false;
|
|
11
11
|
let canControlSites = false;
|
|
12
|
-
let queueExpanded = false;
|
|
13
12
|
let currentQueue = [];
|
|
14
13
|
let queueBusy = false;
|
|
15
14
|
let queueConnected = false;
|
|
16
15
|
const queueRows = new Map();
|
|
17
16
|
const queueGroups = new Map();
|
|
17
|
+
const queueThreadGroups = new Map();
|
|
18
18
|
|
|
19
19
|
async function rpc(method, args = {}) {
|
|
20
20
|
const response = await chrome.runtime.sendMessage({method, args});
|
|
@@ -150,93 +150,99 @@ function renderWorkspaces(workspaces, busy, connected) {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
const queueToggle=actionButton('Show all',false,()=>{
|
|
154
|
-
queueExpanded=!queueExpanded;
|
|
155
|
-
lastQueueSignature='';
|
|
156
|
-
renderQueue(currentQueue,queueBusy,queueConnected);
|
|
157
|
-
});
|
|
158
|
-
queueToggle.id='queue-toggle';
|
|
159
|
-
queueToggle.setAttribute('aria-controls','queue-list');
|
|
160
|
-
|
|
161
153
|
function renderQueue(items, busy, connected) {
|
|
162
|
-
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
if (signature===lastQueueSignature) return;
|
|
154
|
+
const nowSeconds=Math.floor(Date.now()/1000);
|
|
155
|
+
const signature=JSON.stringify({
|
|
156
|
+
items:items.map(item=>[item.id,item.platform,item.thread_id,item.title,item.url,item.state,item.attempts,item.created_at]),
|
|
157
|
+
nowSeconds,busy,connected,
|
|
158
|
+
});
|
|
159
|
+
if(signature===lastQueueSignature)return;
|
|
169
160
|
lastQueueSignature=signature;
|
|
170
161
|
const target=el('queue-list');
|
|
171
162
|
target.hidden=!items.length;
|
|
172
|
-
queueToggle.hidden=!(queueExpanded || view.hidden>0);
|
|
173
|
-
queueToggle.textContent=queueExpanded?'Show less':'Show all '+view.total;
|
|
174
|
-
queueToggle.setAttribute('aria-expanded',String(queueExpanded));
|
|
175
163
|
const grouped=new Map();
|
|
176
|
-
for
|
|
164
|
+
for(const item of items) {
|
|
177
165
|
const platform=String(item.platform||'Queue');
|
|
178
|
-
|
|
179
|
-
grouped.
|
|
166
|
+
const threadId=String(item.thread_id||item.id);
|
|
167
|
+
if(!grouped.has(platform))grouped.set(platform,new Map());
|
|
168
|
+
const threads=grouped.get(platform);
|
|
169
|
+
if(!threads.has(threadId))threads.set(threadId,[]);
|
|
170
|
+
threads.get(threadId).push(item);
|
|
180
171
|
}
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
for
|
|
172
|
+
const activePlatforms=new Set(grouped.keys());
|
|
173
|
+
const activeRows=new Set(items.map(item=>(item.platform||'Queue')+':'+item.id));
|
|
174
|
+
for(const [key,row] of queueRows)if(!activeRows.has(key)){row.remove();queueRows.delete(key);}
|
|
175
|
+
for(const [key,group] of queueThreadGroups)
|
|
176
|
+
if(!grouped.has(key.split('\u0000')[0])||!grouped.get(key.split('\u0000')[0]).has(key.split('\u0000')[1])){
|
|
177
|
+
group.remove();queueThreadGroups.delete(key);
|
|
178
|
+
}
|
|
179
|
+
for(const [key,group] of queueGroups)if(!activePlatforms.has(key)){
|
|
184
180
|
group.remove();queueGroups.delete(key);
|
|
185
181
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
if(!items.length) {
|
|
190
|
-
target.replaceChildren();queueGroups.clear();queueRows.clear();
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
for (const [platform,entries] of grouped) {
|
|
182
|
+
if(!items.length){target.replaceChildren();queueGroups.clear();queueThreadGroups.clear();queueRows.clear();return;}
|
|
183
|
+
for(const [platform,threads] of grouped){
|
|
194
184
|
let group=queueGroups.get(platform);
|
|
195
|
-
if(!group)
|
|
185
|
+
if(!group){
|
|
196
186
|
group=document.createElement('section');group.className='queue-platform';
|
|
197
|
-
const header=document.createElement('div');header.className='queue-platform-header';
|
|
198
187
|
const heading=document.createElement('strong');heading.className='queue-platform-title';
|
|
199
|
-
heading.textContent=platform==='Queue'?'Queue'
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
group.append(header,rows);queueGroups.set(platform,group);target.append(group);
|
|
188
|
+
heading.textContent=platform==='Queue'?'Queue':platform+' Queue';
|
|
189
|
+
const list=document.createElement('div');list.className='queue-platform-threads';
|
|
190
|
+
group.append(heading,list);queueGroups.set(platform,group);
|
|
203
191
|
}
|
|
204
|
-
|
|
205
|
-
for
|
|
206
|
-
const
|
|
207
|
-
let
|
|
208
|
-
if(!
|
|
209
|
-
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
192
|
+
const list=group.querySelector('.queue-platform-threads');
|
|
193
|
+
for(const [threadId,entries] of threads){
|
|
194
|
+
const threadKey=platform+'\u0000'+threadId;
|
|
195
|
+
let thread=queueThreadGroups.get(threadKey);
|
|
196
|
+
if(!thread){
|
|
197
|
+
thread=document.createElement('section');thread.className='queue-thread';
|
|
198
|
+
const id=document.createElement('strong');id.className='queue-thread-id';
|
|
199
|
+
id.textContent=threadId;id.title=threadId;
|
|
200
|
+
const rows=document.createElement('div');rows.className='queue-thread-rows';
|
|
201
|
+
thread.append(id,rows);queueThreadGroups.set(threadKey,thread);
|
|
202
|
+
}
|
|
203
|
+
const rows=thread.querySelector('.queue-thread-rows');
|
|
204
|
+
for(const item of entries){
|
|
205
|
+
const key=platform+':'+item.id;
|
|
206
|
+
let row=queueRows.get(key);
|
|
207
|
+
if(!row){
|
|
208
|
+
row=document.createElement('div');row.className='queue-row';
|
|
209
|
+
const info=document.createElement('div');info.className='queue-info';
|
|
210
|
+
const title=actionButton('',false,async()=>{
|
|
211
|
+
try{await rpc('workspace.control.openQueue',{queueId:item.id});el('message').textContent='Queue destination opened.';}
|
|
212
|
+
catch(error){el('message').textContent=error.message;}
|
|
213
|
+
},'queue-title');
|
|
214
|
+
const meta=document.createElement('span');meta.className='queue-meta';
|
|
215
|
+
const remove=actionButton('×',false,async()=>{
|
|
216
|
+
try{
|
|
217
|
+
if(row.dataset.state==='UNCERTAIN' && !confirm('This send is unconfirmed. It may already have reached ChatGPT. Removing it may unblock later messages. Remove?'))return;
|
|
218
|
+
const result=await rpc('workspace.control.queueCancel',{queueId:item.id});
|
|
219
|
+
if(!result.id)throw Error('Missing queue request ID');
|
|
220
|
+
el('message').textContent='Waiting for WebHelm daemon…';
|
|
221
|
+
}catch(error){el('message').textContent=error.message;}
|
|
222
|
+
refresh();
|
|
223
|
+
},'queue-remove');
|
|
224
|
+
info.append(title,meta);row.append(info,remove);queueRows.set(key,row);
|
|
225
|
+
}
|
|
226
|
+
const title=row.querySelector('.queue-title');
|
|
227
|
+
title.textContent=item.title||platform+' message';
|
|
228
|
+
title.title=(item.title||platform+' message')+(item.state==='UNCERTAIN'?' — Send not confirmed; check thread before removing.':'');
|
|
229
|
+
title.disabled=!connected||!item.url;
|
|
230
|
+
row.dataset.state=item.state;
|
|
231
|
+
row.classList.toggle('queue-unconfirmed',item.state==='UNCERTAIN');
|
|
232
|
+
const age=Number(item.created_at);
|
|
233
|
+
const seconds=Number.isFinite(age)&&age>0 ? Math.max(0,nowSeconds-Math.floor(age)) : null;
|
|
234
|
+
const attempts=Math.max(0,Number(item.attempts)||0);
|
|
235
|
+
row.querySelector('.queue-meta').textContent='('+
|
|
236
|
+
(seconds===null?'':seconds+' second'+(seconds===1?'':'s')+', ')+
|
|
237
|
+
attempts+' attempt'+(attempts===1?'':'s')+')';
|
|
238
|
+
const remove=row.querySelector('.queue-remove');
|
|
239
|
+
const cancellable=['QUEUED','WAITING','BLOCKED','UNCERTAIN'].includes(item.state);
|
|
240
|
+
remove.disabled=!cancellable||busy||!connected;
|
|
241
|
+
remove.title=cancellable?'Remove '+title.textContent+' from queue':'Cannot remove a running or completed submission';
|
|
242
|
+
remove.setAttribute('aria-label',remove.title);
|
|
243
|
+
if(row.parentElement!==rows)rows.append(row);
|
|
222
244
|
}
|
|
223
|
-
|
|
224
|
-
title.textContent=item.title||`${platform} message`;
|
|
225
|
-
title.title=item.title||`${platform} message`;
|
|
226
|
-
title.disabled=!connected||!item.url;
|
|
227
|
-
const attempts=Number(item.attempts)||0;
|
|
228
|
-
const more=!queueExpanded ? (view.behind.get(item.id)||0) : 0;
|
|
229
|
-
row.querySelector('.queue-detail').textContent=`${String(item.state||'queued').toLowerCase()} · ${attempts} attempt${attempts===1?'':'s'}`+
|
|
230
|
-
(more ? ` · ${more} more in this thread` : '');
|
|
231
|
-
const remove=row.querySelector('button:last-child');
|
|
232
|
-
const safe=['QUEUED','WAITING','BLOCKED','UNCERTAIN'].includes(item.state);
|
|
233
|
-
remove.disabled=!safe||busy||!connected;
|
|
234
|
-
remove.title=safe?'Remove '+title.textContent+' from queue':'Cannot remove a running or completed submission';
|
|
235
|
-
remove.setAttribute('aria-label',remove.title);
|
|
236
|
-
row.querySelector('.queue-detail').title=['UNCERTAIN','BLOCKED'].includes(item.state)
|
|
237
|
-
? 'Verify the submission before retrying; later turns in the thread may be waiting.' : '';
|
|
238
|
-
const rows=group.querySelector('.queue-platform-rows');
|
|
239
|
-
if(row.parentElement!==rows)rows.append(row);
|
|
245
|
+
if(thread.parentElement!==list)list.append(thread);
|
|
240
246
|
}
|
|
241
247
|
if(group.parentElement!==target)target.append(group);
|
|
242
248
|
}
|