feat: make Tomorrow a first-class mobile queue (Closes #1158)
CI / lint (pull_request) Successful in 3m7s
CI / build-release (pull_request) Successful in 7s
CI / browser-journey (pull_request) Successful in 3m53s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy committed 2026-08-20 01:20:27 +00:00
1 parent 1ae49df1b0
commit 0fd6314391
5 files changed
+90 -23

No files matched your search

+36
View File
@@ -138,6 +138,42 @@ console.log(JSON.stringify({scheduled:Number.isFinite(scheduled)&&scheduled>0}))
assert result == {"scheduled": True}
def test_tomorrow_planner_summarizes_empty_and_capacity_aware_plans_for_mobile_queues():
result = run_controller("""
const planner=createTomorrowPlan({fetchJson:async()=>({}),localDate:()=> '2026-08-20',timeZone:()=> 'UTC'});
const empty=planner.summary({ids:[],capacity_minutes:null,estimates:{}});
const planned=planner.summary({
ids:['issue:r:1:','issue:r:2:','issue:r:3:'], capacity_minutes:120,
estimates:{'issue:r:1:':30,'issue:r:2:':45,'issue:r:3:':30}
});
const unestimated=planner.summary({ids:['issue:r:4:'],capacity_minutes:null,estimates:{}});
console.log(JSON.stringify({empty,planned,unestimated}));
""")
assert result == {
"empty": "Nothing planned",
"planned": "3 planned · 105 of 120 min",
"unestimated": "1 planned",
}
def test_mobile_queues_expose_tomorrow_and_keep_duplicate_header_actions_hidden():
index = INDEX.read_text()
css = CSS.read_text()
dashboard = (FRONTEND / "dashboard.js").read_text()
assert 'data-mobile-queue="tomorrow"' in index
assert 'id="mobile-tomorrow-summary"' in index
assert '>Nothing planned<' in index
assert "name === 'tomorrow' ? openTomorrowPlanner" in dashboard
assert "tomorrowPlan.summary()" in dashboard
assert "renderTomorrowQueueSummary(saved)" in dashboard
assert "planTodayTrigger?.dataset.mobileQueue === 'tomorrow'" in dashboard
assert "qs('#mobile-queue-sheet').showModal()" in dashboard
assert ".my-work-actions { display:none; }\n .my-work-actions { display:flex; }" not in css
assert ".my-work-actions { display:none; }" in css
def test_tomorrow_plan_has_a_touch_safe_mobile_entry_and_reuses_the_ordered_planner():
index = INDEX.read_text()
css = CSS.read_text()