Skip to content

Commit a13d754

Browse files
committed
Update tool status tooltips - PR_26160_086-tool-status-tooltip-update
1 parent 9aeddd4 commit a13d754

9 files changed

Lines changed: 136 additions & 71 deletions

File tree

admin/tool-votes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ <h2>Vote Inspector</h2>
9292
<details class="vertical-accordion" open>
9393
<summary>Diagnostics</summary>
9494
<div class="accordion-body content-stack">
95-
<p>State edits are limited to planned, wireframe, beta, and complete.</p>
95+
<p data-toolbox-votes-state-help>State definitions load from shared Toolbox status metadata.</p>
9696
<p>Tool links open the current Toolbox route stored in shared metadata.</p>
9797
</div>
9898
</details>

admin/tool-votes.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ const dragStatus = document.querySelector("[data-toolbox-votes-drag-status]");
1010
const body = document.querySelector("[data-toolbox-votes-body]");
1111
const sortButtons = Array.from(document.querySelectorAll("[data-toolbox-votes-sort]"));
1212
const sortHeaders = Array.from(document.querySelectorAll("[data-toolbox-votes-sort-header]"));
13+
const stateHelp = document.querySelector("[data-toolbox-votes-state-help]");
1314
const sortButtonLabels = new Map(sortButtons.map((button) => [
1415
button.dataset.toolboxVotesSort,
1516
button.textContent.trim(),
1617
]));
1718

1819
const toolboxContract = getToolboxContract();
1920
const releaseChannelLabels = toolboxContract.releaseChannelLabels || {};
21+
const releaseChannelHelpText = toolboxContract.releaseChannelHelpText || {};
2022
const RELEASE_CHANNEL_OPTIONS = Object.freeze((toolboxContract.releaseChannels || []).map((channel) => [
2123
channel,
2224
releaseChannelLabels[channel] || channel,
@@ -166,6 +168,33 @@ function releaseChannelLabel(value) {
166168
return RELEASE_CHANNEL_LABELS.get(value) || RELEASE_CHANNEL_LABELS.get(DEFAULT_RELEASE_CHANNEL) || value || DEFAULT_RELEASE_CHANNEL;
167169
}
168170

171+
function releaseChannelHelp(value) {
172+
return releaseChannelHelpText[value] || releaseChannelHelpText[DEFAULT_RELEASE_CHANNEL] || "";
173+
}
174+
175+
function compactHelpText(value) {
176+
return String(value || "").replace(/\s+/g, " ").trim();
177+
}
178+
179+
function statusHelpSummary() {
180+
return RELEASE_CHANNEL_OPTIONS.map(([value, label]) => {
181+
const help = compactHelpText(releaseChannelHelp(value));
182+
return help ? `${label}: ${help}` : label;
183+
}).join(" ");
184+
}
185+
186+
function renderStatusHelp() {
187+
const summary = statusHelpSummary();
188+
if (stateHelp) {
189+
stateHelp.textContent = `State definitions: ${summary}`;
190+
stateHelp.title = summary;
191+
}
192+
const stateSortButton = sortButtons.find((button) => button.dataset.toolboxVotesSort === "releaseChannelLabel");
193+
if (stateSortButton) {
194+
stateSortButton.title = summary;
195+
}
196+
}
197+
169198
function rowReleaseChannel(voteRow) {
170199
const value = String(voteRow.status || voteRow.releaseChannel || "").trim().toLowerCase();
171200
return RELEASE_CHANNEL_LABELS.has(value) ? value : DEFAULT_RELEASE_CHANNEL;
@@ -177,11 +206,13 @@ function stateCell(voteRow) {
177206
const currentState = rowReleaseChannel(voteRow);
178207
select.dataset.toolboxVotesState = voteRow.toolId;
179208
select.setAttribute("aria-label", `State for ${voteRow.toolName}`);
209+
select.title = `${releaseChannelLabel(currentState)}: ${compactHelpText(releaseChannelHelp(currentState))}`;
180210
const options = RELEASE_CHANNEL_OPTIONS.length ? RELEASE_CHANNEL_OPTIONS : [[currentState, currentState]];
181211
options.forEach(([value, label]) => {
182212
const option = document.createElement("option");
183213
option.value = value;
184214
option.textContent = label;
215+
option.title = `${label}: ${compactHelpText(releaseChannelHelp(value))}`;
185216
select.append(option);
186217
});
187218
select.value = currentState;
@@ -410,4 +441,5 @@ sortButtons.forEach((button) => {
410441
});
411442
});
412443

444+
renderStatusHelp();
413445
renderToolboxVotes();

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,11 @@ Missing changed runtime JS files are WARN, not FAIL.
66
Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.
77

88
Changed runtime JS files considered:
9-
(0%) assets/theme-v2/js/account-achievements.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10-
(0%) src/dev-runtime/persistence/tool-repositories/game-design-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
11-
(0%) src/dev-runtime/persistence/tool-repositories/palette-catalog-config.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
12-
(0%) src/dev-runtime/persistence/tool-repositories/project-journey-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
13-
(0%) src/dev-runtime/persistence/tool-repositories/project-workspace-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
14-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
15-
(0%) toolbox/project-journey/project-journey-api-client.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
16-
(0%) toolbox/project-journey/project-journey.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
17-
(0%) toolbox/project-workspace/project-workspace.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
18-
(89%) toolbox/colors/colors.js - executed lines 1848/1848; executed functions 189/212
19-
(100%) toolbox/colors/palette-api-client.js - executed lines 28/28; executed functions 4/4
9+
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10+
(0%) toolbox/toolRegistry.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
11+
(78%) admin/tool-votes.js - executed lines 406/406; executed functions 43/55
12+
(84%) toolbox/tools-page-accordions.js - executed lines 960/960; executed functions 92/109
2013

2114
Guardrail warnings:
22-
(0%) assets/theme-v2/js/account-achievements.js - WARNING: changed runtime JS file missing from coverage; advisory only
23-
(0%) src/dev-runtime/persistence/tool-repositories/game-design-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
24-
(0%) src/dev-runtime/persistence/tool-repositories/palette-catalog-config.js - WARNING: changed runtime JS file missing from coverage; advisory only
25-
(0%) src/dev-runtime/persistence/tool-repositories/project-journey-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
26-
(0%) src/dev-runtime/persistence/tool-repositories/project-workspace-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
27-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file missing from coverage; advisory only
28-
(0%) toolbox/project-journey/project-journey-api-client.js - WARNING: changed runtime JS file missing from coverage; advisory only
29-
(0%) toolbox/project-journey/project-journey.js - WARNING: changed runtime JS file missing from coverage; advisory only
30-
(0%) toolbox/project-workspace/project-workspace.js - WARNING: changed runtime JS file missing from coverage; advisory only
15+
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file missing from coverage; advisory only
16+
(0%) toolbox/toolRegistry.js - WARNING: changed runtime JS file missing from coverage; advisory only

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 20 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,55 +12,34 @@ Note: entry percentages use function coverage when available, otherwise line cov
1212
Note: coverage entries are aggregated across every page/tool where coverageReporter.start(page) and coverageReporter.stop(page) ran.
1313

1414
Exercised tool entry points detected:
15-
(88%) Toolbox Index - exercised 3 runtime JS files
15+
(81%) Toolbox Index - exercised 3 runtime JS files
1616
(0%) Tool Template V2 - not exercised by this Playwright run
17-
(77%) Theme V2 Shared JS - exercised 3 runtime JS files
17+
(74%) Theme V2 Shared JS - exercised 2 runtime JS files
1818

1919
Changed runtime JS files covered:
20-
(0%) assets/theme-v2/js/account-achievements.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21-
(0%) src/dev-runtime/persistence/tool-repositories/game-design-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
22-
(0%) src/dev-runtime/persistence/tool-repositories/palette-catalog-config.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
23-
(0%) src/dev-runtime/persistence/tool-repositories/project-journey-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
24-
(0%) src/dev-runtime/persistence/tool-repositories/project-workspace-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
25-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
26-
(0%) toolbox/project-journey/project-journey-api-client.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
27-
(0%) toolbox/project-journey/project-journey.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
28-
(0%) toolbox/project-workspace/project-workspace.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
29-
(89%) toolbox/colors/colors.js - executed lines 1848/1848; executed functions 189/212
30-
(100%) toolbox/colors/palette-api-client.js - executed lines 28/28; executed functions 4/4
20+
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21+
(0%) toolbox/toolRegistry.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
22+
(78%) admin/tool-votes.js - executed lines 406/406; executed functions 43/55
23+
(84%) toolbox/tools-page-accordions.js - executed lines 960/960; executed functions 92/109
3124

3225
Files with executed line/function counts where available:
33-
(58%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 11/19
26+
(38%) src/engine/api/session-api-client.js - executed lines 34/34; executed functions 3/8
27+
(50%) src/engine/api/toolbox-votes-api-client.js - executed lines 46/46; executed functions 3/6
28+
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
3429
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
35-
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
30+
(64%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 16/25
3631
(77%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 43/56
37-
(89%) toolbox/colors/colors.js - executed lines 1848/1848; executed functions 189/212
38-
(92%) assets/theme-v2/js/account-controls.js - executed lines 47/47; executed functions 12/13
39-
(100%) toolbox/colors/palette-api-client.js - executed lines 28/28; executed functions 4/4
32+
(78%) admin/tool-votes.js - executed lines 406/406; executed functions 43/55
33+
(84%) toolbox/tools-page-accordions.js - executed lines 960/960; executed functions 92/109
34+
(100%) toolbox/project-workspace/project-workspace-api-client.js - executed lines 12/12; executed functions 2/2
4035

4136
Uncovered or low-coverage changed JS files:
42-
(0%) assets/theme-v2/js/account-achievements.js - WARNING: uncovered changed runtime JS file; advisory only
43-
(0%) src/dev-runtime/persistence/tool-repositories/game-design-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only
44-
(0%) src/dev-runtime/persistence/tool-repositories/palette-catalog-config.js - WARNING: uncovered changed runtime JS file; advisory only
45-
(0%) src/dev-runtime/persistence/tool-repositories/project-journey-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only
46-
(0%) src/dev-runtime/persistence/tool-repositories/project-workspace-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only
47-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: uncovered changed runtime JS file; advisory only
48-
(0%) toolbox/project-journey/project-journey-api-client.js - WARNING: uncovered changed runtime JS file; advisory only
49-
(0%) toolbox/project-journey/project-journey.js - WARNING: uncovered changed runtime JS file; advisory only
50-
(0%) toolbox/project-workspace/project-workspace.js - WARNING: uncovered changed runtime JS file; advisory only
37+
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: uncovered changed runtime JS file; advisory only
38+
(0%) toolbox/toolRegistry.js - WARNING: uncovered changed runtime JS file; advisory only
5139

5240
Changed JS files considered:
53-
(0%) assets/theme-v2/js/account-achievements.js - changed JS file not collected as browser runtime coverage
54-
(0%) src/dev-runtime/persistence/tool-repositories/game-design-mock-repository.js - changed JS file not collected as browser runtime coverage
55-
(0%) src/dev-runtime/persistence/tool-repositories/palette-catalog-config.js - changed JS file not collected as browser runtime coverage
56-
(0%) src/dev-runtime/persistence/tool-repositories/project-journey-mock-repository.js - changed JS file not collected as browser runtime coverage
57-
(0%) src/dev-runtime/persistence/tool-repositories/project-workspace-mock-repository.js - changed JS file not collected as browser runtime coverage
58-
(0%) src/dev-runtime/server/mock-api-router.mjs - changed JS file not collected as browser runtime coverage
59-
(0%) tests/playwright/tools/ProjectJourneyTool.spec.mjs - changed JS file not collected as browser runtime coverage
60-
(0%) tests/playwright/tools/ProjectWorkspaceMockRepository.spec.mjs - changed JS file not collected as browser runtime coverage
61-
(0%) tests/playwright/tools/ToolboxRoutePages.spec.mjs - changed JS file not collected as browser runtime coverage
62-
(0%) toolbox/project-journey/project-journey-api-client.js - changed JS file not collected as browser runtime coverage
63-
(0%) toolbox/project-journey/project-journey.js - changed JS file not collected as browser runtime coverage
64-
(0%) toolbox/project-workspace/project-workspace.js - changed JS file not collected as browser runtime coverage
65-
(89%) toolbox/colors/colors.js - changed JS file with browser V8 coverage
66-
(100%) toolbox/colors/palette-api-client.js - changed JS file with browser V8 coverage
41+
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - changed JS file not collected as browser runtime coverage
42+
(0%) tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs - changed JS file not collected as browser runtime coverage
43+
(0%) toolbox/toolRegistry.js - changed JS file not collected as browser runtime coverage
44+
(78%) admin/tool-votes.js - changed JS file with browser V8 coverage
45+
(84%) toolbox/tools-page-accordions.js - changed JS file with browser V8 coverage
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# PR_26160_086 Tool Status Tooltip Update Report
2+
3+
## Branch Validation
4+
5+
| Check | Result | Evidence |
6+
| --- | --- | --- |
7+
| Current branch is `main` | PASS | `git branch --show-current` returned `main` before changes. |
8+
9+
## Requirement Checklist
10+
11+
| Requirement | Result | Evidence |
12+
| --- | --- | --- |
13+
| Update Toolbox/Admin status tooltip hover text to use the new governance definitions | PASS | `src/dev-runtime/guest-seeds/tool-metadata-inventory.js` now exports the PR085 definitions through `TOOL_RELEASE_CHANNEL_HELP_TEXT`. |
14+
| Tooltip text explains `planned`, `wireframe`, `beta`, and `complete` | PASS | API contract assertion verifies all four help strings in `tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs`. |
15+
| Tooltip appears in Toolbox Build Path | PASS | `toolbox/tools-page-accordions.js` adds shared-definition title text to Build Path status cells and existing status filter buttons use the same contract help text. |
16+
| Tooltip appears in Admin Tool Votes | PASS | `admin/tool-votes.js` applies shared-definition title text to State selects/options and renders a shared-definition diagnostics line. |
17+
| Do not hardcode duplicate definitions in multiple places when shared metadata exists | PASS | Active UI reads help text from the Toolbox API contract. The compatibility `toolbox/toolRegistry.js` stub was updated only to prevent stale definitions for legacy scripts/tests. |
18+
| Use DB/API/service-backed or shared metadata where already available | PASS | Active Toolbox/Admin surfaces consume `getToolboxContract()` from `/api/toolbox/registry/snapshot`. |
19+
| Do not use inline script/style/event handlers | PASS | Focused `rg` audit found no inline handlers/styles in changed HTML/JS. |
20+
21+
## Tooltip Coverage
22+
23+
| Surface | Coverage |
24+
| --- | --- |
25+
| Toolbox status filter controls | Existing `data-toolbox-status-filter` buttons use `releaseChannelHelp(channel)` from the API contract for `title`; Playwright asserts Beta contains "Can be used in a real game." |
26+
| Toolbox Build Path status cells | New `data-build-path-status-help` cells show `<Status>: <definition>` in `title`; Playwright asserts Complete contains "Ready for long-term support." |
27+
| Toolbox tiles/status kickers | Existing `data-toolbox-kicker` badges continue using contract-backed `tool.releaseChannelHelpText`. |
28+
| Admin Tool Votes State select | New select/option titles use shared `releaseChannelHelpText`; Playwright asserts Colors State title contains the Complete definition. |
29+
| Admin Tool Votes Diagnostics | New `data-toolbox-votes-state-help` line renders all shared definitions; Playwright asserts the Beta definition is visible. |
30+
31+
## Validation
32+
33+
| Lane | Result | Notes |
34+
| --- | --- | --- |
35+
| Branch guard | PASS | Current branch was `main`. |
36+
| Changed-file syntax | PASS | `node --check` passed for changed JS and test files. |
37+
| Inline HTML/JS audit | PASS | `rg` found no inline scripts, styles, or event handlers in changed files. |
38+
| Diff hygiene | PASS | `git diff --check` completed with line-ending normalization warnings only. |
39+
| Targeted Playwright | PASS | `npx playwright test tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs --reporter=line` passed 4/4. |
40+
41+
## Impacted Lanes
42+
43+
- Impacted lane: Toolbox/Admin Tool Votes metadata SSoT.
44+
- Playwright impacted: Yes.
45+
- Samples skipped: Safe to skip because the change only updates Toolbox/Admin status metadata and hover/help display.
46+
- Full samples validation: Not run per request.
47+
48+
## Manual Test Notes
49+
50+
- Open `/toolbox/index.html`, switch to Build Path, hover status filter buttons and status cells.
51+
- Open `/admin/tool-votes.html`, hover State dropdowns and confirm the Diagnostics panel lists the same four status meanings.

src/dev-runtime/guest-seeds/tool-metadata-inventory.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ export const TOOL_RELEASE_CHANNEL_LABELS = Object.freeze({
2424
});
2525

2626
export const TOOL_RELEASE_CHANNEL_HELP_TEXT = Object.freeze({
27-
planned: "Idea exists.\nNot yet available.",
28-
wireframe: "Preview the planned workflow and layout.\nHelp shape the design before development begins.",
29-
beta: "Ready to try.\nFeatures, layout, and workflows may change based on feedback.",
30-
complete: "Production ready and fully supported."
27+
planned: "Not designed yet.\nNo meaningful UI.\nNo ownership defined.",
28+
wireframe: "Tool exists.\nUser can understand workflow.\nData ownership is defined.\nNot functionally usable.",
29+
beta: "Functionally usable.\nCan be used in a real game.\nMay still contain incomplete workflows, placeholder data, UI cleanup issues, unused fields, missing validation, or incomplete code review.",
30+
complete: "Functionally usable.\nCode reviewed.\nDead code removed.\nInvalid fields removed.\nUI cleaned up.\nNo known placeholder data.\nNo known invalid controls.\nReady for long-term support."
3131
});
3232

3333
export const TOOL_REGISTRY_REQUIRED_METADATA_FIELDS = Object.freeze([

0 commit comments

Comments
 (0)