Skip to content

Commit a32dbf0

Browse files
author
DavidQ
committed
Deep rename Text to Speech V2 and fix accordion empty-state behavior - PR_26130_025-text-to-speech-v2-deep-rename-and-accordion-state
1 parent 82fe80d commit a32dbf0

32 files changed

Lines changed: 1284 additions & 818 deletions
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# PR_26130_025-text-to-speech-v2-deep-rename-and-accordion-state
2+
3+
## Scope
4+
5+
Updated Text to Speech V2 and direct Workspace Manager/tool references for the canonical `text2speech-V2` spelling, playback gating, scroll behavior, last-item delete behavior, and accordion height behavior.
6+
7+
## Changes
8+
9+
- Renamed Text to Speech V2 direct code, CSS, DOM ids, test selectors, tool ids, schema ids, logs, sample wiring, and workspace/tool references from `text2speach` to `text2speech`.
10+
- Added explicit legacy compatibility for the old `text2speach-V2` tool path, schema path, sample JSON path, workspace toolState key, and tool id alias so existing links/session state migrate visibly instead of silently failing.
11+
- Disabled Speak, Pause, Resume, and Stop until a valid named speech item is selected and text/voice options are present.
12+
- Added internal scrolling for Output Summary content and summary pre blocks.
13+
- Allowed deleting the last Named Sentence, leaves a safe empty runtime state, and blocks copy/export/save through schema validation until a new schema-valid item is added.
14+
- Centered Add, Duplicate, and Delete actions.
15+
- Updated Text to Speech V2 accordions so open accordions share available vertical space and closed accordions collapse in normal and fullscreen modes.
16+
- Kept Workspace Manager V2 Text to Speech tile availability based on normal repo/game selection and selected-game launch purpose.
17+
18+
## Legacy Migration Notes
19+
20+
Preserved compatibility only for required direct Text to Speech V2 references:
21+
22+
- `/tools/text2speach-V2/index.html` redirects to `/tools/text2speech-V2/index.html` while preserving query string and hash.
23+
- `/tools/schemas/tools/text2speach-V2.schema.json` remains as an alias file whose `$id` points to `tools/schemas/tools/text2speech-V2.schema.json`.
24+
- `/samples/phase-19/1903/sample.1903.text2speach-V2.json` remains as an alias payload matching the canonical `sample.1903.text2speech-V2.json`.
25+
- `workspace.tools.text2speach-V2` session state migrates to `workspace.tools.text2speech-V2` with a status log entry.
26+
- `root.tools.text2speach-V2` workspace payloads migrate to `root.tools.text2speech-V2` during Workspace Manager context normalization and report the migration in status.
27+
- Tool registry alias maps `text2speach-V2` to `text2speech-V2`.
28+
29+
## Validation
30+
31+
- `node --check tools/text2speech-V2/js/TextToSpeechToolApp.js` passed.
32+
- `node --check tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js` passed.
33+
- `node --check tools/toolRegistry.js` passed.
34+
- `node --check tests/playwright/tools/WorkspaceManagerV2.spec.mjs` passed.
35+
- `npm run test:workspace-v2` passed: 35 tests passed.
36+
- `git diff --check` passed with line-ending normalization warnings only.
37+
38+
## Skipped
39+
40+
- Full samples smoke test skipped because the BUILD request explicitly said not to run it.

samples/metadata/samples.index.metadata.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"$schema": "../../tools/schemas/samples/sample.tool-payload.schema.json",
33
"version": 1,
44
"phases": [
@@ -3453,11 +3453,11 @@
34533453
"preview": "/samples/phase-19/1903/assets/images/preview.svg",
34543454
"classValues": [],
34553455
"engineClassesUsed": [],
3456-
"toolHints": ["text2speach-V2"],
3456+
"toolHints": ["text2speech-V2"],
34573457
"roundtripToolPresets": [
34583458
{
3459-
"toolId": "text2speach-V2",
3460-
"presetPath": "/samples/phase-19/1903/sample.1903.text2speach-V2.json"
3459+
"toolId": "text2speech-V2",
3460+
"presetPath": "/samples/phase-19/1903/sample.1903.text2speech-V2.json"
34613461
}
34623462
]
34633463
}

samples/phase-19/1903/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<!-- SAMPLE_LOCAL_CONTRACT_README -->
1+
<!-- SAMPLE_LOCAL_CONTRACT_README -->
22
# Sample 1903 - Text to Speech V2 JSON Source
33

44
Sample-local contract for `samples/phase-19/1903`.
55

66
## Implementation Location
77

88
- Entrypoint: `samples/phase-19/1903/index.html`
9-
- Sample payload: `samples/phase-19/1903/sample.1903.text2speach-V2.json`
10-
- The payload is a Text to Speech V2 root array of named speech items and validates against `tools/schemas/tools/text2speach-V2.schema.json`.
11-
- The sample launches `/tools/text2speach-V2/index.html` with `samplePresetPath` pointing at the sample JSON.
9+
- Sample payload: `samples/phase-19/1903/sample.1903.text2speech-V2.json`
10+
- The payload is a Text to Speech V2 root array of named speech items and validates against `tools/schemas/tools/text2speech-V2.schema.json`.
11+
- The sample launches `/tools/text2speech-V2/index.html` with `samplePresetPath` pointing at the sample JSON.
1212

1313
## Discovery Contract
1414

samples/phase-19/1903/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
/*
1+
/*
22
Toolbox Aid
33
David Quesenberry
44
05/11/2026
55
main.js
66
*/
77

8-
const TEXT_TO_SPEECH_PATH = "/tools/text2speach-V2/index.html";
9-
const TEXT_TO_SPEECH_SAMPLE_PRESET_PATH = "/samples/phase-19/1903/sample.1903.text2speach-V2.json";
8+
const TEXT_TO_SPEECH_PATH = "/tools/text2speech-V2/index.html";
9+
const TEXT_TO_SPEECH_SAMPLE_PRESET_PATH = "/samples/phase-19/1903/sample.1903.text2speech-V2.json";
1010

1111
function buildTextToSpeechHref() {
1212
const params = new URLSearchParams({
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
[
2+
{
3+
"id": "narrator-welcome",
4+
"name": "Narrator welcome",
5+
"text": "Welcome to Toolbox Aid. This is the default Text to Speech V2 sample line for previewing narration, prompts, and menu feedback.",
6+
"gender": "any",
7+
"language": "en-US",
8+
"voice": "mock-google-us-english",
9+
"voiceAge": "any",
10+
"volume": 1,
11+
"rate": 1,
12+
"pitch": 1,
13+
"queueMode": "replace",
14+
"characterPreset": "narrator",
15+
"ssmlLikePreset": "normal"
16+
},
17+
{
18+
"id": "hero-ready",
19+
"name": "Hero ready",
20+
"text": "Systems ready. The hero prompt is queued for an upbeat menu confirmation.",
21+
"gender": "male-preferred",
22+
"language": "en-GB",
23+
"voice": "mock-google-uk-english-male",
24+
"voiceAge": "teen",
25+
"volume": 1,
26+
"rate": 1.2,
27+
"pitch": 1.4,
28+
"queueMode": "append",
29+
"characterPreset": "dramatic",
30+
"ssmlLikePreset": "normal"
31+
},
32+
{
33+
"id": "alert-warning",
34+
"name": "Alert warning",
35+
"text": "Warning. Incoming hazard detected. Please confirm the next action.",
36+
"gender": "female-preferred",
37+
"language": "en-US",
38+
"voice": "mock-microsoft-zira",
39+
"voiceAge": "adult",
40+
"volume": 0.9,
41+
"rate": 1.3,
42+
"pitch": 0.9,
43+
"queueMode": "replace",
44+
"characterPreset": "alert",
45+
"ssmlLikePreset": "normal"
46+
}
47+
]

src/engine/audio/TextToSpeechDefaults.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const TEXT_TO_SPEECH_TOOL_ID = "text2speach-V2";
2-
const TEXT_TO_SPEECH_SCHEMA_ID = "tools/schemas/tools/text2speach-V2.schema.json";
1+
const TEXT_TO_SPEECH_TOOL_ID = "text2speech-V2";
2+
const TEXT_TO_SPEECH_SCHEMA_ID = "tools/schemas/tools/text2speech-V2.schema.json";
33
const TEXT_TO_SPEECH_DISPLAY_NAME = "Text to Speech V2";
44

55
const TEXT_TO_SPEECH_LANGUAGE_OPTIONS = Object.freeze([

0 commit comments

Comments
 (0)