Compare commits

..

No commits in common. "ce9301f145060db6ed9ce30270e966d89bd37bb9" and "424ab2bb6d834f8771515ab1e9f0f0cfd92f26da" have entirely different histories.

2 changed files with 1 additions and 24 deletions

View File

@ -62,10 +62,7 @@
function renderCoach() { function renderCoach() {
if (!options.coach) return; if (!options.coach) return;
const visible = options.mediaQuery.matches && state() === 'coaching' && options.isTodayActive(); options.coach.hidden = !(options.mediaQuery.matches && state() === 'coaching' && options.isTodayActive());
options.coach.hidden = !visible;
const host = options.coach.closest?.('[data-mobile-today-hud]');
if (visible && host) host.hidden = false;
} }
function render() { function render() {

View File

@ -190,26 +190,6 @@ process.stdout.write(JSON.stringify({offline, calls, sheetOpen:sheet.open}));
} }
def test_first_task_coaching_reveals_its_mobile_today_host():
result = run_node(
"""
const values = new Map([['stackchain.first-task.v1:timmy', 'coaching']]);
const host = new Element(); host.hidden = true;
const coach = new Element(); coach.hidden = true; coach.closest = () => host;
const controller = createFirstTask({
storage:{getItem:key=>values.get(key)||null,setItem:(key,value)=>values.set(key,value)},
getLogin:()=> 'timmy',hasWork:()=>true,isTodayActive:()=>true,isOnline:()=>true,
mediaQuery:{matches:true},sheet:new Element(),title:new Element(),coach,receipt:new Element(),
findButton:new Element(),createButton:new Element(),setupButton:new Element(),closeButton:new Element(),status:new Element(),
});
controller.refresh();
process.stdout.write(JSON.stringify({coachHidden:coach.hidden,hostHidden:host.hidden}));
"""
)
assert result == {"coachHidden": False, "hostHidden": False}
def test_first_task_exposes_completion_operation_before_showing_local_success(): def test_first_task_exposes_completion_operation_before_showing_local_success():
result = run_node( result = run_node(
""" """