Resolve LID for profile-picture contacts.update#2605
Conversation
|
Thanks for opening this pull request and contributing to the project! The next step is for the maintainers to review your changes. If everything looks good, it will be approved and merged into the main branch. In the meantime, anyone in the community is encouraged to test this pull request and provide feedback. ✅ How to confirm it worksIf you’ve tested this PR, please comment below with: This helps us speed up the review and merge process. 📦 To test this PR locally:If you encounter any issues or have feedback, feel free to comment as well. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR introduces ChangesContact Picture Identity Resolution
Sequence DiagramsequenceDiagram
participant MessageHandler as message handler
participant PictureResolver as resolveContactPictureIdentity
participant LIDMapping as signalRepository.lidMapping
participant ContactSignal as contacts signal
MessageHandler->>PictureResolver: call with picture from/to, context
PictureResolver->>LIDMapping: getPNForLID(from) or getLIDForPN(from)
LIDMapping-->>PictureResolver: resolved identity
PictureResolver-->>MessageHandler: {id, lid?, phoneNumber?}
MessageHandler->>ContactSignal: emit update with resolved identity + imgUrl
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/__tests__/Socket/contact-picture-identity.test.ts`:
- Around line 1-5: Move the test file from
src/__tests__/Socket/contact-picture-identity.test.ts into
src/__tests__/Utils/contact-picture-identity.test.ts so it mirrors the source
module path (src/Utils/contact-picture-identity.ts); keep the existing imports
of resolveContactPictureIdentity and ContactPictureIdentityContext and adjust
any relative import paths if needed (they should remain valid), and ensure the
test filename and exports remain unchanged so jest still discovers tests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: b419be7e-b12b-48be-b4bf-5f31f18a3b06
📒 Files selected for processing (4)
src/Socket/messages-recv.tssrc/Utils/contact-picture-identity.tssrc/Utils/index.tssrc/__tests__/Socket/contact-picture-identity.test.ts
There was a problem hiding this comment.
No issues found across 4 files
You’re at about 94% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
|
Tested and working ✅ |
…lper Mirror the source module path (src/Utils/contact-picture-identity.ts) by relocating the spec to src/__tests__/Utils, and add a docstring to the test context helper to satisfy docstring-coverage. Addresses CodeRabbit review notes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rt PR WhiskeySockets#2605) (#506) fix(contacts): resolve LID↔PN for profile-picture contacts.update (port PR WhiskeySockets#2605) (#506)
|
@purpshell, could you please review the changes when you have a chance? |
For #2598 - Resolve LID for profile-picture contacts.update)
Summary by cubic
Resolves LID↔PN for profile-picture contacts.update events so clients can reliably match updates to cached contacts. Addresses Linear #2598.
resolveContactPictureIdentity.src/__tests__/Utilsand documented helper.Written for commit f991b31. Summary will update on new commits.
Review in cubic
Summary by CodeRabbit
Bug Fixes
Tests