Compare commits

..

No commits in common. "306a20c37f2f312826adf1c869a88e19970d1b03" and "76f89df609f4dd2580447c96189316e25e38ca1b" have entirely different histories.

2 changed files with 10 additions and 26 deletions

View File

@ -5450,18 +5450,6 @@
});
}
}
if (snapshot.context) {
const contextIdentityFresh = !snapshot.context.error && !contextFreshness?.stale &&
!contextFreshness?.degraded && !contextFreshness?.revalidating;
activeFlushLogin = contextIdentityFresh ? String(snapshot.context.user?.login || '').trim() : '';
if (activeFlushLogin) {
confirmedOwnerLogin = activeFlushLogin;
timerView.restore(todaySync.flush());
restoreReleaseReceipt();
updateDeliveryReceiptControls();
interruptionPrompt.restore();
}
}
if (snapshot.context && workChanged) {
setOfflineWorkMode(false);
const retainedPlanningLogin = !snapshot.context.error ?
@ -5475,6 +5463,16 @@
laterSync.migrate(laterWork.read());
laterSync.flush();
}
const contextIdentityFresh = !snapshot.context.error && !contextFreshness?.stale &&
!contextFreshness?.degraded && !contextFreshness?.revalidating;
activeFlushLogin = contextIdentityFresh ? String(snapshot.context.user?.login || '').trim() : '';
if (activeFlushLogin) {
confirmedOwnerLogin = activeFlushLogin;
timerView.restore(todaySync.flush());
restoreReleaseReceipt();
updateDeliveryReceiptControls();
interruptionPrompt.restore();
}
snapshot.context.notifications = lastNotifications;
renderContextSnapshot(snapshot.context);
if (contextFreshness?.stale) markMyWorkStale();

View File

@ -267,20 +267,6 @@ restoring.then(result => {{
assert "timerView.restore(todaySync.flush());" in dashboard
def test_fresh_unchanged_context_restores_the_confirmed_break_owner():
dashboard = (ROOT / "frontend" / "dashboard.js").read_text()
snapshot_handler = dashboard.split("async function renderLiveSnapshot", 1)[1]
identity_restore, changed_render = snapshot_handler.split(
"if (snapshot.context && workChanged)", 1
)
assert "activeFlushLogin = contextIdentityFresh ?" in identity_restore
assert "confirmedOwnerLogin = activeFlushLogin;" in identity_restore
assert "timerView.restore(todaySync.flush());" in identity_restore
assert "activeFlushLogin = contextIdentityFresh ?" not in changed_render.split(
"if (eventsChanged", 1
)[0]
def test_timed_break_is_packaged_as_an_accessible_mobile_flow():
html = (ROOT / "frontend" / "index.html").read_text()
css = (ROOT / "frontend" / "dashboard.css").read_text()