Skip to content

Commit 1054001

Browse files
committed
Merge PR_26171_008-message-tts-profile-foundation
2 parents a52c4cd + c385f69 commit 1054001

16 files changed

Lines changed: 1524 additions & 376 deletions

docs_build/database/ddl/messages.sql

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
-- Target DEV database: gamefoundry_dev
55
-- Scope: executable grouped table DDL for active server API migration.
66
-- Authoritative key values are generated by the server/API layer unless a later DEV-only seed exception explicitly applies.
7-
-- Owned tables: messages_categories, messages_emotion_profiles, messages_records, messages_segments
7+
-- Owned tables: messages_categories, messages_emotion_profiles, messages_tts_profiles, messages_records, messages_segments
88
CREATE TABLE IF NOT EXISTS messages_categories (
99
key text PRIMARY KEY,
1010
"name" text NOT NULL UNIQUE,
@@ -45,6 +45,23 @@ CREATE TABLE IF NOT EXISTS messages_records (
4545
"updatedBy" text NOT NULL REFERENCES users(key)
4646
);
4747

48+
CREATE TABLE IF NOT EXISTS messages_tts_profiles (
49+
key text PRIMARY KEY,
50+
"name" text NOT NULL UNIQUE,
51+
"description" text NOT NULL DEFAULT '',
52+
"providerKey" text NOT NULL,
53+
"voiceName" text NOT NULL DEFAULT '',
54+
"language" text NOT NULL,
55+
"volume" numeric NOT NULL DEFAULT 1,
56+
"pitch" numeric NOT NULL DEFAULT 1,
57+
"rate" numeric NOT NULL DEFAULT 1,
58+
"active" boolean NOT NULL DEFAULT true,
59+
"createdAt" timestamptz NOT NULL DEFAULT now(),
60+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
61+
"createdBy" text NOT NULL REFERENCES users(key),
62+
"updatedBy" text NOT NULL REFERENCES users(key)
63+
);
64+
4865
CREATE TABLE IF NOT EXISTS messages_segments (
4966
key text PRIMARY KEY,
5067
"messageKey" text NOT NULL REFERENCES messages_records(key),
@@ -67,3 +84,6 @@ CREATE INDEX IF NOT EXISTS idx_messages_segments_emotionprofilekey ON messages_s
6784
CREATE INDEX IF NOT EXISTS idx_messages_segments_order ON messages_segments ("messageKey", "displayOrder");
6885
CREATE INDEX IF NOT EXISTS idx_messages_segments_createdby ON messages_segments ("createdBy");
6986
CREATE INDEX IF NOT EXISTS idx_messages_segments_updatedby ON messages_segments ("updatedBy");
87+
CREATE INDEX IF NOT EXISTS idx_messages_tts_profiles_providerkey ON messages_tts_profiles ("providerKey");
88+
CREATE INDEX IF NOT EXISTS idx_messages_tts_profiles_createdby ON messages_tts_profiles ("createdBy");
89+
CREATE INDEX IF NOT EXISTS idx_messages_tts_profiles_updatedby ON messages_tts_profiles ("updatedBy");

docs_build/database/dml/messages.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-- Ownership: docs_build/database/dml/messages.sql
44
-- Runtime setup/seed operations for this group must run through server-side APIs.
55
-- Browser pages must not directly seed authoritative DB records.
6-
-- Owned tables: messages_categories, messages_emotion_profiles, messages_records, messages_segments
6+
-- Owned tables: messages_categories, messages_emotion_profiles, messages_tts_profiles, messages_records, messages_segments
77

88
-- DML status: Server-seed-owned.
99
-- Setup is performed through the Messages Local API / server-side SQLite service for this PR.

docs_build/database/seed/messages.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
"Sad",
2525
"Mysterious"
2626
],
27+
"messages_tts_profiles": [
28+
"Browser Speech Default",
29+
"Narration Preview"
30+
],
2731
"messages_records": [],
2832
"messages_segments": []
2933
},

docs_build/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Manage referenced Messages emotion profiles - PR_26171_006
1+
Add Messages TTS profile foundation - PR_26171_008
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# PR_26171_008 Manual Validation Notes
2+
3+
- Confirmed seeded TTS profiles appear in the Messages UI.
4+
- Confirmed custom TTS profile creation through the Theme V2 form.
5+
- Confirmed custom TTS profile edit, disable, and re-enable.
6+
- Confirmed TTS profiles are configuration only; no speech generation, preview, audio playback, or voice adapter behavior was introduced.
7+
- Confirmed Local API persistence uses server-generated keys and audit fields.
8+
- Confirmed SQLite restart persistence for the custom TTS profile.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
PR_26171_008-message-tts-profile-foundation validation
2+
3+
Branch:
4+
PASS pr/PR_26171_008-message-tts-profile-foundation
5+
6+
Syntax:
7+
PASS node --check src/dev-runtime/messages/messages-sqlite-service.mjs
8+
PASS node --check toolbox/messages/messages-api-client.js
9+
PASS node --check toolbox/messages/messages.js
10+
PASS node --check tests/playwright/tools/MessagesTool.spec.mjs
11+
12+
Targeted API/SQLite:
13+
PASS direct service probe verified TTS profile seeds, create, update, and restart persistence.
14+
15+
Playwright:
16+
PASS npx playwright test tests/playwright/tools/MessagesTool.spec.mjs --project=playwright --workers=1 --reporter=list
17+
Result: 1 passed.
18+
19+
Workspace lane:
20+
FAIL npm run test:workspace-v2
21+
Failure file: tests/playwright/tools/RootToolsFutureState.spec.mjs
22+
Failures:
23+
- Toolbox accordion control-card count was 0.
24+
- Header alphabetical expectation failed around Game Hub/Game Journey ordering.
25+
- Non-Messages pages reported failed requests to session, platform banner, registry, and toolbox constants APIs.
26+
27+
Whitespace:
28+
PASS git diff --check on touched files. CRLF warnings only.
29+
30+
Disposition:
31+
MERGE WITH RECORDED WORKSPACE FAILURE. PR_008 targeted validation passed. The required workspace-v2 lane failed outside the Messages TTS profile scope and is documented for follow-up.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# PR_26171_008-message-tts-profile-foundation
2+
3+
## Branch Validation
4+
5+
- Branch: `pr/PR_26171_008-message-tts-profile-foundation`
6+
- Source: clean `main` after PR_26171_006 merge and push.
7+
- Status: PASS for branch setup and scoped implementation.
8+
9+
## Requirement Checklist
10+
11+
- PASS: Added `messages_tts_profiles` persistence under the grouped `messages` ownership area.
12+
- PASS: Added Local API contracts for list, get, create, and update TTS profiles.
13+
- PASS: Added server-seeded `Browser Speech Default` and `Narration Preview` TTS profiles.
14+
- PASS: TTS profile fields include Name, Description, Provider Key, Voice Name, Language, Volume, Pitch, Rate, and Active/Inactive.
15+
- PASS: Added Theme V2 TTS Profiles management section to the Messages tool.
16+
- PASS: TTS profiles are configuration records only.
17+
- PASS: No speech preview, synthesis, audio playback, audio generation, voice adapters, runtime playback, delete endpoint, dialog trees, localization, translation, or AI voices were added.
18+
- PASS: Browser uses Local API contracts only and does not generate authoritative keys.
19+
- PASS: SQLite service generates keys and audit fields.
20+
- PASS: Missing TTS Name, Provider Key, or Language fails visibly in the UI and actionably in the API.
21+
- PASS: No inline styles, style blocks, inline scripts, or inline event handlers were introduced.
22+
- FAIL: Required `npm run test:workspace-v2` lane failed in existing `RootToolsFutureState.spec.mjs` coverage outside the Messages/TTS scope.
23+
24+
## Validation Lane Report
25+
26+
- PASS: `node --check src/dev-runtime/messages/messages-sqlite-service.mjs`
27+
- PASS: `node --check toolbox/messages/messages-api-client.js`
28+
- PASS: `node --check toolbox/messages/messages.js`
29+
- PASS: `node --check tests/playwright/tools/MessagesTool.spec.mjs`
30+
- PASS: Direct SQLite/API validation for TTS seed, create, update, and restart persistence.
31+
- PASS: `npx playwright test tests/playwright/tools/MessagesTool.spec.mjs --project=playwright --workers=1 --reporter=list`
32+
- PASS: `git diff --check` on touched files.
33+
- FAIL: `npm run test:workspace-v2`
34+
35+
## Workspace-V2 Failure Summary
36+
37+
`npm run test:workspace-v2` failed in `tests/playwright/tools/RootToolsFutureState.spec.mjs`:
38+
39+
- Toolbox accordion `.control-card` count was `0`.
40+
- Header alphabetical expectation failed around `Game Hub` and `Game Journey`.
41+
- Non-Messages pages reported failed requests to session, platform banner, registry, and toolbox constants APIs.
42+
43+
These failures were already present for the batch and are outside PR_008's Messages TTS profile scope.
44+
45+
## Manual Validation Notes
46+
47+
- Confirmed seeded TTS profiles appear in the Messages UI.
48+
- Confirmed a custom TTS profile can be created.
49+
- Confirmed a custom TTS profile can be edited, disabled, and re-enabled.
50+
- Confirmed Local API returns TTS profile list/get payloads with server-owned ULIDs and audit fields.
51+
- Confirmed SQLite restart persistence for the custom TTS profile.
52+
- Confirmed no speech preview or audio playback occurs in this PR.
53+
54+
## Samples Decision
55+
56+
- Full samples smoke was not run because samples are out of scope for Messages TTS profile configuration.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
docs_build/database/ddl/messages.sql
2+
docs_build/database/dml/messages.sql
3+
docs_build/database/seed/messages.json
14
docs_build/dev/commit_comment.txt
2-
docs_build/dev/reports/PR_26171_006-message-emotion-profile-management-manual-validation.md
3-
docs_build/dev/reports/PR_26171_006-message-emotion-profile-management-validation.txt
4-
docs_build/dev/reports/PR_26171_006-message-emotion-profile-management.md
5+
docs_build/dev/reports/PR_26171_008-message-tts-profile-foundation-manual-validation.md
6+
docs_build/dev/reports/PR_26171_008-message-tts-profile-foundation-validation.txt
7+
docs_build/dev/reports/PR_26171_008-message-tts-profile-foundation.md
58
docs_build/dev/reports/codex_changed_files.txt
69
docs_build/dev/reports/codex_review.diff
710
docs_build/dev/reports/coverage_changed_js_guardrail.txt
811
docs_build/dev/reports/playwright_v8_coverage_report.txt
912
src/dev-runtime/messages/messages-sqlite-service.mjs
1013
tests/playwright/tools/MessagesTool.spec.mjs
1114
toolbox/messages/index.html
15+
toolbox/messages/messages-api-client.js
1216
toolbox/messages/messages.js

0 commit comments

Comments
 (0)