From 5c476bb13fd30fb6b95f5b304c4b1c34cf14ff85 Mon Sep 17 00:00:00 2001 From: Cowork Supervisor Date: Sun, 12 Jul 2026 13:03:29 -0400 Subject: [PATCH] fix: pop old AND new name from health cache on rename (#36) Closes #36 Co-Authored-By: Claude Fable 5 --- bcc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bcc.py b/bcc.py index dbd6110..32d8290 100644 --- a/bcc.py +++ b/bcc.py @@ -2083,12 +2083,17 @@ class MainWindow(QMainWindow): if not (0 <= idx < len(self.servers)): return entry = self.servers[idx] + old_name = entry.name entry.name = self.editor.current_name() entry.data = self.editor.dump_data() # The server stays in its section (enable state unchanged), so update # its existing row in place rather than re-rendering. # An edit invalidates any cached "Test all" result -- the server that - # was spawn-tested no longer matches what's on disk once saved. + # was spawn-tested no longer matches what's on disk once saved. Pop + # both names: the old one (so a rename doesn't leave a stale entry + # for whoever takes that name next) and the new one (so we don't + # inherit a stale result cached under the name being renamed to). + self._health.pop(old_name, None) self._health.pop(entry.name, None) loc = self._row_of_index.get(idx) if loc: