Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# PR_26171_067 Instruction Compliance Checklist

## Required Reads

- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before implementation.
- PASS: Read `docs_build/dev/PROJECT_MULTI_PC.txt` before implementation.
- PASS: Read repository `AGENTS.md` instructions from the active workspace context.
- PASS: Read relevant target files before editing.

## Gate Checks

- PASS: Started from `main`.
- PASS: Pulled latest `origin/main`.
- PASS: Repo was clean before branch creation.
- PASS: Created scoped branch `pr/26171-067-tts-profile-emotion-table-foundation`.
- PASS: PR number `067` is odd and assigned to Laptop / Environment 2.
- PASS: TTS Studio is within Laptop ownership.
- PASS: Active path is `toolbox/text-to-speech/`.
- PASS: No wrong `tools/text2speech/` path was created.
- PASS: No database changes were made.
- PASS: No placeholder-only provider blocking behavior was introduced.

## Required Artifacts

- PASS: PR-specific report created.
- PASS: Parent-child table checklist created.
- PASS: Message/TTS contract checklist created.
- PASS: Validation report created.
- PASS: Manual validation notes created.
- PASS: `codex_review.diff` and `codex_changed_files.txt` will be generated from the final scoped diff.
- PASS: Repo-structured delta ZIP will be created under `tmp/`.
17 changes: 17 additions & 0 deletions docs_build/dev/reports/PR_26171_067-manual-validation-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# PR_26171_067 Manual Validation Notes

## Notes

- Verified TTS Studio keeps the active path `toolbox/text-to-speech/`.
- Verified the page uses Theme V2 classes and external JavaScript only.
- Verified the profile table can open child Emotion Settings by clicking the profile row.
- Verified `Default Balanced Profile` delete is disabled because it is marked in use by Message Studio data.
- Verified default `Neutral` emotion delete is disabled because it is marked in use by Message Parts.
- Verified Add Profile, Edit Profile, Add Emotion, and Edit Emotion inline rows through targeted Playwright validation.
- Verified Message Studio remains separate and its existing TTS dropdown smoke path still passes.
- Verified no `tools/text2speech/` path was created.
- Verified no database files were changed.

## Follow Up

- Future persistence can connect TTS Studio profile authoring to the existing Local API profile contract once that API ownership is assigned.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# PR_26171_067 Message TTS Contract Checklist

## Ownership

- PASS: Message Studio owns message text and ordered message parts.
- PASS: TTS Studio owns reusable TTS Profiles and per-profile Emotion Settings.
- PASS: `src/engine/audio/` remains the playback owner.
- PASS: Audio playback results remain owned by the audio engine flow.
- PASS: Message Studio and TTS Studio are not merged into one tool.

## Contract Readiness

- PASS: TTS Studio exposes `TTS_PROFILE_CONTRACT_VERSION` with value `tts-profile-emotion-v1`.
- PASS: TTS Studio exports `createMessageStudioTtsProfileOptions`.
- PASS: Exported profile options include stable keys, active state, display name, language, provider key, voice name, and active emotion settings.
- PASS: Emotion settings include emotion key, display label, pitch, rate, volume, and SSML-like preset.
- PASS: The output summary shows the contract version and Message Studio compatible profile options for local diagnostics.
- PASS: Existing Message Studio dropdown smoke validation still passes.

## Boundaries

- PASS: No database changes were introduced.
- PASS: No future provider behavior was hardcoded.
- PASS: No browser-owned product data was introduced as source of truth.
- PASS: Default profile data is limited to a local down-the-middle fallback until the API/data contract exists.
- PASS: Existing Message Studio Local API profile shape remains untouched.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# PR_26171_067 Parent Child Table Checklist

## Parent Table

- PASS: Parent table label is `TTS Profiles`.
- PASS: Parent table lives in `toolbox/text-to-speech/`.
- PASS: Parent table columns are Profile Name, Voice, Language, Gender, Age, Emotion Count, Status, Actions.
- PASS: Default rows include `Default Balanced Profile`, `Man Profile 1`, and `Woman Profile 2`.
- PASS: Parent row click opens or closes the child Emotion Settings row.
- PASS: One selected profile row owns the visible child subtable at a time.
- PASS: Parent profile count is visible in the summary stats.

## Parent Actions

- PASS: Add Profile opens a new inline row below the parent table rows.
- PASS: Edit Profile opens an inline edit row for the selected profile.
- PASS: Save Profile validates required Profile Name and Language values.
- PASS: Duplicate Profile Name is blocked with a visible actionable error.
- PASS: Cancel Profile closes the inline editor without applying changes.
- PASS: Delete Profile removes unused profiles.
- PASS: Delete Profile is disabled when the profile has Message Studio usage.

## Child Table

- PASS: Child table label is `Emotion Settings`.
- PASS: Child table opens under the selected TTS Profile row.
- PASS: Child columns are Emotion, Pitch, Rate, Volume, SSML-like Preset, Status, Actions.
- PASS: Default neutral emotion is provided for every default profile.
- PASS: Emotion count is visible in both the profile row and summary stats.

## Child Actions

- PASS: Add Emotion opens a new inline row in the child table.
- PASS: Edit Emotion opens an inline edit row.
- PASS: Save Emotion validates selected profile and unique emotion per profile.
- PASS: Cancel Emotion closes the inline editor without applying changes.
- PASS: Delete Emotion removes unused emotions.
- PASS: Delete Emotion is disabled when the emotion has Message Parts usage.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# PR_26171_067 TTS Profile Emotion Table Foundation

## Summary

TTS Studio now presents a parent TTS Profiles table with an expandable child Emotion Settings table. The active tool remains `toolbox/text-to-speech/`, uses Theme V2, and keeps all JavaScript external.

## Scope

- Updated `toolbox/text-to-speech/index.html` to expose the requested parent and child table surfaces.
- Updated `toolbox/text-to-speech/text2speech.js` to seed reusable profiles, render child emotion settings, support inline add/edit rows, and block delete actions when profile or emotion usage is marked by Message Studio data.
- Added a TTS profile contract helper that returns Message Studio compatible options without moving ownership into Message Studio.
- Updated targeted TTS browser and unit validation.

## Requirement Evidence

- PASS: Active path remains `toolbox/text-to-speech/`.
- PASS: Parent table is TTS Profiles.
- PASS: Clicking a profile row opens the child Emotion Settings subtable.
- PASS: Parent rows include `Man Profile 1` and `Woman Profile 2`.
- PASS: Parent columns are Profile Name, Voice, Language, Gender, Age, Emotion Count, Status, Actions.
- PASS: Child columns are Emotion, Pitch, Rate, Volume, SSML-like Preset, Status, Actions.
- PASS: Add Profile opens an inline add row under the parent table.
- PASS: Edit Profile opens an inline edit row.
- PASS: Add Emotion opens an inline add row in the child table.
- PASS: Edit Emotion opens an inline edit row.
- PASS: Delete profile is disabled when usage count indicates Message Studio data uses it.
- PASS: Delete emotion is disabled when usage count indicates Message Parts use it.
- PASS: Default balanced profile and default neutral emotion are provided.
- PASS: Message Studio compatible profile options are exported for a future API/data contract.
- PASS: Message Studio and TTS Studio remain separate tools.
- PASS: No database changes were made.
- PASS: Theme V2 only; no page-local CSS, tool-local CSS, inline styles, style blocks, or inline handlers.

## Validation

- PASS: `node --check toolbox\text-to-speech\text2speech.js`.
- PASS: `node --check tests\playwright\tools\TextToSpeechFunctional.spec.mjs`.
- PASS: `node --check tests\tools\Text2SpeechShell.test.mjs`.
- PASS: HTML inline style/script/event scan for `toolbox/text-to-speech/index.html`.
- PASS: `node --test tests/tools/Text2SpeechShell.test.mjs`.
- PASS: `npx playwright test tests/playwright/tools/TextToSpeechFunctional.spec.mjs --project=playwright --workers=1 --reporter=list`.
- PASS: `npx playwright test tests/playwright/tools/MessagesTool.spec.mjs --project=playwright --workers=1 --reporter=list`.
- PASS: `npm run test:workspace-v2` (legacy command name; user-facing language is Project Workspace).

## Out Of Scope

- No Message Studio merge.
- No new provider behavior.
- No generated audio export.
- No database schema, seed, or persistence change.
43 changes: 43 additions & 0 deletions docs_build/dev/reports/PR_26171_067-validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# PR_26171_067 Validation Report

## Commands Run

- `git branch --show-current`
- PASS: started from `main`.
- `git checkout main`
- PASS.
- `git pull origin main`
- PASS: already up to date.
- `git status --short`
- PASS: clean before branch creation.
- `node --check toolbox\text-to-speech\text2speech.js`
- PASS.
- `node --check tests\playwright\tools\TextToSpeechFunctional.spec.mjs`
- PASS.
- `node --check tests\tools\Text2SpeechShell.test.mjs`
- PASS.
- `Select-String -Path toolbox\text-to-speech\index.html -Pattern '<style|<script(?![^>]+src=)|\son\w+=|style='`
- PASS: no matches.
- `node --test tests/tools/Text2SpeechShell.test.mjs`
- PASS: 4 tests passed.
- `npx playwright test tests/playwright/tools/TextToSpeechFunctional.spec.mjs --project=playwright --workers=1 --reporter=list`
- PASS: 2 tests passed.
- Covers default profiles, expandable Emotion Settings, inline add/edit rows, delete-disabled usage states, and existing speech composition.
- `npx playwright test tests/playwright/tools/MessagesTool.spec.mjs --project=playwright --workers=1 --reporter=list`
- PASS: 2 tests passed.
- Covers Message Studio smoke compatibility for the existing TTS dropdown and audio-engine path.
- `npm run test:workspace-v2`
- PASS: 5 Project Workspace tests passed.
- Note: command name is legacy; user-facing language is Project Workspace.

## Coverage

- PASS: `docs_build/dev/reports/playwright_v8_coverage_report.txt` produced changed runtime JS coverage.
- PASS: `toolbox/text-to-speech/text2speech.js` covered by targeted browser validation.
- NOTE: The advisory coverage helper also listed the previous HEAD Message Studio files because it includes `git diff-tree HEAD` before this PR is committed. Those Message Studio files are unchanged in this PR and were separately smoke-checked with `MessagesTool.spec.mjs`.

## Skipped

- Database validation skipped because no database schema, seed, or persistence implementation changed.
- Full samples validation skipped because no samples changed.
- External TTS provider validation skipped because this PR does not implement provider behavior.
81 changes: 31 additions & 50 deletions docs_build/dev/reports/codex_changed_files.txt
Original file line number Diff line number Diff line change
@@ -1,53 +1,34 @@
# Codex Changed Files - PR_26171_065-message-studio-parent-child-table-foundation

## Git Status Short
```text
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
# git status --short
M docs_build/dev/reports/codex_changed_files.txt
M docs_build/dev/reports/codex_review.diff
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
M docs_build/dev/reports/playwright_v8_coverage_report.txt
M tests/playwright/tools/MessagesTool.spec.mjs
M toolbox/messages/index.html
M toolbox/messages/message-tts-service-registry.js
M toolbox/messages/messages.js
?? docs_build/dev/reports/PR_26171_065-instruction-compliance-checklist.md
?? docs_build/dev/reports/PR_26171_065-manual-validation-notes.md
?? docs_build/dev/reports/PR_26171_065-message-studio-parent-child-table-foundation.md
?? docs_build/dev/reports/PR_26171_065-parent-child-table-checklist.md
?? docs_build/dev/reports/PR_26171_065-validation.md
```

## Scoped Diff Stat
```text
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +
.../dev/reports/playwright_v8_coverage_report.txt | 43 +-
tests/playwright/tools/MessagesTool.spec.mjs | 317 +++++---------
toolbox/messages/index.html | 29 +-
toolbox/messages/message-tts-service-registry.js | 8 +-
toolbox/messages/messages.js | 486 ++++++++++++---------
6 files changed, 415 insertions(+), 470 deletions(-)
```

## Changed Files
- toolbox/messages/index.html
- toolbox/messages/messages.js
- toolbox/messages/message-tts-service-registry.js
- tests/playwright/tools/MessagesTool.spec.mjs
- docs_build/dev/reports/coverage_changed_js_guardrail.txt
- docs_build/dev/reports/playwright_v8_coverage_report.txt
- docs_build/dev/reports/PR_26171_065-message-studio-parent-child-table-foundation.md
- docs_build/dev/reports/PR_26171_065-parent-child-table-checklist.md
- docs_build/dev/reports/PR_26171_065-validation.md
- docs_build/dev/reports/PR_26171_065-manual-validation-notes.md
- docs_build/dev/reports/PR_26171_065-instruction-compliance-checklist.md
- docs_build/dev/reports/codex_review.diff
- docs_build/dev/reports/codex_changed_files.txt
M tests/playwright/tools/TextToSpeechFunctional.spec.mjs
M tests/tools/Text2SpeechShell.test.mjs
M toolbox/text-to-speech/index.html
M toolbox/text-to-speech/text2speech.js
?? docs_build/dev/reports/PR_26171_067-instruction-compliance-checklist.md
?? docs_build/dev/reports/PR_26171_067-manual-validation-notes.md
?? docs_build/dev/reports/PR_26171_067-message-tts-contract-checklist.md
?? docs_build/dev/reports/PR_26171_067-parent-child-table-checklist.md
?? docs_build/dev/reports/PR_26171_067-tts-profile-emotion-table-foundation.md
?? docs_build/dev/reports/PR_26171_067-validation.md

## Validation
- PASS: `node --check toolbox\messages\messages.js`.
- PASS: `node --check toolbox\messages\message-tts-service-registry.js`.
- PASS: `node --check tests\playwright\tools\MessagesTool.spec.mjs`.
- PASS: HTML inline style/script/event scan for `toolbox/messages/index.html`.
- PASS: `npx playwright test tests/playwright/tools/MessagesTool.spec.mjs --project=playwright --workers=1 --reporter=list`.
- PASS: `npm run test:workspace-v2` (legacy command name; user-facing language is Project Workspace).
# git ls-files --others --exclude-standard
docs_build/dev/reports/PR_26171_067-instruction-compliance-checklist.md
docs_build/dev/reports/PR_26171_067-manual-validation-notes.md
docs_build/dev/reports/PR_26171_067-message-tts-contract-checklist.md
docs_build/dev/reports/PR_26171_067-parent-child-table-checklist.md
docs_build/dev/reports/PR_26171_067-tts-profile-emotion-table-foundation.md
docs_build/dev/reports/PR_26171_067-validation.md

## ZIP
- Path: `tmp/PR_26171_065-message-studio-parent-child-table-foundation_delta.zip`.
# git diff --stat
docs_build/dev/reports/codex_changed_files.txt | 75 +-
docs_build/dev/reports/codex_review.diff | 2766 +++++++++-----------
.../dev/reports/coverage_changed_js_guardrail.txt | 9 +-
.../dev/reports/playwright_v8_coverage_report.txt | 27 +-
.../tools/TextToSpeechFunctional.spec.mjs | 42 +-
tests/tools/Text2SpeechShell.test.mjs | 48 +
toolbox/text-to-speech/index.html | 40 +-
toolbox/text-to-speech/text2speech.js | 728 +++++-
8 files changed, 2153 insertions(+), 1582 deletions(-)
Loading
Loading