From da4025d3384ba0c0e1a1069c8d47adefedded4c8 Mon Sep 17 00:00:00 2001 From: Patrick Buckley Date: Tue, 17 Mar 2026 01:07:48 -0700 Subject: [PATCH] =?UTF-8?q?ui:=20skills=20table=20=E2=80=94=20category=20f?= =?UTF-8?q?irst,=20risk=20column,=20remove=20variables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move category column before name - Remove variables column (rarely useful in table view) - Add dedicated RISK column with scan badge, unicode shape indicators (checkmark/triangle/diamond/warning), and multi-line tooltip showing composite score and flagged axes from scan report - Risk badge is keyboard-focusable (tabindex=0) with aria-label - Unscanned skills show em-dash placeholder at 40% opacity - Balanced grid: 100px 1.5fr 100px 120px - Risk + category hidden on mobile (<700px) --- turnstone/console/static/governance.js | 60 ++++++++++++++++++-------- turnstone/console/static/index.html | 4 +- turnstone/console/static/style.css | 4 +- 3 files changed, 47 insertions(+), 21 deletions(-) diff --git a/turnstone/console/static/governance.js b/turnstone/console/static/governance.js index 2896672b..664a6eb3 100644 --- a/turnstone/console/static/governance.js +++ b/turnstone/console/static/governance.js @@ -688,13 +688,6 @@ function _renderGovSkills(items) { var html = ""; for (var i = 0; i < items.length; i++) { var t = items[i]; - var vars = ""; - try { - var vlist = JSON.parse(t.variables || "[]"); - vars = vlist.join(", "); - } catch (e) { - vars = t.variables; - } var activationBadge = ""; var activation = t.activation || "named"; if (activation === "default") { @@ -715,7 +708,8 @@ function _renderGovSkills(items) { : ""; var catBadge = '' + escapeHtml(t.category) + ""; - var scanBadge = ""; + // Build risk column content with tooltip + var riskCell = ""; if (t.scan_status) { var scanClass = { @@ -725,12 +719,45 @@ function _renderGovSkills(items) { high: "scope-scan-high", critical: "scope-scan-critical", }[t.scan_status] || ""; - scanBadge = - ' ' + + '" tabindex="0" role="button" aria-label="Risk: ' + escapeHtml(t.scan_status) + + (tipParts.length ? ". " + escapeHtml(tipParts.join(". ")) : "") + + '" title="' + + escapeHtml(tipText) + + '">' + + escapeHtml(scanIcon + t.scan_status) + ""; + } else { + riskCell = + '\u2014'; } var resBadge = ""; if (t.resource_count > 0) { @@ -745,13 +772,15 @@ function _renderGovSkills(items) { var deleteDisabled = t.readonly ? " disabled" : ""; html += '
' + + '' + + catBadge + + "" + '' + escapeHtml(t.name) + " " + activationBadge + defBadge + originBadge + - scanBadge + resBadge + (t.description ? '
' + @@ -759,12 +788,9 @@ function _renderGovSkills(items) { "" : "") + "
" + - '' + - catBadge + + '' + + riskCell + "" + - '' + - escapeHtml(vars || "\u2014") + - "" + '' + '