diff --git a/src/langbot/pkg/workspace/invitation_delivery.py b/src/langbot/pkg/workspace/invitation_delivery.py index a3e2e8c86..75f5f5136 100644 --- a/src/langbot/pkg/workspace/invitation_delivery.py +++ b/src/langbot/pkg/workspace/invitation_delivery.py @@ -258,30 +258,80 @@ class InvitationDeliveryService: + Join {escaped_workspace} on LangBot Cloud - +
You have been invited to join {escaped_workspace} on LangBot Cloud.
- - +
- - - - -
-
LangBot Cloud
-
You’re invited
-
-

You have been invited to collaborate in this Workspace:

-
{escaped_workspace}
-
- Accept invitation -
-

This invitation expires in 7 days and is bound to the email address that received it.

-

If the button does not work, copy and paste this URL into your browser:

-

{escaped_link}

-
If you were not expecting this invitation, you can safely ignore this email.
-
+ + +
+ + + + + + + + + + +
+ + LangBot + LangBot Cloud + +
+ + + + +
+
Workspace invitation
+

You’re invited to collaborate

+

Join your team on LangBot Cloud and start building together in this Workspace.

+ + + + + + +
  +
Workspace
+
{escaped_workspace}
+
+ + + +
 
+ + + + + +
+ Accept invitation +
+ + + +
 
+ + + + + +
+

For your security, this invitation expires in 7 days and only works for the email address that received it.

+ Open invitation link → +
+
+
+ Sent by LangBot Cloud
+ If you were not expecting this invitation, you can safely ignore this email. +
+
''' diff --git a/tests/unit_tests/workspace/test_invitation_delivery.py b/tests/unit_tests/workspace/test_invitation_delivery.py index 34a7f5512..4bfd368d6 100644 --- a/tests/unit_tests/workspace/test_invitation_delivery.py +++ b/tests/unit_tests/workspace/test_invitation_delivery.py @@ -103,3 +103,21 @@ async def test_cloud_invitation_email_has_branded_html_plain_fallback_and_expiry assert 'Research & Development' in html assert 'expires in 7 days' in html assert 'lbi_secret&next=<unsafe>' in html + + +async def test_cloud_invitation_email_uses_quiet_cloud_lockup_and_compact_fallback_link(): + service = InvitationDeliveryService(_app({})) + link = 'https://cloud.langbot.app/invitations/accept#token=lbi_secret' + + html = service._html("RockChinQ's Workspace", link) + + assert 'https://docs.langbot.app/langbot-logo.png' in html + assert 'LangBot Cloud' in html + assert 'Workspace invitation' in html + assert 'Open invitation link' in html + assert 'linear-gradient' not in html + assert 'box-shadow' not in html + assert 'height="28"' in html + assert 'height="32"' in html + assert 'margin-top:32px' not in html + assert f'>{link}<' not in html