Skip to content

fix(desktop): paginate complete channel directory#1690

Merged
tlongwell-block merged 4 commits into
mainfrom
wren/channel-directory-pagination
Jul 9, 2026
Merged

fix(desktop): paginate complete channel directory#1690
tlongwell-block merged 4 commits into
mainfrom
wren/channel-directory-pagination

Conversation

@tlongwell-block

Copy link
Copy Markdown
Collaborator

Summary

  • page the channel-membership and open-channel metadata queries instead of relying on one oversized request
  • use the relay's composite (until, before_id) cursor so same-second events cannot be skipped
  • preserve the existing paginated people search/member-picker path

Validation

  • cargo test --manifest-path desktop/src-tauri/Cargo.toml (1119 passed, 11 ignored; integration diagnostic 3 passed)
  • pre-commit hooks passed
  • pre-push desktop, desktop-Tauri, and mobile suites passed; unrelated root buzz-db suite is blocked because local rustc 1.89 is older than sqlx 0.9's rustc 1.94 requirement

Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
@tlongwell-block tlongwell-block requested a review from a team as a code owner July 9, 2026 20:08
Allow relay query access checks to consider every open channel so client-side pagination can traverse directories larger than 1,000 entries.

Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
@tlongwell-block

Copy link
Copy Markdown
Collaborator Author

Local high-volume validation

Followed TESTING.md and crates/buzz-cli/TESTING.md against an isolated local stack (Postgres :55432, Redis :56379, relay :3130; no Desktop data shared).

Validation found and fixed an additional relay-side prerequisite: get_accessible_channel_ids capped its open-channel access scope at 1,000, filtering older channel metadata before the desktop paginator could see it. Commit 0a94296bc8eede0b4610ccfa0c65c5e45453780e removes that internal cap and adds a 1,001-channel DB regression test.

Results after the fix:

  • Seeded 1,602 open channels; 1,601 metadata events shared the exact same timestamp to exercise (until, before_id) tie-breaking.
  • A single raw /query with limit: 5000 still returned exactly 1,000, confirming the relay event-query clamp remains intact.
  • The actual patched desktop get_channels implementation returned 1,602 / 1,602 channels, including seed-0001 and seed-1601, in 250.5 ms locally.
  • DB regression: accessible_channel_ids_are_not_truncated_at_one_thousand passed against the isolated Postgres instance.
  • Normal usage smoke passed end-to-end: create channel, get/list metadata, add member, join as the second identity, send root, send reply, read messages, read thread, list members. The sequence completed in 0.252 s and returned 2 members.
  • Full buzz-db lib suite: 79 passed, 64 ignored.
  • Full desktop Tauri suite: 1,119 passed, 11 ignored; diagnostics 3/3 passed.
  • cargo clippy -p buzz-db --lib -- -D warnings, pre-commit, and pre-push passed. Pre-push also reran desktop/Tauri/mobile suites.

Verified local and remote PR head: 0a94296bc8eede0b4610ccfa0c65c5e45453780e.

npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 added 2 commits July 9, 2026 16:43
Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
…y-pagination

* origin/main:
  fix(mobile): declare exempt encryption for iOS (#1684)

Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
@tlongwell-block tlongwell-block merged commit b41cf3f into main Jul 9, 2026
29 checks passed
@tlongwell-block tlongwell-block deleted the wren/channel-directory-pagination branch July 9, 2026 21:07
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.

1 participant