chore: bind user metadata to per-view directories (#31)
Rust / build (macos-latest, stable) (push) Canceled after 0s
Rust / build (ubuntu-latest, stable) (push) Canceled after 0s
Rust / build (windows-latest, stable) (push) Canceled after 0s

Reviewed-on: #31
This commit was merged in pull request #31.
This commit is contained in:
2026-10-15 07:46:03 +00:00
parent cd61a09320
commit 30ff255372
25 changed files with 791 additions and 383 deletions
+9 -4
View File
@@ -15,15 +15,16 @@ pub(crate) mod tree;
use std::fmt::Display;
use gpui::prelude::*;
use gpui::{AnyElement, App, div};
use gpui::{AnyElement, App, Entity, div};
use gpui_component::{Sizable as _, h_flex};
pub use inbox::InboxView;
use metadata::ProfileDirectory;
pub(crate) use placeholder_panel::PlaceholderPanel;
pub use repo::RepoDetailView;
pub(crate) use repo::{RepoItem, open_repo_item, open_repo_panel};
pub use repo_list::RepoListView;
pub use sidebar::SidebarPanel;
use signed_state::{ProfileStore, RepoStore};
use signed_state::RepoStore;
use signed_ui::Avatar;
pub(crate) fn tab_title(avatar: AnyElement, label: impl IntoElement) -> impl IntoElement {
@@ -38,7 +39,11 @@ pub(crate) fn panel_avatar(seed: impl Display) -> AnyElement {
Avatar::new(seed).xsmall().into_any_element()
}
pub(crate) fn repo_tab_avatar(store: &RepoStore, cx: &App) -> AnyElement {
pub(crate) fn repo_tab_avatar(
store: &RepoStore,
directory: &Entity<ProfileDirectory>,
cx: &App,
) -> AnyElement {
let seed = store
.announcement
.as_ref()
@@ -55,7 +60,7 @@ pub(crate) fn repo_tab_avatar(store: &RepoStore, cx: &App) -> AnyElement {
let owner = store
.announcement
.as_ref()
.map(|announcement| ProfileStore::global(cx).read(cx).get(&announcement.owner));
.map(|announcement| directory.read(cx).profile(&announcement.owner, cx));
let (name, picture) = owner
.map(|profile| (Some(profile.name()), profile.picture()))