[codex] PR_26171_065 message studio parent child table foundation#20
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11d62b86e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (key && key !== NEW_ROW_KEY) { | ||
| state.messageTtsProfileKeys.set(key, messageSelect.value || defaultTtsProfileKey()); |
There was a problem hiding this comment.
Preserve add-row TTS selections after saving
When the user chooses a Default TTS Profile while creating a new message, this guard drops the change because the add row's identity is __new__; commitMessage never reads that select either, so the saved message reverts to the default playback profile. The same pattern exists for new parts just below, so any non-default TTS choice made in an Add Message/Add Part row is silently lost as soon as the row is saved.
Useful? React with 👍 / 👎.
| if (!String(target.text || "").trim()) { | ||
| return visiblePlaybackError("Selected message or part needs text before playback."); | ||
| } | ||
| return ttsServiceRegistry.speak(service.key, { |
There was a problem hiding this comment.
Surface speech engine failures from row playback
This returns the raw ttsServiceRegistry.speak() result, but the new Play Part/Play Message callers only return when ok is false. If SpeechSynthesis is supported but the configured voice is unavailable on the current browser, or voices have not loaded yet, TextToSpeechEngine returns an error message and the row-level playback buttons appear to do nothing instead of showing the actionable failure in the validation/status UI.
Useful? React with 👍 / 👎.
| const target = selectedSpeechTarget(); | ||
| const emotion = target.emotionProfile; | ||
| const result = ttsServiceRegistry.speak(service.key, { | ||
| const result = speakTarget(service, target, target.profile || selectedTtsProfile()); |
There was a problem hiding this comment.
Honor the Speech Test profile selector
For any selected message or part, selectedSpeechTarget() already attaches a profile, so this expression never uses selectedTtsProfile() from the Inspector's TTS Profile dropdown. In the Speech Test panel, changing that visible dropdown and pressing Test Speech still plays with the row/default profile, which makes the control ineffective unless the user also changes the table-row selector.
Useful? React with 👍 / 👎.
Summary
Validation
node --check toolbox\messages\messages.jsnode --check toolbox\messages\message-tts-service-registry.jsnode --check tests\playwright\tools\MessagesTool.spec.mjstoolbox/messages/index.htmlnpx playwright test tests/playwright/tools/MessagesTool.spec.mjs --project=playwright --workers=1 --reporter=listnpm run test:workspace-v2(legacy command name; user-facing language is Project Workspace)git diff --checkNotes