Skip to content

feat(identity): auto-link Slack chat IDs from email + "Complete your profile" checklist (v0.227.0)#376

Merged
vikasprogrammer merged 1 commit into
mainfrom
feat/slack-autolink-profile
Jul 17, 2026
Merged

feat(identity): auto-link Slack chat IDs from email + "Complete your profile" checklist (v0.227.0)#376
vikasprogrammer merged 1 commit into
mainfrom
feat/slack-autolink-profile

Conversation

@vikasprogrammer

Copy link
Copy Markdown
Owner

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 Slack U… id from their verified account email via users.lookupByEmail (new SlackSocket.userIdForEmail, in-process hit/miss cache), DMs them, and persists the id to the identity map so:

  • the first notification reaches an unlinked-but-in-Slack member, and
  • every later run-as / DM lookup is already resolved — no manual Team → Chat IDs step.

Persisted with created_by = auto:slack-email, audited identity.autolinked. Needs the users:read.email bot 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 typecheck clean; cd web && npm run build clean.
  • npm run test:governance → 68/68.
  • Isolated in-process e2e (scratch DB, mocked Slack API) driving notifyTaskEventdeliverDM: an unlinked member is looked up by email, DM'd to the resolved id, and the id is persisted to the identity map with created_by=auto:slack-emailPASS.

🤖 Generated with Claude Code

…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>
@vikasprogrammer
vikasprogrammer merged commit c173bbc into main Jul 17, 2026
1 check 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