fix: preserve synchronous Today reconciliation
All checks were successful
CI / lint (pull_request) Successful in 3m3s
CI / build-release (pull_request) Successful in 6s
CI / browser-journey (pull_request) Successful in 3m40s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy 2026-08-20 05:48:08 +00:00
parent d86e84253a
commit 6fb547e8ce
2 changed files with 6 additions and 5 deletions

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