From 55e1c3d6dde14b7e1c9dac46294e2e696d65b3e5 Mon Sep 17 00:00:00 2001 From: timmy Date: Thu, 20 Aug 2026 16:28:15 +0000 Subject: [PATCH] feat: plan Week Ahead in one mobile pass (Closes #1186) --- frontend/dashboard.css | 1 + frontend/dashboard.js | 4 +- frontend/index.html | 1 + frontend/week-plan.js | 37 +++++++++++-- tests/e2e/test_mobile_week_ahead_release.py | 16 ++++-- tests/test_week_plan_frontend.py | 57 +++++++++++++++++++++ 6 files changed, 106 insertions(+), 10 deletions(-) diff --git a/frontend/dashboard.css b/frontend/dashboard.css index 761e1d9..3dfb3fc 100644 --- a/frontend/dashboard.css +++ b/frontend/dashboard.css @@ -241,6 +241,7 @@ textarea { resize: vertical; min-height: 120px; } .plan-today-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; } .plan-today-header h2, .plan-today-header p { margin-top:0; } .plan-today-header button { min-width:44px; min-height:44px; } +.week-plan-progress { margin:8px 0 4px; color:#bfdbfe; font-weight:700; } .week-plan-dates { display:flex; gap:8px; margin:8px 0 12px; padding:2px 0 8px; overflow-x:auto; overscroll-behavior-inline:contain; } .week-plan-dates[hidden] { display:none; } .week-plan-dates button { min-height:44px; min-width:86px; flex:0 0 auto; padding:6px 10px; } diff --git a/frontend/dashboard.js b/frontend/dashboard.js index 141e45b..507ce06 100644 --- a/frontend/dashboard.js +++ b/frontend/dashboard.js @@ -3120,8 +3120,8 @@ qs('#plan-today-error').textContent = ''; qs('#plan-today-sheet').hidden = false; document.body.classList.add('task-overlay-open'); - weekWorkflow.renderDates(); renderPlanToday(); + weekWorkflow.renderDates(); if (protectProposal) qs('#plan-today-build-status').textContent = protectProposal.summary + (protectProposal.displaced.length ? '. Displaced work remains unchanged until you save.' : '. Review estimates and capacity before saving.'); qs('#cancel-plan-today').focus(); @@ -7920,7 +7920,7 @@ const result = planToday.commit({ start, confirmOverCapacity: button.dataset.confirmOverCapacity === 'true' }); if (result === 'saved') { button.dataset.confirmOverCapacity = ''; - taskOverlayHistory.leave(); + if (!weekWorkflow.active() || !weekWorkflow.advance()) taskOverlayHistory.leave(); } else if (result === 'confirm-over-capacity') { button.dataset.confirmOverCapacity = 'true'; qs('#plan-today-error').textContent = 'This plan exceeds your available time. Press again to save over capacity.'; diff --git a/frontend/index.html b/frontend/index.html index 85cd60b..6bd717b 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -460,6 +460,7 @@

Plan Today

Choose and order the work you want to finish next.

+