Skip to content

ECHO-670 Recording duration incorrect after pause and resume fix#486

Merged
spashii merged 1 commit intomainfrom
conversation-finish-logic-update
Mar 18, 2026
Merged

ECHO-670 Recording duration incorrect after pause and resume fix#486
spashii merged 1 commit intomainfrom
conversation-finish-logic-update

Conversation

@ussaama
Copy link
Copy Markdown
Contributor

@ussaama ussaama commented Mar 18, 2026

  • Simplified the logic in task_merge_conversation_chunks by removing redundant checks for conversation state.
  • Added functionality in ConversationService to reset conversation state if it was previously finished and merged, ensuring all segments are processed correctly.

Summary by CodeRabbit

  • Bug Fixes

    • Improved conversation state management when processing chunks for previously completed conversations; conversation records are now properly reset before creating new chunks.
    • Enhanced conversation merging logic to ensure consistent processing of all conversations regardless of their completion status.
  • Chores

    • Code formatting improvements.

- Simplified the logic in `task_merge_conversation_chunks` by removing redundant checks for conversation state.
- Added functionality in `ConversationService` to reset conversation state if it was previously finished and merged, ensuring all segments are processed correctly.
@linear
Copy link
Copy Markdown

linear bot commented Mar 18, 2026

@ussaama ussaama requested a review from spashii March 18, 2026 16:33
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 734e6dee-e775-472e-ad4e-899a5f68a54f

📥 Commits

Reviewing files that changed from the base of the PR and between 44ad16b and 55d6d68.

📒 Files selected for processing (2)
  • echo/server/dembrane/service/conversation.py
  • echo/server/dembrane/tasks.py

Walkthrough

This PR adds state-reset logic in conversation chunk creation when a finished conversation has a merged audio path, and removes an early exit guard in conversation chunk merging to ensure consistent fetch behavior. Formatting adjustments included.

Changes

Cohort / File(s) Summary
Conversation State Reset
echo/server/dembrane/service/conversation.py
Introduces conditional logic in create_chunk to reset conversation state (is_finished, is_all_chunks_transcribed, merged_audio_path, duration, summary) when processing a previously finished conversation with existing merged audio.
Task Control Flow
echo/server/dembrane/tasks.py
Removes early guard in task_merge_conversation_chunks that skipped processing for finished conversations with merged audio; now always attempts fetch. Includes multi-line formatting adjustments to transcription function calls.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

bug

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly references the main functional change: fixing recording duration issues after pause/resume by resetting conversation state when resuming after completion.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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 conversation-finish-logic-update
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai bot added the bug Something isn't working label Mar 18, 2026
@spashii spashii added this pull request to the merge queue Mar 18, 2026
Merged via the queue into main with commit 91e5945 Mar 18, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants