Replace dock shell with titlebar repository tabs

- Move repository navigation from the dock sidebar to titlebar tabs.
- Route main and detail panels through Workspace.
- Move sign-in into the main panel and remove unlinked navigation.
This commit is contained in:
2026-11-15 13:37:32 +07:00
parent d79d2c7a27
commit 5bd289b418
29 changed files with 1041 additions and 1242 deletions
+4 -24
View File
@@ -1,12 +1,12 @@
use gpui::{
AnyElement, Context, Entity, InteractiveElement as _, IntoElement, ParentElement as _, Render,
Context, Entity, InteractiveElement as _, IntoElement, ParentElement as _, Render,
ScrollHandle, SharedString, Styled as _, Subscription, Window, div,
};
use gpui_native_kit::avatar::Avatar;
use gpui_native_kit::common::{Sizable as _, h_flex, v_flex};
use gpui_native_kit::empty_state::EmptyState;
use gpui_native_kit::input::InputState;
use gpui_native_kit::layout::dock::Panel;
use gpui_native_kit::layout::panel::Panel;
use gpui_native_kit::scroll_area::ScrollArea;
use gpui_native_kit::theme::{ActiveTheme as _, TextRole, Typeset as _};
use metadata::ProfileDirectory;
@@ -16,7 +16,7 @@ use signed_state::RepoStore;
use utils::relative_time;
use crate::issues::helpers::{comment_form, comments_section, issue_roots, sidebar_section};
use crate::shared::widgets::{repo_tab_avatar, status_badge};
use crate::shared::widgets::status_badge;
pub struct IssueDetailView {
store: Entity<RepoStore>,
@@ -80,27 +80,7 @@ impl IssueDetailView {
}
}
impl Panel for IssueDetailView {
fn title(&self, cx: &gpui::App) -> Option<SharedString> {
let short_id = self
.store
.read(cx)
.issues
.iter()
.find(|issue| issue.id == self.issue_id)
.map(|issue| {
let hex = issue.id.to_hex();
SharedString::from(&hex[..8])
})
.unwrap_or_else(|| SharedString::from("Issue"));
Some(short_id)
}
fn lead(&self, cx: &gpui::App) -> Option<AnyElement> {
Some(repo_tab_avatar(self.store.read(cx), &self.directory, cx))
}
}
impl Panel for IssueDetailView {}
impl Render for IssueDetailView {
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {