fix: foreground mobile delivery attention handoffs (Closes #1018)
CI / lint (pull_request) Successful in 3m1s
CI / build-release (pull_request) Successful in 6s
CI / browser-journey (pull_request) Successful in 2m22s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy committed 2026-08-17 10:42:19 +00:00
1 parent 6913fc8257
commit 3fde7cf3ad
5 files changed
+156 -14

No files matched your search

+8 -8
View File
@@ -3205,14 +3205,14 @@
const button = event.currentTarget;
if (!activeFlushLogin || !deliveryCenter.retryable.length) return;
button.disabled = true;
qs('#my-work-action-status').textContent = 'Retrying safe waiting deliveries…';
qs('#my-work-action-status').textContent = 'Retrying waiting deliveries…';
const [issueResult, authoredResult] = await Promise.all([issueOutbox.flush(activeFlushLogin), authoredOutbox.flush(activeFlushLogin)]);
applyOutboxResult(issueResult);
applyAuthoredOutboxResult(authoredResult);
qs('#my-work-action-status').textContent = 'Waiting deliveries retried. Items needing attention were skipped.';
qs('#my-work-action-status').textContent = 'Waiting deliveries retried; attention stayed queued.';
});
list.querySelectorAll('.draft-resume').forEach(button => {
button.addEventListener('click', async () => {
button.onclick=async()=>{
const item = lastDrafts[Number(button.dataset.draftIndex)];
if (!item) return;
if (item.kind === 'unfiled-issue') {
@@ -3221,7 +3221,7 @@
} catch (error) { qs('#my-work-action-status').textContent = error.message; }
} else if (item.kind === 'new-issue') openCreateIssueSheet();
else if (item.route) workRoute.open(item.route);
});
};
});
list.querySelectorAll('.draft-continue').forEach(button => {
button.addEventListener('click', () => {
@@ -3268,7 +3268,7 @@
});
});
list.querySelectorAll('.draft-review-checklist').forEach(button => {
button.addEventListener('click', async () => {
button.onclick=async()=>{
const item = lastDrafts[Number(button.dataset.draftIndex)];
const queued = authoredOutbox.list().find(candidate => candidate.id === item?.outbox_id);
if (!item?.checklist_conflict || !queued || !activeFlushLogin) return;
@@ -3301,7 +3301,7 @@
} finally {
button.disabled = false;
}
});
};
});
list.querySelectorAll('.draft-authorize').forEach(button => {
button.addEventListener('click', async () => {
@@ -3322,12 +3322,12 @@
});
});
list.querySelectorAll('.draft-copy').forEach(button => {
button.addEventListener('click', async () => {
button.onclick=async()=>{
const item = lastDrafts[Number(button.dataset.draftIndex)];
if (!item?.copy_text) return;
await navigator.clipboard.writeText(item.copy_text);
qs('#my-work-action-status').textContent = 'Queued content copied without sending it.';
});
};
});
list.querySelectorAll('.draft-discard').forEach(button => {
button.addEventListener('click', async () => {
+7 -5
View File
@@ -109,14 +109,15 @@
}
async function attend(item) {
if (typeof document === 'undefined') return false;
const index = options.getIndex ? options.getIndex(item) : -1;
const selector = item.quarantined ? '.draft-copy' :
item.checklist_conflict ? '.draft-review-checklist' : '.draft-resume';
const action = document.querySelector('#my-work-list ' + selector + '[data-draft-index="' + index + '"]');
if (!action) throw new Error('This delivery changed. Reopen recovery to load its current action.');
action.click();
return true;
if (!action) throw new Error('Delivery changed.');
elements.dialog.close();
action.scrollIntoView();
action.focus();
return await action.onclick();
}
function activate() {
@@ -138,7 +139,8 @@
}
const result = render();
if (failure && elements?.status) {
elements.status.textContent = failure + ' Try again when the connection is ready.';
if (active && !elements.dialog.open) elements.dialog.showModal();
elements.status.textContent = failure + ' Try again.';
}
return result;
})().finally(() => { inFlight = null; });