Skip to content

feat(inbox): Outlook email support, HTML rendering, connection settings redesign - #230

Merged
scottcarlton merged 2 commits into
devfrom
fix/inbox-outlook
Jun 4, 2026
Merged

feat(inbox): Outlook email support, HTML rendering, connection settings redesign#230
scottcarlton merged 2 commits into
devfrom
fix/inbox-outlook

Conversation

@scottcarlton

Copy link
Copy Markdown
Owner

Summary

  • Make the Inbox work with an Outlook connection the same as Gmail — list, read thread, unread count, reply, and compose — via a new provider-agnostic email service and a per-user Microsoft Graph mail module.
  • Render email bodies as sanitized HTML (DOMPurify) instead of raw text, so messages read like a real mail client.
  • Redesign Connected Email / Connected Calendar settings into per-provider cards (icon · name · "Connected" · Disconnect) with "+ Connect X" links; zero-state buttons unchanged.

Why

The Inbox only ever called the Gmail client, so an Outlook-connected user got a "Connect your email" wall and no mail. The connection settings also needed to match the new card-based mockup.

Notable fixes

  • Inbox gate used .maybeSingle() with no provider filter — a user with email and a calendar connection (both live in email_connections) tripped it and saw the empty state.
  • Outlook bodies came back as HTML and were rendered as text (raw markup); now preferred-HTML + sanitized.
  • Outlook address is read from the OAuth id_token because Graph /me returns UnknownError for personal Outlook.com accounts.

Verification

  • bun run lint passes
  • bun run check passes (0 errors)
  • bun run test:run passes (717 tests; +17 new for Outlook mappers, HTML body extraction, id_token parsing)
  • Verified live against Microsoft Graph with a connected account: inbox list, thread read, send (lands in Sent Items), and Prefer-less HTML body all confirmed
  • Reviewer: exercise the connected card UI in the browser against the mockup

Test plan

  • Connect Gmail → inbox lists, open a thread (renders HTML), reply, compose
  • Connect Outlook → same flow; confirm thread body renders formatted, not raw HTML
  • Settings: connected provider shows a card + "+ Connect X instead"/"+ Calendly" links; zero state shows the original brand buttons
  • Reconnect Outlook → card detail shows the real address (id_token capture)

Note: deliverability from brand-new personal Outlook.com accounts is throttled by Microsoft (lands in recipient junk) — not a Threadline issue.

🤖 Generated with Claude Code

scottcarlton and others added 2 commits June 3, 2026 20:20
…design connection settings

Make the Inbox work with an Outlook connection the same way it does Gmail,
render messages as real HTML, and clean up the connection settings UI.

- Add a provider-agnostic email service that routes list/thread/unread/send
  to Gmail or Outlook based on the user's connected provider
- Add a per-user Microsoft Graph mail module (list, conversation, unread,
  send, reply) backed by the existing per-user Outlook token helper
- Fix the inbox gate: it used .maybeSingle() with no provider filter, so a
  user with both email and a calendar connection saw "Connect your email"
- Render email bodies as sanitized HTML via DOMPurify instead of raw text,
  preferring the text/html part (Gmail) and HTML body (Graph)
- Capture the Outlook address from the OAuth id_token, since Graph /me
  returns UnknownError for personal Outlook.com accounts
- Redesign Connected Email/Calendar settings into per-provider cards with
  "Connected"/Disconnect and "+ Connect X" links; zero-state buttons unchanged

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadline Ready Ready Preview, Comment Jun 4, 2026 2:24am

@scottcarlton
scottcarlton merged commit a9c0df8 into dev Jun 4, 2026
6 checks passed
@scottcarlton
scottcarlton deleted the fix/inbox-outlook branch June 4, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant