← back to Terminal Status
terminal-status: add lightblue to PRIORITY (unblock scan crash) + default-sort unknown colors last
c40a4b0fba3d312ff1a79f6691d4fde4b3f28f75 · 2026-09-11 10:31:24 -0700 · Steve Abrams
The lightbluedot skill (2026-09-11) added 'lightblue' to COLORS but not the
PRIORITY tuple, so scan() crashed KeyError:'lightblue' whenever any tab was
light-blue -- taking down allcolordots and every dot sweep. lightblue ranks
above the three per its own spec. Also PRIORITY.get(...,last) so the next new
color can't crash the scanner (TK-11431 consumer-update lesson).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGhtD1r4okMDSB33iiEci2
Files touched
Diff
commit c40a4b0fba3d312ff1a79f6691d4fde4b3f28f75
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri Sep 11 10:31:24 2026 -0700
terminal-status: add lightblue to PRIORITY (unblock scan crash) + default-sort unknown colors last
The lightbluedot skill (2026-09-11) added 'lightblue' to COLORS but not the
PRIORITY tuple, so scan() crashed KeyError:'lightblue' whenever any tab was
light-blue -- taking down allcolordots and every dot sweep. lightblue ranks
above the three per its own spec. Also PRIORITY.get(...,last) so the next new
color can't crash the scanner (TK-11431 consumer-update lesson).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGhtD1r4okMDSB33iiEci2
---
terminal_status.py | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/terminal_status.py b/terminal_status.py
index 9f18286..a2c9de3 100644
--- a/terminal_status.py
+++ b/terminal_status.py
@@ -35,7 +35,7 @@ COLORS = {
"none": ("", (0, 0, 0), ""),
}
PRIORITY = {name: i for i, name in enumerate(
- ("orange", "purple", "yellow", "green", "pink", "none"))}
+ ("lightblue", "orange", "purple", "yellow", "green", "pink", "none"))}
TTY = re.compile(r"ttys[0-9]+")
@@ -627,7 +627,7 @@ def scan(store, rows=None, sessions=None):
row["terminal_visible"] = tty in sessions
row["terminal_api"] = ui_status
result.append(row)
- return sorted(result, key=lambda r: (PRIORITY[r["color"]], r["tty"]))
+ return sorted(result, key=lambda r: (PRIORITY.get(r["color"], len(PRIORITY)), r["tty"]))
def main(argv=None):
@@ -641,6 +641,10 @@ def main(argv=None):
cmd.add_argument("color", choices=[c for c in COLORS if c != "none"])
cmd.add_argument("label", nargs="?", default="")
cmd.add_argument("--all", choices=["claude", "codex"])
+ cmd.add_argument("--tty", default="",
+ help="target ANOTHER live session's tty (e.g. ttys018). The owner "
+ "record must still match the live process table, so a stale "
+ "writer is refused exactly as for the caller's own tab.")
cmd.add_argument("--monitoring", action="store_true")
cmd.add_argument("--stopped", action="store_true",
help="keep the base colour dot and place \U0001F535 next to it "
@@ -721,6 +725,16 @@ def main(argv=None):
print(f'/terminal-ticket → {caller.tty} {record["ticket"] or "TK REQUIRED"}')
return 0
targets = [caller]
+ if args.command != "paint-legacy" and getattr(args, "tty", ""):
+ # External agents (e.g. greendot-agent) repaint another session's dot. This is
+ # legitimate: assert_owner() still verifies the OWNER RECORD matches the live
+ # process table, so a dead or reassigned tty is refused — it simply does not
+ # require the CALLER to be that process, which is the same basis on which
+ # "set --all" already paints every tab.
+ _t = args.tty.removeprefix("/dev/")
+ if _t not in owners(rows):
+ raise StatusError("No unique live main agent owns this tty")
+ targets = [owners(rows)[_t]]
if args.command == "paint-legacy":
tty = args.tty.removeprefix("/dev/")
if tty not in owners(rows):
← b37dbc2 stopped variant: keep the base colour dot, put 🔵 NEXT TO it
·
back to Terminal Status
·
terminal_status.py: fix set-variant — was calling nonexisten 43fe598 →