From 6cac778acd1c01c1359acc254db79a80ab012e5d Mon Sep 17 00:00:00 2001 From: timmy Date: Thu, 13 Aug 2026 00:53:09 +0000 Subject: [PATCH] feat: make mobile Agenda addressable (Closes #693) --- frontend/work-route.js | 2 +- tests/test_my_work.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/work-route.js b/frontend/work-route.js index bd648e2..b7fc756 100644 --- a/frontend/work-route.js +++ b/frontend/work-route.js @@ -6,7 +6,7 @@ 'use strict'; const repositoryPart = /^[A-Za-z0-9_.-]+$/; - const queueFilters = ['today', 'attention', 'update', 'later', 'draft']; + const queueFilters = ['today', 'agenda', 'attention', 'update', 'later', 'draft']; function positiveInteger(value) { const number = Number(value); diff --git a/tests/test_my_work.py b/tests/test_my_work.py index 09f7a09..351a571 100644 --- a/tests/test_my_work.py +++ b/tests/test_my_work.py @@ -659,12 +659,12 @@ process.stdout.write(JSON.stringify({{calls, hash:location.hash, parsed:routes.p def test_every_mobile_queue_route_survives_hydration_and_detail_back_navigation(): script = f""" const routes = require({json.dumps(str(WORK_ROUTE))}); -const canonical = ['today', 'attention', 'updates', 'later', 'drafts']; +const canonical = ['today', 'agenda', 'attention', 'updates', 'later', 'drafts']; const parsed = canonical.map(name => [name, routes.parse('#/my-work/' + name)]); const listeners = {{}}; -const location = {{hash:'#/my-work/later'}}; +const location = {{hash:'#/my-work/agenda'}}; const calls = []; -const stack = ['#/my-work/later']; +const stack = ['#/my-work/agenda']; let cursor = 0; const history = {{ pushState(state, _, hash) {{ stack.splice(cursor + 1); stack.push(hash); cursor += 1; location.hash = hash; }}, @@ -693,16 +693,17 @@ process.stdout.write(JSON.stringify({{parsed, calls, hash:location.hash}})); assert json.loads(result.stdout) == { "parsed": [ ["today", {"kind": "queue", "filter": "today"}], + ["agenda", {"kind": "queue", "filter": "agenda"}], ["attention", {"kind": "queue", "filter": "attention"}], ["updates", {"kind": "queue", "filter": "update"}], ["later", {"kind": "queue", "filter": "later"}], ["drafts", {"kind": "queue", "filter": "draft"}], ], "calls": [ - ["queue", "later"], + ["queue", "agenda"], ["open", 42], ["close"], - ["queue", "later"], + ["queue", "agenda"], ["queue", "draft"], ], "hash": "#/my-work/drafts", -- 2.43.0