fix(mobile): discover, browse, and join open channels - #4199
Draft
brow wants to merge 4 commits into
Draft
Conversation
Co-authored-by: Tom Brow <tomb@block.xyz> Signed-off-by: Tom Brow <tomb@block.xyz>
Contributor
Author
|
@codex review |
Contributor
Author
|
@builderbot review |
|
To use Codex here, create a Codex account and connect to github. |
Co-authored-by: Tom Brow <tomb@block.xyz> Signed-off-by: Tom Brow <tomb@block.xyz>
Contributor
Author
|
@codex review |
Contributor
Author
|
@builderbot review |
|
To use Codex here, create a Codex account and connect to github. |
Co-authored-by: Tom Brow <tomb@block.xyz> Signed-off-by: Tom Brow <tomb@block.xyz> Co-authored-by: Codex <noreply@openai.com> Ai-assisted: true
Co-authored-by: Tom Brow <tomb@block.xyz> Signed-off-by: Tom Brow <tomb@block.xyz>
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.
What changed?
Mobile now discovers relay-visible open channels from paginated kind 39000 metadata, while continuing to derive membership only from kind 39002. Discovered channels remain
isMember: false, and private channels, DMs, and archived channels are excluded. Discovery stops when a page makes no progress and throws if it exceeds a hard iteration cap.Users can browse eligible channels from quick actions, and users with no joined channels see the same joinable channels in the empty state. Both surfaces reuse the existing kind 9021 join path and refresh membership from the relay. The main channel list remains joined-only.
Why?
Relay PR #4196 adds open-channel memberships for future invite claimers. Users who claimed before that fix are already relay members, so an idempotent re-claim cannot repair their missing channel memberships. This mobile recovery path lets those users find and join open channels without a production data write. Together, the relay and mobile changes cover both populations.
How is it tested?
At
62f20d2fd, static analysis is clean and the focused provider and page suites pass all 44 tests.Added tests:
channels_provider_test.dartcovers zero-membership discovery, membership integrity, private and DM exclusion, deduplication, pagination, repeated-page termination, and the hard iteration cap.channels_page_test.dartcovers browse eligibility, empty-state recovery, join delegation and refresh, joined-only rendering, and multi-channel empty-state layout.Mutation checks killed removal of each recovery mechanism: discovery removal returns an empty zero-membership result, repeat-page guard removal issues an unexpected third request, empty-state browse removal hides the recovery channel, and quick-action browse removal hides the open channel.
The full mobile suite reports 1,030 passed, 1 skipped, and 1 unrelated host-scoped failure:
ChannelDetailPage keeps follow mode off while a tall newest message stays visible. The same failure reproduces unchanged in isolation on this Mac.