Skip to content

Fix Unstuck voice input and move live model to GLM-4.5-Air#67

Merged
simongonzalezdc merged 1 commit into
mainfrom
codex/glm45-air-voice-fix
May 31, 2026
Merged

Fix Unstuck voice input and move live model to GLM-4.5-Air#67
simongonzalezdc merged 1 commit into
mainfrom
codex/glm45-air-voice-fix

Conversation

@simongonzalezdc
Copy link
Copy Markdown
Member

@simongonzalezdc simongonzalezdc commented May 31, 2026

Summary

  • switch the Z.AI coding-plan default and VPS compose from glm-5.1 to glm-4.5-air
  • harden the chat Mic button with transcript preservation, continuous recognition, local language selection, and keyboard-dictation fallback
  • update tests for the GLM-4.5-Air target and voice fallback coverage

Verification

  • npm test
  • node --check EF-COACH/live-demo/public/app.js && git diff --check
  • browser check on http://127.0.0.1:4175/chat/ with fake SpeechRecognition transcript and unsupported fallback path
  • live Z.AI API probe for glm-4.5-air with thinking enabled returned HTTP 200 and non-empty assistant content

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added voice-typing state preservation to retain pre-dictation drafts and recent transcripts
    • Enhanced voice input flow with manual dictation fallback for unsupported browsers
  • Bug Fixes

    • Improved voice error handling and browser compatibility detection
  • Chores

    • Updated AI model configuration
    • Updated application branding identifier

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a26bf01b-e0ec-4f2c-9dc9-93e9a2d46760

📥 Commits

Reviewing files that changed from the base of the PR and between 9c7bd81 and ec0d1cc.

📒 Files selected for processing (7)
  • EF-COACH/live-demo/deploy/docker-compose.vps.yml
  • EF-COACH/live-demo/lib/llm-client.mjs
  • EF-COACH/live-demo/public/app.js
  • EF-COACH/live-demo/scripts/build-hostinger-compose.mjs
  • EF-COACH/live-demo/test/chat-ui.test.mjs
  • EF-COACH/live-demo/test/compose.test.mjs
  • EF-COACH/live-demo/test/llm-client.test.mjs

📝 Walkthrough

Walkthrough

The PR upgrades the live-demo LLM client from GLM-5.1 to GLM-4.5-Air across configuration, deployment, and tests. It significantly refactors voice dictation in the frontend to preserve draft state, provide a manual keyboard fallback with new helper functions, and improve error handling. Minor rebranding changes the application title and service name from "Unstuck" to "U" in build artifacts.

Changes

GLM Model Migration and Voice Input Enhancements

Layer / File(s) Summary
LLM client GLM-4.5-Air configuration
lib/llm-client.mjs, test/llm-client.test.mjs
A new ZAI_GLM_AIR_MODEL constant is introduced and used in resolveLlmConfig for ZAI Coding Plan mode. The provider label is updated accordingly. Test cases verify the new model configuration and the resulting chat completion request model field.
Deployment and build configuration model update
deploy/docker-compose.vps.yml, scripts/build-hostinger-compose.mjs, test/compose.test.mjs
Production Docker Compose and build script default to GLM-4.5-Air. HTML title and service name are rebranded to "U". Tests verify the generated compose output includes the updated model environment variable.
Voice dictation refactoring with helpers and fallback
public/app.js, test/chat-ui.test.mjs
Voice state variables track pre-dictation draft and captured transcripts. New helper functions apply transcripts, extract recognition results, and focus manual fallback input. Error messaging guides users to keyboard input. startVoiceInput now handles initialization failures and unsupported browsers by routing to manual dictation with updated recognition config. end and error handlers use the new helpers and transcript-based status messages. Tests assert the presence of helper functions and verify recognition configuration details.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description provides comprehensive information about the changes and verification steps, but omits the required Empower Orchestrator checklist section. Include the Empower Orchestrator checklist section with checkmarks for reviewed repeatable tasks, durable improvements, and blast-radius verification.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the two main changes: fixing voice input and migrating to GLM-4.5-Air model.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/glm45-air-voice-fix

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

@simongonzalezdc simongonzalezdc merged commit 202d8ef into main May 31, 2026
2 of 3 checks passed
@simongonzalezdc simongonzalezdc deleted the codex/glm45-air-voice-fix branch May 31, 2026 13:27
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec0d1cc3d8

ℹ️ 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".

recognition.lang = navigator.language || "en-US";
recognition.interimResults = true;
recognition.continuous = false;
recognition.continuous = true;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop continuous recognition when submitting voice text

With continuous = true, the recognizer can keep emitting result events after the user has already pressed Send while the Mic is still active. The submit handler clears message.value but never stops currentRecognition, so a later interim/final result can call applyVoiceTranscript() and put the already-submitted transcript back into the composer (or append more dictated text to the old voiceBaseDraft), making it easy to resend duplicate/stale input. This only affects the voice flow when the user sends before manually tapping Mic again to stop.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant