From 86b21c15d09237a87eb1232516ecb2d186187428 Mon Sep 17 00:00:00 2001 From: max Date: Tue, 8 Sep 2026 14:06:28 +0200 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_0169iPWwKHZoBTNN9qwXiwqk --- README.md | 2 +- src/hotreload/controller.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2b449e0..0f18b8a 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ title is the same session. | Action | How | | --- | --- | -| Start | The `$(flame)` status bar item (icon only; the state is in its colour and tooltip), *.NET Solution: Run Startup Project with Hot Reload*, or `Ctrl+Alt+F5` | +| Start | The `$(flame)` status bar item (icon only; it gains a word — *failed*, *restart needed* — only when something needs you), *.NET Solution: Run Startup Project with Hot Reload*, or `Ctrl+Alt+F5` | | Apply, restart, attach, stop | Click the status bar item while it runs — one menu for all of them | | Restart the application | Also `Ctrl+R` inside the watch terminal | diff --git a/src/hotreload/controller.ts b/src/hotreload/controller.ts index cc97f8f..379288f 100644 --- a/src/hotreload/controller.ts +++ b/src/hotreload/controller.ts @@ -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';