Skip to content

Commit 5682011

Browse files
committed
Polish Admin Notes navigation and rename dev viewer file - PR_26158_049-admin-notes-navigation-polish
1 parent eda114e commit 5682011

11 files changed

Lines changed: 158 additions & 76 deletions
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# PR_26158_049 Admin Notes Navigation Polish Report
2+
3+
## Summary
4+
5+
PR_26158_049 renames the dev-only Admin Notes source page to `src/dev-runtime/admin/notes.html`, keeps `/admin/admin-notes.html` as the local admin-facing route, and polishes the viewer folder navigation into separate folder/file sections with a parent `..` control.
6+
7+
## Implementation
8+
9+
| File | Change |
10+
| --- | --- |
11+
| `src/dev-runtime/admin/notes.html` | Renamed from `admin-notes.html`; updated directory UI to show `Local Dev`, `Current Folder: <folder>`, `..`, `Open folders:`, and `Open files:`. |
12+
| `src/dev-runtime/admin/admin-notes-viewer.js` | Tracks the current folder, disables/enables `..`, separates folder/file links, and navigates parent folders through `index.txt`. |
13+
| `src/dev-runtime/admin/admin-notes-menu.mjs` | Updated the dev source path constant to `/src/dev-runtime/admin/notes.html`. |
14+
| `src/dev-runtime/server/local-api-server.mjs` | Maps `/admin/admin-notes.html` to `/src/dev-runtime/admin/notes.html`. |
15+
| `tests/helpers/playwrightRepoServer.mjs` | Mirrors the local route mapping for Playwright. |
16+
| `tests/dev-runtime/AdminNotesBoundary.test.mjs` | Validates new source filename and retired old filename. |
17+
| `tests/playwright/tools/AdminNotesLocalViewer.spec.mjs` | Adds assertions for root/child `..` states, separated folders/files, selected file content, and the renamed source route. |
18+
19+
## Requirement Checklist
20+
21+
| Requirement | Status | Evidence |
22+
| --- | --- | --- |
23+
| Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first. | PASS | Read before implementation. |
24+
| Rename `src/dev-runtime/admin/admin-notes.html` to `src/dev-runtime/admin/notes.html`. | PASS | Old source path is absent; new source path exists. |
25+
| Keep local route `/admin/admin-notes.html` mapped to `src/dev-runtime/admin/notes.html`. | PASS | Local server and Playwright helper route `/admin/admin-notes.html` to `/src/dev-runtime/admin/notes.html`; Admin menu Playwright passes. |
26+
| Update Admin menu links/routes without exposing Admin Notes in UAT/PROD. | PASS | Local menu remains `/admin/admin-notes.html`; production header and public path audits returned no matches. |
27+
| Show `Local Dev`. | PASS | `notes.html` directory card includes `Local Dev`; Playwright renders the card. |
28+
| Show `Current Folder: <folder name> [..]`. | PASS | Viewer renders `Current Folder: admin-notes` at root and updates to `other` in child folder; `..` button is present. |
29+
| Add a `..` button to the right of Current Folder. | PASS | `notes.html` uses a section-heading with current folder and `data-admin-notes-parent-folder` button; Playwright uses that button. |
30+
| Disable `..` at admin-notes root. | PASS | Playwright validates `..` is disabled at root. |
31+
| Enable `..` in child folder. | PASS | Playwright opens `other/`, validates `..` is enabled, and clicks it back to root. |
32+
| Separate folders and files into distinct sections. | PASS | Playwright validates folder links only under `data-admin-notes-folder-links` and file links only under `data-admin-notes-file-links`. |
33+
| Preserve `index.txt` default display and selected `.txt` note display. | PASS | Playwright validates default `Project Life Cycle`, selected `quick-reference.txt`, and child `other/index.txt` content. |
34+
| Do not modify `start_of_day` folders. | PASS | `git diff --name-only \| rg "(^|/)start_of_day(/|$)"` returned no matches. |
35+
36+
## Validation
37+
38+
| Validation | Status | Evidence |
39+
| --- | --- | --- |
40+
| Changed-file syntax checks. | PASS | `node --check` passed for changed JS/MJS/test files; AdminNotesBoundary passed 5/5. |
41+
| AdminNotesLocalViewer Playwright. | PASS | Targeted viewer test validates folder/file separation, `..` states, selected files, and child folder behavior. |
42+
| Admin menu Playwright proving `/admin/admin-notes.html` still opens. | PASS | LoginSessionMode tests validate random-port and fixed `5501` Admin menu click-through. |
43+
| Verify UAT/PROD paths do not expose `src/dev-runtime/admin/`. | PASS | Static import/exposure audits returned no matches in production-facing path set. |
44+
45+
## Skipped Lanes
46+
47+
| Lane | Decision | Reason |
48+
| --- | --- | --- |
49+
| Full samples smoke | SKIP | No sample loader/framework, sample data, or game runtime changed. |
50+
| Full Playwright suite | SKIP | Targeted Admin Notes viewer and Admin menu lanes cover the requested behavior. |
51+
52+
## Result
53+
54+
PASS. All requested PR_26158_049 requirements are implemented and validated.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.
88
Changed runtime JS files considered:
99
(0%) src/dev-runtime/admin/admin-notes-menu.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1010
(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
11+
(91%) src/dev-runtime/admin/admin-notes-viewer.js - executed lines 520/520; executed functions 48/53
1212

1313
Guardrail warnings:
1414
(0%) src/dev-runtime/admin/admin-notes-menu.mjs - WARNING: changed runtime JS file missing from coverage; advisory only

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,16 @@ Note: coverage entries are aggregated across every page/tool where coverageRepor
1414
Exercised tool entry points detected:
1515
(0%) Toolbox Index - not exercised by this Playwright run
1616
(0%) Tool Template V2 - not exercised by this Playwright run
17-
(70%) Theme V2 Shared JS - exercised 2 runtime JS files
17+
(75%) Theme V2 Shared JS - exercised 1 runtime JS files
1818

1919
Changed runtime JS files covered:
2020
(0%) src/dev-runtime/admin/admin-notes-menu.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2121
(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
22+
(91%) src/dev-runtime/admin/admin-notes-viewer.js - executed lines 520/520; executed functions 48/53
2323

2424
Files with executed line/function counts where available:
25-
(20%) src/engine/api/mock-db-api-client.js - executed lines 19/19; executed functions 1/5
26-
(29%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 4/14
27-
(62%) assets/theme-v2/js/login-session.js - executed lines 357/357; executed functions 16/26
28-
(63%) src/engine/api/session-api-client.js - executed lines 34/34; executed functions 5/8
2925
(75%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 441/441; executed functions 30/40
30-
(96%) src/dev-runtime/admin/admin-notes-viewer.js - executed lines 501/501; executed functions 47/49
26+
(91%) src/dev-runtime/admin/admin-notes-viewer.js - executed lines 520/520; executed functions 48/53
3127

3228
Uncovered or low-coverage changed JS files:
3329
(0%) src/dev-runtime/admin/admin-notes-menu.mjs - WARNING: uncovered changed runtime JS file; advisory only
@@ -40,4 +36,4 @@ Changed JS files considered:
4036
(0%) tests/helpers/playwrightRepoServer.mjs - changed JS file not collected as browser runtime coverage
4137
(0%) tests/playwright/tools/AdminNotesLocalViewer.spec.mjs - changed JS file not collected as browser runtime coverage
4238
(0%) tests/playwright/tools/LoginSessionMode.spec.mjs - changed JS file not collected as browser runtime coverage
43-
(96%) src/dev-runtime/admin/admin-notes-viewer.js - changed JS file with browser V8 coverage
39+
(91%) src/dev-runtime/admin/admin-notes-viewer.js - changed JS file with browser V8 coverage

docs_build/dev/reports/testing_lane_execution_report.md

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# PR_26158_048 Testing Lane Execution Report
1+
# PR_26158_049 Testing Lane Execution Report
22

33
## Lanes Run
44

55
| Lane | Command | Result |
66
| --- | --- | --- |
77
| Changed-file syntax checks | `node --check src/dev-runtime/admin/admin-notes-menu.mjs`; `node --check src/dev-runtime/admin/admin-notes-viewer.js`; `node --check src/dev-runtime/server/local-api-server.mjs`; `node --check tests/helpers/playwrightRepoServer.mjs`; `node --check tests/dev-runtime/AdminNotesBoundary.test.mjs`; `node --check tests/playwright/tools/AdminNotesLocalViewer.spec.mjs`; `node --check tests/playwright/tools/LoginSessionMode.spec.mjs`; `node --test tests/dev-runtime/AdminNotesBoundary.test.mjs` | PASS, AdminNotesBoundary 5/5 |
8-
| AdminNotesLocalViewer Playwright | `npx playwright test tests/playwright/tools/AdminNotesLocalViewer.spec.mjs tests/playwright/tools/LoginSessionMode.spec.mjs --grep "Admin Notes local viewer loads\|Admin Notes direct dev-runtime\|Local users unlock\|API-backed 5501 login page shows" --workers=1` | PASS, 4/4 after restarting stale local server |
9-
| Production header partial clean check | `Select-String -Path assets/theme-v2/partials/header-nav.html -Pattern "Admin Notes\|data-admin-notes-local-menu\|admin-notes\|docs_build/dev/admin-notes"`; `Test-Path admin/admin-notes.html`; `Test-Path admin/notes.html` | PASS, no header matches; both production admin note paths returned `False` |
8+
| AdminNotesLocalViewer and Admin menu Playwright | `npx playwright test tests/playwright/tools/AdminNotesLocalViewer.spec.mjs tests/playwright/tools/LoginSessionMode.spec.mjs --grep "Admin Notes local viewer loads\|Local users unlock\|API-backed 5501 login page shows" --workers=1` | PASS, 3/3 |
9+
| Direct renamed source route Playwright | `npx playwright test tests/playwright/tools/AdminNotesLocalViewer.spec.mjs --grep "Admin Notes direct dev-runtime source route" --workers=1` | PASS, 1/1 |
10+
| Production header/route clean check | `Select-String -Path assets/theme-v2/partials/header-nav.html -Pattern "Admin Notes\|data-admin-notes-local-menu\|admin-notes\|docs_build/dev/admin-notes"`; `Test-Path admin/admin-notes.html`; `Test-Path admin/notes.html`; `Test-Path src/dev-runtime/admin/admin-notes.html`; `Test-Path src/dev-runtime/admin/notes.html` | PASS, no header matches; production admin note paths false; old source false; new source true |
1011
| Public navigation exposure audit | `rg -n "docs_build/dev/admin-notes\|docs_build\\dev\\admin-notes\|data-admin-notes-local-menu\|Admin Notes" account admin assets toolbox src/engine src/shared --glob '!archive/v1-v2/**' --glob '!tmp/**'` | PASS, no matches |
1112
| UAT/PROD dev-runtime admin import audit | `rg -n "src/dev-runtime/admin\|src\\dev-runtime\\admin" account admin assets toolbox src/engine src/shared --glob '!archive/v1-v2/**' --glob '!tmp/**'` | PASS, no matches |
1213
| Changed-file whitespace/static validation | `git diff --check` | PASS, Git line-ending warnings only |
@@ -16,27 +17,20 @@
1617

1718
| Check | Evidence | Result |
1819
| --- | --- | --- |
19-
| `/admin/admin-notes.html` opens and renders the viewer. | AdminNotesLocalViewer Playwright opens the route, validates header/footer, viewer title, loaded `index.txt`, folder/file links, and note content. | PASS |
20-
| Direct `/src/dev-runtime/admin/admin-notes.html` still works. | AdminNotesLocalViewer Playwright opens the direct source route and validates the viewer, header/footer, and loaded `index.txt` status. | PASS |
21-
| Admin menu opens `/admin/admin-notes.html`. | LoginSessionMode Playwright hovers Admin, validates `Admin Notes (Local Dev)` link `href="/admin/admin-notes.html"`, clicks it, and validates the viewer. | PASS |
22-
| Fixed local API-backed path works from `http://127.0.0.1:5501/login.html`. | LoginSessionMode Playwright opens the exact fixed-port login URL and clicks through to `http://127.0.0.1:5501/admin/admin-notes.html`. | PASS |
23-
| Viewer uses the Theme V2 admin page shell. | Boundary and Playwright checks validate shared header/footer partial slots, Theme V2 partial wiring, and no inline script/style/event handlers. | PASS |
24-
| Production/public header remains clean. | Static partial and public exposure checks returned no matches. | PASS |
25-
| UAT/PROD-facing paths do not expose Admin Notes implementation. | Static import audit returned no matches under public/admin/account/toolbox/engine/shared paths. | PASS |
26-
27-
## Rerun Notes
28-
29-
| Attempt | Result | Resolution |
30-
| --- | --- | --- |
31-
| First targeted Playwright attempt | FAIL | PID `71976` was a stale `node ./scripts/start-local-api-server.mjs` instance serving the previous `/src/dev-runtime/admin/admin-notes.html` menu link on port 5501. |
32-
| Final targeted Playwright attempt | PASS | Stopped the stale local server process, reran the targeted lane, and validated `/admin/admin-notes.html` from the fixed 5501 login URL. |
20+
| Source page renamed to `src/dev-runtime/admin/notes.html`. | File check returned old source `False`, new source `True`; AdminNotesBoundary treats old source as retired. | PASS |
21+
| `/admin/admin-notes.html` still opens the viewer. | Admin menu Playwright validates menu click-through to `/admin/admin-notes.html` and loaded `index.txt`. | PASS |
22+
| Root folder disables `..`. | AdminNotesLocalViewer Playwright validates `data-admin-notes-parent-folder` is disabled at `admin-notes`. | PASS |
23+
| Child folder enables `..`. | AdminNotesLocalViewer Playwright opens `other/` and validates `..` is enabled, then clicks it back to root. | PASS |
24+
| Folders and files are separated. | Playwright validates folders render under `data-admin-notes-folder-links`, files render under `data-admin-notes-file-links`, and cross-type lists are empty. | PASS |
25+
| Selected text files display content. | Playwright opens `quick-reference.txt` and validates `Quick Reference` content. | PASS |
26+
| UAT/PROD paths do not expose Admin Notes implementation. | Static exposure/import audits returned no matches in production-facing paths. | PASS |
3327

3428
## Skipped Lanes
3529

3630
| Lane | Decision | Reason |
3731
| --- | --- | --- |
3832
| Full samples smoke | SKIP | No sample loader/framework, sample data, or game runtime changed. |
39-
| Full Playwright suite | SKIP | Targeted Admin Notes viewer and Admin menu lanes cover the local route/template behavior requested. |
33+
| Full Playwright suite | SKIP | Targeted Admin Notes viewer and Admin menu lanes validate the requested navigation behavior. |
4034

4135
## Notes
4236

src/dev-runtime/admin/admin-notes-menu.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from "node:path";
22

33
export const ADMIN_NOTES_LOCAL_VIEWER_PATH = "/admin/admin-notes.html";
4-
export const ADMIN_NOTES_LOCAL_SOURCE_PATH = "/src/dev-runtime/admin/admin-notes.html";
4+
export const ADMIN_NOTES_LOCAL_SOURCE_PATH = "/src/dev-runtime/admin/notes.html";
55
export const ADMIN_NOTES_LOCAL_MENU_LABEL = "Admin Notes (Local Dev)";
66

77
const HEADER_PARTIAL_PATH = "assets/theme-v2/partials/header-nav.html";

0 commit comments

Comments
 (0)