block / block/buzz

Mobile: creating/renaming/deleting a channel section (or moving a channel into one) doesn't update the UI

Open
#5,797 1 comment 1 reaction 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

Summary
On mobile, local mutations to channel sections (create, rename, delete, reorder, assign/unassign a channel) are persisted to disk and eventually published to the relay, but the sidebar UI does not reflect them. The section list appears unchanged — most visibly, creating a new section via "Move to section... -> New section..." shows no result at all.

Environment
- Client: Buzz mobile (iOS, Flutter)
- Repo commit: 45f4b91a3

Steps to reproduce
1. Open a channel, tap "Move to section..."
2. Tap "New section...", enter a name, tap "Create"
3. Observe: nothing happens — no new section appears in the sidebar

Same symptom for renaming, deleting, reordering a section, or assigning/removing a channel from one.

Root cause
mobile/lib/features/channels/channel_sections/channel_sections_manager.dart — ChannelSectionsManager mutation methods (createSection L191, renameSection L210, deleteSection L231, moveSectionUp L246, moveSectionDown L255, assignChannel L264, unassignChannel L276) update _store and call _persist() + markDirty() (which only schedules a debounced relay publish), but never call _onChanged().

_onChanged() is what drives ChannelSectionsNotifier._emitManagerState() in channel_sections_provider.dart, which reassigns Riverpod state. The sidebar widget (mobile/lib/features/channels/channels_page/body.dart:104, ref.watch(channelSectionsProvider)) only rebuilds when that state object changes — so local mutations are silently invisible until some unrelated event (relay fetch, live subscription update) happens to call _onChanged() later.

Suggested fix
Call _onChanged() in each of the mutation methods above, right after _persist().

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.