feat: continue mobile Work into Filed follow-up (Closes #1008)
All checks were successful
CI / lint (pull_request) Successful in 2m43s
CI / build-release (pull_request) Successful in 6s
CI / browser-journey (pull_request) Successful in 1m56s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy 2026-08-17 07:28:00 +00:00
parent 021af60cf3
commit d64c646b68
3 changed files with 32 additions and 3 deletions

View File

@ -13,6 +13,7 @@
['today', 'Continue Today'], ['today', 'Continue Today'],
['update', 'Resume Updates'], ['update', 'Resume Updates'],
['agenda', 'Open Agenda'], ['agenda', 'Open Agenda'],
['filed', 'Review Filed'],
['later', 'Start Later'], ['later', 'Start Later'],
['draft', 'Open Drafts'], ['draft', 'Open Drafts'],
]; ];

View File

@ -66,9 +66,9 @@
function updateWork(mode) { function updateWork(mode) {
const text = { const text = {
continue:'Continue', resume:'Resume', start:'Start', plan:'Plan', find:'Find', continue:'Continue', resume:'Resume', start:'Start', plan:'Plan', find:'Find',
attention:'Attention', update:'Updates', agenda:'Agenda', later:'Later', draft:'Drafts', attention:'Attention', update:'Updates', agenda:'Agenda', filed:'Filed', later:'Later', draft:'Drafts',
}[mode] || 'Work'; }[mode] || 'Work';
const queue = ['Attention', 'Updates', 'Agenda', 'Later', 'Drafts'].includes(text); const queue = ['Attention', 'Updates', 'Agenda', 'Filed', 'Later', 'Drafts'].includes(text);
if (options.workLabel) options.workLabel.textContent = text; if (options.workLabel) options.workLabel.textContent = text;
if (buttons.work) buttons.work.setAttribute('aria-label', queue if (buttons.work) buttons.work.setAttribute('aria-label', queue
? (mode === 'update' ? 'Resume ' : 'Open ') + text ? (mode === 'update' ? 'Resume ' : 'Open ') + text

View File

@ -485,6 +485,33 @@ process.stdout.write(JSON.stringify({{result, calls}}));
} }
def test_mobile_work_continues_into_filed_follow_up_before_later_work():
script = f"""
const createLauncher = require({json.dumps(str(QUEUE_LAUNCHER))});
const calls = [];
let counts = {{attention:0, today:0, update:0, agenda:0, filed:2, later:4, draft:3}};
const launcher = createLauncher({{
getCounts: () => counts,
openFiled: () => {{ calls.push('filed-follow-up'); return 'opened-filed'; }},
selectFilter: name => calls.push('filter:' + name),
firstAction: () => null,
announce: () => {{}},
openFindWork: () => calls.push('find'),
}});
const recommendation = launcher.recommend();
const opened = launcher.continueWork();
process.stdout.write(JSON.stringify({{recommendation, opened, calls}}));
"""
result = subprocess.run(["node", "-e", script], capture_output=True, text=True)
assert result.returncode == 0, result.stderr
assert json.loads(result.stdout) == {
"recommendation": {"name": "filed", "count": 2, "label": "Review Filed (2)"},
"opened": "opened-filed",
"calls": ["filed-follow-up"],
}
def test_mobile_queue_launcher_recommends_and_revalidates_cross_queue_continuation(): def test_mobile_queue_launcher_recommends_and_revalidates_cross_queue_continuation():
script = f""" script = f"""
const createLauncher = require({json.dumps(str(QUEUE_LAUNCHER))}); const createLauncher = require({json.dumps(str(QUEUE_LAUNCHER))});
@ -555,7 +582,7 @@ const work = {{attributes: {{}}, setAttribute(name, value) {{ this.attributes[na
const workLabel = {{textContent:''}}; const workLabel = {{textContent:''}};
const dock = createDock({{nav:{{}}, buttons:{{work}}, workLabel}}); const dock = createDock({{nav:{{}}, buttons:{{work}}, workLabel}});
const labels = {{}}; const labels = {{}};
for (const mode of ['attention','update','agenda','later','draft']) {{ for (const mode of ['attention','update','agenda','filed','later','draft']) {{
dock.updateWork(mode); dock.updateWork(mode);
labels[mode] = [workLabel.textContent, work.attributes['aria-label']]; labels[mode] = [workLabel.textContent, work.attributes['aria-label']];
}} }}
@ -568,6 +595,7 @@ process.stdout.write(JSON.stringify(labels));
"attention": ["Attention", "Open Attention"], "attention": ["Attention", "Open Attention"],
"update": ["Updates", "Resume Updates"], "update": ["Updates", "Resume Updates"],
"agenda": ["Agenda", "Open Agenda"], "agenda": ["Agenda", "Open Agenda"],
"filed": ["Filed", "Open Filed"],
"later": ["Later", "Open Later"], "later": ["Later", "Open Later"],
"draft": ["Drafts", "Open Drafts"], "draft": ["Drafts", "Open Drafts"],
} }