Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(ui): prevents email address overflow in user menu box (#2800)

Alisson Pelizaro042901ddc85a
diff --git a/web/src/components/layouts/layout.tsx b/web/src/components/layouts/layout.tsx
index a622babf8a..cba56418d7 100644
--- a/web/src/components/layouts/layout.tsx
+++ b/web/src/components/layouts/layout.tsx
@@ -389,7 +389,10 @@ export default function Layout(props: PropsWithChildren) {
leaveTo="transform opacity-0 scale-95"
>
<Menu.Items className="absolute -top-full bottom-1 right-0 z-10 overflow-hidden rounded-md bg-background py-2 shadow-lg ring-1 ring-border focus:outline-none">
- <span className="block border-b px-3 pb-2 text-sm leading-6 text-muted-foreground">
+ <span
+ className="block max-w-44 overflow-hidden text-ellipsis border-b px-3 pb-2 text-sm leading-6 text-muted-foreground"
+ title={session.data?.user?.email ?? undefined}
+ >
{session.data?.user?.email}
</span>
{userNavigation.map((item) => (
@@ -454,7 +457,10 @@ export default function Layout(props: PropsWithChildren) {
leaveTo="transform opacity-0 scale-95"
>
<Menu.Items className="absolute right-0 z-10 mt-2.5 rounded-md bg-background py-2 pb-1 shadow-lg ring-1 ring-border focus:outline-none">
- <span className="mb-1 block border-b px-3 pb-2 text-sm leading-6 text-muted-foreground">
+ <span
+ className="mb-1 block max-w-44 overflow-hidden text-ellipsis border-b px-3 pb-2 text-sm leading-6 text-muted-foreground"
+ title={session.data?.user?.email ?? undefined}
+ >
{session.data?.user?.email}
</span>
{userNavigation.map((item) => (