Skip to content

feat(3155): Private channels for mobile#3194

Merged
islathehut merged 103 commits into
developfrom
feat/3155-private-channels-mobile
May 28, 2026
Merged

feat(3155): Private channels for mobile#3194
islathehut merged 103 commits into
developfrom
feat/3155-private-channels-mobile

Conversation

@islathehut
Copy link
Copy Markdown
Collaborator

@islathehut islathehut commented Apr 24, 2026

Pull Request Checklist

  • I have linked this PR to a related GitHub issue.
  • I have added a description of the change (and Github issue number, if any) to the root CHANGELOG.md.

(Optional) Mobile checklist

Please ensure you completed the following checks if you did any changes to the mobile package:

  • I have run e2e tests for mobile
  • I have updated base screenshots for visual regression tests

islathehut and others added 30 commits January 12, 2026 09:32
…nit since we can start initialization via qss or libp2p events
}
}

function* deleteNotificationTokenSaga(): Generator {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this partially to be in line with the sync saga but I also had to modify it to only try the deletion when notifications were enabled. I don't know what was going wrong but it kept crashing due to the firebase app not being initialized, even when notifications were enabled so the changes below are there to fix those crashes.

@holmesworcester
Copy link
Copy Markdown
Collaborator

LLMs think these are issues, and they seem real:

PR #3194 — feat(3155): Private channels for mobile

Scope: 107 files, ~7,580/-751. Mostly mobile (new ChannelMembership + UpdateChannelMembership screens, channel-tile/context-menu polish for public vs private). Backend changes are small and mostly cleanup.
Snapshot/test churn accounts for ~5,500 lines.

Real issues

  1. Broken useEffect pattern — packages/mobile/src/components/ChannelMembership/UpdateChannelMembership/UpdateChannelMembershipList.component.tsx:42
    useEffect(useCallback(() => { setHasOptions(...) }, [visibleOptionsIndices, userProfiles]))
  2. useCallback's deps don't control re-runs; the effect has no deps array, so it fires every render. Should be useEffect(() => {...}, [visibleOptionsIndices, userProfiles]).
  3. State mutation, ref-equality bug — same file, updateOptionsOnCheck:
    options[option.index] = { ...option, selected: !... }
    setOptions(options) // same array reference!
    setUpdatedAt(Date.now()) // workaround on FlatList extraData
  4. Direct in-place mutation + setOptions(options) won't trigger a re-render on its own — the updatedAt/extraData trick is masking the bug. Fix by doing immutable update (setOptions(prev => prev.map(...))) and
    drop the updatedAt shim.
  5. Privacy: logging message bodies at debug — packages/backend/src/nest/storage/channels/messages/{private,public}-channel-messages.service.ts
    this.logger.debug('Sending private channel message', message.channelId, message.message)
  6. Logging plaintext message content (even at debug) is risky for a privacy-focused app — receivers' end could ship logs. Drop the body, keep id/length.
  7. Inconsistent redirect on missing channel — ChannelMembership.screen.tsx falls back to ChannelListScreen when the channel disappears; UpdateChannelMembership.screen.tsx falls back to ChannelScreen (the chat
    for a channel that no longer exists). Both should go to ChannelList.

Minor

  • Stale TODO in production — ChannelTile.component.tsx:11: // TODO Question: can this be deleted? on _leftSwipe. Resolve before merge.
  • Typo — ChannelContextMenu.container.tsx: setter setMemberCountSuffx (missing i).
  • Missing dep — same file, _initializeData runs in an effect deyed on [userProfiles, screen]. screen is unrelated; chann
    PR feat(3155): Private channels for mobile #3194 — feat(3155): Private channels for mobile

Copy link
Copy Markdown
Collaborator

@holmesworcester holmesworcester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For requested changes, see my previous comment with the Claude/Codex suggestions and address any of those that are valid or matter.

Otherwise I just had a few questions but no requested changes.

Comment thread packages/mobile/src/store/pushNotifications/pushNotifications.master.saga.ts Outdated
@islathehut islathehut merged commit c3c89bf into develop May 28, 2026
88 of 89 checks 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.

Users should be able to create a private channel

3 participants