From f8c2541d301cae0caf5c48c09bbaacb77ab0d4fd Mon Sep 17 00:00:00 2001 From: timmy Date: Tue, 18 Aug 2026 11:03:05 +0000 Subject: [PATCH] feat: pause Today during quick capture (Closes #1076) --- frontend/dashboard.css | 2 + frontend/dashboard.js | 13 +- frontend/index.html | 4 + frontend/today-timer.js | 112 +++++++++++++++- .../e2e/test_mobile_today_handoff_release.py | 26 ++++ tests/test_today_capture_flow.py | 30 +++++ tests/test_today_timer_handoff.py | 124 ++++++++++++++++++ 7 files changed, 304 insertions(+), 7 deletions(-) create mode 100644 tests/test_today_capture_flow.py diff --git a/frontend/dashboard.css b/frontend/dashboard.css index 536f7ed..1d31196 100644 --- a/frontend/dashboard.css +++ b/frontend/dashboard.css @@ -841,6 +841,8 @@ textarea { resize: vertical; min-height: 120px; } .create-issue-sheet.open { display:flex; } .create-issue-panel { width:min(560px,100%); height:100dvh; overflow:auto; overflow-x:hidden; display:grid; align-content:start; gap:12px; padding:18px; padding-bottom:calc(18px + env(safe-area-inset-bottom)); background:#0b1526; border-left:1px solid #2a496e; } .create-issue-header { display:flex; align-items:center; justify-content:space-between; gap:10px; } +.today-capture-interruption { display:grid; gap:2px; padding:10px 12px; border:1px solid #3f6f9f; border-radius:10px; background:#10243b; } +.today-capture-interruption[hidden] { display:none; } .create-issue-header button, .create-issue-actions button, .create-issue-capture-actions button { min-height:44px; } .mobile-create-issue-nav { display:none; } .create-issue-form { display:grid; gap:12px; } diff --git a/frontend/dashboard.js b/frontend/dashboard.js index c521ca2..02c4d82 100644 --- a/frontend/dashboard.js +++ b/frontend/dashboard.js @@ -1851,6 +1851,7 @@ const item = todayMyWork.find(entry => todayWork.identity(entry) === identity); return completeTodayItem(item); }, + onCapture:() => openCreateIssueSheet(), }); todaySessionSync = attachTodaySessionHandoff({ fetchJson:fetchReviewJson, storage:localStorage, timer, qs, @@ -4871,6 +4872,8 @@ creatingIssue = false; issueCaptureModal().close({restore:!followUpSourceUpdate}); createIssueLauncher = null; + if (createAndStartRequested) timerView.transferCapture(); + else timerView.finishCapture(); if (followUpSourceUpdate) { const source = followUpSourceUpdate; followUpSourceUpdate = null; @@ -5941,7 +5944,6 @@ event.currentTarget.disabled = false; } }); - qs('#new-issue').addEventListener('click', openCreateIssueSheet); qs('#create-update-follow-up').addEventListener('click', async () => { if (!selectedUpdate || !selectedUpdateDetail || !await ensureIssueCapture()) return; const source = {item: selectedUpdate, detail: selectedUpdateDetail}; @@ -5982,16 +5984,19 @@ await unfiledCaptures.completeResume(rUC); rUC = ''; } + const capture = timerView.finishCapture(); issueCapture.clearDraft(); qs('#create-issue-title').value = ''; qs('#create-issue-body').value = ''; createIssueAttachmentController.clear(); closeCreateIssueSheet(true, false); - qs('[data-work-filter="draft"]').click(); - mobileTaskDock.select('queues'); + if (!capture) { + qs('[data-work-filter="draft"]').click(); + mobileTaskDock.select('queues'); + } refreshMyWorkView(); const savedCard = qs('[data-capture-id="' + CSS.escape(savedCapture.id) + '"]'); - requestAnimationFrame(() => { + if (!capture) requestAnimationFrame(() => { savedCard?.scrollIntoView({block:'nearest'}); savedCard?.focus({preventScroll:true}); }); diff --git a/frontend/index.html b/frontend/index.html index 6e4c17e..c1f4450 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -964,6 +964,10 @@

Capture work

+