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();
warmTodayOffline();
},
onRemotePlan: async plan => {
onRemotePlan: plan => {
if (!planningOwnerLogin) return;
latestTodayPlan = plan;
const startDayLaunch = window.location.hash === '#/my-work/start-day';
await promoteTomorrowIfDue(plan);
if (startDayLaunch) {
promoteTomorrowIfDue(plan).finally(() => {
if (!startDayLaunch) return;
window.history.replaceState({}, '', '#/my-work/today');
openMobileStartDay();
}
});
todayWork.replacePlanning({
capacity_minutes: plan.capacity_minutes ?? null,
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 "startDayHour:qs('#push-start-day-hour')" 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