feat(identity): auto-link Slack chat IDs from email + "Complete your profile" checklist (v0.227.0)#376
Merged
Merged
Conversation
…e your profile" checklist (v0.227.0) deliverDM now resolves an unlinked member's Slack user id from their verified account email (users.lookupByEmail → new SlackSocket.userIdForEmail, cached), DMs them, and persists the id to the identity map (created_by=auto:slack-email, audited identity.autolinked) so the first notification reaches them and every later run-as/DM lookup is pre-resolved. Slack only — Discord has no email. For what auto-link can't cover (Discord especially), the Profile page gets a live "Complete your profile" checklist over what's already filled in — avatar, a linked chat account, GitHub, working context — that scroll-jumps to each gap and hides once complete. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Two related improvements around getting members reachable on chat.
1. Slack chat IDs auto-link from the member's email
Today, assigning a task (or any approval/question/session DM) to a member with no linked Slack handle yields only an in-console Inbox card — no push. Now
deliverDM(tenant-registry.ts) resolves the member's SlackU…id from their verified account email viausers.lookupByEmail(newSlackSocket.userIdForEmail, in-process hit/miss cache), DMs them, and persists the id to the identity map so:Persisted with
created_by = auto:slack-email, auditedidentity.autolinked. Needs theusers:read.emailbot scope (already required for the reverse run-as lookup). Slack only — Discord exposes no email, so an unlinked Discord member stays manual.2. "Complete your profile" checklist (the manual fallback)
Since Discord can't be auto-resolved, the Profile page gets a live, self-dismissing checklist over what the member has already filled in — profile picture, a linked chat account (Slack/Discord), a connected GitHub, and their working context. Each unfinished step shows a one-line why and scroll-jumps to the section below; the card hides once all four are done.
Verification
npm run typecheckclean;cd web && npm run buildclean.npm run test:governance→ 68/68.notifyTaskEvent→deliverDM: an unlinked member is looked up by email, DM'd to the resolved id, and the id is persisted to the identity map withcreated_by=auto:slack-email— PASS.🤖 Generated with Claude Code