fix(agent-status): honor opted-out synthetic profiles

This commit is contained in:
Brennan Benson
2026-08-24 11:26:25 -07:00
parent e025dfd9ea
commit 773f69afa8
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -240,6 +240,7 @@ describe('collectAgentTitleEvidence', () => {
it('does not invent synthetic titles for an opted-out profile', () => {
expect(agentFor('OpenCode ready')).toBeNull()
expect(agentFor('⠋ OpenCode')).toBeNull()
expect(reasonFor('OpenCode ready')).toBe('free-text-only')
})
+5 -1
View File
@@ -198,7 +198,11 @@ function agentForSyntheticTitle(text: string): TuiAgent | null {
const emittedLabels = [profile.permissionLabel, profile.idleLabel]
if (profile.synthesizeWorkingTitle !== false) {
// Working labels are emitted only as spinner frames; a bare name is free text.
if (containsAgentSpinnerGlyph(trimmed) && normalized === profile.workingLabel.toLowerCase()) {
if (
profile.synthesizeTerminalTitle !== false &&
containsAgentSpinnerGlyph(trimmed) &&
normalized === profile.workingLabel.toLowerCase()
) {
return agent
}
}