NA: READY page on 21, archives on 30-31, location pages back on 98/99

- Apply's import message names the READY page by its own number

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 15:00:58 -04:00
co-authored by Claude Opus 5.5
parent 48a754a118
commit a201d51db2
6 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -1198,8 +1198,8 @@
]
}
],
"page": 24,
"page_name": "24\\nReady"
"page": 21,
"page_name": "21\\nReady"
},
"restart_page": {
"back_pos": [
Binary file not shown.
Binary file not shown.
+2 -1
View File
@@ -455,7 +455,8 @@ class Applier:
if want != have:
return False, "page %d: the import did not land as built (%d keys built, %d on the page)" % (page, len(want), len(have))
done.append(name)
return True, ", ".join("page %d" % (cfg["page"] if n == "status" else cfg["restart_page"]["page"]) for n in done) or "nothing to import"
number = {"status": cfg["page"], "restart": (cfg.get("restart_page") or {}).get("page"), "ready": (cfg.get("ready_page") or {}).get("page")}
return True, ", ".join("page %s" % number.get(n) for n in done) or "nothing to import"
def colour_nav_keys(self, cfg):
comp = cfg["companion"]
Binary file not shown.
+2 -2
View File
@@ -467,12 +467,12 @@ class TestPages(unittest.TestCase):
def test_status_page_ready_key_opens_the_page(self):
acts = self.actions(make_page.build(CONFIG), 2, 7)
self.assertEqual(acts["up"], [("set_page", {"surfaceId": "self", "page": 24})])
self.assertEqual(acts["up"], [("set_page", {"surfaceId": "self", "page": 21})])
self.assertEqual(acts["2000"][0][1]["value"], "$(custom:sp_cmd);restart ready $(internal:time_unix)")
def test_ready_page(self):
export = make_page.build_ready(CONFIG)
self.assertEqual(export["page"]["name"], "24\\nReady")
self.assertEqual(export["page"]["name"], "21\\nReady")
self.assertEqual(self.actions(export, 0, 3)["up"][0][1]["value"], "$(custom:sp_cmd);done rd_boh")
self.assertNotIn("2000", self.actions(export, 0, 3)) # a tap key has no hold
self.assertEqual(self.actions(export, 2, 1)["up"][0][1]["value"], "$(custom:sp_cmd);ack rd_lineup")