ECHO-446 Add Disclaimer to Echo chat #291
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a responsive AI-disclaimer and repositions the chat input hint in ProjectChatRoute; updates PO files to add the new string and shift source anchors; replaces multiple locale TS catalogs with expanded translation payloads. No public API or runtime logic changes. LGTM. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
✨ Finishing touches
🧪 Generate unit tests
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 11
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
echo/frontend/src/routes/project/chat/ProjectChatRoute.tsx (1)
547-553: Enter submits empty input; guard it.
Pressing Enter triggers submit even when input is empty; the Send button is disabled but the key handler isn’t.- onKeyDown={(e) => { - if (e.key === "Enter" && !e.shiftKey) { + onKeyDown={(e) => { + if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); e.stopPropagation(); - handleSubmit(); + if (input.trim() !== "") handleSubmit(); } }}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (11)
echo/frontend/src/locales/de-DE.po(1 hunks)echo/frontend/src/locales/de-DE.ts(1 hunks)echo/frontend/src/locales/en-US.po(1 hunks)echo/frontend/src/locales/en-US.ts(1 hunks)echo/frontend/src/locales/es-ES.po(1 hunks)echo/frontend/src/locales/es-ES.ts(1 hunks)echo/frontend/src/locales/fr-FR.po(1 hunks)echo/frontend/src/locales/fr-FR.ts(1 hunks)echo/frontend/src/locales/nl-NL.po(1 hunks)echo/frontend/src/locales/nl-NL.ts(1 hunks)echo/frontend/src/routes/project/chat/ProjectChatRoute.tsx(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-19T10:14:31.647Z
Learnt from: ussaama
PR: Dembrane/echo#266
File: echo/frontend/src/components/chat/ChatAccordion.tsx:214-221
Timestamp: 2025-08-19T10:14:31.647Z
Learning: In the Echo frontend codebase using Lingui, i18n IDs in Trans components (e.g., `<Trans id="any.string.here">`) can be arbitrary strings and don't need to follow specific naming conventions. They are just references used in .po files, and the actual translations need to be manually defined in the locale files.
Applied to files:
echo/frontend/src/locales/en-US.po
📚 Learning: 2025-05-30T15:36:40.131Z
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.
Applied to files:
echo/frontend/src/locales/fr-FR.po
🧬 Code graph analysis (5)
echo/frontend/src/locales/es-ES.ts (2)
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/en-US.ts (4)
echo/frontend/src/locales/de-DE.ts (1)
messages(1-1)echo/frontend/src/locales/es-ES.ts (1)
messages(1-1)echo/frontend/src/locales/fr-FR.ts (1)
messages(1-1)echo/frontend/src/locales/nl-NL.ts (1)
messages(1-1)
echo/frontend/src/locales/de-DE.ts (1)
echo/frontend/src/locales/en-US.ts (1)
messages(1-1)
echo/frontend/src/locales/nl-NL.ts (2)
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/fr-FR.ts (2)
echo/frontend/src/locales/de-DE.ts (1)
messages(1-1)echo/frontend/src/locales/en-US.ts (1)
messages(1-1)
🔇 Additional comments (9)
echo/frontend/src/locales/es-ES.po (1)
2881-2884: LGTM: anchor move onlyString unchanged; anchor relocation looks consistent with UI changes.
echo/frontend/src/locales/de-DE.po (1)
2880-2883: LGTM: anchor move onlyTranslation remains correct; no action.
echo/frontend/src/locales/es-ES.ts (1)
1-1: ES disclaimer LGTM“Echo funciona con IA. Por favor, revisa las respuestas.” reads natural and on-brief.
echo/frontend/src/locales/fr-FR.ts (1)
1-1: Nice: kept “Echo Dembrane” per FR style guideObserved “Dembrane Echo” → “Echo Dembrane” retained, matching our localization learning. LGTM.
echo/frontend/src/locales/nl-NL.po (1)
3138-3141: Hint translation LGTM.
Accurate and idiomatic: “Gebruik Shift + Enter om een nieuwe regel toe te voegen.”echo/frontend/src/locales/en-US.po (1)
2962-2965: Shift+Enter hint LGTM.
No issues.echo/frontend/src/locales/nl-NL.ts (1)
1-1: Don't hand-edit compiled catalogs; update nl-NL.po and recompile — verified.
nl-NL.po contains the corrected msgstr and echo/frontend/src/locales/nl-NL.ts contains the compiled Dutch strings ("Gebruik Shift + Enter om een nieuwe regel toe te voegen" and "Echo wordt aangestuurd door AI. Controleer de Antwoorden dubbel.").echo/frontend/src/locales/en-US.ts (2)
1-1: Compiled catalog expansion LGTM.New disclaimer string present (id: H8blQl). No runtime risks; aligns with Lingui-compiled pattern. Ship it.
1-1: Verify disclaimer present in all locales & referenced in chat route
- UI: "Echo is powered by AI. Please double check responses." found at echo/frontend/src/routes/project/chat/ProjectChatRoute.tsx:562.
- Locale scan was inconclusive (fd pattern error); cannot confirm key "H8blQl" exists across locale files. Re-run from the repo root with this check:
#!/bin/bash set -euo pipefail missing=0 for f in $(find echo/frontend/src/locales -type f -name '*.ts'); do if rg -q '"H8blQl"\s*:\s*\[' "$f"; then echo "OK - $f" else echo "MISS- $f"; missing=$((missing+1)) fi done if [ $missing -gt 0 ]; then echo "Missing disclaimer key in $missing file(s)"; exit 1 fi rg -n -C2 'H8blQl|Echo is powered by AI' echo/frontend/src/routes || true
…ted the english text for "double-check"
There was a problem hiding this comment.
Actionable comments posted: 8
♻️ Duplicate comments (9)
echo/frontend/src/locales/nl-NL.po (1)
3142-3145: Fix Dutch capitalization in disclaimer.
Lowercase “antwoorden” for correct Dutch; current casing looks off in UI.Apply:
-msgstr "Echo wordt aangedreven door AI. Controleer de Antwoorden nogmaals." +msgstr "Echo wordt aangedreven door AI. Controleer de antwoorden nogmaals."echo/frontend/src/locales/es-ES.po (1)
2885-2888: Spanish disclaimer: perfect — matches native phrasing. LGTM.Adopted the prior suggestion; reads natural and on-brand.
echo/frontend/src/locales/de-DE.po (1)
2884-2887: Fix term and phrasing: AI → KI; “von KI unterstützt.”German UIs use “KI”. Also “von KI unterstützt” is the idiomatic rendering.
-msgstr "Echo wird durch AI unterstützt. Bitte überprüfen Sie die Antworten." +msgstr "Echo wird von KI unterstützt. Bitte überprüfen Sie die Antworten."echo/frontend/src/locales/fr-FR.po (2)
2881-2884: Polish FR keyboard label: Shift → MajFrench UI uses “Maj” for the Shift key.
-msgstr "Utilisez Shift + Entrée pour ajouter une nouvelle ligne" +msgstr "Utilisez Maj + Entrée pour ajouter une nouvelle ligne"
2885-2888: Use “propulsé par l’IA” (not “optimisé”)Matches existing “Powered by” phrasing elsewhere.
-msgstr "Echo est optimisé par l'IA. Veuillez vérifier les réponses." +msgstr "Echo est propulsé par l'IA. Veuillez vérifier les réponses."echo/frontend/src/locales/fr-FR.ts (1)
1-1: Keep FR TS in sync with FR PO: “Maj” and “propulsé”Aligns with FR conventions and prior guidance.
-"ngdRFH":["Utilisez Shift + Entrée pour ajouter une nouvelle ligne"], +"ngdRFH":["Utilisez Maj + Entrée pour ajouter une nouvelle ligne"], -"rH6cQt":["Echo est optimisé par l'IA. Veuillez vérifier les réponses."], +"rH6cQt":["Echo est propulsé par l'IA. Veuillez vérifier les réponses."],Run to ensure no lingering mismatches:
#!/bin/bash rg -n "Shift \+ Entrée|optimisé par l'IA" echo/frontend/src/locales/fr-FR.*echo/frontend/src/locales/en-US.ts (1)
1-1: Optional: parameterize brand name “Echo”Future-proof copy by injecting {brand}/{BRAND} from config.
echo/frontend/src/locales/de-DE.ts (1)
1-1: Fix DE disclaimer: AI → KI; “durch” → “von”.More idiomatic/accurate German for the new disclaimer.
-"rH6cQt":["Echo wird durch AI unterstützt. Bitte überprüfen Sie die Antworten."], +"rH6cQt":["Echo wird von KI unterstützt. Bitte überprüfen Sie die Antworten."],echo/frontend/src/routes/project/chat/ProjectChatRoute.tsx (1)
556-569: Stabilize i18n IDs (follow-up).Consider giving these Trans nodes explicit ids (e.g., chat.hint.shift_enter, chat.disclaimer.ai_powered) to reduce churn across extractions. This requires adding those ids to all locale catalogs in this PR; otherwise strings will fall back to English. Flagging as a follow-up so we don’t regress translations now.
Also applies to: 590-599
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (11)
echo/frontend/src/locales/de-DE.po(1 hunks)echo/frontend/src/locales/de-DE.ts(1 hunks)echo/frontend/src/locales/en-US.po(1 hunks)echo/frontend/src/locales/en-US.ts(1 hunks)echo/frontend/src/locales/es-ES.po(1 hunks)echo/frontend/src/locales/es-ES.ts(1 hunks)echo/frontend/src/locales/fr-FR.po(1 hunks)echo/frontend/src/locales/fr-FR.ts(1 hunks)echo/frontend/src/locales/nl-NL.po(1 hunks)echo/frontend/src/locales/nl-NL.ts(1 hunks)echo/frontend/src/routes/project/chat/ProjectChatRoute.tsx(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-06-06T05:43:44.935Z
Learnt from: ussaama
PR: Dembrane/echo#180
File: echo/frontend/src/locales/es-ES.ts:1-1
Timestamp: 2025-06-06T05:43:44.935Z
Learning: When users indicate they have already addressed translation issues in locale files, verify the current state before assuming the issue persists. Translation files are often updated in bulk and previously flagged English text may have been properly localized.
Applied to files:
echo/frontend/src/locales/en-US.po
🧬 Code graph analysis (4)
echo/frontend/src/locales/nl-NL.ts (2)
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/de-DE.ts (1)
echo/frontend/src/locales/en-US.ts (1)
messages(1-1)
echo/frontend/src/locales/fr-FR.ts (2)
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)
echo/frontend/src/locales/en-US.ts (1)
messages(1-1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Cursor Bugbot
- GitHub Check: ci-check-server
🔇 Additional comments (4)
echo/frontend/src/locales/nl-NL.po (1)
3138-3141: "Shift + Enter" hint reads well in Dutch — ship it.echo/frontend/src/locales/en-US.po (2)
2962-2965: "Shift + Enter" hint: LGTM.
2966-2969: Hyphenation fixed — LGTM.
String and translation both use “double-check”; aligned with style.echo/frontend/src/locales/en-US.ts (1)
1-1: LGTM — disclaimer copy is crispHyphenated “double-check” reads well; keys present. Ship it.
Added disclaimer message detailing that Echo is powered by AI with translations for each of the selectable languages this time with proper positioning <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added AI disclaimer under chat input: “Echo is powered by AI. Please double-check responses.” * **Style** * Reorganized chat input helper texts for improved responsive display and adjusted breakpoints for desktop vs. mobile. * **Chores** * Expanded and updated translation catalogs (en, de, es, fr, nl), and added a French “View” translation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Usama <59267656+ussaama@users.noreply.github.com>
Added disclaimer message detailing that Echo is powered by AI with translations for each of the selectable languages this time with proper positioning
Summary by CodeRabbit
New Features
Style
Chores