You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constapiBackedLoginDiagnostic="Use the API-backed local server for login. Run npm run dev:local-api and open http://127.0.0.1:5501/login.html.";
18
-
conststaticModeDisabledMessage="Use the API-backed local server for login. Run npm run dev:local-api and open http://127.0.0.1:5501/login.html. Local Mem and Local DB are disabled until the local API server is running.";
17
+
constlocalApiStartCommand="npm run dev:local-api";
constapiBackedLoginDiagnostic=`Use the API-backed local server for login. Run ${localApiStartCommand} and open ${localApiLoginUrl}.`;
21
+
conststaticModeDisabledMessage=`Use the API-backed local server for login. Run ${localApiStartCommand} and open ${localApiLoginUrl}. Local Mem and Local DB are disabled until the local API server is running.`;
Added a Local Development Status section near the bottom of `login.html`, below a new HR, so local developers can see the current URL, detected server mode, Local API availability, disabled reason, expected endpoint, correct API-backed URL, and startup command.
6
+
7
+
Static-only `127.0.0.1:5500` login remains disabled with no fallback behavior. API-backed Local Mem and Local DB remain enabled when the local API server is available.
8
+
9
+
## Implementation
10
+
11
+
| Area | Change | Evidence |
12
+
| --- | --- | --- |
13
+
| Login page markup | Added one HR and a `Local Development Status` card using existing Theme V2 classes. |`login.html`|
14
+
| Login runtime | Populates current URL, detected server mode, API availability, disabled reason, expected endpoint, local URL, and startup command from the existing render/error paths. |`assets/theme-v2/js/login-session.js`|
15
+
| Static Playwright | Verifies the diagnostics are visible and explain why Local Mem / Local DB are disabled without API. |`tests/playwright/tools/StaticOnlyLoginApiRequired.spec.mjs`|
16
+
| API-backed Playwright | Verifies Local Mem / Local DB are enabled and diagnostics report API availability. |`tests/playwright/tools/LoginSessionMode.spec.mjs`|
17
+
18
+
## Requirement Checklist
19
+
20
+
| Requirement | Evidence | Status |
21
+
| --- | --- | --- |
22
+
| Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first. | Read before implementation and validation. | PASS |
23
+
| Add an HR near the bottom of `login.html`. | Added `main hr`; both Playwright lanes verify one HR in `main`. | PASS |
24
+
| Add a Local Development Status section below the HR. | Added `Local Development Status` H2 and status fields below the HR. | PASS |
25
+
| Display current URL. |`[data-login-status-current-url]` is populated from `window.location.href`; both Playwright lanes verify it. | PASS |
26
+
| Display detected server mode. | Static lane verifies `Static-only local server`; API-backed lane verifies Local Mem and Local DB server modes. | PASS |
27
+
| Display Local API availability status. | Static lane verifies `Unavailable`; API-backed lane verifies `Available` and `/api/session/current`. | PASS |
28
+
| Display why Local Mem and Local DB are disabled when API is unavailable. | Static lane verifies disabled reason text, command, and URL. | PASS |
29
+
| Display the expected API endpoint. | Both lanes verify `/api/session/current`. | PASS |
30
+
| Display the correct local API-backed URL and startup command if discoverable from repo scripts. | Both lanes verify `http://127.0.0.1:5501/login.html` and `npm run dev:local-api`, established by PR_26158_035. | PASS |
31
+
| Preserve disabled login behavior when API is unavailable. | Static lane verifies both login mode buttons are disabled and unselected. | PASS |
32
+
| Do not add fallback login behavior. | Static lane verifies no `/api/session/current` or `/api/session/` request is made from 5500. | PASS |
33
+
| Run changed-file syntax checks. |`node --check` passed for changed JS/spec files. | PASS |
34
+
| Run LoginSessionMode Playwright. |`npx playwright test tests/playwright/tools/LoginSessionMode.spec.mjs` passed 5/5. | PASS |
35
+
| Run static-only login Playwright proving diagnostics are visible. |`npx playwright test tests/playwright/tools/StaticOnlyLoginApiRequired.spec.mjs` passed 1/1. | PASS |
36
+
| Verify Local Mem and Local DB become enabled when API is available. | LoginSessionMode verifies both `[data-login-mode]` buttons are enabled on API-backed login. | PASS |
37
+
| Required reports and review artifacts generated. | This report, `testing_lane_execution_report.md`, V8 coverage report, review diff, changed files, and ZIP artifact generated. | PASS |
|`npx playwright test tests/playwright/tools/LoginSessionMode.spec.mjs`| PASS, 5/5 |
47
+
|`npx playwright test tests/playwright/tools/StaticOnlyLoginApiRequired.spec.mjs`| PASS, 1/1 |
48
+
|`git diff --check`| PASS, with Git line-ending warnings only |
49
+
50
+
## Skipped Lanes
51
+
52
+
| Lane | Decision | Reason |
53
+
| --- | --- | --- |
54
+
| ToolboxRoutePages Playwright | SKIP | No toolbox route/page rendering files were changed. |
55
+
| AdminDbViewer Playwright | SKIP | Admin DB Viewer behavior and DB adapter rendering were not changed. |
56
+
| ProjectJourneyTool Playwright | SKIP | Project Journey files and persistence paths were not changed. |
57
+
| Full samples smoke | SKIP | No samples, sample loader, or shared sample framework changed. |
58
+
59
+
## Notes
60
+
61
+
- No CSS was added.
62
+
- No fallback login behavior was added.
63
+
- Existing SQLite experimental warnings and seed-only audit diagnostics appeared during API-backed validation; they were existing runtime diagnostics and did not affect the PR requirement results.
64
+
- The V8 coverage helper includes HEAD-changed server files as advisory coverage context; this PR's current changed browser runtime file, `assets/theme-v2/js/login-session.js`, was collected by Playwright V8 coverage.
| API-backed local server probe | Inline Node import of `startLocalApiServer({ host: "127.0.0.1", port: 5501 })`; fetched `/login.html` and `/api/session/current`| PASS; both returned 200 |
| Static `127.0.0.1:5500` login keeps Local Mem and Local DB disabled. |`StaticOnlyLoginApiRequired.spec.mjs` verifies both `[data-login-mode]` buttons are disabled and not selected. | PASS |
19
-
| Static login disabled message includes exact start command. |`StaticOnlyLoginApiRequired.spec.mjs` verifies `[data-login-mode-disabled-message]` and `[data-login-mode-status]` include `npm run dev:local-api`. | PASS |
20
-
| Static login disabled message includes exact API-backed URL. |`StaticOnlyLoginApiRequired.spec.mjs` verifies `[data-login-mode-disabled-message]` and `[data-login-mode-status]` include `http://127.0.0.1:5501/login.html`. | PASS |
21
-
| Static `127.0.0.1:5500` does not call session API routes. | Static lane records all requests and asserts no request URL contains `/api/session/current` or `/api/session/`. | PASS |
22
-
| API-backed Local Mem and Local DB behavior is unchanged. |`LoginSessionMode.spec.mjs` passed 5/5, including Local DB session behavior. | PASS |
23
-
| Documented API-backed URL is real. | Server probe fetched `http://127.0.0.1:5501/login.html` and `http://127.0.0.1:5501/api/session/current` with 200 responses. | PASS |
17
+
| Local Development Status section is visible below an HR. | Both Playwright lanes verify `main hr` count and the `Local Development Status` H2. | PASS |
18
+
| Current URL displays. | Static lane verifies `http://127.0.0.1:5500/login.html`; API-backed lane verifies the API-backed server URL for `/login.html`. | PASS |
19
+
| Detected server mode displays. | Static lane verifies `Static-only local server`; API-backed lane verifies `API-backed local server (Local Mem)` and `API-backed local server (Local DB)`. | PASS |
20
+
| Local API availability displays. | Static lane verifies `Unavailable`; API-backed lane verifies `Available` and `/api/session/current`. | PASS |
21
+
| Disabled reason displays when API is unavailable. | Static lane verifies the disabled reason includes Local Mem / Local DB disabled plus the command and URL. | PASS |
22
+
| Expected API endpoint displays. | Both lanes verify `/api/session/current`. | PASS |
23
+
| Correct API-backed URL and startup command display. | Both lanes verify `http://127.0.0.1:5501/login.html` and `npm run dev:local-api`. | PASS |
24
+
| Local Mem and Local DB remain disabled without API. | Static lane verifies both buttons are disabled and unselected. | PASS |
25
+
| Local Mem and Local DB become enabled when API is available. | LoginSessionMode verifies both mode buttons are enabled on the API-backed server. | PASS |
26
+
| No fallback behavior was added. | Static lane verifies no `/api/session/current` or `/api/session/` requests are made from 5500. | PASS |
24
27
25
28
## Skipped Lanes
26
29
27
30
| Lane | Decision | Reason |
28
31
| --- | --- | --- |
29
32
| ToolboxRoutePages Playwright | SKIP | Tool route rendering was not changed by this PR. |
30
33
| AdminDbViewer Playwright | SKIP | DB Viewer routes, DB adapters, and admin DB rendering were not changed. |
31
-
| ProjectJourneyTool Playwright | SKIP | Project Journey behavior and persistence paths were not changed. |
34
+
| ProjectJourneyTool Playwright | SKIP | Project Journey files and persistence paths were not changed. |
32
35
| Full samples smoke | SKIP | No samples, shared sample loader, or sample framework files changed. |
33
36
| Full Playwright suite | SKIP | Static 5500 login and API-backed login cover the changed login/session behavior. |
34
37
35
38
## Notes
36
39
37
-
- Playwright and the API-backed server probe emitted existing Node SQLite experimental warnings and existing seed-only audit fallback diagnostics; they did not fail validation.
38
-
- Playwright impacted: Yes. The changed behavior is login/session UI messaging and enabled/disabled state under static-only and API-backed local serving.
40
+
- Playwright impacted: Yes. The changed behavior is login/session diagnostics and enabled/disabled state visibility.
41
+
- Playwright and API-backed server startup emitted existing Node SQLite experimental warnings and existing seed-only audit fallback diagnostics; they did not fail validation.
42
+
- The V8 coverage helper includes HEAD-changed server files as advisory context; current PR changed browser login runtime plus Playwright specs.
0 commit comments