From 7aa25f1d8c2a43c1ee2908b3058535e3598514a2 Mon Sep 17 00:00:00 2001 From: timmy Date: Tue, 11 Aug 2026 23:56:39 +0000 Subject: [PATCH] feat: complete Today from mobile HUD (Closes #601) --- frontend/dashboard.css | 8 ++-- frontend/dashboard.js | 4 ++ frontend/index.html | 1 + frontend/today-timer.js | 17 ++++++++- tests/test_mobile_task_dock.py | 68 ++++++++++++++++++++++++++++++++++ 5 files changed, 94 insertions(+), 4 deletions(-) diff --git a/frontend/dashboard.css b/frontend/dashboard.css index 7ba29d5..6b2638d 100644 --- a/frontend/dashboard.css +++ b/frontend/dashboard.css @@ -574,9 +574,11 @@ textarea { resize: vertical; min-height: 120px; } .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)); } - .mobile-today-hud { position:fixed; left:8px; right:8px; bottom:calc(56px + env(safe-area-inset-bottom)); z-index:44; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; max-width:100%; padding:8px; border:1px solid #31577f; border-radius:12px 12px 0 0; background:rgba(16,38,65,.98); box-shadow:0 -8px 24px rgba(0,0,0,.28); } - .mobile-today-summary { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:left; font-weight:700; } - .mobile-today-hud [data-work-session-progress] { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } + .mobile-today-hud { position:fixed; left:8px; right:8px; bottom:calc(56px + env(safe-area-inset-bottom)); z-index:44; display:grid; grid-template-columns:minmax(0,1fr) minmax(112px,auto); grid-template-areas:"summary complete" "progress toggle"; gap:4px 8px; max-width:100%; padding:8px; border:1px solid #31577f; border-radius:12px 12px 0 0; background:rgba(16,38,65,.98); box-shadow:0 -8px 24px rgba(0,0,0,.28); } + .mobile-today-summary { grid-area:summary; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:left; font-weight:700; } + .mobile-today-hud [data-work-session-progress] { grid-area:progress; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } + .mobile-today-hud [data-mobile-today-complete] { grid-area:complete; } + .mobile-today-hud [data-mobile-today-toggle] { grid-area:toggle; } .mobile-today-hud button { min-height:44px; max-width:100%; } .mobile-today-hud [data-work-session-adjust-plan] { grid-column:1 / -1; } } diff --git a/frontend/dashboard.js b/frontend/dashboard.js index 41d6f53..e1aaed6 100644 --- a/frontend/dashboard.js +++ b/frontend/dashboard.js @@ -955,6 +955,10 @@ selectTodayWork(); workSession.reopen(todayMyWork.find(item => todayWork.identity(item) === identity)); }, + onComplete: identity => { + const item = todayMyWork.find(entry => todayWork.identity(entry) === identity); + return completeTodayItem(item); + }, }); renderAttentionInterruption(); qs('#return-to-today').addEventListener('click', () => { diff --git a/frontend/index.html b/frontend/index.html index b9b0ef3..bd5f408 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -813,6 +813,7 @@