Skip to content

Commit 850dbfe

Browse files
committed
PR_26175_CHARLIE_014-configuration-summary
1 parent 0d817a3 commit 850dbfe

14 files changed

Lines changed: 455 additions & 306 deletions

admin/system-health.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ <h2>Admin</h2>
4141
<p>Environment Identity</p>
4242
<p>Environment Map</p>
4343
<p>Service Health</p>
44+
<p>Configuration Summary</p>
4445
<p>Local API Startup</p>
4546
<p>Database Health</p>
4647
<p>Storage Health</p>
@@ -116,6 +117,21 @@ <h4>Loading</h4>
116117
</article>
117118
</div>
118119
</section>
120+
<div class="table-wrapper">
121+
<table class="data-table" aria-label="Configuration summary">
122+
<caption>Configuration Summary</caption>
123+
<thead>
124+
<tr>
125+
<th scope="col">Field</th>
126+
<th scope="col">Read-only Value</th>
127+
<th scope="col">Status</th>
128+
</tr>
129+
</thead>
130+
<tbody data-admin-system-health-configuration-rows>
131+
<tr><td>Configuration Summary</td><td>Waiting for safe API status</td><td data-health-status="PENDING" title="Reason: configuration summary has not loaded yet." aria-label="PENDING: configuration summary has not loaded yet.">PENDING</td></tr>
132+
</tbody>
133+
</table>
134+
</div>
119135
<div class="table-wrapper">
120136
<table class="data-table" aria-label="Local API startup diagnostics">
121137
<caption>Local API Startup Diagnostics</caption>

assets/theme-v2/js/admin-system-health.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class AdminSystemHealthController {
6161
node,
6262
]));
6363
this.historyRows = root.querySelector("[data-admin-system-health-history-rows]");
64+
this.configurationRows = root.querySelector("[data-admin-system-health-configuration-rows]");
6465
this.serviceCards = root.querySelector("[data-admin-system-health-service-cards]");
6566
this.startupRows = root.querySelector("[data-admin-system-health-startup-rows]");
6667
this.runtimeRows = root.querySelector("[data-admin-system-health-runtime-rows]");
@@ -136,6 +137,7 @@ class AdminSystemHealthController {
136137
this.renderStoragePending(reason);
137138
this.renderRuntimeHealthPending(reason);
138139
this.renderServiceHealthPending(reason);
140+
this.renderConfigurationSummaryPending(reason);
139141
this.renderHistoryPending(reason);
140142
}
141143

@@ -278,6 +280,45 @@ class AdminSystemHealthController {
278280
this.serviceCards.replaceChildren(fragment);
279281
}
280282

283+
renderConfigurationSummaryPending(reason) {
284+
if (!this.configurationRows) {
285+
return;
286+
}
287+
const row = document.createElement("tr");
288+
row.append(
289+
this.createCell("Configuration Summary"),
290+
this.createCell("not available"),
291+
this.createStatusCell("PENDING", reason),
292+
);
293+
this.configurationRows.replaceChildren(row);
294+
}
295+
296+
renderConfigurationSummary(configurationSummary = {}) {
297+
if (!this.configurationRows) {
298+
return;
299+
}
300+
if (configurationSummary?.secretsExposed === true || configurationSummary?.secretEditingAllowed === true) {
301+
this.renderConfigurationSummaryPending("Safe configuration summary response was blocked because it exposed secret controls.");
302+
return;
303+
}
304+
const rows = Array.isArray(configurationSummary.rows) ? configurationSummary.rows : [];
305+
if (!rows.length) {
306+
this.renderConfigurationSummaryPending("Safe Admin System Health API returned no configuration summary rows.");
307+
return;
308+
}
309+
const fragment = document.createDocumentFragment();
310+
rows.forEach((configurationRow) => {
311+
const row = document.createElement("tr");
312+
row.append(
313+
this.createCell(configurationRow.field),
314+
this.createCell(configurationRow.value),
315+
this.createStatusCell(configurationRow.status, configurationSummary.message),
316+
);
317+
fragment.append(row);
318+
});
319+
this.configurationRows.replaceChildren(fragment);
320+
}
321+
281322
renderStartupPending(reason) {
282323
if (!this.startupRows) {
283324
return;
@@ -461,6 +502,7 @@ class AdminSystemHealthController {
461502
this.runStorageDiagnostics();
462503
this.renderRuntimeHealth(data?.runtimeHealth || {});
463504
this.renderServiceHealth(data?.serviceHealth || {});
505+
this.renderConfigurationSummary(data?.configurationSummary || {});
464506
this.renderHealthCheckHistory(data?.healthCheckHistory || []);
465507
this.renderRuntimeEnvironment(data?.runtimeEnvironment || {});
466508
} catch (error) {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# PR_26175_CHARLIE_014 Branch Validation
2+
3+
## Branch Rules
4+
5+
- PASS: Continued on `pr/26175-CHARLIE-010-system-health-history-and-closeout`.
6+
- PASS: Stacked on PR_26175_CHARLIE_013.
7+
- PASS: No merge was performed.
8+
- PASS: No rebase was performed.
9+
- PASS: No new root branch was created.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# PR_26175_CHARLIE_014 Manual Validation Notes
2+
3+
- Verified Configuration Summary renders on `admin/system-health.html`.
4+
- Verified the summary contains only read-only fields.
5+
- Verified site/API URL credentials are not displayed.
6+
- Verified no raw database or auth secrets are included.
7+
- Verified no peer environment health checks were introduced.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# PR_26175_CHARLIE_014 Requirement Checklist
2+
3+
- PASS: Added read-only Configuration Summary.
4+
- PASS: Shows current environment.
5+
- PASS: Shows hosting model.
6+
- PASS: Shows site URL.
7+
- PASS: Shows API URL.
8+
- PASS: Shows database provider/type.
9+
- PASS: Shows storage provider/folder.
10+
- PASS: Shows auth provider/status.
11+
- PASS: Does not expose secrets.
12+
- PASS: Masks sensitive URL values.
13+
- PASS: Uses API/service contract data.
14+
- PASS: Tests were updated.
15+
- PASS: Required reports were generated.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# PR_26175_CHARLIE_014 Validation Report
2+
3+
## Commands
4+
5+
- PASS: `node --check src/dev-runtime/server/local-api-router.mjs`
6+
- PASS: `node --check assets/theme-v2/js/admin-system-health.js`
7+
- PASS: `git diff --check`
8+
- Result: no whitespace errors; CRLF conversion warnings only.
9+
- PASS: `node --test tests/dev-runtime/AdminHealthOperations.test.mjs`
10+
- Result: 4 passed.
11+
- PASS: `npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line`
12+
- Result: 3 passed.
13+
14+
## Validation Lane
15+
16+
- Targeted System Health API/unit lane: PASS.
17+
- Targeted System Health Playwright lane: PASS.
18+
- Full samples smoke: not run; not required for this System Health-only slice.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# PR_26175_CHARLIE_014 Configuration Summary
2+
3+
## Scope
4+
5+
Team: Charlie
6+
7+
Purpose: Add a read-only current-environment Configuration Summary to Admin System Health Phase 2.
8+
9+
## Changes
10+
11+
- Added server-owned `configurationSummary` to the Admin System Health status API.
12+
- Added a Configuration Summary table with current environment, hosting model, site URL, API URL, database provider/type, storage provider/folder, and auth provider/status.
13+
- Reused existing URL redaction so credentials are masked before the browser receives display values.
14+
- Updated API and Playwright System Health tests.
15+
16+
## Architecture Notes
17+
18+
- PASS: Summary is read-only.
19+
- PASS: No secrets are exposed.
20+
- PASS: Current environment only.
21+
- PASS: Browser renders API-owned configuration state only.
22+
- PASS: No cross-environment checks were added.
23+
24+
## Artifact
25+
26+
- `tmp/PR_26175_CHARLIE_014-configuration-summary_delta.zip`

docs_build/dev/reports/codex_changed_files.txt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ M admin/system-health.html
66
M src/dev-runtime/server/local-api-router.mjs
77
M tests/dev-runtime/AdminHealthOperations.test.mjs
88
M tests/playwright/tools/AdminHealthOperationsPage.spec.mjs
9-
?? docs_build/dev/reports/PR_26175_CHARLIE_013-service-health-dashboard-branch-validation.md
10-
?? docs_build/dev/reports/PR_26175_CHARLIE_013-service-health-dashboard-manual-validation-notes.md
11-
?? docs_build/dev/reports/PR_26175_CHARLIE_013-service-health-dashboard-requirement-checklist.md
12-
?? docs_build/dev/reports/PR_26175_CHARLIE_013-service-health-dashboard-validation.md
13-
?? docs_build/dev/reports/PR_26175_CHARLIE_013-service-health-dashboard.md
9+
?? docs_build/dev/reports/PR_26175_CHARLIE_014-configuration-summary-branch-validation.md
10+
?? docs_build/dev/reports/PR_26175_CHARLIE_014-configuration-summary-manual-validation-notes.md
11+
?? docs_build/dev/reports/PR_26175_CHARLIE_014-configuration-summary-requirement-checklist.md
12+
?? docs_build/dev/reports/PR_26175_CHARLIE_014-configuration-summary-validation.md
13+
?? docs_build/dev/reports/PR_26175_CHARLIE_014-configuration-summary.md
1414

1515
# git ls-files --others --exclude-standard
16-
docs_build/dev/reports/PR_26175_CHARLIE_013-service-health-dashboard-branch-validation.md
17-
docs_build/dev/reports/PR_26175_CHARLIE_013-service-health-dashboard-manual-validation-notes.md
18-
docs_build/dev/reports/PR_26175_CHARLIE_013-service-health-dashboard-requirement-checklist.md
19-
docs_build/dev/reports/PR_26175_CHARLIE_013-service-health-dashboard-validation.md
20-
docs_build/dev/reports/PR_26175_CHARLIE_013-service-health-dashboard.md
16+
docs_build/dev/reports/PR_26175_CHARLIE_014-configuration-summary-branch-validation.md
17+
docs_build/dev/reports/PR_26175_CHARLIE_014-configuration-summary-manual-validation-notes.md
18+
docs_build/dev/reports/PR_26175_CHARLIE_014-configuration-summary-requirement-checklist.md
19+
docs_build/dev/reports/PR_26175_CHARLIE_014-configuration-summary-validation.md
20+
docs_build/dev/reports/PR_26175_CHARLIE_014-configuration-summary.md
2121

2222
# git diff --stat
23-
admin/system-health.html | 16 +++
24-
assets/theme-v2/js/admin-system-health.js | 62 +++++++++++
25-
.../dev/reports/coverage_changed_js_guardrail.txt | 3 +-
26-
.../dev/reports/playwright_v8_coverage_report.txt | 12 +--
27-
src/dev-runtime/server/local-api-router.mjs | 115 +++++++++++++++++++++
28-
tests/dev-runtime/AdminHealthOperations.test.mjs | 10 ++
29-
.../tools/AdminHealthOperationsPage.spec.mjs | 9 ++
30-
7 files changed, 216 insertions(+), 11 deletions(-)
23+
admin/system-health.html | 16 ++++++
24+
assets/theme-v2/js/admin-system-health.js | 42 +++++++++++++++
25+
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
26+
.../dev/reports/playwright_v8_coverage_report.txt | 6 +--
27+
src/dev-runtime/server/local-api-router.mjs | 63 ++++++++++++++++++++++
28+
tests/dev-runtime/AdminHealthOperations.test.mjs | 16 ++++++
29+
.../tools/AdminHealthOperationsPage.spec.mjs | 10 ++++
30+
7 files changed, 151 insertions(+), 4 deletions(-)

0 commit comments

Comments
 (0)