Skip to content

Dev - #232

Merged
scottcarlton merged 5 commits into
mainfrom
dev
Jun 10, 2026
Merged

Dev#232
scottcarlton merged 5 commits into
mainfrom
dev

Conversation

@scottcarlton

Copy link
Copy Markdown
Owner

No description provided.

scottcarlton and others added 5 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>
feat(inbox): Outlook email support, HTML rendering, connection settings redesign
…ta whitelist

Auth:
- Add server-side POST /logout that clears the httpOnly active_org_id cookie
  (client signOut can't), preventing the prior user's org leaking across
  sessions on a shared browser.
- Extract the hooks.server.ts context-loading into src/lib/server/auth.ts
  (loadUserContext/applyUserContext + pure helpers); hook is now a thin
  orchestrator. Adds unit tests for the four identity branches and SSO.
- Gate the /auth/callback domain auto-join on an actual SSO session, so a
  plain OAuth/magic-link signup whose email domain matches an org's SSO
  provider is no longer auto-joined to that org.
- Cache positive beta-whitelist results in a short-TTL in-memory map to drop
  a per-request query on warm instances; authz context is never cached.

Beta whitelist (local dev):
- Document BETA_WHITELIST_ENABLED in .env.example and seed allow-listed
  emails in supabase/seed.sql so local mirrors deployed behavior.

Other:
- Point the marketing "Join Beta" button and the login page at /beta
  unconditionally (was host-gated to beta.threadline.systems), and surface a
  /beta link on the not-whitelisted error.
- Resolve all svelte-check a11y/CSS warnings (aria-labels on icon buttons,
  label-vs-span on composite controls, keyboard-accessible color swatch,
  empty ruleset).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(auth): harden auth flow, extract context loader, enable local beta whitelist
@vercel

vercel Bot commented Jun 10, 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 10, 2026 5:19pm

@scottcarlton
scottcarlton merged commit acc8bd2 into main Jun 10, 2026
10 checks passed
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