Skip to content

feat: shared workspace card for teams already on Cap - #4859

Draft
richiemcilroy wants to merge 13 commits into
mainfrom
building/team-path-87bbf787
Draft

richiemcilroy wants to merge 13 commits into
mainfrom
building/team-path-87bbf787

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Adds a small card on My Caps for people on a work email whose colleagues already have Cap accounts. It shows a rounded count of other people on the same domain, then lets them name a shared workspace, invite teammates through the existing invite flow and buy Pro seats through the existing checkout. "Not now" hides it for 90 days.

  • Eligibility is decided on the server from the signed-in user's own stored domain. Only a rounded count reaches the browser.
  • Sign-ins through Google, Google One Tap, WorkOS SSO and OIDC now record emailVerified when the provider confirms the address.
  • users.emailDomain is a stored generated column with an (emailDomain, emailVerified) index. Migration: 0068_users_email_domain.
  • The personal provider rules in @cap/database/public-email-domains now include a vendored free email provider list, used by both the card and the Loops work email signal. CAP_TEAM_PATH_EXCLUDED_DOMAINS excludes extra domains.
  • Purchases started from the card carry checkout_source on purchase_completed.
  • Off by default behind CAP_TEAM_PATH_CARD.

Demo and checks to follow.

Confidence Score: 5/5RetriggerView in Greptile

The latest changes appear safe to merge and address both earlier findings.

Summary

Adds an optional shared-workspace card, checks eligibility on the server, records provider-confirmed email addresses, and tracks purchases started from the card.

The latest changes address both earlier findings:

  • Eligible people can start a shared workspace from My Caps.
  • Sign-ins record verified email proof and shared domain rules filter work addresses.
  • Purchases from the workspace offer carry a source label into purchase events.

No new actionable issues were found. Checks were based on source review; no runtime tests or browser checks were run.

Reviews (2) · Last reviewed commit: "fix(database): trim the stored email dom..." · Reviewed by Greptile

@vercel

vercel Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

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

1 Skipped Deployment
Project Deployment Actions Updated
cap-status Skipped Skipped Dec 4, 2026 2:51pm UTC

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

Comment on lines +213 to +215
return email
.slice(email.lastIndexOf("@") + 1)
.replace(/^ +| +$/g, "")
@vercel
vercel Bot temporarily deployed to Preview – cap-status December 4, 2026 14:51 Inactive
@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cap-web — 6b654432 Deployed Dec 4, 2026 by vercel[bot]
Preview – cap-status — 6b654432 Deployed Dec 4, 2026 by vercel[bot]
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.

2 participants