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

Open Beginner friendly
#5,797 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
dart, flutter
Domain
mobile

Research direction

Start in mobile/lib/features/channels/channel_sections/channel_sections_manager.dart at the listed mutation methods, then read channel_sections_provider.dart and the ref.watch call in mobile/lib/features/channels/channels_page/body.dart. Reproduce the create-section flow on mobile and verify that creating, renaming, deleting, reordering, and channel assignment changes are immediately reflected in the sidebar.

Written by the indexing model from the issue text.

Description

bug

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

Dominant language
Rust
Stars
33.7k
Forks
4.4k
Avg merge
1d 21h
Merged PRs (30d)
239

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from block/buzz

All issues in block/buzz

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.