ABLESET switch (Restart page): hold to stop AbleSet being watched and opened

The user has an AbleSet bug and needs auto-open off for now. A bypass key can now hold off fixes
(bypass.fixes): their checks stay green and nothing runs them. The status page is full, so a Restart
page key with toggle shows the switch and its hold flips it. Switched off live 2026-10-25 07:18.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 07:19:51 -04:00
co-authored by Claude Opus 5.5
parent 0f3471bf51
commit 0ecec5f112
7 changed files with 93 additions and 15 deletions
+16 -5
View File
@@ -274,7 +274,9 @@ field("tiles[].kind", "enum", None, "A special key: master (ALL), service (ALARM
"silences), bypass (hold: hand a device to an operator - its MIDI links out, its Companion connections off).",
"Keys", advanced=True, options=["master", "service", "network", "ready", "autofix", "bypass"])
field("tiles[].bypass", "dict", None, "A bypass key: peers (MIDI peer or session names to take out, e.g. Lighting), "
"hosts (the Macs whose sessions to look in; \"\" is this Mac) and conns (Companion connections to switch off).",
"hosts (the Macs whose sessions to look in; \"\" is this Mac) and conns (Companion connections to switch off); or "
"fixes (fix ids it holds off: their checks stay green and nothing runs them, e.g. ableset), with on_text / off_text "
"for the key's face.",
"Keys", advanced=True)
field("tiles[].members", "list", None, "A group: the keys it sums up.", "Keys")
field("tiles[].checks", "list", [], "What the key watches.", "Keys")
@@ -350,6 +352,8 @@ field("restart_page.keys[].id", "id", None, "", "Keys", advanced=True, required=
field("restart_page.keys[].label", "str", None, "", "Keys", required=True, apply="pages")
field("restart_page.keys[].pos", "list", None, "[row, column].", "Keys", required=True, apply="pages")
field("restart_page.keys[].fix", "str", None, "What holding it runs.", "Keys", required=True)
field("restart_page.keys[].toggle", "str", None, "A switch kept on this page: the bypass key (no position of its own) "
"it shows and a hold flips, e.g. ableset.", "Keys", apply="pages")
field("restart_page.keys[].disabled", "bool", False, "Switched off: the key stays on the page (OFF) but a hold does "
"nothing.", "Keys", apply="pages")
field("restart_page.keys[].watch", "list", [], "Keep flashing HOLD TO FIX while these fixes' checks or "
@@ -565,7 +569,7 @@ GLOSSARY = {
"ON FOH BACKUP", "BUSY", "TAKING MIDI OUT", "PUTTING MIDI BACK", "TAKING", "PUTTING", "MIDI OUT", "MIDI BACK",
],
"a switch key (AUTO-FIX, or one like LIGHTS that hands a device to an operator)": [
"OPERATOR", "MIDI OFF", "OFF IN SETTINGS", "SETTINGS", "TIL", "PAUSED",
"OPERATOR", "MIDI OFF", "AUTO-OPEN", "OFF IN SETTINGS", "SETTINGS", "TIL", "PAUSED",
],
}
@@ -732,7 +736,9 @@ def validate(cfg, live=None):
fixes_of = {c.get("fix") for c in t.get("checks", []) if isinstance(c.get("fix"), str)} | {"conn:" + c["conn"] for c in t.get("checks", []) if c.get("conn")}
if fixes_of & on_restart:
continue
if "pos" not in t and "members" not in t and t.get("id") not in in_group and t.get("kind") != "master":
toggled = {k.get("toggle") for k in (cfg.get("restart_page") or {}).get("keys", [])}
if "pos" not in t and "members" not in t and t.get("id") not in in_group and t.get("kind") != "master" \
and t.get("id") not in toggled:
warnings.append("key %s has no place on the deck and is in no group: nobody will see it" % t.get("id"))
if kinds["master"] != 1:
errors.append("there must be exactly one ALL key (kind master); found %d" % kinds["master"])
@@ -745,8 +751,11 @@ def validate(cfg, live=None):
for t in cfg["tiles"]:
if t.get("kind") == "bypass":
b = t.get("bypass") if isinstance(t.get("bypass"), dict) else {}
if not b.get("peers"):
errors.append("key %s: a bypass key needs bypass.peers (the MIDI peers it takes out)" % t.get("id"))
if not b.get("peers") and not b.get("fixes"):
errors.append("key %s: a bypass key needs bypass.peers (the MIDI peers it takes out) or bypass.fixes" % t.get("id"))
for f in b.get("fixes") or []:
if f not in cfg.get("fixes", {}):
errors.append("key %s: bypass fix %s is not a fix in the settings" % (t.get("id"), f))
for h in b.get("hosts") or []:
if h and h not in cfg.get("hosts", {}):
errors.append("key %s: bypass host %s is not a computer in the settings" % (t.get("id"), h))
@@ -857,6 +866,8 @@ def validate(cfg, live=None):
errors.append("%s: a key on the Status page has that id" % where)
if k.get("fix") not in fixes:
errors.append("%s: unknown fix %s" % (where, k.get("fix")))
if k.get("toggle") and not any(t.get("id") == k["toggle"] and t.get("kind") == "bypass" for t in cfg.get("tiles", [])):
errors.append("%s: toggle %s is not a bypass key" % (where, k["toggle"]))
for w in k.get("watch", []):
if not w.startswith("conn:") and w not in fixes:
errors.append("%s: unknown fix %s in its watch list" % (where, w))