Skip to content

Commit 8a68c5d

Browse files
committed
Enforce tools-progress as Toolbox status source of truth - PR_26156_128-tool-status-registry-enforcement
1 parent b5d4e58 commit 8a68c5d

17 files changed

Lines changed: 1434 additions & 1653 deletions

admin/tools-progress-source.js

Lines changed: 778 additions & 0 deletions
Large diffs are not rendered by default.

admin/tools-progress.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
import { getActiveToolRegistry, getToolRoute } from "../toolbox/toolRegistry.js";
2-
3-
const completionByStatus = Object.freeze({
4-
Ready: "Yes",
5-
Wireframe: "No",
6-
"Under Construction": "No",
7-
Planned: "No",
8-
Hidden: "No",
9-
Deprecated: "No"
10-
});
2+
import {
3+
getToolProgressReadiness,
4+
getToolsProgressSource,
5+
toolProgressMetadataDiagnostic
6+
} from "./tools-progress-source.js";
117

128
const swatchByGroup = Object.freeze({
139
AI: "swatch-purple",
@@ -79,8 +75,22 @@ function createGroupCell(tool) {
7975
return cell;
8076
}
8177

78+
function createStatusCell(tool) {
79+
const cell = createCell("td", tool.status);
80+
const statusDiagnostic = toolProgressMetadataDiagnostic(tool);
81+
if (statusDiagnostic) {
82+
const diagnostic = document.createElement("span");
83+
diagnostic.className = "status";
84+
diagnostic.dataset.toolsProgressStatusDiagnostic = tool.displayName;
85+
diagnostic.setAttribute("role", "status");
86+
diagnostic.textContent = statusDiagnostic;
87+
cell.append(diagnostic);
88+
}
89+
return cell;
90+
}
91+
8292
function isComplete(tool) {
83-
return completionByStatus[tool.status] || "No";
93+
return tool.readiness || getToolProgressReadiness(tool.status);
8494
}
8595

8696
function firstIncompleteTool(tools) {
@@ -92,22 +102,26 @@ function renderToolsProgress() {
92102
return;
93103
}
94104

95-
const tools = getActiveToolRegistry();
105+
const tools = getToolsProgressSource(getActiveToolRegistry());
96106
progressBody.replaceChildren();
97107
tools.forEach((tool) => {
98108
const row = document.createElement("tr");
109+
const statusDiagnostic = toolProgressMetadataDiagnostic(tool);
99110
row.className = tool.colorGroup;
100111
row.dataset.toolsProgressTool = tool.displayName;
101112
row.dataset.toolsProgressOrder = String(tool.order);
102113
row.dataset.toolsProgressGroup = tool.category;
103114
row.dataset.toolsProgressColorGroup = tool.colorGroup;
104115
row.dataset.toolsProgressStatus = tool.status;
105116
row.dataset.toolsProgressComplete = isComplete(tool);
117+
if (statusDiagnostic) {
118+
row.dataset.toolsProgressStatusDiagnostic = statusDiagnostic;
119+
}
106120
row.append(
107121
createCell("td", String(tool.order)),
108122
createToolNameCell(tool),
109123
createGroupCell(tool),
110-
createCell("td", tool.status),
124+
createStatusCell(tool),
111125
createCell("td", isComplete(tool))
112126
);
113127
progressBody.append(row);
588 KB
Loading
645 KB
Loading
481 KB
Loading
2.82 MB
Loading
-140 KB
Binary file not shown.

docs_build/dev/codex_commands.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,3 +896,39 @@ Required reports:
896896
- `docs_build/dev/reports/testing_lane_execution_report.md`
897897
- `docs_build/dev/reports/codex_changed_files.txt`
898898
- `docs_build/dev/reports/codex_review.diff`
899+
900+
901+
## PR_26156_128
902+
903+
Changes:
904+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
905+
- Added `admin/tools-progress-source.js` as the Admin Tools Progress status metadata source consumed by both Admin Tools Progress and Toolbox rendering.
906+
- Removed duplicated Toolbox-local status/readiness/visibility/requiredness ownership from `toolbox/toolRegistry.js`.
907+
- Updated `admin/tools-progress.js` to hydrate rows from the Admin status source.
908+
- Updated `toolbox/tools-page-accordions.js` to hydrate card visibility/status from the Admin status source.
909+
- Added visible missing-metadata diagnostics for Admin Tools Progress rows and Toolbox cards.
910+
- Removed obsolete/dead Toolbox status constants and local progress mappings.
911+
- Updated targeted Tools Progress tests to verify Admin source reflection, user/Admin visibility, and missing-metadata diagnostics.
912+
- Updated the tool registry validator so base registry entries no longer need duplicate status visibility fields.
913+
- Did not modify archived V1/V2 pages.
914+
- Did not modify `start_of_day`.
915+
916+
Validation:
917+
- `node --check admin/tools-progress-source.js`
918+
- `node --check admin/tools-progress.js`
919+
- `node --check toolbox/toolRegistry.js`
920+
- `node --check toolbox/tools-page-accordions.js`
921+
- `node --check tests/playwright/tools/ToolsProgressHydration.spec.mjs`
922+
- `node --check scripts/validate-tool-registry.mjs`
923+
- `node --check scripts/validate-active-tools-surface.mjs`
924+
- `node scripts/validate-tool-registry.mjs`
925+
- `node ./scripts/run-targeted-test-lanes.mjs --lane tools-progress --lane tool-runtime`
926+
- `git diff --check`
927+
- Supplemental `node scripts/validate-active-tools-surface.mjs` was not used as this PR's validation gate because it still reports existing non-status Toolbox wireframe expectations outside PR_26156_128 scope.
928+
- Full samples smoke: skipped by request.
929+
930+
Required reports:
931+
- `docs_build/dev/reports/tool-status-registry-enforcement-report.md`
932+
- `docs_build/dev/reports/testing_lane_execution_report.md`
933+
- `docs_build/dev/reports/codex_changed_files.txt`
934+
- `docs_build/dev/reports/codex_review.diff`

docs_build/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Clean up Toolbox cards and status visibility - PR_26156_127-toolbox-card-and-status-cleanup
1+
Enforce Admin Tools Progress status source - PR_26156_128-tool-status-registry-enforcement

0 commit comments

Comments
 (0)