From c28c39dd458f2c48cc5df4562ba1ab9bb8424a06 Mon Sep 17 00:00:00 2001 From: ThreeFish Date: Tue, 30 Jun 2026 14:24:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(Log):=20CI=20Tooltip=20=E5=90=84=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E9=A1=B9=E7=8A=B6=E6=80=81=E5=9B=BE=E6=A0=87=E6=8C=89?= =?UTF-8?q?=E9=80=9A=E8=BF=87/=E5=A4=B1=E8=B4=A5/=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E4=B8=AD=E4=B8=8A=E8=89=B2;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tipGlyph 此前返回裸 SVG,缺少 .g-{state} 包裹,导致 Tooltip 内每项检查图标 继承前景色呈单色(仅头部图标上色)。现统一包裹:绿=通过、红=失败、黄=运行中、 灰=未知,与头部及 Log 行图标语义一致。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang --- src/adapter/webview/log-webview.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/adapter/webview/log-webview.ts b/src/adapter/webview/log-webview.ts index 3c96b39..27d149d 100644 --- a/src/adapter/webview/log-webview.ts +++ b/src/adapter/webview/log-webview.ts @@ -459,7 +459,7 @@ body { margin: 0; font-family: var(--vscode-font-family); font-size: var(--vscod #ci-tip .g-success { color: var(--vscode-testing-iconPassed, #3fb950); } #ci-tip .g-failure { color: var(--vscode-testing-iconFailed, var(--vscode-errorForeground, #f85149)); } #ci-tip .g-pending { color: var(--vscode-testing-iconQueued, var(--vscode-editorWarning-foreground, #d29922)); } -#ci-tip .g-skipped { color: var(--vscode-descriptionForeground, #8b949e); } +#ci-tip .g-skipped, #ci-tip .g-unknown { color: var(--vscode-descriptionForeground, #8b949e); } @@ -628,10 +628,11 @@ function flushCiRequests() { // ── CI Tooltip(自定义浮层:列明细 + 失败原因 + 跳转链接,仿 IDEA / GitHub)── function tipGlyph(state) { - if (state === 'skipped' || state === 'unknown') { - return ''; - } - return ciGlyph(state); + const svg = (state === 'unknown' || state === 'skipped') + ? '' + : ciGlyph(state); + // 必须包裹 .g-{state} 才能上色(绿=通过/红=失败/黄=运行中/灰=未知),否则继承前景色呈单色。 + return '' + svg + ''; } function buildTip(ci) { const headState = ci.state === 'success' ? 'success' : ci.state === 'failure' ? 'failure' : 'pending';