Launch planned days with a private morning reminder #1167

Merged
rockachopa merged 2 commits from timmy/1166-start-day-reminder into main 2026-08-20 06:01:51 +00:00
2 changed files with 6 additions and 5 deletions
Showing only changes of commit 6fb547e8ce - Show all commits

View File

@ -476,15 +476,15 @@
refreshMyWorkView(); refreshMyWorkView();
warmTodayOffline(); warmTodayOffline();
}, },
onRemotePlan: async plan => { onRemotePlan: plan => {
if (!planningOwnerLogin) return; if (!planningOwnerLogin) return;
latestTodayPlan = plan; latestTodayPlan = plan;
const startDayLaunch = window.location.hash === '#/my-work/start-day'; const startDayLaunch = window.location.hash === '#/my-work/start-day';
await promoteTomorrowIfDue(plan); promoteTomorrowIfDue(plan).finally(() => {
if (startDayLaunch) { if (!startDayLaunch) return;
window.history.replaceState({}, '', '#/my-work/today'); window.history.replaceState({}, '', '#/my-work/today');
openMobileStartDay(); openMobileStartDay();
} });
todayWork.replacePlanning({ todayWork.replacePlanning({
capacity_minutes: plan.capacity_minutes ?? null, capacity_minutes: plan.capacity_minutes ?? null,
estimates: plan.estimates || {}, estimates: plan.estimates || {},

View File

@ -144,5 +144,6 @@ def test_mobile_settings_and_launch_route_wire_start_day_into_existing_promotion
assert "startDayControl:qs('#push-start-day')" in dashboard assert "startDayControl:qs('#push-start-day')" in dashboard
assert "startDayHour:qs('#push-start-day-hour')" in dashboard assert "startDayHour:qs('#push-start-day-hour')" in dashboard
assert "window.location.hash === '#/my-work/start-day'" in dashboard assert "window.location.hash === '#/my-work/start-day'" in dashboard
assert "await promoteTomorrowIfDue(plan)" in dashboard assert "promoteTomorrowIfDue(plan).finally(() =>" in dashboard
assert "onRemotePlan: async plan =>" not in dashboard
assert "openMobileStartDay()" in dashboard assert "openMobileStartDay()" in dashboard