feat(mobile): sync per-group channel sorting - #4231
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce19f0d0bd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
a05e767 to
ae2186c
Compare
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
ae2186c to
91b4058
Compare
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
|
Thanks for the quick turnaround. The two issues from the last round (an older relay blob erasing a local offline edit, and pending edits dropped on provider rebuild) are both genuinely fixed, and the durable pending-flag recovery is a nicer mechanism than a dispose-time flush since it survives process death. The new test in channel_sort_manager_test.dart is a real detector for it. One new issue in the fix itself is blocking: a silent unsynced state with a positive-feedback loop. On the fix: we tried the obvious change (stamp plain
|
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
|
Thanks for the two follow-up commits, A few non-blocking observations from the review, recorded for whenever this area is next touched. None of these is a defect in what landed, and none needs action now. 1. The drift-branch reschedule is the highest-value untested line. 2. The clamp at 3. The legacy conjunct is uncovered. In 4. The publish retry has no backoff. 5. One reachability note, since it came up in review and we corrected ourselves twice on it: an inflated non-pending cursor is bounded to exactly +300 seconds, reachable by adopting a fast-clock peer's blob rather than by local edits, and it self-heals once wall clock catches up. |
…er-snapshots * origin/main: feat(mobile): sync per-group channel sorting (#4231) feat(mobile): add channel scroll navigation (#4239) feat(desktop): redesign the Huddle experience (#4281) feat(mobile): bring channel menus to desktop parity (#3940) Signed-off-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@buzz.block.builderlab.xyz> # Conflicts: # desktop/src-tauri/src/lib.rs
…onfig * origin/main: feat(mobile): sync per-group channel sorting (#4231) feat(mobile): add channel scroll navigation (#4239) feat(desktop): redesign the Huddle experience (#4281) feat(mobile): bring channel menus to desktop parity (#3940) feat(agents): model-tuning parity in global Agent Defaults editor (#4578) Signed-off-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@buzz.block.builderlab.xyz> Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
…theme-config * origin/main: (81 commits) feat(mobile): sync per-group channel sorting (#4231) feat(mobile): add channel scroll navigation (#4239) feat(desktop): redesign the Huddle experience (#4281) feat(mobile): bring channel menus to desktop parity (#3940) feat(agents): model-tuning parity in global Agent Defaults editor (#4578) Polish Share Compute settings (#3735) fix(reactions): wrap long popover names (#3834) fix(desktop): clarify inherited agent parallelism (#4010) feat(desktop): make onboarding model defaults skippable (#3968) ci: add guarded desktop release cache prewarm (#4575) fix(mobile): recover stale relay sessions (#4372) chore(release): release Buzz Desktop version 0.5.4 (#4562) test(mobile): assert follow boundary semantics (#4559) docs(release): align desktop handoff instructions (#3988) fix: report agent usage per provider round, not once per turn (#4545) fix(desktop): harden Windows installs against Defender block and orphaned Node (#4382) feat(desktop): improve channel template discovery (#4549) fix(desktop): save key backups to authorized path (#4022) Add channel activity hover menu (#3935) feat(desktop): show saved Run on settings when editing an agent (#4539) ... Signed-off-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@buzz.block.builderlab.xyz> Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
…-style * origin/main: (25 commits) Polish mobile inbox and media flows (block#4512) feat: ship Buzz Term (block#4347) feat(mobile): sync per-group channel sorting (block#4231) feat(mobile): add channel scroll navigation (block#4239) feat(desktop): redesign the Huddle experience (block#4281) feat(mobile): bring channel menus to desktop parity (block#3940) feat(agents): model-tuning parity in global Agent Defaults editor (block#4578) Polish Share Compute settings (block#3735) fix(reactions): wrap long popover names (block#3834) fix(desktop): clarify inherited agent parallelism (block#4010) feat(desktop): make onboarding model defaults skippable (block#3968) ci: add guarded desktop release cache prewarm (block#4575) fix(mobile): recover stale relay sessions (block#4372) chore(release): release Buzz Desktop version 0.5.4 (block#4562) test(mobile): assert follow boundary semantics (block#4559) docs(release): align desktop handoff instructions (block#3988) fix: report agent usage per provider round, not once per turn (block#4545) fix(desktop): harden Windows installs against Defender block and orphaned Node (block#4382) feat(desktop): improve channel template discovery (block#4549) fix(desktop): save key backups to authorized path (block#4022) ... Amp-Thread-ID: https://ampcode.com/threads/T-019fccee-fa22-7145-95bc-a3aa0c10a174 Co-authored-by: Amp <amp@ampcode.com> Signed-off-by: Joah Gerstenberg <joah@squareup.com> # Conflicts: # desktop/package.json # desktop/src-tauri/src/commands/agent_config.rs # desktop/src/app/AppShell.tsx # desktop/src/features/channels/hooks.ts # desktop/src/features/channels/unreadReadMarker.test.mjs # desktop/src/features/channels/useUnreadChannels.ts # desktop/src/features/sidebar/ui/CommunityRail.tsx # desktop/src/main.tsx # pnpm-lock.yaml
…-phase2-integration * origin/main: (23 commits) Refine community invite links (#4734) feat(desktop): persist sidebar observed-unread across webview reload (#3976) feat(desktop): surface config diff in restart-required badge (#3637) Polish sidebar unread hierarchy (#4573) fix(desktop): show cached display names on startup (#3317) docs(acp): explain per-channel session model in base prompt (#4729) docs(nip-am): normative amendment — cache SHOULD/MUST + pricingIdentity + consumer cost guidance (#4632) Remove blur from Welcome composer guidance (#4691) Refine desktop timeline activity presentation (#4582) Defer desktop media uploads until send (#4522) fix(desktop): stop clipping focus ring on channel intro action cards (#2392) (#4374) Polish mobile inbox and media flows (#4512) feat: ship Buzz Term (#4347) feat(mobile): sync per-group channel sorting (#4231) feat(mobile): add channel scroll navigation (#4239) feat(desktop): redesign the Huddle experience (#4281) feat(mobile): bring channel menus to desktop parity (#3940) feat(agents): model-tuning parity in global Agent Defaults editor (#4578) Polish Share Compute settings (#3735) fix(reactions): wrap long popover names (#3834) ...
Category: improvement
User Impact: Mobile users can sort each channel group by recent activity or A–Z, with their choices synchronized with desktop.
Problem: Desktop supports persistent per-group channel sorting, but mobile shows the same groups without equivalent controls or shared preferences. The earlier mobile attempt coupled sorting to unsafe dirty-state behavior that could overwrite newer cross-client changes.
Solution: Add mobile sorting controls and encrypted NIP-78 synchronization using the existing desktop
channel-sortcontract, while retaining ordinary whole-blob last-write-wins behavior. Local state is scoped by identity and normalized relay, startup closes fetch/subscription gaps, and both clients use the same deterministic ordering rules.File changes
desktop/src/features/sidebar/lib/channelSortPreference.test.mjs
Updates ordering coverage for the deterministic, cross-client A–Z comparison rule.
desktop/src/features/sidebar/lib/channelSortPreference.ts
Aligns desktop channel-name collation with mobile so synchronized preferences produce the same visible order.
mobile/lib/features/channels/channel_sort/channel_sort_manager.dart
Adds encrypted relay synchronization with safe startup gap handling, clock checks, and ordinary last-write-wins conflicts.
mobile/lib/features/channels/channel_sort/channel_sort_provider.dart
Scopes sort state to the active identity and community lifecycle.
mobile/lib/features/channels/channel_sort/channel_sort_storage.dart
Defines the desktop-compatible payload, relay-scoped cache and migration, cleanup, and shared ordering behavior.
mobile/lib/features/channels/channels_page.dart
Connects sort state to the channel page.
mobile/lib/features/channels/channels_page/body.dart
Applies each selected order to Starred, custom groups, Channels, and DMs.
mobile/lib/features/channels/channels_page/sections.dart
Adds checked Recent and A–Z actions using the existing anchored-popover UI.
mobile/test/features/channels/channel_sort/channel_sort_manager_test.dart
Covers payload adoption, encrypted publication, conflicts, timestamps, retries, and cleanup.
mobile/test/features/channels/channel_sort/channel_sort_storage_test.dart
Covers parsing, relay isolation, migration, cleanup, and ordering modes.
mobile/test/features/channels/channels_page_test.dart
Verifies the group controls expose both choices.
Reproduction steps
Screenshots
Approved
livecustom-section flow withresearchkept offscreen.Validation
flutter analyze— cleanac4fa13b8