feat: make mobile Agenda addressable (Closes #693)
All checks were successful
CI / lint (pull_request) Successful in 1m26s
CI / build-release (pull_request) Successful in 6s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy 2026-08-13 00:53:09 +00:00
parent a8a93b2f3b
commit 6cac778acd
2 changed files with 7 additions and 6 deletions

View File

@ -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);

View File

@ -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",