PR_26171_BETA_075 tts message table cleanup#37
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a569fef611
ℹ️ 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".
| const profile = previewProfile(); | ||
| const hasVoice = Boolean(profile?.voice); | ||
| const supported = engine.isSupported(); | ||
| if (elements.speak) elements.speak.disabled = !(supported && hasText && hasVoice && selectedItem()); | ||
| if (elements.pause) elements.pause.disabled = !(engine.canPause() && selectedItem()); | ||
| if (elements.resume) elements.resume.disabled = !(engine.canResume() && selectedItem()); | ||
| if (elements.stop) elements.stop.disabled = !(supported && selectedItem()); | ||
| if (elements.copyJson) elements.copyJson.disabled = isWorkspaceLaunch(); | ||
| if (elements.exportJson) elements.exportJson.disabled = isWorkspaceLaunch(); | ||
| if (elements.importJson) elements.importJson.disabled = isWorkspaceLaunch(); | ||
| setTextContent(root, "[data-tts-text-count]", String(String(elements.text?.value || "").length)); | ||
| if (elements.speak) elements.speak.disabled = !(supported && hasText && hasVoice); |
There was a problem hiding this comment.
Rebind default profiles after voices load
In browsers where speechSynthesis.getVoices() returns an empty list on first load and later fires voiceschanged, the default profiles are created before any voices exist, so their voice fields stay empty. Since the Speak button now keys readiness off profile?.voice, the later voiceschanged refresh only updates state.voiceOptions and re-renders rows; it never assigns a voice to those existing default profiles, leaving preview playback disabled until the user manually edits a profile. This regresses first-load TTS preview on common Web Speech implementations that hydrate voices asynchronously.
Useful? React with 👍 / 👎.
Summary
Validation
node --check toolbox/text-to-speech/text2speech.jsnode --check toolbox/messages/messages.jsnpx playwright test tests/playwright/tools/TextToSpeechFunctional.spec.mjsnpx playwright test tests/playwright/tools/MessagesTool.spec.mjs --trace=offnode --test tests/tools/Text2SpeechShell.test.mjsnpm run test:workspace-v2git diff --checkgit diff --cached --checkReports
docs_build/dev/reports/codex_review.diffdocs_build/dev/reports/codex_changed_files.txtdocs_build/dev/reports/PR_26171_BETA_075-tts-message-table-cleanup.mddocs_build/dev/reports/PR_26171_BETA_075-tts-message-table-cleanup-validation-report.mddocs_build/dev/reports/PR_26171_BETA_075-tts-message-table-cleanup-manual-validation-notes.mddocs_build/dev/reports/PR_26171_BETA_075-tts-message-table-cleanup-instruction-compliance-checklist.mdDelta ZIP
tmp/PR_26171_BETA_075-tts-message-table-cleanup_delta.zip