Skip to content

DM Waves - Don't allow PFP and name changes. Choose PFP collages wisely#2074

Merged
GelatoGenesis merged 2 commits intomainfrom
b-17727889483
Mar 6, 2026
Merged

DM Waves - Don't allow PFP and name changes. Choose PFP collages wisely#2074
GelatoGenesis merged 2 commits intomainfrom
b-17727889483

Conversation

@GelatoGenesis
Copy link
Copy Markdown
Collaborator

@GelatoGenesis GelatoGenesis commented Mar 6, 2026

Summary by CodeRabbit

  • New Features
    • Authenticated users are now excluded from contributor image displays in their own waves.
    • Edit functionality is hidden for direct message conversations.

Signed-off-by: GelatoGenesis <tarmokalling@gmail.com>
Signed-off-by: GelatoGenesis <tarmokalling@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 6, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The changes introduce contributor identity awareness throughout the wave components. Contributors now carry an identity field alongside their profile picture. WavePicture filters out authenticated users from the contributor collage, and WaveHeader/WaveHeaderName prevent editing of direct message waves. Tests expand to cover these new identity and DM behaviors.

Changes

Cohort / File(s) Summary
Test Suite Expansions
__tests__/components/waves/WavePicture.test.tsx, __tests__/components/waves/header/WaveHeader.test.tsx, __tests__/components/waves/header/name/WaveHeaderName.test.tsx
Add test cases for identity-based contributor filtering (excluding authenticated users from collage), direct message wave handling, and edit permission constraints for DM waves. Reorganize test setup to use React Testing Library patterns and inline JSX mocks.
Contributor Identity Field Propagation
components/brain/content/BrainContentPinnedWave.tsx, components/brain/my-stream/tabs/MyStreamWaveTabsDefault.tsx, components/brain/my-stream/tabs/MyStreamWaveTabsMeme.tsx, components/header/AppHeader.tsx, components/waves/header/WaveHeader.tsx, components/waves/utils/profile/WaveProfileTooltip.tsx
Add identity field alongside pfp in contributor objects passed to WavePicture, extending the contributor data shape across multiple components.
WavePicture Core Logic
components/waves/WavePicture.tsx
Introduce identity normalization and candidate extraction utilities; wire in authentication context; filter contributors by excluding those whose identity matches authenticated user candidates; update contributors prop signature to include optional identity field.
Direct Message Awareness
components/waves/header/WaveHeader.tsx, components/waves/header/name/WaveHeaderName.tsx
Extract isDirectMessage from wave data and use it to prevent editing of DM waves; simplify WaveHeaderName by removing useState/useEffect in favor of render-time edit visibility calculation.
Data Hook Update
contexts/wave/hooks/useEnhancedWavesListCore.ts
Extend MinimalWave contributors to include identity field alongside pfp when mapping waves to internal data structure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • wave logo edit #1758: Modifies WaveHeader's canEdit logic and picture-edit UI alongside this PR's introduction of contributor identity wiring and DM awareness constraints.
  • Wave header impro #2043: Updates WavePicture integration and contributor data across AppHeader and MyStreamWaveTabs components, overlapping with this PR's identity field propagation.
  • wip #1824: Adds WavePicture invocation logic that could be affected by the contributor shape and identity-handling changes introduced here.

Suggested reviewers

  • ragnep
  • simo6529
  • prxt6529

🐰 Hop along with identity, clear the path!
DMs stay safe from edits' wrath,
Collages skip the self-same face,
Contributors find their proper place.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main changes: preventing PFP and name edits for DM waves, and filtering authenticated users from PFP collages.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch b-17727889483

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@GelatoGenesis GelatoGenesis merged commit b81202a into main Mar 6, 2026
5 of 6 checks passed
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 6, 2026

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