refactor(mute)!: use muted stream as source of truth instead of relationships model#1391
Merged
refactor(mute)!: use muted stream as source of truth instead of relationships model#1391
Conversation
Contributor
Greptile SummaryRefactored the muting system to use the muted user stream ( Key Changes:
Architecture Alignment: Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| .env.example | bumped DB version from 2 to 3 for schema migration |
| src/libs/env/env.ts | updated default DB version from 2 to 3 |
| src/core/models/user/relationships/userRelationships.schema.ts | removed muted field from schema and Dexie index definition |
| src/core/models/user/relationships/userRelationships.ts | removed muted property from model class |
| src/core/services/nexus/nexus.types.ts | removed muted field from NexusUserRelationship type |
| src/core/services/local/mute/mute.ts | refactored to use muted user stream as source of truth instead of relationships model; simplified logic removing transaction complexity |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Mute/Unmute Request] --> B{LocalMuteService}
B --> C[Check Current Stream State]
C --> D{Already in desired state?}
D -->|Yes| E[Return Early - Idempotent]
D -->|No| F[Update Muted User Stream]
F --> G[UserStreamTypes.MUTED]
G -->|Mute| H[prependToStream]
G -->|Unmute| I[removeFromStream]
H --> J[Clear Post Stream Queue]
I --> J
J --> K[Complete]
style G fill:#e1f5ff
style B fill:#fff4e6
style D fill:#f0f0f0
Last reviewed commit: 5305396
🚀 Preview DeploymentURL: https://franky-preview-pr-1391-fzxmjul7ya-oa.a.run.app
|
tipogi
approved these changes
Feb 26, 2026
d76ddc8 to
dbd956b
Compare
Member
|
@Taewa it looks like this didn't get reviewed again after you added more commits/force pushed? |
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.

NOTE: NEXT_PUBLIC_DB_VERSION is required in deployment
#1382