buzz icon indicating copy to clipboard operation
buzz copied to clipboard

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

Open ams1 opened this issue 3 months ago • 1 comments

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().

ams1 avatar Aug 13 '26 19:08 ams1

The same experience here

iOS 17.6

Aladincz avatar Aug 14 '26 09:08 Aladincz