fix(slack): resolve actor name via direct user lookup instead of paginated list[ES-557] - #11263
Merged
Conversation
Harika Kondur (harikakondur)
force-pushed
the
es-557
branch
from
August 7, 2026 18:30
ca430eb to
f57798b
Compare
Harika Kondur (harikakondur)
marked this pull request as ready for review
August 7, 2026 18:34
ryunsong-contentful
approved these changes
Aug 7, 2026
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.
Purpose
Customer reported (ES-557) that Slack entry notifications show a raw, illegible user ID instead of the author's name — despite #11167 already adding actor name resolution.
Approach
getUserNamewas resolving the actor's name by fetchingcmaClient.user.getManyForSpace({})— a paginated collection — and searching for the actor in the first page of results. For spaces with more members than the default page size (e.g. large orgs synced via SSO), an actor outside that first page was never found, silently falling back to the raw ID. This matches the customer's report.Replaced the paginated list +
.find()with a direct single-user lookup:cmaClient.user.getForSpace({ spaceId, userId }). This resolves the exact actor in one call, independent of space size, and still falls back to the raw ID if the lookup fails (e.g. deleted user).getSpaceNamewas checked as part of this investigation — it already usescmaClient.space.get({ spaceId }), a direct single-space lookup, so it was not affected by this bug.Testing steps
service.test.tsto stubuser.getForSpaceinstead ofuser.getManyForSpace.npm test,tsc --noEmit, andeslintall pass on the changed files.