From fc8ce04f2b696d06d3ff22dc60f225fecb3f24a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sat, 22 Aug 2026 21:01:33 +0000 Subject: [PATCH] the commander's name shows the moment it is typed, not after a refresh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Naming works — confirmed on a live commander, which now carries `{"type":"summary","summary":"Inbox Summarizer"}` in its transcript. The instrumentation showed exactly the predicted shape: two attempts 2.8 seconds apart, the first on `session:claude` before the transcript file existed and the second on `result`, which is the one that landed. The retry was the fix; the guess about WHY was right and the evidence was worth having rather than assuming. What was left was cosmetic and looked like the same bug: the pane still read "Untitled commander" until a refresh. It could not have read anything else — the rename lands at the end of the first turn, and this bar has no fetched title because a brand-new commander has nothing to resume. So it showed the one thing on screen nobody had chosen, while the chosen name sat in a field two inches above it. It takes the name from state now, which is where it already was. Instrumentation removed. It earned its place: three attempts at this bug were reasoned and two of them were wrong, and the log settled it in one run. Co-Authored-By: Claude Opus 5 --- src/servers/api/chat/websocket.ts | 10 ---------- .../officerdev/src/apps/CommandHQ/CommandHqDetail.tsx | 10 +++++++++- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/servers/api/chat/websocket.ts b/src/servers/api/chat/websocket.ts index e4e39539..bbe432f6 100644 --- a/src/servers/api/chat/websocket.ts +++ b/src/servers/api/chat/websocket.ts @@ -469,15 +469,6 @@ function createMessageHandler( let commanderNamed = false; const fileAsCommander = (): void => { - // TEMPORARY instrumentation, 2026-08-22. The chosen name has failed to reach the transcript twice, and - // reasoning about the path has been wrong twice. Remove once the cause is known. - logger.warn('[commander-name] fileAsCommander', { - commandHq, - transcriptId, - hasName: !!commanderName, - name: commanderName ?? null, - alreadyNamed: commanderNamed, - }); if (!commandHq || !transcriptId) return; const userId = sessionManager.getSession(sessionId)?.userId; if (!userId) return; @@ -510,7 +501,6 @@ function createMessageHandler( // and locates the transcript wherever it actually is — so this works either way, and passing a // path we know is probably wrong would be the kind of thing that reads as intent later. commanderNamed = renameClaudeSession(who, who.home, filedId, commanderName.trim()); - logger.warn('[commander-name] rename attempt', { filedId, home: who.home, ok: commanderNamed }); }) .catch((err: unknown) => { logger.warn('Could not file this session as a commander', { diff --git a/src/workspaces/officerdev/src/apps/CommandHQ/CommandHqDetail.tsx b/src/workspaces/officerdev/src/apps/CommandHQ/CommandHqDetail.tsx index 4beb2c96..e965cd78 100644 --- a/src/workspaces/officerdev/src/apps/CommandHQ/CommandHqDetail.tsx +++ b/src/workspaces/officerdev/src/apps/CommandHQ/CommandHqDetail.tsx @@ -209,7 +209,15 @@ function NewCommander({ {chat.claudeSessionId ? (