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 ${localApiStartCommand} and open ${localApiLoginUrl}.`;
21
30
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.`;
(0%) toolbox/assets/assets-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
12
12
(0%) toolbox/colors/palette-workspace-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
13
13
(0%) toolbox/project-journey/project-journey-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
Added a two-step Reseed control to the login page Local Development Status section. The control uses the existing server API boundary (`/api/mock-db/seed`) and reseeds only the active DB mode: Local Mem or Local DB.
6
+
7
+
## Files Changed
8
+
9
+
| File | Change |
10
+
| --- | --- |
11
+
|`login.html`| Added Local Development Status reseed fields, start/confirm/cancel controls, and visible reseed status text. |
12
+
|`assets/theme-v2/js/login-session.js`| Wired reseed UI state, confirmation, cancel, success, failure, and API-unavailable disabled handling. |
13
+
|`src/engine/api/mock-db-api-client.js`| Updated seed client context text from Local Mem-specific wording to generic Mock DB seed wording. |
14
+
|`src/dev-runtime/server/mock-api-router.mjs`| Updated seed action diagnostics to name Local Mem or Local DB based on the active mode. |
15
+
|`tests/dev-runtime/DbSeedIntegrity.test.mjs`| Added independent Local Mem/Local DB reseed API validation. |
16
+
|`tests/playwright/tools/LoginSessionMode.spec.mjs`| Added UI coverage for reseed confirmation, cancel, Local Mem success, Local DB success, and visible failure status. |
17
+
18
+
## Requirement Checklist
19
+
20
+
| Requirement | Status | Evidence |
21
+
| --- | --- | --- |
22
+
| Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first. | PASS | Read before implementation; applied PR completion, HTML, validation, and ZIP/report rules. |
23
+
| Add a Reseed control to the login page Local Development Status section. | PASS |`login.html` adds `data-login-reseed-*` controls inside the Local Development Status card. |
24
+
| Require confirmation before reseed executes. | PASS |`login-session.js` only calls `seedMockDb()` from the confirm handler; LoginSessionMode verifies start -> confirm/cancel state. |
25
+
| Local Mem reseeds only Local Mem. | PASS | Node reseed test mutates Local DB, reseeds Local Mem, and verifies Local DB remains mutated. |
26
+
| Local DB reseeds only Local DB. | PASS | Node reseed test reseeds Local DB separately and verifies Local Mem remains unchanged by that action. |
27
+
| Do not reseed both DBs from one action. | PASS |`LocalDevMockDataSource.seed()` persists only the current adapter state; Node test validates both directions. |
28
+
| Show active DB mode visibly. | PASS |`data-login-reseed-active-mode`; LoginSessionMode verifies Local Mem and Local DB text. |
29
+
| Show reseed target visibly. | PASS |`data-login-reseed-target`; LoginSessionMode verifies Local Mem and Local DB text. |
30
+
| Show success visibly. | PASS | LoginSessionMode verifies `Reseed complete for Local Mem...` and `Reseed complete for Local DB...`. |
31
+
| Show failure visibly. | PASS | LoginSessionMode forces `/api/mock-db/seed` to return `ok:false` and verifies visible failure text. |
32
+
| Show canceled status visibly. | PASS | LoginSessionMode verifies `Reseed canceled for Local Mem.`|
33
+
| Preserve real runtime timestamps during reseed. | PASS |`DbSeedIntegrity.test.mjs` reuses runtime timestamp assertions after Local Mem and Local DB reseed. |
34
+
| Preserve guest tool samples from PR_26158_037. | PASS | Existing seed integrity test still verifies guest samples for every active tool. |
35
+
| Preserve unique per-user seeded data from PR_26158_037. | PASS | Existing seed integrity test still verifies unique user-owned project/tool state keys. |
36
+
| Preserve SQLite-backed Local DB behind API boundary. | PASS | Local DB reseed and AdminDbViewer tests access Local DB through `/api/*`; no browser DB implementation imports were added. |
37
+
| Do not add fallback behavior. | PASS | Static/API-unavailable behavior remains disabled; reseed controls disable through `renderError()`. |
38
+
| Do not add UAT/Prod behavior. | PASS | Login options and seed behavior remain Local Mem / Local DB only. |
39
+
| Do not add CSS. | PASS | No CSS files or inline/page-local styles were changed. |
| Full samples smoke | SKIP | No sample runtime or loader changed. |
57
+
| Full Playwright suite | SKIP | Targeted login, DB Viewer, and reseed API lanes cover this PR scope. |
58
+
| ProjectJourneyTool Playwright | SKIP | Project Journey runtime UI was not changed. |
59
+
| ToolboxRoutePages Playwright | SKIP | Tool route rendering was not changed. |
60
+
61
+
## Notes
62
+
63
+
- The first failure-case Playwright attempt used an intentional HTTP 500 and produced an expected browser resource console error. The test was corrected to use a JSON API failure (`ok:false`) and then passed.
64
+
- Existing Node SQLite experimental warnings and seed-only audit fallback diagnostics appeared during validation and did not indicate PR_26158_038 failures.
65
+
- The generated V8 coverage report includes advisory entries from the existing stacked HEAD-diff coverage helper; current PR files are listed in `codex_changed_files.txt`.
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21
21
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
22
22
(0%) toolbox/assets/assets-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
23
23
(0%) toolbox/colors/palette-workspace-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
24
24
(0%) toolbox/project-journey/project-journey-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
0 commit comments