Hot reload item: a word only in the warning states

Flame alone while idle, starting, watching or applied; "failed" and
"restart needed" get their text back, since those are the moments the
colour alone does not explain.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169iPWwKHZoBTNN9qwXiwqk
This commit is contained in:
max
2026-09-08 14:06:28 +02:00
co-authored by Claude Fable 5.1
parent 9f0036c5d3
commit 86b21c15d0
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -53,10 +53,13 @@ export class HotReloadController implements vscode.Disposable {
return;
}
// Icon only: the state shows through the icon and the warning colour, the words
// live in the tooltip. A small debugger mark is added while one is attached.
// Icon only while things are fine; a word only when something needs attention.
// "watching" and "applied" are the normal course of a session and would just be
// a wider flame, but "failed" and "restart needed" are the moments you would
// otherwise wonder why the app did not change.
const debuggerMark = this.link?.busy ? '$(loading~spin)' : this.link?.attached ? '$(debug)' : '';
this.item.text = `$(${label.icon})${debuggerMark}`;
const word = label.warn ? ` ${label.text.replace(/^Hot Reload:\s*/, '')}` : '';
this.item.text = `$(${label.icon})${word}${debuggerMark}`;
this.item.backgroundColor = label.warn ? new vscode.ThemeColor('statusBarItem.warningBackground') : undefined;
this.item.command = this.session?.running ? 'dotnetSolution.hotReload.menu' : 'dotnetSolution.hotReload.start';