Skip to content

ECHO-446 Add Disclaimer to Echo chat #291

Merged
ussaama merged 6 commits intoDembrane:mainfrom
MsVivienne:disclaimer+translations
Sep 12, 2025
Merged

ECHO-446 Add Disclaimer to Echo chat #291
ussaama merged 6 commits intoDembrane:mainfrom
MsVivienne:disclaimer+translations

Conversation

@MsVivienne
Copy link
Copy Markdown
Contributor

@MsVivienne MsVivienne commented Sep 12, 2025

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

    • Added AI disclaimer under chat input: “Echo is powered by AI. Please double-check responses.”
  • Style

    • Reorganized chat input helper texts and adjusted responsive behavior so hints display differently on desktop vs. mobile.
  • Chores

    • Expanded and updated translation catalogs for en, de, es, fr, nl (including a new French “View” translation).

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 12, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds 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

Cohort / File(s) Summary
Chat UI hint updates
echo/frontend/src/routes/project/chat/ProjectChatRoute.tsx
Adjusts layout classes and adds responsive hint elements: shows “Use Shift + Enter to add a new line” and new “Echo is powered by AI. Please double-check responses.” texts with desktop (lg+) and mobile variants; presentational only.
Locale PO updates (new string + anchors)
echo/frontend/src/locales/en-US.po, echo/frontend/src/locales/es-ES.po, echo/frontend/src/locales/fr-FR.po, echo/frontend/src/locales/de-DE.po, echo/frontend/src/locales/nl-NL.po
Adds PO entries for the AI disclaimer and updates source-location anchors for the “Use Shift + Enter to add a new line” string; content-only localization edits.
Locale TS catalog expansions (data-only)
echo/frontend/src/locales/en-US.ts, echo/frontend/src/locales/es-ES.ts, echo/frontend/src/locales/fr-FR.ts, echo/frontend/src/locales/de-DE.ts, echo/frontend/src/locales/nl-NL.ts
Replaces the JSON payloads parsed into messages with much larger translation maps (many new keys including prefixed/hashed IDs). Export signatures unchanged; purely data changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs


📜 Recent 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 19da53c and d23094c.

📒 Files selected for processing (1)
  • echo/frontend/src/routes/project/chat/ProjectChatRoute.tsx (3 hunks)
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

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: 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 998957c and dfd180d.

📒 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 only

String unchanged; anchor relocation looks consistent with UI changes.

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

2880-2883: LGTM: anchor move only

Translation 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 guide

Observed “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

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: 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 → Maj

French 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 933661d and 19da53c.

📒 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 crisp

Hyphenated “double-check” reads well; keys present. Ship it.

@ussaama ussaama added this pull request to the merge queue Sep 12, 2025
@ussaama ussaama changed the title Added disclaimer message and translations for it ECHO-446 Added disclaimer message and translations for it Sep 12, 2025
Merged via the queue into Dembrane:main with commit 7c60655 Sep 12, 2025
5 of 7 checks passed
@ussaama ussaama changed the title ECHO-446 Added disclaimer message and translations for it ECHO-446 Add Disclaimer to Echo chat Sep 12, 2025
@MsVivienne MsVivienne deleted the disclaimer+translations branch September 17, 2025 10:39
spashii pushed a commit that referenced this pull request Nov 18, 2025
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants