Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
2f057f4
fix(settings): give add-on settings pages the native content width
WilliamWang1721 Oct 6, 2026
1e0340d
test(backup): check provider rows pairwise for the two-column grid
WilliamWang1721 Oct 6, 2026
4af1090
Merge branch 'main' into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 6, 2026
cdf3373
Merge branch 'main' into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 7, 2026
7d4766c
Merge main into claude/settings-tab-width-consistency-d130f2
claude Oct 9, 2026
9fca41b
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 11, 2026
48a5213
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 11, 2026
cbfc682
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 13, 2026
3685b97
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 13, 2026
2f2e3c5
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 14, 2026
2d26512
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 14, 2026
7c1403b
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 14, 2026
24ae680
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 15, 2026
5b99c38
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 15, 2026
6a6ac23
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 16, 2026
3aa5477
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 17, 2026
0261c46
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 19, 2026
aefd58e
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 21, 2026
0b972cf
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 21, 2026
88d22eb
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 22, 2026
029587f
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 23, 2026
71a72a1
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 23, 2026
061c755
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 23, 2026
9b68b0c
Merge branch 'main' into claude/settings-tab-width-consistency-d130f2
Kuddev Oct 24, 2026
591ada7
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 24, 2026
09cf569
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 24, 2026
58c3085
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 25, 2026
c292b64
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 26, 2026
fdc2ddc
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 26, 2026
f567eb7
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 27, 2026
a1e3e9a
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 28, 2026
63bb459
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 28, 2026
7f0153e
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 30, 2026
25c38cb
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 31, 2026
ce6ba36
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Oct 31, 2026
ec76e1f
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 1, 2026
d1d09ce
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 2, 2026
fb5b97c
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 3, 2026
b0ae031
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 4, 2026
5466a59
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 4, 2026
8199a9d
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 4, 2026
cc40aba
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 17, 2026
ced08fa
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 17, 2026
8c2021d
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 19, 2026
b20675f
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 19, 2026
b20140a
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 20, 2026
c0e3a4c
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 20, 2026
4dfa424
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 21, 2026
ee77e09
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 21, 2026
79e1014
Merge main into claude/settings-tab-width-consistency-d130f2
WilliamWang1721 Nov 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pebrel_app/src/gpui_shell/settings_pane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,7 @@ impl SettingsPane {
1 => self.section_appearance(window, cx),
2 => self.section_profiles(window, cx),
3 => self.section_providers(window, cx),
4 => self.section_ssh(window, cx),
4 => self.section_ssh(cx),
5 => self.section_network(cx),
6 => self.section_interaction(cx),
7 => self.section_keymap(cx),
Expand Down Expand Up @@ -1826,7 +1826,7 @@ impl Render for SettingsPane {
.when(!form_page && !application_page, |content| {
content.pt(px(28.0)).pb(px(30.0))
})
.when(mobile_page || self.active_section == 3, |content| content.p_0())
.when(self.active_section == 3, |content| content.p_0())
.overflow_y_scrollbar()
// Scrollable wraps the content in a block; the full-width flex
// column keeps cards aligned when the window is resized.
Expand All @@ -1846,7 +1846,7 @@ impl Render for SettingsPane {
.pt(px(design::CONTENT_PAD_TOP))
.pb(px(design::CONTENT_PAD_BOTTOM))
})
.when(matches!(self.active_section, 4 | 9 | 10 | MOBILE_SECTION | PLUGINS_SECTION), |content| {
.when(self.active_section == PLUGINS_SECTION, |content| {
content.items_center()
})
.when(application_page, |content| content.max_w(px(960.0)))
Expand Down
1 change: 0 additions & 1 deletion pebrel_app/src/gpui_shell/settings_pane/agents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ impl SettingsPane {
}
v_flex()
.w_full()
.max_w(px(720.0))
.gap_4()
.child(
h_flex()
Expand Down
7 changes: 3 additions & 4 deletions pebrel_app/src/gpui_shell/settings_pane/agents/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn fixture(
}

#[gpui::test]
fn agents_content_is_centered_and_paths_leave_room_for_hook_status(cx: &mut TestAppContext) {
fn agents_fill_settings_column_and_paths_leave_room_for_hook_status(cx: &mut TestAppContext) {
let (pane, window, reply, _) = fixture(cx);
drop(reply);
pane.update(window, |pane, cx| {
Expand All @@ -83,9 +83,8 @@ fn agents_content_is_centered_and_paths_leave_room_for_hook_status(cx: &mut Test
let row = window.debug_bounds("agent-hook-row-0").unwrap();
let path = window.debug_bounds("agent-cli-path-0").unwrap();
let status = window.debug_bounds("agent-hook-status-0").unwrap();
let center = px((width + SETTINGS_NAV_WIDTH) / 2.0);
assert!((f32::from(row.center().x - center)).abs() <= 2.0);
assert!(row.size.width <= px(720.0));
assert!((f32::from(row.left()) - (SETTINGS_NAV_WIDTH + 20.0)).abs() <= 2.0);
assert!((f32::from(row.right()) - (width - 20.0)).abs() <= 2.0);
assert!(path.size.width > px(0.0));
assert!(path.right() <= status.left());
assert!(status.right() + px(40.0) <= row.right());
Expand Down
4 changes: 3 additions & 1 deletion pebrel_app/src/gpui_shell/settings_pane/backup/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ impl SettingsPane {
Message::CloudScope,
];
let compact = window.viewport_size().width < px(960.0);
// 宽窗下单列存储选项会被拉成整行长条,改为两列。
let cols = if compact { 1 } else { 2 };
let progress = div()
.debug_selector(|| "backup-wizard-progress".into())
.grid()
Expand Down Expand Up @@ -168,7 +170,7 @@ impl SettingsPane {
.child(caption(l.text(lead), cx).max_w(px(520.0))),
);
body = match step {
1 => body.child(v_flex().w_full().flex_shrink_0().gap_2().children(
1 => body.child(div().grid().grid_cols(cols).flex_shrink_0().gap_2().children(
PROVIDERS.into_iter().enumerate().map(
|(i, (protocol, nutstore, title, hint, icon))| {
Button::new(("backup-provider", i))
Expand Down
25 changes: 17 additions & 8 deletions pebrel_app/src/gpui_shell/settings_pane/backup/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,15 @@ fn backup_wizard_requires_connection_and_matching_passwords(cx: &mut gpui::TestA
cx.simulate_resize(gpui::size(px(width), px(1400.0)));
draw(cx);
let wizard = cx.debug_bounds("backup-wizard").unwrap();
assert!(wizard.right() <= px(width));
assert!(wizard.size.width <= px(700.0));
let center = px((width + SETTINGS_NAV_WIDTH) / 2.0);
assert!(f32::from(wizard.center().x - center).abs() <= 2.0);
assert!((f32::from(wizard.left()) - (SETTINGS_NAV_WIDTH + 20.0)).abs() <= 2.0);
assert!((f32::from(wizard.right()) - (width - 20.0)).abs() <= 2.0);
let first = cx.debug_bounds("backup-provider-0").unwrap();
let second = cx.debug_bounds("backup-provider-1").unwrap();
if width >= 960.0 {
assert_eq!(second.top(), first.top(), "wide windows show storage in two columns");
} else {
assert!(first.bottom() <= second.top());
}
assert!(cx.debug_bounds("backup-content-0").is_none());
}
click(cx, "backup-provider-4");
Expand Down Expand Up @@ -404,7 +409,7 @@ fn backup_provider_rows_contain_titles_and_wrapped_hints(cx: &mut gpui::TestAppC
);
}
}
let mut previous_bottom = None;
let mut rows: Vec<gpui::Bounds<gpui::Pixels>> = Vec::new();
let mut wrapped = false;
for (row_selector, title_selector, hint_selector) in [
("backup-provider-0", "backup-provider-title-0", "backup-provider-hint-0"),
Expand Down Expand Up @@ -432,10 +437,14 @@ fn backup_provider_rows_contain_titles_and_wrapped_hints(cx: &mut gpui::TestAppC
hint.left() >= row.left() && hint.right() <= row.right(),
"hint exceeds row width"
);
if let Some(bottom) = previous_bottom {
assert!(bottom + px(4.0) <= row.top(), "provider rows overlap");
for other in &rows {
assert!(
other.right() + px(4.0) <= row.left()
|| other.bottom() + px(4.0) <= row.top(),
"provider rows overlap: {other:?}, {row:?}"
);
}
previous_bottom = Some(row.bottom());
rows.push(row);
wrapped |= hint.size.height > px(30.0);
}
if width == 600.0 {
Expand Down
1 change: 0 additions & 1 deletion pebrel_app/src/gpui_shell/settings_pane/backup/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ impl SettingsPane {
v_flex()
.w_full()
.flex_shrink_0()
.max_w(px(700.0))
.gap(px(super::super::design::GROUP_GAP))
.text_size(px(14.0))
.child(
Expand Down
8 changes: 2 additions & 6 deletions pebrel_app/src/gpui_shell/settings_pane/mobile/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,12 @@ impl SettingsPane {
.set_focused(self.mobile.port_input.read(cx).focus_handle(cx).is_focused(window));
let language = crate::gpui_shell::config::ui_language(cx);
let phase = self.mobile.phase();
// 原型的 812 包含两侧 56px 留白;窄窗收紧页边,不缩小二维码或按钮。
// 窄窗把配对卡改为上下排列,不缩小二维码或按钮。
let narrow = f32::from(window.viewport_size().width) < 1000.0;
let mut page = v_flex()
.id("mobile-settings")
.debug_selector(|| "mobile-settings".into())
.w_full()
.max_w(px(812.0))
.px(px(if narrow { 24.0 } else { 56.0 }))
.pt(px(44.0))
.pb(px(140.0))
.text_size(px(14.0))
.line_height(px(21.0))
.child(
Expand Down Expand Up @@ -183,7 +179,7 @@ impl SettingsPane {
if phase == Phase::Paired {
page = page.child(self.mobile_connections(cx)).child(self.mobile_permissions(cx));
}
div().w_full().flex().justify_center().child(page)
div().w_full().child(page)
}

fn mobile_off(&self, cx: &Context<Self>) -> gpui::Stateful<gpui::Div> {
Expand Down
10 changes: 1 addition & 9 deletions pebrel_app/src/gpui_shell/ssh_settings/library.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,11 +680,7 @@ impl SettingsPane {
.into_any_element()
}

pub(in crate::gpui_shell) fn section_ssh(
&mut self,
window: &Window,
cx: &mut Context<Self>,
) -> gpui::Div {
pub(in crate::gpui_shell) fn section_ssh(&mut self, cx: &mut Context<Self>) -> gpui::Div {
let language = crate::gpui_shell::config::ui_language(cx);
let controls = self.library_controls(cx);
let header = self.library_header(cx);
Expand Down Expand Up @@ -768,10 +764,6 @@ impl SettingsPane {
.flex_col()
.gap(px(14.0))
.w_full()
.max_w(px(1000.0))
.px(px(if f32::from(window.viewport_size().width) < 1000.0 { 12.0 } else { 36.0 }))
.pt(px(16.0))
.pb(px(110.0))
.child(header)
.child(div().mt(px(10.0)).child(controls))
.children(
Expand Down
Loading