feat(coach): document chats live in the Coach view and history

Asking the Coach about a document opened a separate, half-finished chat panel
that never appeared in Coach history. The bespoke drawer is gone; a document
conversation now opens the real Coach view, appears in the Coach list with a
document badge and a "Chatting about: <title>" note, and is read back through
the same history rail as any other thread.

The prompt-injection fence is unchanged and stays server-side. A document turn
is still sent through the hardened fenced endpoint (no tools, no health
snapshot, grounded in the document text only); the coach tool route continues
to fetch with documentId null, so a document-scoped conversation can never be
continued through the tool loop even from a hostile client. Only the surface
moved into the Coach; the boundary did not.

The relaxed conversation-list and detail filters drop only the documentId
predicate — userId scoping is unchanged, so a document thread is still visible
only to its owner. CoachConversationDTO gains documentId + documentTitle
(server-derived, title/filename only); no schema change (documentId exists
since 0230). OpenAPI regenerated.
This commit is contained in:
Marc-André Bombeck committed 2026-07-16 11:01:59 +02:00
1 parent 57539283c8
commit 5b24ca0fa1
28 files changed
+605 -1112

No files matched your search

+6 -17
View File
@@ -2213,6 +2213,11 @@
"errorCredentialExpired": "Deine Verbindung zum KI-Anbieter ist abgelaufen. Stelle sie in den Einstellungen wieder her, damit der Coach weiterläuft.",
"tagline": "Persönlicher Gesundheitscoach, auf deine Daten gestützt.",
"newChat": "Neuer Chat",
"docScope": {
"badge": "Dokument",
"chattingAbout": "Chat über: {title}",
"notIndexedHint": "Lies dieses Dokument zuerst im Archiv mit KI ein, damit der Coach dazu antworten kann."
},
"actionsMenu": "Aktionen",
"maximizeAriaLabel": "Im Vollbild öffnen",
"minimizeAriaLabel": "Zurück zum Seitenfenster",
@@ -8407,24 +8412,8 @@
},
"chat": {
"title": "Über dieses Dokument chatten",
"notIndexed": "Lies das Dokument zuerst mit KI, um darüber zu chatten.",
"empty": "Stelle eine Frage zu diesem Dokument, um zu beginnen.",
"placeholder": "Frage zu diesem Dokument…",
"inputLabel": "Deine Frage zu diesem Dokument",
"send": "Senden",
"thinking": "Dokument wird gelesen…",
"safety": "Antworten beschreiben dieses Dokument und sind keine medizinische Beratung.",
"close": "Chat schließen",
"errorHistory": "Unterhaltung konnte nicht geladen werden. Bitte erneut versuchen.",
"errorGeneric": "Etwas ist schiefgelaufen. Bitte erneut versuchen.",
"errorRateLimited": "Zu viele Nachrichten. Bitte kurz warten und erneut versuchen.",
"errorBudget": "Das tägliche KI-Limit ist erreicht. Bitte morgen erneut versuchen.",
"errorCredential": "Der KI-Anbieter muss in den Einstellungen neu verbunden werden.",
"errorConsent": "Aktiviere die KI-Zustimmung in den Einstellungen, um über dieses Dokument zu chatten.",
"errorNetwork": "Du scheinst offline zu sein. Prüfe deine Verbindung und versuche es erneut.",
"openAria": "Coach über dieses Dokument fragen",
"openButton": "Coach fragen",
"scopeBadge": "Chat über: {title}"
"openButton": "Coach fragen"
}
},
"selfDescription": {
+6 -17
View File
@@ -2213,6 +2213,11 @@
"errorCredentialExpired": "Your AI provider connection has expired. Reconnect it in Settings to keep the Coach running.",
"tagline": "Personal health coach, grounded in your data.",
"newChat": "New chat",
"docScope": {
"badge": "Document",
"chattingAbout": "Chatting about: {title}",
"notIndexedHint": "Read this document with AI first in the vault so the Coach can answer about it."
},
"actionsMenu": "Actions",
"maximizeAriaLabel": "Open in full page",
"minimizeAriaLabel": "Back to the drawer",
@@ -8407,24 +8412,8 @@
},
"chat": {
"title": "Chat about this document",
"notIndexed": "Read this document with AI first to chat about it.",
"empty": "Ask a question about this document to get started.",
"placeholder": "Ask about this document…",
"inputLabel": "Your question about this document",
"send": "Send",
"thinking": "Reading the document…",
"safety": "Answers describe this document and are not medical advice.",
"close": "Close chat",
"errorHistory": "Couldn't load the conversation. Try again.",
"errorGeneric": "Something went wrong. Try again.",
"errorRateLimited": "Too many messages. Wait a moment and try again.",
"errorBudget": "The daily AI limit has been reached. Try again tomorrow.",
"errorCredential": "The AI provider needs reconnecting in settings.",
"errorConsent": "Turn on AI consent in settings to chat about this document.",
"errorNetwork": "You appear to be offline. Check your connection and try again.",
"openAria": "Ask the Coach about this document",
"openButton": "Ask the Coach",
"scopeBadge": "Chatting about: {title}"
"openButton": "Ask the Coach"
}
},
"selfDescription": {
+6 -17
View File
@@ -2213,6 +2213,11 @@
"errorCredentialExpired": "Tu conexión con el proveedor de IA ha caducado. Vuelve a conectarla en Ajustes para que el Coach siga funcionando.",
"tagline": "Coach personal de salud, apoyado en tus datos.",
"newChat": "Nueva conversación",
"docScope": {
"badge": "Documento",
"chattingAbout": "Hablando sobre: {title}",
"notIndexedHint": "Primero lee este documento con IA en el archivo para que el Coach pueda responder sobre él."
},
"actionsMenu": "Acciones",
"maximizeAriaLabel": "Abrir en pantalla completa",
"minimizeAriaLabel": "Volver al panel",
@@ -8407,24 +8412,8 @@
},
"chat": {
"title": "Chatea sobre este documento",
"notIndexed": "Primero lee este documento con IA para poder chatear sobre él.",
"empty": "Haz una pregunta sobre este documento para empezar.",
"placeholder": "Pregunta sobre este documento…",
"inputLabel": "Tu pregunta sobre este documento",
"send": "Enviar",
"thinking": "Leyendo el documento…",
"safety": "Las respuestas describen este documento y no son consejo médico.",
"close": "Cerrar chat",
"errorHistory": "No se pudo cargar la conversación. Inténtalo de nuevo.",
"errorGeneric": "Algo salió mal. Inténtalo de nuevo.",
"errorRateLimited": "Demasiados mensajes. Espera un momento e inténtalo de nuevo.",
"errorBudget": "Se alcanzó el límite diario de IA. Inténtalo de nuevo mañana.",
"errorCredential": "Hay que volver a conectar el proveedor de IA en los ajustes.",
"errorConsent": "Activa el consentimiento de IA en los ajustes para chatear sobre este documento.",
"errorNetwork": "Parece que no tienes conexión. Comprueba tu red e inténtalo de nuevo.",
"openAria": "Pregunta al Coach sobre este documento",
"openButton": "Preguntar al Coach",
"scopeBadge": "Chateando sobre: {title}"
"openButton": "Preguntar al Coach"
}
},
"selfDescription": {
+6 -17
View File
@@ -2213,6 +2213,11 @@
"errorCredentialExpired": "Ta connexion au fournisseur d'IA a expiré. Reconnecte-la dans les Réglages pour que le Coach continue de fonctionner.",
"tagline": "Coach personnel de santé, ancré sur tes données.",
"newChat": "Nouvelle conversation",
"docScope": {
"badge": "Document",
"chattingAbout": "Discussion sur : {title}",
"notIndexedHint": "Lis d'abord ce document avec l'IA dans le coffre pour que le Coach puisse y répondre."
},
"actionsMenu": "Actions",
"maximizeAriaLabel": "Ouvrir en pleine page",
"minimizeAriaLabel": "Revenir au panneau",
@@ -8407,24 +8412,8 @@
},
"chat": {
"title": "Discuter de ce document",
"notIndexed": "Lisez d'abord ce document avec l'IA pour pouvoir en discuter.",
"empty": "Posez une question sur ce document pour commencer.",
"placeholder": "Une question sur ce document…",
"inputLabel": "Votre question sur ce document",
"send": "Envoyer",
"thinking": "Lecture du document…",
"safety": "Les réponses décrivent ce document et ne constituent pas un avis médical.",
"close": "Fermer le chat",
"errorHistory": "Impossible de charger la conversation. Réessayez.",
"errorGeneric": "Une erreur s'est produite. Réessayez.",
"errorRateLimited": "Trop de messages. Patientez un instant et réessayez.",
"errorBudget": "La limite quotidienne d'IA est atteinte. Réessayez demain.",
"errorCredential": "Le fournisseur d'IA doit être reconnecté dans les paramètres.",
"errorConsent": "Activez le consentement à l'IA dans les paramètres pour discuter de ce document.",
"errorNetwork": "Vous semblez hors ligne. Vérifiez votre connexion et réessayez.",
"openAria": "Interroger le Coach sur ce document",
"openButton": "Demander au Coach",
"scopeBadge": "Discussion sur : {title}"
"openButton": "Demander au Coach"
}
},
"selfDescription": {
+6 -17
View File
@@ -2213,6 +2213,11 @@
"errorCredentialExpired": "La connessione al provider di IA è scaduta. Riconnettila nelle Impostazioni per mantenere attivo il Coach.",
"tagline": "Coach personale di salute, basato sui tuoi dati.",
"newChat": "Nuova chat",
"docScope": {
"badge": "Documento",
"chattingAbout": "Stai parlando di: {title}",
"notIndexedHint": "Leggi prima questo documento con l'IA nell'archivio così il Coach può rispondere."
},
"actionsMenu": "Azioni",
"maximizeAriaLabel": "Apri a pagina intera",
"minimizeAriaLabel": "Torna al pannello",
@@ -8407,24 +8412,8 @@
},
"chat": {
"title": "Chatta su questo documento",
"notIndexed": "Leggi prima questo documento con l'IA per poterne parlare.",
"empty": "Fai una domanda su questo documento per iniziare.",
"placeholder": "Una domanda su questo documento…",
"inputLabel": "La tua domanda su questo documento",
"send": "Invia",
"thinking": "Lettura del documento…",
"safety": "Le risposte descrivono questo documento e non sono un consiglio medico.",
"close": "Chiudi chat",
"errorHistory": "Impossibile caricare la conversazione. Riprova.",
"errorGeneric": "Qualcosa è andato storto. Riprova.",
"errorRateLimited": "Troppi messaggi. Attendi un momento e riprova.",
"errorBudget": "Limite giornaliero di IA raggiunto. Riprova domani.",
"errorCredential": "Il provider IA va ricollegato nelle impostazioni.",
"errorConsent": "Attiva il consenso all'IA nelle impostazioni per chattare su questo documento.",
"errorNetwork": "Sembri offline. Controlla la connessione e riprova.",
"openAria": "Chiedi al Coach su questo documento",
"openButton": "Chiedi al Coach",
"scopeBadge": "Stai chattando su: {title}"
"openButton": "Chiedi al Coach"
}
},
"selfDescription": {
+6 -17
View File
@@ -2213,6 +2213,11 @@
"errorCredentialExpired": "Połączenie z dostawcą AI wygasło. Połącz je ponownie w Ustawieniach, aby Coach działał dalej.",
"tagline": "Osobisty coach zdrowia, oparty na twoich danych.",
"newChat": "Nowa rozmowa",
"docScope": {
"badge": "Dokument",
"chattingAbout": "Rozmowa o: {title}",
"notIndexedHint": "Najpierw wczytaj ten dokument z pomocą AI w archiwum, aby Coach mógł na jego temat odpowiadać."
},
"actionsMenu": "Działania",
"maximizeAriaLabel": "Otwórz na pełnej stronie",
"minimizeAriaLabel": "Powrót do panelu",
@@ -8407,24 +8412,8 @@
},
"chat": {
"title": "Porozmawiaj o tym dokumencie",
"notIndexed": "Najpierw przeczytaj ten dokument z pomocą AI, aby o nim porozmawiać.",
"empty": "Zadaj pytanie o ten dokument, aby zacząć.",
"placeholder": "Zapytaj o ten dokument…",
"inputLabel": "Twoje pytanie o ten dokument",
"send": "Wyślij",
"thinking": "Czytanie dokumentu…",
"safety": "Odpowiedzi opisują ten dokument i nie są poradą medyczną.",
"close": "Zamknij czat",
"errorHistory": "Nie udało się wczytać rozmowy. Spróbuj ponownie.",
"errorGeneric": "Coś poszło nie tak. Spróbuj ponownie.",
"errorRateLimited": "Zbyt wiele wiadomości. Poczekaj chwilę i spróbuj ponownie.",
"errorBudget": "Osiągnięto dzienny limit AI. Spróbuj ponownie jutro.",
"errorCredential": "Dostawcę AI trzeba ponownie połączyć w ustawieniach.",
"errorConsent": "Włącz zgodę na AI w ustawieniach, aby porozmawiać o tym dokumencie.",
"errorNetwork": "Wygląda na to, że jesteś offline. Sprawdź połączenie i spróbuj ponownie.",
"openAria": "Zapytaj Coacha o ten dokument",
"openButton": "Zapytaj Coacha",
"scopeBadge": "Rozmowa o: {title}"
"openButton": "Zapytaj Coacha"
}
},
"selfDescription": {