Skip to content

feat(mobile): add channel sections with relay sync#800

Open
wpfleger96 wants to merge 1 commit into
wpfleger/channel-sections-syncfrom
wpfleger/channel-sections-mobile
Open

feat(mobile): add channel sections with relay sync#800
wpfleger96 wants to merge 1 commit into
wpfleger/channel-sections-syncfrom
wpfleger/channel-sections-mobile

Conversation

@wpfleger96
Copy link
Copy Markdown
Collaborator

Adds channel sections to the mobile app, bringing it to full parity with the desktop feature introduced in #789 and #792.

Users who organize their channels into sections on desktop currently see a flat list on mobile. This PR renders those sections, supports creating/renaming/deleting/reordering them, lets users assign channels via long-press, and syncs bidirectionally with desktop through the same NIP-78 kind 30078 events and NIP-44 encryption established in #792.

  • channel_sections_storage.dart — SharedPreferences persistence with key sprout.channel-sections.v1:<pubkey>, matching the desktop format exactly so the same relay events decode correctly on both platforms
  • channel_sections_manager.dartChannelSectionsCrypto (NIP-44 encrypt-to-self) + ChannelSectionsManager with full CRUD, 5-second debounced publish, kind 30078 fetch/subscribe, and last-write-wins merge (newer createdAt wins; event ID tie-break)
  • channel_sections_provider.dartChannelSectionsNotifier Riverpod provider watching relayConfigProvider, relaySessionProvider, and activeWorkspaceProvider; follows ReadStateNotifier pattern throughout
  • channels_page.dart — renders user-defined _CustomChannelSection widgets above the built-in "Channels" group; adds _CustomSectionHeader with PopupMenuButton (rename/move up/move down/delete); adds long-press on _ChannelTile to open a "Move to section" action sheet; _SectionNameDialog for create/rename flows

Stack: #789 (desktop UI) → #792 (relay sync) → this PR (mobile)

@wpfleger96 wpfleger96 force-pushed the wpfleger/channel-sections-sync branch from 02d06b9 to 2b5e69e Compare May 29, 2026 22:32
User-defined channel groups for the mobile sidebar, matching the desktop
feature. Sections are persisted locally via SharedPreferences and synced
across devices through NIP-78 kind 30078 events with NIP-44 encryption,
using the same data format as desktop so changes propagate bidirectionally.

Adds CRUD (create/rename/delete sections, move up/down), channel
assignment via long-press action sheet, and section rendering above the
ungrouped "Channels" group. Follows the ReadStateManager pattern for
relay fetch/subscribe/publish with 5-second debounced writes and
last-write-wins conflict resolution.
@wpfleger96 wpfleger96 force-pushed the wpfleger/channel-sections-mobile branch from c353ec6 to acd0e36 Compare May 29, 2026 22:33
@wpfleger96
Copy link
Copy Markdown
Collaborator Author

channel sections on mobile
image

@wpfleger96
Copy link
Copy Markdown
Collaborator Author

wpfleger96 commented May 29, 2026

Channel section changes sync across devices in realtime via Nostr

sprout_channel_sections_sync_to_mobile

@wpfleger96 wpfleger96 marked this pull request as ready for review May 29, 2026 22:47
@wpfleger96 wpfleger96 requested a review from a team as a code owner May 29, 2026 22:47
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