Merge pull request 'Continue Prepare Today after Attention clears' (#902) from timmy/901-continue-prepare-today-attention into main
This commit is contained in:
commit
06184f1cb2
|
|
@ -2634,11 +2634,11 @@
|
||||||
});
|
});
|
||||||
activeMyWork = partitioned.active;
|
activeMyWork = partitioned.active;
|
||||||
laterMyWork = partitioned.later;
|
laterMyWork = partitioned.later;
|
||||||
const authoritativeTodayReconciliation = liveMode && hasContextSnapshot &&
|
const authoritativeMyWorkRefresh = liveMode && hasContextSnapshot &&
|
||||||
!lastContextSnapshot?.error &&
|
!lastContextSnapshot?.error &&
|
||||||
!Object.values(workPagination).some(page => page?.has_more);
|
!Object.values(workPagination).some(page => page?.has_more);
|
||||||
todayMyWork = todayWork.reconcile(actionableMyWork, {
|
todayMyWork = todayWork.reconcile(actionableMyWork, {
|
||||||
pruneMissing: authoritativeTodayReconciliation,
|
pruneMissing: authoritativeMyWorkRefresh,
|
||||||
onPrune: retiredIds => {
|
onPrune: retiredIds => {
|
||||||
const queued = retiredIds.map(id => todaySync.enqueue('remove', id)).every(Boolean);
|
const queued = retiredIds.map(id => todaySync.enqueue('remove', id)).every(Boolean);
|
||||||
if (queued) todaySync.flush();
|
if (queued) todaySync.flush();
|
||||||
|
|
@ -2666,6 +2666,7 @@
|
||||||
if (element) element.textContent = count;
|
if (element) element.textContent = count;
|
||||||
});
|
});
|
||||||
mobileQueueCounts = counts;
|
mobileQueueCounts = counts;
|
||||||
|
mobileStartDay.reconcile({authoritative:authoritativeMyWorkRefresh});
|
||||||
mobileStartDay.render();
|
mobileStartDay.render();
|
||||||
mobileTaskDock.updateQueues(counts);
|
mobileTaskDock.updateQueues(counts);
|
||||||
mobileTaskDock.updateWork(mobileWorkEntry.mode());
|
mobileTaskDock.updateWork(mobileWorkEntry.mode());
|
||||||
|
|
|
||||||
|
|
@ -44,12 +44,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveCheckpoint() {
|
function saveCheckpoint(phase = null) {
|
||||||
if (!storage) return false;
|
if (!storage) return false;
|
||||||
const current = identity();
|
const current = identity();
|
||||||
if (!current.login || !current.day) return false;
|
if (!current.login || !current.day) return false;
|
||||||
try {
|
try {
|
||||||
storage.setItem(checkpointKey, JSON.stringify(current));
|
storage.setItem(checkpointKey, JSON.stringify({...current, phase}));
|
||||||
return true;
|
return true;
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
|
|
||||||
function startNext() {
|
function startNext() {
|
||||||
const next = briefing().next;
|
const next = briefing().next;
|
||||||
if (reviewOrder.some(([name]) => name === next)) saveCheckpoint();
|
if (reviewOrder.some(([name]) => name === next)) saveCheckpoint(next);
|
||||||
else clearCheckpoint();
|
else clearCheckpoint();
|
||||||
options.openQueue(next);
|
options.openQueue(next);
|
||||||
return next;
|
return next;
|
||||||
|
|
@ -98,13 +98,23 @@
|
||||||
return {active:Boolean(checkpoint()), next:current.next, label:current.label};
|
return {active:Boolean(checkpoint()), next:current.next, label:current.label};
|
||||||
}
|
}
|
||||||
|
|
||||||
function completePhase() {
|
function completePhase(phase) {
|
||||||
if (!checkpoint()) return false;
|
const saved = checkpoint();
|
||||||
|
if (!saved || (saved.phase && saved.phase !== phase)) return false;
|
||||||
const current = render();
|
const current = render();
|
||||||
|
saveCheckpoint();
|
||||||
if (options.onHandoff) options.onHandoff(current);
|
if (options.onHandoff) options.onHandoff(current);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function reconcile({authoritative = false} = {}) {
|
||||||
|
const saved = checkpoint();
|
||||||
|
if (!authoritative || !saved?.phase) return false;
|
||||||
|
const counts = options.getCounts ? options.getCounts() : {};
|
||||||
|
if (count(counts[saved.phase]) > 0) return false;
|
||||||
|
return completePhase(saved.phase);
|
||||||
|
}
|
||||||
|
|
||||||
function finish() {
|
function finish() {
|
||||||
const cleared = clearCheckpoint();
|
const cleared = clearCheckpoint();
|
||||||
render();
|
render();
|
||||||
|
|
@ -128,5 +138,5 @@
|
||||||
if (options.elements) options.elements.action.addEventListener('click', startNext);
|
if (options.elements) options.elements.action.addEventListener('click', startNext);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {briefing, completePhase, finish, render, start, startNext, state};
|
return {briefing, completePhase, finish, reconcile, render, start, startNext, state};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
const BASE = new URL('./', self.location.href).pathname;
|
const BASE = new URL('./', self.location.href).pathname;
|
||||||
importScripts(BASE + 'static/private-data-registry.js');
|
importScripts(BASE + 'static/private-data-registry.js');
|
||||||
importScripts(BASE + 'static/background-issue-sync.js');
|
importScripts(BASE + 'static/background-issue-sync.js');
|
||||||
const CACHE = 'stackchain-dashboard-shell-v104';
|
const CACHE = 'stackchain-dashboard-shell-v105';
|
||||||
const OFFLINE_LEASE_URL = new URL(BASE + '__offline-session-lease', self.location.origin).href;
|
const OFFLINE_LEASE_URL = new URL(BASE + '__offline-session-lease', self.location.origin).href;
|
||||||
const OUTAGE_STATUSES = new Set([500, 502, 503, 504]);
|
const OUTAGE_STATUSES = new Set([500, 502, 503, 504]);
|
||||||
const NAVIGATION_TIMEOUT_MS = self.__STACKCHAIN_NAVIGATION_TIMEOUT_MS || 4000;
|
const NAVIGATION_TIMEOUT_MS = self.__STACKCHAIN_NAVIGATION_TIMEOUT_MS || 4000;
|
||||||
|
|
|
||||||
|
|
@ -303,4 +303,4 @@ async def test_unread_update_offers_reply_mark_read_and_next_independent_of_toda
|
||||||
assert '.update-reply-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr));' in html
|
assert '.update-reply-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr));' in html
|
||||||
assert '.update-reply-actions button { min-height:44px;' in html
|
assert '.update-reply-actions button { min-height:44px;' in html
|
||||||
worker = (Path(__file__).parents[1] / "frontend" / "service-worker.js").read_text()
|
worker = (Path(__file__).parents[1] / "frontend" / "service-worker.js").read_text()
|
||||||
assert "stackchain-dashboard-shell-v104" in worker
|
assert "stackchain-dashboard-shell-v105" in worker
|
||||||
|
|
|
||||||
|
|
@ -347,5 +347,5 @@ async def test_dashboard_syncs_every_later_change_and_exposes_account_status():
|
||||||
def test_later_sync_ships_atomically_in_the_offline_shell():
|
def test_later_sync_ships_atomically_in_the_offline_shell():
|
||||||
source = (Path(__file__).parents[1] / "frontend" / "service-worker.js").read_text()
|
source = (Path(__file__).parents[1] / "frontend" / "service-worker.js").read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/later-sync.js'" in source
|
assert "BASE + 'static/later-sync.js'" in source
|
||||||
|
|
|
||||||
|
|
@ -137,4 +137,4 @@ def test_markdown_work_bodies_are_mobile_safe_block_containers():
|
||||||
assert ".markdown-content { min-width:0; max-width:100%; overflow-wrap:anywhere;" in css
|
assert ".markdown-content { min-width:0; max-width:100%; overflow-wrap:anywhere;" in css
|
||||||
assert ".markdown-content pre { max-width:100%; overflow-x:auto;" in css
|
assert ".markdown-content pre { max-width:100%; overflow-x:auto;" in css
|
||||||
assert ".markdown-content a { min-height:44px;" in css
|
assert ".markdown-content a { min-height:44px;" in css
|
||||||
assert "stackchain-dashboard-shell-v104" in worker
|
assert "stackchain-dashboard-shell-v105" in worker
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ def test_offline_shell_contains_every_local_dashboard_runtime_asset():
|
||||||
shell_assets = set(re.findall(r"BASE \+ '([^']+)'", worker.split("async function sessionCsrf", 1)[0]))
|
shell_assets = set(re.findall(r"BASE \+ '([^']+)'", worker.split("async function sessionCsrf", 1)[0]))
|
||||||
|
|
||||||
assert local_assets <= shell_assets, f"Offline shell is missing: {sorted(local_assets - shell_assets)}"
|
assert local_assets <= shell_assets, f"Offline shell is missing: {sorted(local_assets - shell_assets)}"
|
||||||
assert "stackchain-dashboard-shell-v104" in worker
|
assert "stackchain-dashboard-shell-v105" in worker
|
||||||
|
|
||||||
|
|
||||||
def test_all_conversation_composers_offer_accessible_mobile_mentions():
|
def test_all_conversation_composers_offer_accessible_mobile_mentions():
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ def test_mobile_dashboard_mounts_phone_safe_device_setup_flow():
|
||||||
assert "promptStorage:localStorage" in dashboard
|
assert "promptStorage:localStorage" in dashboard
|
||||||
assert "pushControllerReady.then(ensureDeviceSetup)" in dashboard
|
assert "pushControllerReady.then(ensureDeviceSetup)" in dashboard
|
||||||
assert "BASE + 'static/mobile-device-setup.js'" in worker
|
assert "BASE + 'static/mobile-device-setup.js'" in worker
|
||||||
assert "stackchain-dashboard-shell-v104" in worker
|
assert "stackchain-dashboard-shell-v105" in worker
|
||||||
assert ".device-setup-panel" in css
|
assert ".device-setup-panel" in css
|
||||||
assert ".device-readiness-card" in css
|
assert ".device-readiness-card" in css
|
||||||
assert "overflow-x:hidden" in css
|
assert "overflow-x:hidden" in css
|
||||||
|
|
|
||||||
|
|
@ -179,6 +179,57 @@ process.stdout.write(JSON.stringify({{started, handed, resumed, isolated, expire
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def test_prepare_today_attention_hands_off_once_only_after_authoritative_refresh():
|
||||||
|
script = f"""
|
||||||
|
const createStartDay = require({json.dumps(str(START_DAY))});
|
||||||
|
const saved = new Map();
|
||||||
|
const storage = {{
|
||||||
|
getItem: key => saved.has(key) ? saved.get(key) : null,
|
||||||
|
setItem: (key, value) => saved.set(key, value),
|
||||||
|
removeItem: key => saved.delete(key),
|
||||||
|
}};
|
||||||
|
let counts = {{agenda:0, attention:1, update:2, filed:0, today:3}};
|
||||||
|
const opened = [];
|
||||||
|
const handoffs = [];
|
||||||
|
const controller = createStartDay({{
|
||||||
|
storage,
|
||||||
|
getLogin: () => 'timmy',
|
||||||
|
getDay: () => '2026-08-15',
|
||||||
|
getCounts: () => counts,
|
||||||
|
openQueue: name => opened.push(name),
|
||||||
|
onHandoff: current => handoffs.push({{next:current.next, label:current.label}}),
|
||||||
|
}});
|
||||||
|
const launchedAttention = controller.startNext();
|
||||||
|
counts = {{agenda:0, attention:0, update:2, filed:0, today:3}};
|
||||||
|
const ignoredPartial = controller.reconcile({{authoritative:false}});
|
||||||
|
const handedToUpdates = controller.reconcile({{authoritative:true}});
|
||||||
|
const duplicateRefresh = controller.reconcile({{authoritative:true}});
|
||||||
|
const launchedUpdates = controller.startNext();
|
||||||
|
counts = {{agenda:0, attention:0, update:0, filed:0, today:3}};
|
||||||
|
const handedToToday = controller.reconcile({{authoritative:true}});
|
||||||
|
const duplicateReadyRefresh = controller.reconcile({{authoritative:true}});
|
||||||
|
process.stdout.write(JSON.stringify({{
|
||||||
|
launchedAttention, ignoredPartial, handedToUpdates, duplicateRefresh,
|
||||||
|
launchedUpdates, handedToToday, duplicateReadyRefresh, opened, handoffs,
|
||||||
|
}}));
|
||||||
|
"""
|
||||||
|
|
||||||
|
assert run_node(script) == {
|
||||||
|
"launchedAttention": "attention",
|
||||||
|
"ignoredPartial": False,
|
||||||
|
"handedToUpdates": True,
|
||||||
|
"duplicateRefresh": False,
|
||||||
|
"launchedUpdates": "update",
|
||||||
|
"handedToToday": True,
|
||||||
|
"duplicateReadyRefresh": False,
|
||||||
|
"opened": ["attention", "update"],
|
||||||
|
"handoffs": [
|
||||||
|
{"next": "update", "label": "Review Updates"},
|
||||||
|
{"next": "today", "label": "Continue Today"},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def test_prepare_today_checkpoint_uses_the_device_local_day():
|
def test_prepare_today_checkpoint_uses_the_device_local_day():
|
||||||
script = f"""
|
script = f"""
|
||||||
process.env.TZ = 'Pacific/Honolulu';
|
process.env.TZ = 'Pacific/Honolulu';
|
||||||
|
|
@ -202,7 +253,7 @@ createStartDay({{
|
||||||
process.stdout.write(JSON.stringify(JSON.parse(saved.get('stackchain.mobile-start-day.v1'))));
|
process.stdout.write(JSON.stringify(JSON.parse(saved.get('stackchain.mobile-start-day.v1'))));
|
||||||
"""
|
"""
|
||||||
|
|
||||||
assert run_node(script) == {"login": "timmy", "day": "2026-08-15"}
|
assert run_node(script) == {"login": "timmy", "day": "2026-08-15", "phase": "agenda"}
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.anyio
|
@pytest.mark.anyio
|
||||||
|
|
@ -222,6 +273,7 @@ async def test_dashboard_wires_thumb_safe_start_day_briefing_into_offline_mobile
|
||||||
assert "mobileStartDay.completePhase('agenda')" in html
|
assert "mobileStartDay.completePhase('agenda')" in html
|
||||||
assert "mobileStartDay.completePhase('update')" in html
|
assert "mobileStartDay.completePhase('update')" in html
|
||||||
assert "mobileStartDay.completePhase('filed')" in html
|
assert "mobileStartDay.completePhase('filed')" in html
|
||||||
|
assert "mobileStartDay.reconcile({authoritative:authoritativeMyWorkRefresh})" in html
|
||||||
assert "mobileStartDay.finish()" in html
|
assert "mobileStartDay.finish()" in html
|
||||||
assert "openQueue: name =>" in html
|
assert "openQueue: name =>" in html
|
||||||
assert "if (sheet.open) sheet.close();" in html
|
assert "if (sheet.open) sheet.close();" in html
|
||||||
|
|
@ -231,4 +283,4 @@ async def test_dashboard_wires_thumb_safe_start_day_briefing_into_offline_mobile
|
||||||
assert ".mobile-start-day-finish { min-height:44px;" in html
|
assert ".mobile-start-day-finish { min-height:44px;" in html
|
||||||
assert "max-width:100%; overflow-wrap:anywhere;" in html
|
assert "max-width:100%; overflow-wrap:anywhere;" in html
|
||||||
assert "BASE + 'static/mobile-start-day.js'" in service_worker
|
assert "BASE + 'static/mobile-start-day.js'" in service_worker
|
||||||
assert "stackchain-dashboard-shell-v104" in service_worker
|
assert "stackchain-dashboard-shell-v105" in service_worker
|
||||||
|
|
|
||||||
|
|
@ -410,7 +410,7 @@ async def test_plan_today_wires_cancel_back_and_success_through_overlay_history(
|
||||||
def test_plan_today_controller_is_available_in_the_offline_shell():
|
def test_plan_today_controller_is_available_in_the_offline_shell():
|
||||||
source = SERVICE_WORKER.read_text()
|
source = SERVICE_WORKER.read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/plan-today.js'" in source
|
assert "BASE + 'static/plan-today.js'" in source
|
||||||
assert "BASE + 'static/plan-today-readiness.js'" in source
|
assert "BASE + 'static/plan-today-readiness.js'" in source
|
||||||
assert "BASE + 'static/plan-today-preview.js'" in source
|
assert "BASE + 'static/plan-today-preview.js'" in source
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ async function dispatchPush(payload) {{
|
||||||
def test_resumable_today_session_ships_in_a_new_offline_shell():
|
def test_resumable_today_session_ships_in_a_new_offline_shell():
|
||||||
source = WORKER.read_text()
|
source = WORKER.read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/my-work.js'" in source
|
assert "BASE + 'static/my-work.js'" in source
|
||||||
assert "BASE + 'static/dashboard.js'" in source
|
assert "BASE + 'static/dashboard.js'" in source
|
||||||
assert "BASE + 'static/dashboard.css'" in source
|
assert "BASE + 'static/dashboard.css'" in source
|
||||||
|
|
@ -161,14 +161,14 @@ def test_resumable_today_session_ships_in_a_new_offline_shell():
|
||||||
def test_ownership_exit_runtime_rolls_the_offline_shell_cache():
|
def test_ownership_exit_runtime_rolls_the_offline_shell_cache():
|
||||||
source = WORKER.read_text()
|
source = WORKER.read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/dashboard.js'" in source
|
assert "BASE + 'static/dashboard.js'" in source
|
||||||
|
|
||||||
|
|
||||||
def test_offline_review_next_ships_today_completion_atomically():
|
def test_offline_review_next_ships_today_completion_atomically():
|
||||||
source = WORKER.read_text()
|
source = WORKER.read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/today-completion.js'" in source
|
assert "BASE + 'static/today-completion.js'" in source
|
||||||
assert "BASE + 'static/dashboard.js'" in source
|
assert "BASE + 'static/dashboard.js'" in source
|
||||||
|
|
||||||
|
|
@ -176,7 +176,7 @@ def test_offline_review_next_ships_today_completion_atomically():
|
||||||
def test_duplicate_aware_capture_ships_in_a_new_offline_shell():
|
def test_duplicate_aware_capture_ships_in_a_new_offline_shell():
|
||||||
source = WORKER.read_text()
|
source = WORKER.read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/create-issue-sheet.js'" in source
|
assert "BASE + 'static/create-issue-sheet.js'" in source
|
||||||
assert "BASE + 'static/dashboard.js'" in source
|
assert "BASE + 'static/dashboard.js'" in source
|
||||||
|
|
||||||
|
|
@ -184,14 +184,14 @@ def test_duplicate_aware_capture_ships_in_a_new_offline_shell():
|
||||||
def test_exact_later_picker_ships_atomically_in_a_new_offline_shell():
|
def test_exact_later_picker_ships_atomically_in_a_new_offline_shell():
|
||||||
source = WORKER.read_text()
|
source = WORKER.read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/later-picker.js'" in source
|
assert "BASE + 'static/later-picker.js'" in source
|
||||||
|
|
||||||
|
|
||||||
def test_navigation_deadline_ships_in_a_new_shell_cache():
|
def test_navigation_deadline_ships_in_a_new_shell_cache():
|
||||||
source = WORKER.read_text()
|
source = WORKER.read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/dashboard.css'" in source
|
assert "BASE + 'static/dashboard.css'" in source
|
||||||
assert "BASE + 'static/dashboard.js'" in source
|
assert "BASE + 'static/dashboard.js'" in source
|
||||||
assert "BASE + 'static/install-app.js'" in source
|
assert "BASE + 'static/install-app.js'" in source
|
||||||
|
|
@ -200,21 +200,21 @@ def test_navigation_deadline_ships_in_a_new_shell_cache():
|
||||||
def test_today_convergence_ships_in_a_new_shell_cache():
|
def test_today_convergence_ships_in_a_new_shell_cache():
|
||||||
source = WORKER.read_text()
|
source = WORKER.read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/today-sync.js'" in source
|
assert "BASE + 'static/today-sync.js'" in source
|
||||||
|
|
||||||
|
|
||||||
def test_mobile_search_viewport_ships_in_a_new_offline_shell():
|
def test_mobile_search_viewport_ships_in_a_new_offline_shell():
|
||||||
source = WORKER.read_text()
|
source = WORKER.read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/mobile-search-viewport.js'" in source
|
assert "BASE + 'static/mobile-search-viewport.js'" in source
|
||||||
|
|
||||||
|
|
||||||
def test_update_ownership_flow_ships_atomically_in_a_new_offline_shell():
|
def test_update_ownership_flow_ships_atomically_in_a_new_offline_shell():
|
||||||
source = WORKER.read_text()
|
source = WORKER.read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/update-ownership.js'" in source
|
assert "BASE + 'static/update-ownership.js'" in source
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -800,7 +800,7 @@ def test_one_session_bound_csrf_proof_is_reused_for_a_background_drain():
|
||||||
def test_queue_today_ships_atomically_in_a_new_offline_shell():
|
def test_queue_today_ships_atomically_in_a_new_offline_shell():
|
||||||
source = WORKER.read_text()
|
source = WORKER.read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/queue-today.js'" in source
|
assert "BASE + 'static/queue-today.js'" in source
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ async def test_today_blocker_opens_existing_preview_and_preserves_readiness_gate
|
||||||
def test_readiness_runtime_is_available_in_offline_shell():
|
def test_readiness_runtime_is_available_in_offline_shell():
|
||||||
service_worker = SERVICE_WORKER.read_text()
|
service_worker = SERVICE_WORKER.read_text()
|
||||||
|
|
||||||
assert "const CACHE = 'stackchain-dashboard-shell-v104';" in service_worker
|
assert "const CACHE = 'stackchain-dashboard-shell-v105';" in service_worker
|
||||||
assert "BASE + 'static/today-readiness.js'" in service_worker
|
assert "BASE + 'static/today-readiness.js'" in service_worker
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ sync.enqueueConfiguration(120, {{'issue:r:1:':60}});
|
||||||
def test_inflight_today_drain_ships_in_a_new_offline_shell():
|
def test_inflight_today_drain_ships_in_a_new_offline_shell():
|
||||||
source = (Path(__file__).parents[1] / "frontend" / "service-worker.js").read_text()
|
source = (Path(__file__).parents[1] / "frontend" / "service-worker.js").read_text()
|
||||||
|
|
||||||
assert "stackchain-dashboard-shell-v104" in source
|
assert "stackchain-dashboard-shell-v105" in source
|
||||||
assert "BASE + 'static/today-sync.js'" in source
|
assert "BASE + 'static/today-sync.js'" in source
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -356,7 +356,7 @@ async def test_dashboard_runs_the_curated_today_queue_as_a_mobile_work_flow():
|
||||||
assert "todaySync.enqueue('add'" in html
|
assert "todaySync.enqueue('add'" in html
|
||||||
assert "todaySync.enqueue('remove'" in html
|
assert "todaySync.enqueue('remove'" in html
|
||||||
assert "todaySync.enqueue('move'" in html
|
assert "todaySync.enqueue('move'" in html
|
||||||
assert "const authoritativeTodayReconciliation = liveMode && hasContextSnapshot &&" in html
|
assert "const authoritativeMyWorkRefresh = liveMode && hasContextSnapshot &&" in html
|
||||||
assert "!lastContextSnapshot?.error &&" in html
|
assert "!lastContextSnapshot?.error &&" in html
|
||||||
assert "onPrune: retiredIds =>" in html
|
assert "onPrune: retiredIds =>" in html
|
||||||
assert "retiredIds.map(id => todaySync.enqueue('remove', id)).every(Boolean)" in html
|
assert "retiredIds.map(id => todaySync.enqueue('remove', id)).every(Boolean)" in html
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user