All your AI agent sessions in one place — browse, search, resume. Rust + GPUI.
Rust
Give the detail header more room
Corey Chiucc4d7d12437a
diff --git a/DESIGN.md b/DESIGN.mdindex 31cb1f4..bffd6ee 100644--- a/DESIGN.md+++ b/DESIGN.md@@ -37,7 +37,7 @@ Wake 的目标不是展示技术感,而是让用户在几秒内重新找到并|---|---|| 默认窗口 | 1180 × 760,居中(14" 屏约占 78% × 77%) || 最小窗口 | 940 × 620 |-| 窗口顶部 | macOS 不设全宽标题栏,交通灯与拖拽区收在侧栏顶部;Windows 用原生标题栏,Linux 视 compositor 装饰协商而定 |+| 窗口顶部 | macOS 主窗口使用 40px 透明标题栏,交通灯与拖拽区收在侧栏顶部;Windows 用原生标题栏,Linux 视 compositor 装饰协商而定 || 资料库侧栏 | 224px 固定宽度 || 会话流 | 336px 固定宽度 || 阅读区 | 剩余宽度,`min_w(0)`;正文最大宽度 720px |@@ -121,7 +121,7 @@ UI 语言英文;会话正文保持原语言。元信息分隔符固定为前后### 窗口顶部-macOS 不设置横跨三栏的自定义 header。系统交通灯保留在侧栏顶部,其所在拖拽区与侧栏使用完全相同的材质和颜色;会话流与阅读区不为标题栏预留另一条色带。Windows 保留系统原生标题栏(贴靠布局与深色模式经 DWM 处理);Linux 由 compositor 装饰协商决定,报 Client 时侧栏顶部挂自绘 TitleBar。+macOS 不设置横跨三栏的自定义 header。主窗口透明标题栏高 40px,系统交通灯在其中垂直居中;其所在拖拽区与侧栏使用完全相同的材质和颜色。会话流与阅读区不为标题栏预留另一条色带。Windows 保留系统原生标题栏(贴靠布局与深色模式经 DWM 处理);Linux 由 compositor 装饰协商决定,报 Client 时侧栏顶部挂自绘 TitleBar。### 资料库侧栏@@ -153,7 +153,7 @@ macOS 不设置横跨三栏的自定义 header。系统交通灯保留在侧栏层级从上到下为:-1. Agent、项目、分支等来源上下文与右侧操作工具条。+1. Agent、项目、分支等来源上下文与右侧操作工具条,共享一个 40px 高的 Flex 行;28px 操作条上下各保留约 6px,不使用绝对定位。2. 独占整行、最多两行的 22px 会话标题。3. 独占一行的项目路径。4. 模型、来源 badge 与消息数、token 组成的统计行。diff --git a/crates/wake/src/main.rs b/crates/wake/src/main.rsindex 243693e..22b9341 100644--- a/crates/wake/src/main.rs+++ b/crates/wake/src/main.rs@@ -83,7 +83,8 @@ fn main() {TitlebarOptions {title: None,appears_transparent: true,- traffic_light_position: Some(point(px(20.), px(11.))),+ // 40px Wake 顶部净空中垂直居中 13.5px traffic lights。+ traffic_light_position: Some(point(px(20.), px(13.))),}} else {TitlebarOptions {diff --git a/crates/wake/src/workbench.rs b/crates/wake/src/workbench.rsindex f9073e9..ab0d4ed 100644--- a/crates/wake/src/workbench.rs+++ b/crates/wake/src/workbench.rs@@ -70,8 +70,8 @@ pub const PALETTE_CONTEXT: &str = "WakePalette";const PALETTE_HEIGHT: Pixels = px(492.);/// location 表单标签列宽(Agent/Folder 两行共用)const FORM_LABEL_W: Pixels = px(52.);-/// macOS 透明窗口标题栏与 gpui-component TitleBar 的固定高度。-const WINDOW_TITLEBAR_HEIGHT: Pixels = px(34.);+/// Wake 主窗口的透明标题栏高度。28px 详情操作条上下各保留约 6px。+const WINDOW_TITLEBAR_HEIGHT: Pixels = px(40.);type SharedAdapters = Arc<Vec<Box<dyn AgentAdapter>>>;type SharedLocations = Arc<Vec<AdapterLocation>>;@@ -2260,8 +2260,11 @@ impl Workbench {.h_full().flex_shrink_0().bg(theme.sidebar)- // 压平 titlebar 靠 theme.rs 的 title_bar/title_bar_border token,不再叠加覆写- .when(show_titlebar, |this| this.child(TitleBar::new()))+ // 压平 titlebar 靠 theme.rs 的 title_bar/title_bar_border token;主窗口+ // 使用 40px 高度,与详情顶部行共享同一垂直节奏。+ .when(show_titlebar, |this| {+ this.child(TitleBar::new().h(WINDOW_TITLEBAR_HEIGHT))+ }).child(div().flex_shrink_0()