Skip to content

ECHO-308 Conversation deletion case handle#180

Merged
ussaama merged 3 commits intomainfrom
conversation-deletion-case-handle
Jun 16, 2025
Merged

ECHO-308 Conversation deletion case handle#180
ussaama merged 3 commits intomainfrom
conversation-deletion-case-handle

Conversation

@ussaama
Copy link
Copy Markdown
Contributor

@ussaama ussaama commented Jun 6, 2025

Summary by CodeRabbit

  • New Features

    • Added user-friendly error messages and recovery options when a conversation cannot be loaded or is deleted during recording in participant conversation views.
    • Users are now informed if a conversation ends or is deleted mid-recording, with options to reload the page or start a new conversation.
  • Localization

    • Updated and expanded translations for English, German, Spanish, French, and Dutch to include new conversation status and error messages.
    • Improved translation metadata for better accuracy across all supported languages.

ussaama added 2 commits June 6, 2025 05:23
- Added functionality to monitor conversation status during recording, stopping the recording if the conversation is deleted or unavailable.
- Implemented user feedback for conversation errors, including options to reload the page or start a new conversation.
- Updated UI components to reflect changes in conversation status, improving user experience and error handling.
- Adjusted line numbers for various messages in German, English, Spanish, French, Dutch, and more to ensure accurate translations.
- Added new translations for error messages related to conversation loading issues, enhancing user guidance across supported languages.
- Improved consistency and accuracy in localization files to reflect recent changes in the application.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jun 6, 2025

Walkthrough

This update introduces robust error handling and user feedback for participant conversations when a conversation is deleted or unavailable, especially during recording. New localized UI messages and translations are added for English, German, Spanish, French, and Dutch. The participant conversation routes now display appropriate error states and recovery actions, like reloading or starting a new conversation.

Changes

Files Change Summary
echo/frontend/src/locales/en-US.po
.../de-DE.po
.../es-ES.po
.../fr-FR.po
.../nl-NL.po
Added new translation entries for conversation error states and updated source references.
echo/frontend/src/locales/en-US.ts
.../de-DE.ts
.../es-ES.ts
.../fr-FR.ts
.../nl-NL.ts
Updated static translation JSON content; added new keys and updated some values, no logic changes.
echo/frontend/src/routes/participant/ParticipantConversation.tsx Enhanced error handling for missing/deleted conversations, added new UI for error states with reload and new conversation options.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ParticipantConversationRoute
    participant ConversationQuery
    participant Recorder
    participant UI

    User->>ParticipantConversationRoute: Access conversation route
    ParticipantConversationRoute->>ConversationQuery: Fetch conversation data
    alt Conversation available
        ConversationQuery-->>ParticipantConversationRoute: Return data
        ParticipantConversationRoute->>UI: Render conversation interface
    else Conversation unavailable or deleted
        ConversationQuery-->>ParticipantConversationRoute: Return error/null
        alt Recording in progress
            ParticipantConversationRoute->>Recorder: Stop recording
            ParticipantConversationRoute->>UI: Show 'Conversation deleted during recording' message
        else Not recording
            ParticipantConversationRoute->>UI: Show generic error message
        end
        UI->>User: Offer 'Reload Page' and 'Start New Conversation' actions
    end
Loading

Suggested reviewers

  • spashii
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8511db8 and d26e524.

📒 Files selected for processing (11)
  • echo/frontend/src/locales/de-DE.po (46 hunks)
  • echo/frontend/src/locales/de-DE.ts (1 hunks)
  • echo/frontend/src/locales/en-US.po (47 hunks)
  • echo/frontend/src/locales/en-US.ts (1 hunks)
  • echo/frontend/src/locales/es-ES.po (46 hunks)
  • echo/frontend/src/locales/es-ES.ts (1 hunks)
  • echo/frontend/src/locales/fr-FR.po (46 hunks)
  • echo/frontend/src/locales/fr-FR.ts (1 hunks)
  • echo/frontend/src/locales/nl-NL.po (48 hunks)
  • echo/frontend/src/locales/nl-NL.ts (1 hunks)
  • echo/frontend/src/routes/participant/ParticipantConversation.tsx (7 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
echo/frontend/src/locales/fr-FR.ts (4)
echo/frontend/src/locales/de-DE.ts (1)
  • messages (1-1)
echo/frontend/src/locales/en-US.ts (1)
  • messages (1-1)
echo/frontend/src/locales/es-ES.ts (1)
  • messages (1-1)
echo/frontend/src/locales/nl-NL.ts (1)
  • messages (1-1)
echo/frontend/src/locales/es-ES.ts (1)
echo/frontend/src/locales/en-US.ts (1)
  • messages (1-1)
echo/frontend/src/routes/participant/ParticipantConversation.tsx (1)
echo/frontend/src/components/project/ProjectQRCode.tsx (1)
  • useProjectSharingLink (24-59)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: ci-check-server
🔇 Additional comments (79)
echo/frontend/src/locales/en-US.ts (1)

1-1: LGTM – English locale refreshed.
Static JSON update for new UI messages only; no logic changes detected.

echo/frontend/src/locales/de-DE.ts (1)

1-1: LGTM – German locale refreshed.
Static JSON update for new UI messages only; no logic changes detected.

echo/frontend/src/locales/fr-FR.ts (1)

1-1: LGTM – French locale refreshed.
Static JSON update for new UI messages only; no logic changes detected.

echo/frontend/src/locales/nl-NL.ts (1)

1-1: NL locale update looks solid – LGTM
Dutch translations cover all new conversation-deletion and error prompts with no stray English text. Ready to ship.

echo/frontend/src/locales/es-ES.po (25)

53-56: LGTM: Placeholder fallback preserved
The {0} identity string remains intact and correctly mirrored in Spanish.


67-70: LGTM: Dual-unit timer text localized
Placeholders {minutes} and {seconds} are correctly positioned with Spanish units.


75-78: LGTM: Seconds-only timer text localized
The {seconds} token is properly preserved before “segundos.”


86-89: LGTM: Tagged wait UI localized
The <0> wrapper and {0}:{1} placeholders match the original structure.


132-134: LGTM: “Advanced (Tips and tricks)” localized
Spanish “Avanzado (Consejos y trucos)” accurately conveys the meaning.


136-138: LGTM: “Advanced Settings” localized
“Configuración Avanzada” correctly reflects the English label.


232-235: LGTM: Finish confirmation prompt
Spanish question syntax is correct for “Are you sure you want to finish?”.


367-370: LGTM: “Check microphone access” UI label
Imperative “Verificar acceso al micrófono” is clear and concise.


587-589: LGTM: “Dutch” language label
“Holandés” is a valid Spanish term for Dutch.


671-674: LGTM: “English” language label
“Inglés” correctly localizes “English.”


811-814: LGTM: “French” language label
“Francés” accurately matches the source.


823-826: LGTM: “German” language label
“Alemán” is the correct Spanish equivalent.


919-921: LGTM: Deleted-while-recording notice
Spanish message clearly conveys the stopped recording recovery guidance.


1025-1028: LGTM: Continued mic-denied guidance
“Por favor verifica tu configuración e intenta de nuevo” matches the intent.


1187-1190: LGTM: Detailed mic-denied troubleshooting message
Spanish translation preserves tone and actionable guidance.


1204-1207: LGTM: Troubleshooting CTA localized
“Abrir guía de solución de problemas” is an accurate button label.


1254-1257: LGTM: “Pause” button label
“Pausar” correctly reflects the control action.


1315-1318: LGTM: Echo cooldown prompt
Placeholder {timeStr} and “otro Echo” use the correct capitalization.


1441-1444: LGTM: “Record” button label
“Grabar” is the proper command verb in Spanish.


1478-1481: LGTM: “Reload Page” action localized
“Recargar Página” aligns with standard UI terminology.


1559-1562: LGTM: “Resume” button label
“Reanudar” accurately mirrors the resume action.


1796-1800: LGTM: “Start New Conversation” prompt
“Iniciar Nueva Conversación” correctly captures the call to action.


1806-1809: LGTM: “Stop” button label
“Detener” is a clear translation for stopping the recording/chat.


1864-1867: LGTM: Conversation load-error message
“La conversación no pudo ser cargada…” conveys the error and recovery options.


1912-1915: LGTM: “Thinking...” indicator
Ellipsis and wording “Pensando...” are correctly preserved.

echo/frontend/src/locales/fr-FR.po (26)

52-56: LGTM: placeholder translation remains valid
No changes to the {0} placeholder mapping.


67-70: LGTM: time format translation
The {minutes} minutes and {seconds} seconds mapping to French is correct.


75-78: LGTM: seconds-only translation
The {seconds} seconds{seconds} secondes entry is accurate.


132-135: LGTM: "Advanced (Tips and tricks)" translation
"Avancé (Astuces et conseils)" correctly captures the meaning.


136-139: LGTM: "Advanced Settings" translation
"Paramètres avancés" is spot-on.


249-252: LGTM: "Ask for Name?" translation
"Demander le nom ?" aligns with context.


253-256: LGTM: name prompt translation
"Demander aux participants de fournir leur nom..." is clear.


449-452: LGTM: "Conversation Ended" translation
"Conversation terminée" correctly conveys the status.


587-590: LGTM: "Dutch" locale label
"Néerlandais" is the standard French term.


651-654: LGTM: "Enable Report Notifications" translation
"Activer les notifications de rapports" is accurate.


655-658: LGTM: detailed notifications feature text
Long-form description maps correctly to French.


659-662: LGTM: AI-powered response feature text
Translation is clear and faithful.


671-674: LGTM: "English" locale label
"Anglais" is correct.


811-814: LGTM: "French" locale label
"Français" is correct.


823-826: LGTM: "German" locale label
"Allemand" is correct.


919-922: LGTM: deletion-during-recording message
The localized copy properly reflects the new UX state.


937-939: LGTM: "Language" label
"Langue" is spot-on.


1025-1028: LGTM: microphone-denied error text
Translation accurately mirrors the English fallback.


1187-1190: LGTM: troubleshooting-guide prompt
"Oups ! ..." and the guide reference read naturally in French.


1254-1257: LGTM: "Pause" control label
"Pause" is correct.


1441-1444: LGTM: "Record" control label
"Enregistrer" is correct for recording.


1478-1481: LGTM: "Reload Page" action text
"Recharger la page" matches the UX intent.


1750-1756: LGTM: generic error fallback
"Une erreur s'est produite" is standard.


1797-1800: LGTM: "Start New Conversation" prompt
"Commencer une nouvelle conversation" reads well.


1863-1867: LGTM: load-failure recovery text
"La conversation n'a pas pu être chargée..." correctly informs the user.


643-645: ⚠️ Potential issue

Fix brand order for "Dembrane Echo"
The French should preserve the product name order.

- msgstr "Echo Dembrane"
+ msgstr "Dembrane Echo"
⛔ Skipped due to learnings
Learnt from: ussaama
PR: Dembrane/echo#169
File: echo/frontend/src/locales/fr-FR.po:521-523
Timestamp: 2025-05-30T15:36:40.131Z
Learning: In the French localization file (fr-FR.po), "Dembrane Echo" is intentionally translated as "Echo Dembrane" for better French language flow and natural sound. This is not an error but a deliberate localization choice.
echo/frontend/src/locales/de-DE.po (8)

67-69: LGTM – Time localization looks solid.
The German strings correctly mirror placeholders and grammar for minutes and seconds.


75-77: LGTM – Seconds-only translation is accurate.
Placeholders align and the German text reads naturally.


86-89: LGTM – “Wait” componentized string is correct.
The <0>Warte </0>{0}:{1} maintains the React fragment structure and proper German phrasing.


445-447: LGTM – “Conversation Ended” translation is spot-on.
No trailing punctuation needed; it matches the UI label style.


1475-1476: LGTM – “Reload Page” prompt is translated correctly.
Follows German UI convention without extra punctuation.


1795-1796: LGTM – “Start New Conversation” translation is precise.
Matches the intent and style of the English source.


1861-1862: LGTM – Error message for load failure is properly localized.
Grammar and punctuation align with German UX standards.


915-917: 🧹 Nitpick (assertive)

Nit: Add missing terminal period for consistency.
The English source ends with a period; consider appending one in the German translation.

- msgstr "Es scheint, dass das Gespräch während der Aufnahme gelöscht wurde. Wir haben die Aufnahme beendet, um Probleme zu vermeiden. Sie können jederzeit ein neues Gespräch starten"
+ msgstr "Es scheint, dass das Gespräch während der Aufnahme gelöscht wurde. Wir haben die Aufnahme beendet, um Probleme zu vermeiden. Sie können jederzeit ein neues Gespräch starten."

Likely an incorrect or invalid review comment.

echo/frontend/src/locales/nl-NL.po (6)

53-57: LGTM — placeholder entry reference updated.

The updated source paths for the {0} placeholder correctly reflect the component changes, and the translation remains accurate.


67-70: LGTM — dynamic minutes‐seconds translation.

The {minutes} minutes and {seconds} seconds string is correctly localized to Dutch.


75-78: LGTM — seconds-only translation.

The {seconds} seconds entry is accurately translated as {seconds} seconden.


98-102: LGTM — “Wait” component translation.

The <0>Wait </0>{0}:{1} UI prompt and its Dutch counterpart <0>Wacht </0>{0}:{1} are in sync.


152-155: LGTM — “Advanced (Tips and tricks)” label.

The new tutorial section label and its translation “Geavanceerd (Tips en trucs)” are spot-on.


156-159: LGTM — “Advanced Settings” translation.

The source reference and translation for “Advanced Settings” now correctly map to “Geavanceerde instellingen.”

echo/frontend/src/routes/participant/ParticipantConversation.tsx (4)

149-164: LGTM! Solid defensive programming.

The useEffect elegantly handles the edge case of conversation deletion mid-recording. Clean implementation that prevents zombie recording states.


252-307: LGTM! Elite error handling UX.

The error UI is chef's kiss - clear messaging, actionable recovery options, and proper differentiation between deletion-during-recording vs generic errors. The conditional rendering of the new conversation button based on newConversationLink existence is particularly clean.


98-102: LGTM!


661-700: LGTM! Consistent error handling across routes.

The text route error handling mirrors the audio route's approach minus the recording-specific logic. Clean, DRY implementation.

echo/frontend/src/locales/en-US.po (6)

53-53: LGTM: Updated source references for existing translations
Reference lines have been realigned to match recent code moves; no string content was altered.

Also applies to: 72-72, 80-80, 91-92, 137-137, 141-141, 241-242, 616-617


466-468: LGTM: Added "Conversation Ended" translation
The label clearly conveys the end-of-conversation state.


952-955: LGTM: Added recording-stop notification for deleted conversation
Copy is user-friendly, concise, and grammatically correct.


1527-1530: LGTM: Added "Reload Page" action label
Short, actionable, and appropriate in context.


1852-1853: LGTM: Added "Start New Conversation" action label
Clear call-to-action for users.


1923-1924: LGTM: Added load-failure notification for conversations
Provides clear guidance and next steps on load errors.

@spashii
Copy link
Copy Markdown
Member

spashii commented Jun 6, 2025

@ussaama can you please update this with ECHO ticket?

@ussaama ussaama changed the title Conversation deletion case handle ECHO-308 Conversation deletion case handle Jun 13, 2025
@linear
Copy link
Copy Markdown

linear bot commented Jun 13, 2025

@ussaama
Copy link
Copy Markdown
Contributor Author

ussaama commented Jun 13, 2025

@spashii done

@ussaama ussaama added this pull request to the merge queue Jun 16, 2025
Merged via the queue into main with commit 50225ee Jun 16, 2025
7 checks passed
spashii pushed a commit that referenced this pull request Nov 18, 2025
* Enhance conversation handling during recording

- Added functionality to monitor conversation status during recording, stopping the recording if the conversation is deleted or unavailable.
- Implemented user feedback for conversation errors, including options to reload the page or start a new conversation.
- Updated UI components to reflect changes in conversation status, improving user experience and error handling.

* Update localization files for multiple languages

- Adjusted line numbers for various messages in German, English, Spanish, French, Dutch, and more to ensure accurate translations.
- Added new translations for error messages related to conversation loading issues, enhancing user guidance across supported languages.
- Improved consistency and accuracy in localization files to reflect recent changes in the application.
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.

2 participants