style(coach): prettier formatting on W5 surfaces

This commit is contained in:
Marc-André Bombeck committed 2026-05-14 13:37:41 +02:00
1 parent 88efd42755
commit 36bf96059e
2 files changed
+5 -8

No files matched your search

@@ -176,8 +176,9 @@ export function CoachDrawer({
sources: [...DEFAULT_COACH_SCOPE.sources],
window: DEFAULT_COACH_SCOPE.window,
}));
const [windowOverride, setWindowOverride] =
useState<CoachScopeWindow | null>(null);
const [windowOverride, setWindowOverride] = useState<CoachScopeWindow | null>(
null,
);
// v1.4.25 W5 — load the user's saved Coach prefs so the default
// window picks up the cog's saved selection. The hook gates the
@@ -170,9 +170,7 @@ export function MessageThread({
if (!optimisticUser) return false;
// Suppress if the persisted history already contains the same
// user content as the last user message — the twin has landed.
const lastUser = [...messages]
.reverse()
.find((m) => m.role === "user");
const lastUser = [...messages].reverse().find((m) => m.role === "user");
if (lastUser && lastUser.content === optimisticUser.content) return false;
return true;
})();
@@ -373,9 +371,7 @@ function ChatBubble({
// user understands daily-cap (resets at UTC midnight) vs. transient
// provider load (retry in ~5 min). Codes that have no dedicated
// translation fall back to the generic provider-unavailable copy.
const errorKey = errorCode
? errorCodeToI18nKey(errorCode)
: null;
const errorKey = errorCode ? errorCodeToI18nKey(errorCode) : null;
const errorMessage = errorKey ? t(errorKey, {}) : null;
// When a translated message comes back unchanged (i.e. key missing)
// we fall back to a generic provider error string so the bubble