Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2cb04ff
feat(ui): add first-run onboarding
gaelcado Sep 11, 2026
4b836e7
refactor(ui): center onboarding journey
gaelcado Sep 11, 2026
de684d1
fix(ui): address onboarding review feedback
gaelcado Sep 12, 2026
ae3acf4
fix(ui): reconcile centered cardless onboarding
gaelcado Sep 12, 2026
ec6cac2
fix(ui): center compact onboarding steps
gaelcado Sep 12, 2026
533314d
fix(ui): refine onboarding navigation and agent list
gaelcado Sep 12, 2026
df3e434
fix(ui): unify onboarding selection and actions
gaelcado Sep 12, 2026
765fd27
fix(ui): separate onboarding navigation from choices
gaelcado Sep 12, 2026
7b12969
Tighten onboarding spacing and clarify navigation controls
gaelcado Sep 12, 2026
49f7563
Reuse shared controls in onboarding
gaelcado Sep 12, 2026
773e7a8
Fix onboarding resume, keyboard isolation, and complete model selection
gaelcado Sep 13, 2026
2a2af80
Shorten automatic title model label to Cheapest
gaelcado Sep 13, 2026
585dea2
Fix onboarding defaults after model options removal
gaelcado Sep 13, 2026
c2166bf
Add frame-aware onboarding keyboard regression tests
gaelcado Sep 13, 2026
bd45701
Give onboarding dialog keyboard ownership and initialize mounted focus
gaelcado Sep 13, 2026
83fca61
Place Show onboarding before Settings in user menu
gaelcado Sep 13, 2026
528b2e6
Handle Antigravity in onboarding harness labels
gaelcado Sep 19, 2026
5fe716b
Polish onboarding agent actions and keep setup local
gaelcado Sep 13, 2026
f20f71b
Polish compact onboarding layout and window transitions
gaelcado Sep 20, 2026
a52aa7d
Give onboarding more room
gaelcado Sep 20, 2026
93abcd4
Smooth onboarding handoff and fill a stable portrait layout
gaelcado Sep 20, 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
66 changes: 55 additions & 11 deletions crates/ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ mod new_thread_background_image;
mod new_thread_background_mask;
mod notice;
pub mod notify;
pub mod onboarding;
pub mod pickers;
pub mod popover;
pub mod project_actions;
Expand Down Expand Up @@ -158,7 +159,22 @@ pub fn run_app(config: UiConfig) {
gpui_tokio::init_from_handle(cx, runtime_handle);
gpui_base::init(cx);
let data_dir = config.boot().data_dir.clone();
let ui_settings = settings::UiSettings::load(&data_dir);
let mut ui_settings = settings::UiSettings::load(&data_dir);
let fresh_profile = settings::is_fresh_profile(&data_dir);
if fresh_profile {
ui_settings.onboarding = onboarding::OnboardingState::fresh();
// Publish the first-run marker before engine bootstrap creates its
// own durable profile files. A crash on the welcome screen must
// resume onboarding rather than look like an established install.
if let Err(error) = ui_settings.save(&data_dir) {
tracing::warn!(%error, "failed to persist initial onboarding state");
}
} else if ui_settings.onboarding.disposition == onboarding::OnboardingDisposition::Deferred
{
// "Continue later" dismisses the current window only. A new app
// launch resumes the saved step without disturbing its choices.
ui_settings.onboarding.disposition = onboarding::OnboardingDisposition::InProgress;
}
settings::init(ui_settings.clone(), data_dir.clone(), cx);
let font_availability = typography::register_fonts(cx);
// Typography first: theme installation reads the effective family, so
Expand Down Expand Up @@ -309,7 +325,7 @@ fn restored_main_window_bounds(cx: &App) -> (Bounds<gpui::Pixels>, Option<gpui::
}

fn save_main_window_geometry(window: &gpui::Window, cx: &mut App) {
if window.is_fullscreen() {
if window.is_fullscreen() || settings::current(cx).onboarding.is_active() {
return;
}
// macos infers maximization from screen-sized bounds, including ordinary
Expand All @@ -326,9 +342,11 @@ fn save_main_window_geometry(window: &gpui::Window, cx: &mut App) {
}
}

fn observe_main_window_geometry<T: 'static>(window: &mut gpui::Window, cx: &gpui::Context<T>) {
cx.observe_window_bounds(window, |_, window, cx| {
save_main_window_geometry(window, cx);
fn observe_main_window_geometry(window: &mut gpui::Window, cx: &gpui::Context<shell::Shell>) {
cx.observe_window_bounds(window, |shell, window, cx| {
if !shell.onboarding_window.owns_geometry() {
save_main_window_geometry(window, cx);
}
})
.detach();
}
Expand All @@ -339,12 +357,29 @@ fn open_main_window(
cx: &mut App,
) -> gpui::WindowHandle<shell::Shell> {
let (bounds, display_id) = restored_main_window_bounds(cx);
let workspace_size = bounds.size;
let setup = &settings::current(cx).onboarding;
let setup_step = setup.is_active().then_some(setup.step);
let bounds = setup_step.map_or(bounds, |step| {
let compact = onboarding::window::preferred_size(step);
Bounds::new(
gpui::point(
bounds.origin.x + (bounds.size.width - compact.width) / 2.0,
bounds.origin.y + (bounds.size.height - compact.height) / 2.0,
),
compact,
)
});
let handle = cx
.open_window(
WindowOptions {
window_bounds: Some(WindowBounds::Windowed(bounds)),
display_id,
window_min_size: Some(size(px(900.), px(600.))),
window_min_size: Some(if setup_step.is_some() {
size(px(520.), px(440.))
} else {
size(px(900.), px(600.))
}),
// `kind` is deliberately left at its default `WindowKind::Normal`
// (gpui platform.rs WindowOptions::default), which on macOS maps
// to `NSNormalWindowLevel` (gpui_macos window.rs) — same as zed's
Expand Down Expand Up @@ -401,16 +436,25 @@ fn open_main_window(
appearance::observe_window(window, cx).detach();
let shell = cx.new(|cx| {
observe_main_window_geometry(window, cx);
shell::Shell::new(state, boot, cx)
let mut shell = shell::Shell::new(state, boot, cx);
if let Some(step) = setup_step {
shell.onboarding_window.start(workspace_size, step);
}
shell
});
save_main_window_geometry(window, cx);
let weak_shell = shell.downgrade();
window.on_window_should_close(cx, move |window, cx| {
let should_close = weak_shell
.update(cx, |shell, cx| shell.prepare_window_close(cx))
.unwrap_or(true);
let (should_close, setup_geometry) = weak_shell
.update(cx, |shell, cx| {
let setup_geometry = shell.onboarding_window.owns_geometry();
(shell.prepare_window_close(cx), setup_geometry)
})
.unwrap_or((true, false));
if should_close {
save_main_window_geometry(window, cx);
if !setup_geometry {
save_main_window_geometry(window, cx);
}
settings::flush(cx);
}
should_close
Expand Down
Loading
Loading