Skip to content

Commit c384b4f

Browse files
committed
Merge origin/main into Bravo messages
2 parents 2c7ddad + d9724b1 commit c384b4f

297 files changed

Lines changed: 48822 additions & 2997 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ GAMEFOUNDRY_DB_BACKUP_DIR=
5050

5151
# Server-only project asset storage configuration.
5252
# Browser uploads must go through the server API and must not receive these secrets.
53+
# Approved GAMEFOUNDRY_STORAGE_PROJECTS_PREFIX values:
54+
# DEV /dev/projects/
55+
# IST /ist/projects/
56+
# UAT /uat/projects/
57+
# PRD /prod/projects/
5358
GAMEFOUNDRY_STORAGE_ENDPOINT=
5459
GAMEFOUNDRY_STORAGE_ACCESS_KEY_ID=
5560

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
# Ignore the NEXT_COMMAND.txt file
1414
NEXT_COMMAND.txt
1515

16-
# Ignore the tests results and temporary files
16+
# Ignore generated dependency, test result, and temporary files
1717
node_modules/
1818
tests/results/
19+
tests/results/**
1920
tmp/test-results/
21+
tmp/test-results/**
2022
tmp/
2123
scripts/untracked/
2224
projects/

account/user-controls-page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createControlsToolApiRepository } from "../toolbox/controls/controls-api-client.js";
1+
import { createControlsToolApiRepository } from "../assets/js/shared/controls-api-client.js";
22
import { getSessionCurrent } from "../src/api/session-api-client.js";
33
import InputService from "../src/engine/input/InputService.js";
44
import InputCaptureService from "../src/engine/input/InputCaptureService.js";

admin/infrastructure.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ <h2>Admin</h2>
4141
<p>/dev/projects/</p>
4242
<p>/ist/projects/</p>
4343
<p>/uat/projects/</p>
44-
<p>/prd/projects/</p>
44+
<p>/prod/projects/</p>
4545
</div>
4646
</details>
4747
</div>
@@ -81,7 +81,7 @@ <h3 id="admin-infrastructure-image-zoom-title">Game Foundry Infrastructure</h3>
8181
<tr><td>DEV</td><td>/dev/projects/</td><td>Loading</td></tr>
8282
<tr><td>IST</td><td>/ist/projects/</td><td>Loading</td></tr>
8383
<tr><td>UAT</td><td>/uat/projects/</td><td>Loading</td></tr>
84-
<tr><td>PRD</td><td>/prd/projects/</td><td>Loading</td></tr>
84+
<tr><td>PRD</td><td>/prod/projects/</td><td>Loading</td></tr>
8585
</tbody>
8686
</table>
8787
</div>

admin/system-health.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ <h2>Admin</h2>
3939
<summary>Health Sections</summary>
4040
<div class="accordion-body content-stack">
4141
<p>Environment Summary</p>
42+
<p>Local API Startup</p>
4243
<p>Database Health</p>
4344
<p>Storage Health</p>
4445
<p>Runtime Environment</p>
@@ -74,6 +75,21 @@ <h2 id="admin-system-health-title">System Health Tables</h2>
7475
</tbody>
7576
</table>
7677
</div>
78+
<div class="table-wrapper">
79+
<table class="data-table" aria-label="Local API startup diagnostics">
80+
<caption>Local API Startup Diagnostics</caption>
81+
<thead>
82+
<tr>
83+
<th scope="col">Field</th>
84+
<th scope="col">Safe Value</th>
85+
<th scope="col">Status</th>
86+
</tr>
87+
</thead>
88+
<tbody data-admin-system-health-startup-rows>
89+
<tr><td>Startup diagnostics</td><td>Waiting for safe API status</td><td data-health-status="PENDING" title="Reason: safe Local API startup diagnostics have not loaded yet." aria-label="PENDING: safe Local API startup diagnostics have not loaded yet.">PENDING</td></tr>
90+
</tbody>
91+
</table>
92+
</div>
7793
<div class="table-wrapper">
7894
<table class="data-table" aria-label="Database health">
7995
<caption>Database Health - Postgres Only</caption>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
createServerRepositoryClient,
44
readServerToolConstants,
55
requireServerConstant,
6-
} from "../../src/api/server-api-client.js";
6+
} from "../../../src/api/server-api-client.js";
77

88
const constants = readServerToolConstants("assets");
99

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
createServerRepositoryClient,
33
readServerToolConstants,
44
requireServerConstant,
5-
} from "../../src/api/server-api-client.js";
5+
} from "../../../src/api/server-api-client.js";
66

77
const constants = readServerToolConstants("controls");
88

toolbox/game-journey/game-journey-api-client.js renamed to assets/js/shared/game-journey-api-client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import {
22
createServerRepositoryClient,
33
readServerToolConstants,
44
requireServerConstant,
5-
} from "../../src/api/server-api-client.js";
5+
} from "../../../src/api/server-api-client.js";
66
export {
77
readGameJourneyCompletionMetrics,
88
updateGameJourneyCompletionMetric,
9-
} from "../../src/api/game-journey-completion-api-client.js";
9+
} from "../../../src/api/game-journey-completion-api-client.js";
1010

1111
const constants = readServerToolConstants("game-journey");
1212

assets/js/shared/status.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
export const STATUS_VALUES = Object.freeze(["PASS", "WARN", "FAIL", "PENDING", "INFO", "SKIP"]);
2+
3+
export function statusText(value, fallback = "not available") {
4+
const text = String(value ?? "").trim();
5+
return text || fallback;
6+
}
7+
8+
export function normalizeStatusValue(value, fallback = "PENDING") {
9+
const normalized = String(value || "").trim().toUpperCase();
10+
return STATUS_VALUES.includes(normalized) ? normalized : fallback;
11+
}
12+
13+
export function formatStatusMessage(status, message, options = {}) {
14+
const normalized = normalizeStatusValue(status, options.fallbackStatus || "PENDING");
15+
const resolvedMessage = Object.hasOwn(options, "fallbackMessage")
16+
? statusText(message, options.fallbackMessage)
17+
: String(message);
18+
return `${normalized}: ${resolvedMessage}`;
19+
}
20+
21+
export function formatStatusReason(status, reason, options = {}) {
22+
const normalized = normalizeStatusValue(status, options.fallbackStatus || "PENDING");
23+
return `${normalized}: ${statusText(reason, options.fallbackReason || "Safe server diagnostics did not provide a reason.")}`;
24+
}
25+
26+
export function applyStatusNode(node, status, options = {}) {
27+
if (!node) {
28+
return "";
29+
}
30+
const normalized = normalizeStatusValue(status, options.fallbackStatus || "PENDING");
31+
node.textContent = normalized;
32+
node.dataset.healthStatus = normalized;
33+
if (normalized === "PASS" && !options.reason) {
34+
node.removeAttribute("title");
35+
node.removeAttribute("aria-label");
36+
return normalized;
37+
}
38+
const reason = statusText(options.reason, options.titleFallback || "Safe server diagnostics returned this non-PASS status.");
39+
node.setAttribute("title", `${options.titlePrefix || "Reason: "}${reason}`);
40+
node.setAttribute("aria-label", formatStatusReason(normalized, options.reason, options));
41+
return normalized;
42+
}
File renamed without changes.

0 commit comments

Comments
 (0)