Skip to content

Commit c32ebe4

Browse files
committed
Restore dev-only Admin Notes directory viewer and remove header hardcode - PR_26158_043-admin-notes-local-viewer-restore
1 parent b583def commit c32ebe4

15 files changed

Lines changed: 407 additions & 141 deletions

assets/theme-v2/js/gamefoundry-partials.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
"admin-roles": "admin/roles.html",
8181
"admin-moderation": "admin/moderation.html",
8282
"admin-analytics": "admin/analytics.html",
83-
"admin-notes-dev": "docs_build/dev/admin-notes/index.txt",
8483
"admin-tools-progress": "admin/tools-progress.html",
8584
"cookie-policy": "legal/cookie-policy.html",
8685
disclaimer: "legal/disclaimer.html",

assets/theme-v2/partials/header-nav.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@
119119
<a data-nav-link data-route="game-migration" href="toolbox/game-migration/index.html">Game Migration</a>
120120
<a data-nav-link data-route="admin-grouping-colors" href="admin/grouping-colors.html">Grouping Colors</a>
121121
<a data-nav-link data-route="admin-moderation" href="admin/moderation.html">Moderation</a>
122-
<a data-nav-link data-route="admin-notes-dev" href="docs_build/dev/admin-notes/index.txt">Notes (Dev/Admin Only)</a>
123122
<a data-nav-link data-route="platform-settings" href="toolbox/platform-settings/index.html">Platform Settings</a>
124123
<a data-nav-link data-route="admin-ratings" href="admin/ratings.html">Ratings</a>
125124
<a data-nav-link data-route="admin-roles" href="admin/roles.html">Roles</a>

docs_build/dev/admin-notes/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ Owned paths:
1111

1212
Runtime boundary:
1313
- Admin Notes viewer implementation, when needed for local/dev inspection, belongs under `src/dev-runtime/admin/`.
14-
- Only the admin/dev menu may link directly to `docs_build/dev/admin-notes/` content.
15-
- Public user navigation, toolbox pages, root pages, and production runtime bundles must not link to or fetch Admin Notes content.
14+
- Local/dev viewer access belongs under `src/dev-runtime/admin/`.
15+
- Public user navigation, Admin/public route pages, toolbox pages, root pages, and production runtime bundles must not link to or fetch Admin Notes content.
1616
- UAT/PROD bundles must not import `src/dev-runtime/admin/`.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# PR_26158_043 Admin Notes Local Viewer Restore Report
2+
3+
## Summary
4+
5+
Restored a dev-runtime-only Admin Notes viewer at `src/dev-runtime/admin/admin-notes.html`. The viewer loads `docs_build/dev/admin-notes/index.txt` by default, lists live folders/files from `docs_build/dev/admin-notes/`, and opens selected `.txt` notes without exposing Admin Notes from public or production navigation.
6+
7+
## Requirement Checklist
8+
9+
| Requirement | Evidence | Status |
10+
| --- | --- | --- |
11+
| Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first. | Read before implementation. | PASS |
12+
| Restore prior Admin Notes local viewer behavior with default `index.txt`. | `src/dev-runtime/admin/admin-notes.html`; `src/dev-runtime/admin/admin-notes-viewer.js`; Playwright default-load assertion. | PASS |
13+
| Show folders and file names from `docs_build/dev/admin-notes/`. | `src/dev-runtime/admin/admin-notes-directory.mjs` safely lists live root folder entries; Playwright validates folder/file links. | PASS |
14+
| Read and display selected `.txt` note content. | Playwright opens `quick-reference.txt` and `other/index.txt`. | PASS |
15+
| Keep implementation dev-only under `src/dev-runtime/admin/`. | Viewer page, viewer JS, and directory handler live under `src/dev-runtime/admin/`. | PASS |
16+
| Remove Admin Notes hardcoded link from `assets/theme-v2/partials/header-nav.html`. | Header link removed; static audit returns no Admin Notes matches in public/header paths. | PASS |
17+
| Do not expose Admin Notes from production/public navigation. | Boundary test and static audit over `account admin assets toolbox src/engine src/shared`. | PASS |
18+
| Add local/dev-only access through the dev/admin local entrypoint only. | Local entrypoint is `/src/dev-runtime/admin/admin-notes.html`; no public nav or Admin menu link was added. | PASS |
19+
| Do not add fallbacks. | Viewer uses explicit fetches and shows existing visible diagnostics when files/listing are unavailable; no alternate source or hidden default was added. | PASS |
20+
| Do not modify `start_of_day` folders. | `git diff --name-only \| rg "(^|/)start_of_day(/|$)"` returned no matches. | PASS |
21+
| Run changed-file syntax checks. | `node --check` lane passed for changed JS/MJS files. | PASS |
22+
| Run targeted Admin Notes local viewer validation. | `npx playwright test tests/playwright/tools/AdminNotesLocalViewer.spec.mjs` passed. | PASS |
23+
| Verify `docs_build/dev/admin-notes/index.txt` displays by default. | Playwright title/status/content assertions. | PASS |
24+
| Verify folder/file selection displays selected note content. | Playwright clicks `quick-reference.txt` and `other/`. | PASS |
25+
| Verify header nav no longer links directly to `docs_build/dev/admin-notes/`. | Boundary test and `rg` exposure audit. | PASS |
26+
| Verify UAT/PROD paths do not import `src/dev-runtime/admin/`. | Static import audit returned no matches. | PASS |
27+
| Do not run full samples smoke unless directly impacted. | Skipped; no sample loader/framework or sample data changed. | PASS |
28+
29+
## Changed Files
30+
31+
| File | Purpose |
32+
| --- | --- |
33+
| `src/dev-runtime/admin/admin-notes.html` | Dev-runtime local viewer entrypoint. |
34+
| `src/dev-runtime/admin/admin-notes-viewer.js` | Points note/file links at the dev-runtime viewer and fetches repo-root note files. |
35+
| `src/dev-runtime/admin/admin-notes-directory.mjs` | Safely lists live Admin Notes folders/files under `docs_build/dev/admin-notes/`. |
36+
| `src/dev-runtime/server/local-api-server.mjs` | Wires the local server to the Admin Notes directory handler. |
37+
| `tests/helpers/playwrightRepoServer.mjs` | Wires the Playwright local server to the same dev-only directory handler. |
38+
| `assets/theme-v2/partials/header-nav.html` | Removes the direct Admin Notes menu link. |
39+
| `assets/theme-v2/js/gamefoundry-partials.js` | Removes the direct Admin Notes route map entry. |
40+
| `docs_build/dev/admin-notes/README.md` | Documents the restored dev-runtime-only viewer boundary. |
41+
| `tests/dev-runtime/AdminNotesBoundary.test.mjs` | Enforces no public/prod exposure and dev-runtime placement. |
42+
| `tests/playwright/tools/AdminNotesLocalViewer.spec.mjs` | Validates default load, live directory links, and selected note rendering. |
43+
| `tests/playwright/tools/LoginSessionMode.spec.mjs` | Removes the PR042 expectation that Admin navigation exposes Admin Notes. |
44+
45+
## Validation Evidence
46+
47+
| Validation | Result |
48+
| --- | --- |
49+
| Changed-file `node --check` lane | PASS |
50+
| `node --test tests/dev-runtime/AdminNotesBoundary.test.mjs` | PASS, 3/3 |
51+
| `npx playwright test tests/playwright/tools/AdminNotesLocalViewer.spec.mjs` | PASS |
52+
| `npx playwright test tests/playwright/tools/LoginSessionMode.spec.mjs --grep "Local users unlock their allowed Account and Admin pages"` | PASS |
53+
| `npx playwright test tests/playwright/tools/RootToolsFutureState.spec.mjs --grep "common header renders primary navigation order across active pages"` | PASS |
54+
| Public navigation exposure audit | PASS, no matches |
55+
| UAT/PROD dev-runtime admin import audit | PASS, no matches |
56+
| `git diff --check` | PASS, line-ending warnings only |
57+
58+
## Playwright Impact
59+
60+
Playwright impacted: Yes. This PR restores a local viewer page, file selection behavior, and live directory-listing behavior. Expected pass behavior is that the viewer loads `index.txt`, lists current folder entries, and opens selected note content. Expected fail behavior is missing default content, missing folder/file links, or selected note clicks failing to update the content/status.
61+
62+
## Manual Test Notes
63+
64+
1. Start the API-backed local server.
65+
2. Open `/src/dev-runtime/admin/admin-notes.html`.
66+
3. Confirm `index.txt` content loads by default.
67+
4. Click `quick-reference.txt` and `other/`; each should display that selected note content.
68+
5. Confirm the public/Admin header menus do not contain an Admin Notes link.
69+
70+
## Skipped Lanes
71+
72+
- Full samples smoke: skipped because samples and game runtime were not touched.
73+
- Full Playwright suite: skipped because targeted Admin Notes, header, and auth/menu lanes cover the changed behavior.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,10 @@ 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%) src/dev-runtime/guest-seeds/palette-source-mock-db.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10-
(0%) src/dev-runtime/guest-seeds/tool-state-samples.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
11-
(0%) src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
12-
(0%) src/dev-runtime/persistence/tool-repositories/game-configuration-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/game-design-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
14-
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
15-
(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
16-
(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
17-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
18-
(60%) src/engine/api/mock-db-api-client.js - executed lines 19/19; executed functions 3/5
9+
(0%) src/dev-runtime/admin/admin-notes-directory.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10+
(0%) src/dev-runtime/server/local-api-server.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
11+
(96%) src/dev-runtime/admin/admin-notes-viewer.js - executed lines 501/501; executed functions 47/49
1912

2013
Guardrail warnings:
21-
(0%) src/dev-runtime/guest-seeds/palette-source-mock-db.js - WARNING: changed runtime JS file missing from coverage; advisory only
22-
(0%) src/dev-runtime/guest-seeds/tool-state-samples.js - WARNING: changed runtime JS file missing from coverage; advisory only
23-
(0%) src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
24-
(0%) src/dev-runtime/persistence/tool-repositories/game-configuration-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
25-
(0%) src/dev-runtime/persistence/tool-repositories/game-design-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
26-
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
27-
(0%) src/dev-runtime/persistence/tool-repositories/project-journey-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
28-
(0%) src/dev-runtime/persistence/tool-repositories/project-workspace-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
29-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file missing from coverage; advisory only
14+
(0%) src/dev-runtime/admin/admin-notes-directory.mjs - WARNING: changed runtime JS file missing from coverage; advisory only
15+
(0%) src/dev-runtime/server/local-api-server.mjs - WARNING: changed runtime JS file missing from coverage; advisory only

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 15 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,63 +12,28 @@ 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-
(86%) Toolbox Index - exercised 6 runtime JS files
15+
(0%) Toolbox Index - not exercised by this Playwright run
1616
(0%) Tool Template V2 - not exercised by this Playwright run
17-
(72%) Theme V2 Shared JS - exercised 2 runtime JS files
17+
(0%) Theme V2 Shared JS - not exercised by this Playwright run
1818

1919
Changed runtime JS files covered:
20-
(0%) src/dev-runtime/guest-seeds/palette-source-mock-db.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21-
(0%) src/dev-runtime/guest-seeds/tool-state-samples.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
22-
(0%) src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
23-
(0%) src/dev-runtime/persistence/tool-repositories/game-configuration-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/game-design-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
25-
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
26-
(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
27-
(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
28-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
29-
(60%) src/engine/api/mock-db-api-client.js - executed lines 19/19; executed functions 3/5
20+
(0%) src/dev-runtime/admin/admin-notes-directory.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21+
(0%) src/dev-runtime/server/local-api-server.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
22+
(96%) src/dev-runtime/admin/admin-notes-viewer.js - executed lines 501/501; executed functions 47/49
3023

3124
Files with executed line/function counts where available:
32-
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
33-
(60%) src/engine/api/mock-db-api-client.js - executed lines 19/19; executed functions 3/5
34-
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 201/201; executed functions 9/14
35-
(67%) admin/db-viewer.js - executed lines 53/53; executed functions 4/6
36-
(71%) toolbox/project-workspace/project-workspace.js - executed lines 264/264; executed functions 17/24
37-
(74%) toolbox/tools-page-accordions.js - executed lines 774/774; executed functions 53/72
38-
(75%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 442/442; executed functions 30/40
39-
(88%) src/engine/api/mock-db-viewer-ui.js - executed lines 517/517; executed functions 86/98
40-
(89%) toolbox/tool-registry-api-client.js - executed lines 148/148; executed functions 24/27
41-
(97%) toolbox/project-journey/project-journey.js - executed lines 1003/1003; executed functions 104/107
42-
(100%) toolbox/project-journey/project-journey-api-client.js - executed lines 12/12; executed functions 2/2
43-
(100%) toolbox/project-workspace/project-workspace-api-client.js - executed lines 12/12; executed functions 2/2
25+
(96%) src/dev-runtime/admin/admin-notes-viewer.js - executed lines 501/501; executed functions 47/49
4426

4527
Uncovered or low-coverage changed JS files:
46-
(0%) src/dev-runtime/guest-seeds/palette-source-mock-db.js - WARNING: uncovered changed runtime JS file; advisory only
47-
(0%) src/dev-runtime/guest-seeds/tool-state-samples.js - WARNING: uncovered changed runtime JS file; advisory only
48-
(0%) src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only
49-
(0%) src/dev-runtime/persistence/tool-repositories/game-configuration-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only
50-
(0%) src/dev-runtime/persistence/tool-repositories/game-design-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only
51-
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - WARNING: uncovered changed runtime JS file; advisory only
52-
(0%) src/dev-runtime/persistence/tool-repositories/project-journey-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only
53-
(0%) src/dev-runtime/persistence/tool-repositories/project-workspace-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only
54-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: uncovered changed runtime JS file; advisory only
28+
(0%) src/dev-runtime/admin/admin-notes-directory.mjs - WARNING: uncovered changed runtime JS file; advisory only
29+
(0%) src/dev-runtime/server/local-api-server.mjs - WARNING: uncovered changed runtime JS file; advisory only
5530

5631
Changed JS files considered:
57-
(0%) assets/theme-v2/js/login-session.js - changed JS file not collected as browser runtime coverage
58-
(0%) src/dev-runtime/guest-seeds/palette-source-mock-db.js - changed JS file not collected as browser runtime coverage
59-
(0%) src/dev-runtime/guest-seeds/tool-state-samples.js - changed JS file not collected as browser runtime coverage
60-
(0%) src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js - changed JS file not collected as browser runtime coverage
61-
(0%) src/dev-runtime/persistence/tool-repositories/game-configuration-mock-repository.js - changed JS file not collected as browser runtime coverage
62-
(0%) src/dev-runtime/persistence/tool-repositories/game-design-mock-repository.js - changed JS file not collected as browser runtime coverage
63-
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - changed JS file not collected as browser runtime coverage
64-
(0%) src/dev-runtime/persistence/tool-repositories/project-journey-mock-repository.js - changed JS file not collected as browser runtime coverage
65-
(0%) src/dev-runtime/persistence/tool-repositories/project-workspace-mock-repository.js - changed JS file not collected as browser runtime coverage
66-
(0%) src/dev-runtime/server/mock-api-router.mjs - changed JS file not collected as browser runtime coverage
67-
(0%) tests/dev-runtime/DbSeedIntegrity.test.mjs - changed JS file not collected as browser runtime coverage
68-
(0%) tests/dev-runtime/DevRuntimeBoundary.test.mjs - changed JS file not collected as browser runtime coverage
69-
(0%) tests/playwright/tools/AdminDbViewer.spec.mjs - changed JS file not collected as browser runtime coverage
70-
(0%) tests/playwright/tools/AssetToolMockRepository.spec.mjs - changed JS file not collected as browser runtime coverage
32+
(0%) assets/theme-v2/js/gamefoundry-partials.js - changed JS file not collected as browser runtime coverage
33+
(0%) src/dev-runtime/admin/admin-notes-directory.mjs - changed JS file not collected as browser runtime coverage
34+
(0%) src/dev-runtime/server/local-api-server.mjs - changed JS file not collected as browser runtime coverage
35+
(0%) tests/dev-runtime/AdminNotesBoundary.test.mjs - changed JS file not collected as browser runtime coverage
36+
(0%) tests/helpers/playwrightRepoServer.mjs - changed JS file not collected as browser runtime coverage
37+
(0%) tests/playwright/tools/AdminNotesLocalViewer.spec.mjs - changed JS file not collected as browser runtime coverage
7138
(0%) tests/playwright/tools/LoginSessionMode.spec.mjs - changed JS file not collected as browser runtime coverage
72-
(0%) tests/playwright/tools/PaletteToolMockRepository.spec.mjs - changed JS file not collected as browser runtime coverage
73-
(0%) tests/playwright/tools/ProjectJourneyTool.spec.mjs - changed JS file not collected as browser runtime coverage
74-
(60%) src/engine/api/mock-db-api-client.js - changed JS file with browser V8 coverage
39+
(96%) src/dev-runtime/admin/admin-notes-viewer.js - changed JS file with browser V8 coverage

0 commit comments

Comments
 (0)