From 58cee5ea16732ff6bc5801560986d81a5370ef24 Mon Sep 17 00:00:00 2001 From: timmy Date: Tue, 18 Aug 2026 13:43:05 +0000 Subject: [PATCH] feat: pause Today during mobile work detours (Closes #1080) --- frontend/dashboard.css | 2 + frontend/dashboard.js | 2 +- frontend/index.html | 12 +++ frontend/mobile-task-dock.js | 11 ++- frontend/today-timer.js | 87 +++++++++++++++- .../e2e/test_mobile_today_handoff_release.py | 77 +++++++++++++++ tests/test_mobile_task_dock.py | 56 ++++++++++- tests/test_today_timer_handoff.py | 98 +++++++++++++++++++ 8 files changed, 338 insertions(+), 7 deletions(-) diff --git a/frontend/dashboard.css b/frontend/dashboard.css index de37916..85c08c0 100644 --- a/frontend/dashboard.css +++ b/frontend/dashboard.css @@ -1005,6 +1005,8 @@ textarea { resize: vertical; min-height: 120px; } .mobile-task-deadline { padding:1px 5px; border-radius:999px; color:#fef3c7; background:#92400e; font-size:10px; line-height:14px; } .attention-interruption:not([hidden]) { max-width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 12px; padding:10px 12px; border:1px solid #31577f; border-radius:10px; background:#102641; } .attention-interruption button { min-height:44px; flex:0 0 auto; } +.today-detour-interruption:not([hidden]) { max-width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0 12px; padding:10px 12px; border:1px solid #31577f; border-radius:10px; background:#102641; } +.today-detour-interruption button { min-height:44px; flex:0 0 auto; } @media (max-width: 600px) { body { padding-bottom:calc(66px + env(safe-area-inset-bottom)); } body.mobile-today-active { padding-bottom:calc(var(--mobile-today-clearance, 166px) + env(safe-area-inset-bottom)); } diff --git a/frontend/dashboard.js b/frontend/dashboard.js index c8c4f0a..ecd9dd8 100644 --- a/frontend/dashboard.js +++ b/frontend/dashboard.js @@ -220,13 +220,13 @@ deadlineBadge: qs('#mobile-deadline-count'), onSelectQueue:name => name === 'recaps' ? qs('#open-today-recaps').click() : name === 'find' ? qs('#find-work').click() : mobileQueueLauncher.open(name), + detour:() => timerView, overlays: mobileTaskOverlays, actions: { work: () => mobileWorkEntry.open(), find: () => qs('#find-work').click(), new: () => qs('#new-issue').click(), search: () => qs('#open-palette').click(), - queues: () => {}, }, observe(callback, overlays) { const observer = new MutationObserver(callback); diff --git a/frontend/index.html b/frontend/index.html index 5445cf2..26e08f1 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -207,6 +207,10 @@ Today paused while handling Attention +