Opaque panel header and toolbar; explain empty results

The theme's table header colour is a translucent tint, so rows scrolling
underneath made the column bar unreadable. Paint it over the solid
editor background. An empty search now asks the .NET Solution Launcher
which projects the language server loaded and says so, with a reload
button, instead of a bare "No references found".

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 18:53:22 +02:00
co-authored by Claude Fable 5.1
parent 3df78ba490
commit 742788efa3
3 changed files with 55 additions and 2 deletions
+40 -1
View File
@@ -276,12 +276,51 @@ interface SearchTarget {
view?: View;
}
/** Shape of the launcher's `dotnetSolution.languageServerStatus` answer. */
interface LanguageServerStatus {
loaded: string[];
missing: string[];
foreign: string[];
unavailable: boolean;
}
/**
* "No references" means one of two things: there are none, or the language server never
* indexed the project. The .NET Solution Launcher, when installed, knows which projects
* DotRush reported loaded; ask it so the second case is not mistaken for the first.
*/
async function explainEmptyResult(symbol: string): Promise<void> {
let status: LanguageServerStatus | undefined;
try {
const commands = await vscode.commands.getCommands(true);
if (commands.includes('dotnetSolution.languageServerStatus')) {
status = await vscode.commands.executeCommand<LanguageServerStatus>('dotnetSolution.languageServerStatus');
}
} catch {
status = undefined;
}
if (!status || status.unavailable || (status.missing.length === 0 && status.foreign.length === 0)) {
vscode.window.setStatusBarMessage(`No references found for '${symbol}'`, 4000);
return;
}
const why = status.missing.length
? `the language server has not loaded ${status.missing.join(', ')}`
: `the language server loaded projects outside this solution (${status.foreign.join(', ')})`;
const choice = await vscode.window.showWarningMessage(
`No references found for '${symbol}' — ${why}.`, 'Reload Workspace', 'Show Status');
if (choice === 'Reload Workspace') {
await vscode.commands.executeCommand('dotnetSolution.languageServerReload');
} else if (choice === 'Show Status') {
await vscode.commands.executeCommand('dotnetSolution.languageServerMenu');
}
}
async function runSearch(
origin: Origin, languageId: string, symbol: string, target: SearchTarget = {},
): Promise<void> {
const locations = await findReferences(origin, symbol);
if (locations.length === 0) {
vscode.window.setStatusBarMessage(`No references found for '${symbol}'`, 4000);
await explainEmptyResult(symbol);
return;
}