From 9381ff9d840e48c39e3d8534f790f154b2f9469e Mon Sep 17 00:00:00 2001 From: timmy Date: Thu, 27 Aug 2026 01:12:38 +0000 Subject: [PATCH] feat: unify mobile queue start and continue action (Closes #1450) --- frontend/dashboard.css | 1 - frontend/dashboard.js | 17 +++++++++---- frontend/index.html | 3 +-- frontend/mobile-queue-launcher.js | 22 ++++++++++++++--- frontend/mobile-start-day.js | 6 +++-- tests/test_mobile_start_day.py | 41 ++++++++++++++++++++++++++++--- tests/test_mobile_task_dock.py | 39 +++++++++++++++++++++++++++++ 7 files changed, 112 insertions(+), 17 deletions(-) diff --git a/frontend/dashboard.css b/frontend/dashboard.css index a91de02..6d2b9d5 100644 --- a/frontend/dashboard.css +++ b/frontend/dashboard.css @@ -1533,7 +1533,6 @@ textarea { resize: vertical; min-height: 120px; } .mobile-start-day { display:grid; gap:12px; max-width:100%; overflow-wrap:anywhere; margin-top:12px; padding:14px; border:1px solid #31577f; border-radius:14px; background:linear-gradient(135deg,#173b64,#102641); } .mobile-start-day h3, .mobile-start-day p { margin:0; } .mobile-start-day p + p { margin-top:4px; } - .mobile-start-day-action { width:100%; min-height:48px; text-align:center; } .mobile-start-day-finish { min-height:44px; width:100%; background:transparent; } .mobile-queue-list { display:grid; gap:8px; margin-top:12px; } .mobile-queue-list button { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:56px; width:100%; padding:10px 14px; text-align:left; } diff --git a/frontend/dashboard.js b/frontend/dashboard.js index 4aa412b..654b28b 100644 --- a/frontend/dashboard.js +++ b/frontend/dashboard.js @@ -179,6 +179,11 @@ firstAction: name => qs('#my-work-list .my-work-card-main, #my-work-list .draft-resume, #my-work-list .draft-continue, #my-work-list .draft-edit'), announce: announceWork, getCounts: () => queueCounts, + getPreparation: () => { + const briefing = mobileStartDay.briefing(); + return {...briefing, active:mobileStartDay.state().active}; + }, + openPreparation: () => mobileStartDay.startNext(), openFindWork: () => qs('#find-work').click(), rows: Object.fromEntries( Array.from(document.querySelectorAll('[data-mobile-queue]')).map(button => [button.dataset.mobileQueue, button]) @@ -190,7 +195,6 @@ activeSection: qs('#mobile-queue-active-list').parentElement, }); renderMobileQueuePresentation = () => mobileQueueLauncher.renderPresentation(); - renderMobileQueuePresentation(); qs('#mobile-queue-next-action').addEventListener('click', () => mobileQueueLauncher.continueWork()); function openMobileStartDay() { followingQueue.load().catch(() => {}); @@ -199,7 +203,7 @@ qs('#mobile-queue-heading').textContent = state.active ? 'Resume Prepare Today' : 'Prepare Today'; const sheet = qs('#mobile-queue-sheet'); if (!sheet.open) qs('#mobile-queue-sheet').showModal(); - qs('#mobile-start-day-action').focus(); + qs('#mobile-queue-next-action').focus(); } const mobileFirstTask = createMobileFirstTask({ getLogin: () => confirmedOwnerLogin, @@ -238,17 +242,20 @@ qs('#mobile-queue-heading').textContent = 'Prepare Today · ' + current.label; const sheet = qs('#mobile-queue-sheet'); if (!sheet.open) sheet.showModal(); - qs('#mobile-start-day-action').focus(); + qs('#mobile-queue-next-action').focus(); }, elements: { summary: qs('#mobile-start-day-summary'), phases: qs('#mobile-start-day-phases'), - action: qs('#mobile-start-day-action'), finish: qs('#finish-mobile-start-day'), }, }); mobileStartDay.start(); - qs('#finish-mobile-start-day').addEventListener('click', () => mobileStartDay.finish()); + renderMobileQueuePresentation(); + qs('#finish-mobile-start-day').addEventListener('click', () => { + mobileStartDay.finish(); + renderMobileQueuePresentation(); + }); function showMobileQueueCompletion(completedName, cleared = true, phase = '') { if (cleared && phase && mobileStartDay.completePhase(phase)) return; mobileStartDay.render(); diff --git a/frontend/index.html b/frontend/index.html index 9fabd15..e490046 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -2177,11 +2177,10 @@

Reviewing urgent queues…

Checking Agenda, Attention, Updates, Filed, and Following

-
-

Next up

+

Start / Continue