Quick Release V0.6.4: Bug Fixes & Improvements
Hey folks! ๐ We're excited to announce the release of Quick Release v0.6.4! This patch is all about squashing a pesky bug and making things smoother for you. Let's dive into what's new and improved.
Overview
This release is primarily focused on fixing an annoying issue related to the idle timeout feature. Specifically, we've addressed a problem where the idle timeout wasn't firing correctly, which was causing connections to stay open longer than they should. This update tackles the issues identified in Issue #262 and Issue #430. The update ensures that the system correctly recognizes periods of inactivity, preventing the system from staying active unnecessarily. This patch enhances the system's responsiveness and conserves resources.
Why This Matters
Fixing the idle timeout is crucial for the overall performance and efficiency of our application. A properly functioning timeout ensures that inactive sessions are closed promptly, which helps to optimize resource usage and prevent unexpected behavior. This fix improves the user experience by ensuring the application responds as expected and helps with resource management. This update leads to more reliable and efficient system operations.
๐ Issue Fixed
Let's break down the main issues we've resolved in this release:
- Issue #262: Idle timeout not restarting after
USER_STOPPED_SPEAKING. - Issue #430 (voice-commerce): Idle timeout not firing, connections staying open until websocket timeout (~60 seconds) instead of the configured idle timeout (10 seconds).
Understanding the Problems
These issues stemmed from a misunderstanding of how our system tracks user activity. The idle timeout mechanism was being disrupted by the way we handled certain types of messages. This led to sessions remaining active even when there was no user interaction. This resulted in delayed timeouts. This issue impacts overall performance and user experience.
๐ง Changes in This Release
Now, let's explore the changes we've made to solve these issues. We've made some key adjustments to ensure the idle timeout works as intended. These changes are designed to improve system efficiency and reliability.
Root Cause and Solution
The root cause was that Assistant ConversationText messages were resetting the idle timeout. This was happening even when the agent or user was idle. To fix this, we removed ConversationText messages (both user and assistant) from the idle timeout reset logic. This change ensures that the timeout mechanism is not interrupted by these messages, allowing the system to correctly identify periods of inactivity. This directly resolves the identified problems.
Why This Fix Works
ConversationTextmessages are transcripts and do not necessarily indicate ongoing activity.- User activity is already handled via
injectUserMessage()โInjectUserMessagemessage. - Agent activity is tracked via messages like
AgentThinking,AgentStartedSpeaking, andAgentAudioDonemessages and state changes.
This approach ensures that the idle timeout is based on actual user and agent interaction, making the system more responsive and reliable. This change ensures proper idle timeout behavior.
Technical Details
Here's a look at the specific files that were changed:
src/utils/websocket/WebSocketManager.ts- Removed ConversationText handling fromisMeaningfulUserActivity()src/components/DeepgramVoiceInteraction/index.tsx- Added documentation explaining ConversationText redundancytests/agent-state-handling.test.ts- Updated test documentationdocs/issues/ISSUE-262/ISSUE-262-INTERNAL-RECORD.md- Added follow-up fix documentation
These changes help to ensure the idle timeout feature functions correctly.
๐ Quick Release Checklist
Here's a checklist of the steps we took to ensure a smooth release:
Pre-Release
- โ
Tests Passing: All tests passing. We ran
npm testand confirmed that all tests passed.- โ
Run:
npm test- 485 passed, 6 skipped
- โ
Run:
- โ
Linting Clean: No linting errors. We ran
npm run lintand all checks passed.
Version & Build
- โ
Bump Version: Updated to v0.6.4 using
npm version patch. - โ
Build Package: Created a production build using
npm run build. - โ
Test Package: Verified the package works with
npm run package:local.
Documentation
- โ
Create Release Documentation: Created the necessary documentation as per the established structure.
- Created the
docs/releases/v0.6.4/directory. - Created
CHANGELOG.mdfollowing the Keep a Changelog format. - Created
PACKAGE-STRUCTURE.mdfrom the template. - Created
RELEASE-NOTES.md.
- Created the
- โ
Validate Documentation: Run validation to ensure all required documents are present with
npm run validate:release-docs v0.6.4. - โ Update Version: Updated version references in documentation.
Release
- โ
Commit & Tag: Committed changes and created a tag.
- Committed with
git add . && git commit -m "chore: prepare release v0.6.4". - Tagged with
git tag v0.6.4 && git push origin v0.6.4.
- Committed with
- โ Publish: Published to the GitHub Registry. We utilized the CI build to create a GitHub release which triggered the publish workflow.
- โ
GitHub Release: Created a GitHub release.
- Title:
v0.6.4 - Description: Copied from
CHANGELOG.md
- Title:
This thorough process ensures the release is well-documented and validated.
๐จ Important Notes
Here are some key takeaways from this release:
- This is a patch release, so there are no breaking changes.
- Fixes a critical idle timeout bug affecting Issue #262 and Issue #430.
- All tests are passing (485 passed, 6 skipped), indicating a stable release.
- Package successfully publishes to the GitHub Package Registry.
These notes highlight the key aspects of the release.
โ Completion Criteria
We're happy to report that we've met all the completion criteria:
- โ Package published to GitHub Registry.
- โ GitHub release created.
- โ
CHANGELOG.mdupdated. - โ All tests passing.
- โ Issue #262 marked as resolved.
Thanks for your patience and support, and happy coding! ๐