Skip to content

collab_panel: Add ability to favorite a channel#52378

Merged
danilo-leal merged 8 commits intomainfrom
favorite-channel
Mar 26, 2026
Merged

collab_panel: Add ability to favorite a channel#52378
danilo-leal merged 8 commits intomainfrom
favorite-channel

Conversation

@danilo-leal
Copy link
Copy Markdown
Member

@danilo-leal danilo-leal commented Mar 25, 2026

This PR adds the ability to favorite a channel in the collab panel. Note that favorited channels:

  • appear at the very top of the panel
  • also appear in their normal place in the tree
  • are not stored in settings but rather in the local key-value store
Screenshot 2026-03-25 at 1  11@2x

Release Notes:

  • Collab: Added the ability to favorite channels in the collab panel.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 25, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 25, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from a team, cole-miller and reflectronic and removed request for a team March 25, 2026 04:23
@Vastargazing
Copy link
Copy Markdown
Contributor

Vastargazing commented Mar 25, 2026

retain without serialize
in update_entries, self.favorite_channels.retain(...) removes stale channel IDs from memory but doesn't call self.serialize(cx). so orphaned IDs stay in the KV store until the user manually toggles a favorite. is that intentional?

storage layer
the PR description says favorites are stored in the collab database, but looking at the code it seems like they go into KeyValueStore (local client-side). if that's right, favorites won't sync across devices — might be worth clarifying in the description whether cross-device sync is a goal here or not.

visible_on_hover on filter button
the .when(!self.filter_active_channels, |button| button.visible_on_hover(...)) was removed from the filter-active-channels button, so now it's always visible regardless of hover state. was that intentional or a side effect of the refactor?

@danilo-leal
Copy link
Copy Markdown
Member Author

@Vastargazing thank you! I pushed a quick tweak towards improving your first point. The second one was just me writing incorrectly, fixed in the description, too. The third point is intentional.

@danilo-leal danilo-leal merged commit 2a3fcb2 into main Mar 26, 2026
31 checks passed
@danilo-leal danilo-leal deleted the favorite-channel branch March 26, 2026 19:24
danilo-leal added a commit that referenced this pull request Mar 26, 2026
Follow up to #52378

This PR fixes a little race condition that was happening where we were
running the favorite channel pruning function faster than the channels
could load, leading to favorite channels not surviving the app
restarting. The fix is to make the pruning happen only when the number
of channels is bigger than 0, which means the list from the server has
already been loaded.
Release Notes:

- N/A _(No release notes yet because this feature hasn't reached the
wider public)_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants