Skip to content

Commit cec2a71

Browse files
committed
Merge PR_26171_012-message-tool-postgres-table-layout-cleanup
2 parents af88cd2 + df57c1c commit cec2a71

12 files changed

Lines changed: 1668 additions & 871 deletions

docs_build/dev/PROJECT_INSTRUCTIONS.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,20 @@ Prohibited product-data ownership:
358358

359359
Toolbox and Admin tool metadata must use a shared DB-backed tool metadata source for `toolKey`, `toolName`, `group`, `path`, `order`, and `status`. Browser pages may render metadata returned by the API/service contract, but they must not own a separate runtime copy of that metadata.
360360

361+
## POSTGRES DATABASE DIRECTION
362+
363+
SQLite is deprecated for new database work.
364+
365+
Rules:
366+
- New database work must target Postgres.
367+
- New persistence must flow through Local API / Postgres direction only.
368+
- Do not add new SQLite services.
369+
- Do not add new SQLite DDL.
370+
- Do not add new SQLite seed data.
371+
- Do not add new SQLite runtime persistence.
372+
- Legacy SQLite references may remain only as documented technical debt when they already exist.
373+
- Browser code must not own product data or generate authoritative persistence keys.
374+
361375
## DEV RUNTIME BOUNDARY
362376

363377
All mock/dev-only runtime implementation must live under `src/dev-runtime/`.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Manual Validation Notes
2+
3+
- Opened `/tools/messages/index.html` through the repo Playwright server.
4+
- Verified browser-rendered document title: `Message Studio - GameFoundryStudio`.
5+
- Verified browser-rendered H1: `Message Studio`.
6+
- Verified visible category/category controls are absent from the Message Studio page.
7+
- Verified Message Rows appears before row detail editing.
8+
- Verified visible row actions use `Add Message Row`, `Update Row`, and `Disable Row`.
9+
- Verified Emotion Profiles and TTS Profiles appear in the center work surface.
10+
- Verified Speech Preview remains display-only in the inspector.
11+
- Verified no provider calls, audio generation, playback generation, delete behavior, or new SQLite persistence was introduced.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Validation report for PR_26171_012-message-tool-postgres-table-layout-cleanup
2+
3+
Branch and git validation:
4+
- git branch --show-current: main
5+
- git checkout main: PASS
6+
- git -c http.sslBackend=schannel pull origin main: PASS, already up to date
7+
- git status before branch: PASS, clean
8+
- git checkout -b pr/26171-012-message-tool-postgres-table-layout-cleanup: PASS
9+
10+
Static validation:
11+
- node --check toolbox/messages/messages.js: PASS
12+
- node --check src/shared/toolbox/tool-metadata-inventory.js: PASS
13+
- node --check src/dev-runtime/server/local-api-router.mjs: PASS
14+
- node --check tests/playwright/tools/MessagesTool.spec.mjs: PASS
15+
- node --check tests/playwright/tools/RootToolsFutureState.spec.mjs: PASS
16+
- git diff --check for touched files: PASS with CRLF warnings only
17+
18+
Targeted UI/static validation:
19+
- Category/category visible UI removed from toolbox/messages/index.html: PASS
20+
- Save Message / New Message / Message Editor visible copy removed from toolbox/messages/index.html: PASS
21+
- Inline style/script/event handler check for toolbox/messages/index.html: PASS
22+
- Rendered tool title/H1 after registry override: PASS, Message Studio
23+
24+
Playwright:
25+
- npx playwright test tests/playwright/tools/MessagesTool.spec.mjs --project=playwright --workers=1 --reporter=list: PASS, 2 passed
26+
- npm run test:workspace-v2: WARN, 3 passed / 2 failed
27+
- Remaining failures are existing header ordering expectations:
28+
- root tools surface links current tool pages without old_* routes
29+
- common header renders primary navigation order across active pages
30+
- Both failures compare expected alphabetical Toolbox menu order `Game Hub` before `Game Journey` against current UI order `Game Journey` before `Game Hub`.
31+
32+
Samples:
33+
- Full samples validation: SKIP, no samples changed.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# PR_26171_012-message-tool-postgres-table-layout-cleanup
2+
3+
## Branch Validation
4+
5+
- Current branch before implementation: `main`
6+
- Required PR branch: `pr/26171-012-message-tool-postgres-table-layout-cleanup`
7+
- Branch source: pulled latest `origin/main` before branch creation
8+
- Clean repo before branch creation: PASS
9+
10+
## Summary
11+
12+
Message Studio now reflects the approved Postgres direction and creator-facing row workflow. The tool no longer exposes category management or category selection in the UI, Emotion Profiles and TTS Profiles are in the center work surface, and the message editor is organized around a Message Rows table with Add/Update/Disable row language.
13+
14+
## Requirement Checklist
15+
16+
| Requirement | Result | Evidence |
17+
| --- | --- | --- |
18+
| Update repo guidance to state SQLite is deprecated. | PASS | Added `POSTGRES DATABASE DIRECTION` to `docs_build/dev/PROJECT_INSTRUCTIONS.md`. |
19+
| New database work must target Postgres / Local API direction. | PASS | Guidance now requires new persistence through Local API / Postgres direction only. |
20+
| Do not add new SQLite services, DDL, seed, or runtime persistence. | PASS | No SQLite service, DDL, seed, or persistence file was added. Existing legacy SQLite service remains unchanged as technical debt. |
21+
| Remove Category/category UI from the left column. | PASS | `toolbox/messages/index.html` no longer contains visible category controls or category tables. |
22+
| Do not introduce category replacement. | PASS | No new classification form was introduced; left column documents Tags as the future direction only. |
23+
| Move Emotion Profiles into center column. | PASS | Emotion Profiles form/table now render in the center work surface. |
24+
| Move TTS Profiles into center column. | PASS | TTS Profiles form/table now render in the center work surface. |
25+
| Keep Speech Preview display-only. | PASS | Speech Preview remains in the inspector and no provider/audio generation behavior was added. |
26+
| Change Message Editor to table-driven workflow. | PASS | Message Rows table now appears before row detail editing. |
27+
| Add new row/action at bottom of table. | PASS | Message Rows table includes `Add Message Row` below the table. |
28+
| Avoid Save Message / New Message language. | PASS | Visible tool copy now uses `Add Message Row`, `Update Row`, and `Disable Row`. |
29+
| Preferred visible label is Message Studio. | PASS | Page title/H1 and source-controlled Toolbox metadata now use `Message Studio`. |
30+
| Do not rename routes/folders. | PASS | Existing `messages` route/folder/id remain unchanged. |
31+
32+
## Root Cause / Notes
33+
34+
The tool was still presenting the earlier Messages foundation UI: category management in the left rail, Emotion/TTS profile management outside the primary work surface, and form-first `Save Message` / `New Message` actions. The server-backed toolbox registry also retained the old `Messages` label because `messages` was not included in the source-controlled metadata sync allowlist.
35+
36+
This PR keeps the current legacy category key only as an internal compatibility value required by the existing API contract. The category UI is removed from the creator surface and the Postgres migration direction is documented.
37+
38+
## Impacted Lane
39+
40+
- Tool/UI lane: Message Studio Theme V2 surface
41+
- Server metadata lane: Toolbox registry source-controlled metadata sync
42+
- Documentation/governance lane: database direction guidance
43+
44+
## Skipped Lanes
45+
46+
- Samples: skipped, no sample runtime or sample JSON changed.
47+
- Provider/audio generation: skipped, explicitly out of scope.
48+
- Full samples smoke: skipped, out of scope.
49+
50+
## Playwright Result
51+
52+
- PASS: `npx playwright test tests/playwright/tools/MessagesTool.spec.mjs --project=playwright --workers=1 --reporter=list`
53+
- WARN: `npm run test:workspace-v2` still fails on existing header ordering expectations where the UI renders `Game Journey` before `Game Hub`. The PR-caused Toolbox count expectation was updated from `13/42` to `14/43`.
54+
55+
## Manual Validation Notes
56+
57+
- Confirmed rendered `/tools/messages/index.html` title and H1 resolve to `Message Studio` after the server registry override.
58+
- Confirmed visible category controls are absent from `toolbox/messages/index.html`.
59+
- Confirmed no inline style blocks, inline scripts, or inline event handlers were added.
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
docs_build/dev/commit_comment.txt
2-
docs_build/dev/reports/PR_26171_010-message-speech-preview-manual-validation.md
3-
docs_build/dev/reports/PR_26171_010-message-speech-preview-validation.txt
4-
docs_build/dev/reports/PR_26171_010-message-speech-preview.md
1+
docs_build/dev/PROJECT_INSTRUCTIONS.md
2+
docs_build/dev/reports/PR_26171_012-message-tool-postgres-table-layout-cleanup-manual-validation.md
3+
docs_build/dev/reports/PR_26171_012-message-tool-postgres-table-layout-cleanup-validation.txt
4+
docs_build/dev/reports/PR_26171_012-message-tool-postgres-table-layout-cleanup.md
55
docs_build/dev/reports/codex_changed_files.txt
66
docs_build/dev/reports/codex_review.diff
7-
docs_build/dev/reports/coverage_changed_js_guardrail.txt
8-
docs_build/dev/reports/playwright_v8_coverage_report.txt
7+
src/dev-runtime/server/local-api-router.mjs
8+
src/shared/toolbox/tool-metadata-inventory.js
99
tests/playwright/tools/MessagesTool.spec.mjs
10+
tests/playwright/tools/RootToolsFutureState.spec.mjs
1011
toolbox/messages/index.html
1112
toolbox/messages/messages.js

0 commit comments

Comments
 (0)