From 87f63370f64d4207e0ce919591e5898eb73ea907 Mon Sep 17 00:00:00 2001 From: timmy Date: Tue, 11 Aug 2026 21:25:27 +0000 Subject: [PATCH] feat: keep mobile Attention actionable alongside Today (Closes #593) --- frontend/dashboard.css | 1 + frontend/dashboard.js | 16 ++++--- frontend/index.html | 3 +- frontend/mobile-task-dock.js | 26 ++++++------ frontend/service-worker.js | 2 +- tests/test_comment_next.py | 2 +- tests/test_frontend_bundle.py | 2 +- tests/test_later_sync.py | 2 +- tests/test_markdown_renderer.py | 2 +- tests/test_mobile_composer_integration.py | 2 +- tests/test_mobile_device_setup.py | 2 +- tests/test_mobile_task_dock.py | 51 +++++++++++++---------- tests/test_plan_today.py | 2 +- tests/test_service_worker.py | 20 ++++----- tests/test_today_readiness.py | 2 +- tests/test_today_sync.py | 2 +- 16 files changed, 76 insertions(+), 61 deletions(-) diff --git a/frontend/dashboard.css b/frontend/dashboard.css index fe1c74f..4f14881 100644 --- a/frontend/dashboard.css +++ b/frontend/dashboard.css @@ -566,6 +566,7 @@ textarea { resize: vertical; min-height: 120px; } .composer-keyboard-active .pull-comment-composer, .composer-keyboard-active .update-reply { scroll-margin-block:12px; padding-bottom:env(safe-area-inset-bottom); } .mobile-task-dock { position:fixed; inset:auto 0 0; z-index:45; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:2px; padding:6px 8px; padding-bottom:env(safe-area-inset-bottom); border-top:1px solid #2a496e; background:rgba(11,21,38,.98); backdrop-filter:blur(12px); } + .mobile-task-dock[data-attention="true"] { grid-template-columns:repeat(6,minmax(0,1fr)); } } .obi { width:14px; height:14px; background: url('data:image/svg+xml;utf8,') center/contain no-repeat; display:inline-block; } .footer { padding: 12px; text-align: center; color:#4e6b8a; font-size:12px; } diff --git a/frontend/dashboard.js b/frontend/dashboard.js index 35072dd..98cf616 100644 --- a/frontend/dashboard.js +++ b/frontend/dashboard.js @@ -45,9 +45,12 @@ ); const mobileTaskOverlays = Array.from(document.querySelectorAll('[role="dialog"], #whiteboard-modal, #markdown-modal')); function openMobileWorkFallback() { - const counts = countMyWork(activeMyWork); - const filter = counts.attention ? 'attention' : 'all'; - qs('[data-work-filter="' + filter + '"]').click(); + qs('[data-work-filter="all"]').click(); + qs('#my-work').scrollIntoView({block:'start'}); + qs('#my-work').focus(); + } + function openMobileAttention() { + qs('[data-work-filter="attention"]').click(); qs('#my-work').scrollIntoView({block:'start'}); qs('#my-work').focus(); } @@ -68,6 +71,7 @@ overlays: mobileTaskOverlays, actions: { work: () => mobileWorkEntry.open(), + attention: openMobileAttention, find: () => qs('#find-work').click(), new: () => qs('#new-issue').click(), search: () => qs('#open-palette').click(), @@ -977,7 +981,8 @@ qs('#resume-today-session').hidden = active || !todayMyWork.length || !workSession.resumable(); qs('#end-today-session').hidden = !active; updateDetailDeferLabels(active); - mobileTaskDock.updateWork(mobileWorkEntry.mode(), countMyWork(activeMyWork).attention); + mobileTaskDock.updateWork(mobileWorkEntry.mode()); + mobileTaskDock.updateAttention(countMyWork(activeMyWork).attention); } const workSession = createWorkSession({ @@ -1920,7 +1925,8 @@ const element = qs('[data-work-count="' + filter + '"]'); if (element) element.textContent = count; }); - mobileTaskDock.updateWork(mobileWorkEntry.mode(), countMyWork(activeMyWork).attention); + mobileTaskDock.updateWork(mobileWorkEntry.mode()); + mobileTaskDock.updateAttention(countMyWork(activeMyWork).attention); const activeQueue = qs('[data-work-filter="' + selectedWorkFilter + '"]'); qs('#active-work-queue').textContent = activeQueue.firstChild.textContent.trim() + ' (' + (counts[selectedWorkFilter] || 0) + ')'; diff --git a/frontend/index.html b/frontend/index.html index 1d8b1e7..59b9ade 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -808,7 +808,8 @@