the commander's name shows the moment it is typed, not after a refresh
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 <noreply@anthropic.com>
This commit is contained in:
@@ -469,15 +469,6 @@ function createMessageHandler(
|
|||||||
let commanderNamed = false;
|
let commanderNamed = false;
|
||||||
|
|
||||||
const fileAsCommander = (): void => {
|
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;
|
if (!commandHq || !transcriptId) return;
|
||||||
const userId = sessionManager.getSession(sessionId)?.userId;
|
const userId = sessionManager.getSession(sessionId)?.userId;
|
||||||
if (!userId) return;
|
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
|
// 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.
|
// 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());
|
commanderNamed = renameClaudeSession(who, who.home, filedId, commanderName.trim());
|
||||||
logger.warn('[commander-name] rename attempt', { filedId, home: who.home, ok: commanderNamed });
|
|
||||||
})
|
})
|
||||||
.catch((err: unknown) => {
|
.catch((err: unknown) => {
|
||||||
logger.warn('Could not file this session as a commander', {
|
logger.warn('Could not file this session as a commander', {
|
||||||
|
|||||||
@@ -209,7 +209,15 @@ function NewCommander({
|
|||||||
{chat.claudeSessionId ? (
|
{chat.claudeSessionId ? (
|
||||||
<MetaBar
|
<MetaBar
|
||||||
sessionId={chat.claudeSessionId}
|
sessionId={chat.claudeSessionId}
|
||||||
title={undefined}
|
/*
|
||||||
|
The name the owner typed, straight from state.
|
||||||
|
|
||||||
|
It cannot come from the server yet: the rename lands at the END of the first turn (the transcript
|
||||||
|
does not exist when the turn starts), and this bar has no fetched title of its own — a brand-new
|
||||||
|
commander has nothing to resume. So the header read "Untitled commander" until a refresh, showing
|
||||||
|
the one thing on screen that nobody had chosen while the chosen name sat in a field above it.
|
||||||
|
*/
|
||||||
|
title={name.trim() || undefined}
|
||||||
isConnected={chat.isConnected}
|
isConnected={chat.isConnected}
|
||||||
isGenerating={chat.isGenerating}
|
isGenerating={chat.isGenerating}
|
||||||
onDisconnect={chat.disconnectSession}
|
onDisconnect={chat.disconnectSession}
|
||||||
|
|||||||
Reference in New Issue
Block a user