Vectrum
Sign In

Start screen headline like T3 Code's

"What should we build in <project>?" in T3's lighter 30px type, with the
project as a picker listing No project, the projects and Add project.
A thread without a project asks "What should we work on?" with the picker
below it; "or start without a project" shows its shortcut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JjohannSocommitted 1 parent 3866befcommit8a8cfa7

Showing 1 changed file with 44 additions and 32 deletions.

+44−32src/ui/chat.rsView File
@@ -1154,8 +1154,18 @@ impl ChatView {
11541154 })
11551155 .unwrap_or_default();
11561156 let chat = cx.entity().downgrade();
1157+ // T3 Code's project menu: No project, the projects, Add project.
11571158 let project_menu = move |mut menu: gpui_kit::component::menu::PopupMenu, _: &mut Window, _: &mut Context<gpui_kit::component::menu::PopupMenu>| {
1158- menu = menu.min_w(px(240.)).label("Project");
1159+ menu = menu.min_w(px(240.)).max_h(px(320.));
1160+ let no_project = chat.clone();
1161+ menu = menu.item(
1162+ PopupMenuItem::new("No project")
1163+ .icon(Icon::new(Lucide::MessageSquareDashed))
1164+ .checked(scratch)
1165+ .on_click(move |_, _, cx| {
1166+ let _ = no_project.update(cx, |_, cx| cx.emit(ChatEvent::StartWithoutProject));
1167+ }),
1168+ );
11591169 for (name, path, project_env) in projects.clone() {
11601170 let chat = chat.clone();
11611171 let checked = path == cwd && project_env == env;
@@ -1165,9 +1175,21 @@ impl ChatView {
11651175 }));
11661176 }
11671177 let chat = chat.clone();
1168- menu.separator().item(PopupMenuItem::new("Add project folder…").on_click(move |_, _, cx| {
1169- let _ = chat.update(cx, |_, cx| cx.emit(ChatEvent::AddProject));
1170- }))
1178+ menu.separator().item(PopupMenuItem::new("Add project").icon(Icon::new(Lucide::FolderPlus)).on_click(
1179+ move |_, _, cx| {
1180+ let _ = chat.update(cx, |_, cx| cx.emit(ChatEvent::AddProject));
1181+ },
1182+ ))
1183+ };
1184+ let picker = |id: &'static str, label: SharedString| {
1185+ MetalButton::new(id)
1186+ .ghost()
1187+ .label(label)
1188+ .px(px(2.))
1189+ .rounded(px(0.))
1190+ .border_b(px(1.))
1191+ .border_dashed()
1192+ .border_color(p.ink3.opacity(0.6))
11711193 };
11721194
11731195 v_flex()
@@ -1181,44 +1203,33 @@ impl ChatView {
11811203 .flex_wrap()
11821204 .justify_center()
11831205 .items_center()
1184- .text_size(px(34.))
1185- .line_height(px(44.))
1186- .font_weight(FontWeight::SEMIBOLD)
1206+ .text_size(px(30.))
1207+ .line_height(px(36.))
11871208 .text_color(p.ink)
11881209 .map(|this| {
11891210 if scratch {
1190- this.child("What should we build?")
1211+ this.child("What should we work on?")
11911212 } else {
11921213 this.child("What should we build in\u{a0}")
11931214 .child(
1194- MetalButton::new("start-project")
1195- .ghost()
1196- .label(project)
1197- .h(px(44.))
1198- .px(px(2.))
1199- .rounded(px(0.))
1200- .text_size(px(34.))
1201- .font_weight(FontWeight::SEMIBOLD)
1215+ picker("start-project", project)
1216+ .h(px(36.))
1217+ .max_w(px(256.))
1218+ .text_size(px(30.))
1219+ .font_weight(FontWeight::NORMAL)
12021220 .text_color(p.ink)
1203- .border_b(px(2.))
1204- .border_dashed()
1205- .border_color(p.ink3.opacity(0.6))
12061221 .dropdown_menu(project_menu.clone()),
12071222 )
12081223 .child("?")
12091224 }
12101225 }),
12111226 )
1212- .map(|this| {
1227+ .child(div().mt(px(8.)).h(px(24.)).flex().items_center().text_size(px(14.)).map(|this| {
12131228 if scratch {
12141229 this.child(
1215- MetalButton::new("pick-project")
1216- .ghost()
1217- .compact()
1218- .label("or pick a project")
1219- .caret()
1220- .mt(px(6.))
1221- .text_size(px(15.))
1230+ picker("pick-project", "No project".into())
1231+ .h(px(24.))
1232+ .text_size(px(14.))
12221233 .text_color(p.ink3)
12231234 .dropdown_menu(project_menu),
12241235 )
@@ -1226,17 +1237,18 @@ impl ChatView {
12261237 this.child(
12271238 div()
12281239 .id("start-without-project")
1229- .mt(px(6.))
1230- .text_size(px(15.))
12311240 .text_color(p.ink3)
12321241 .cursor_pointer()
1233- .hover(|style| style.text_color(p.ink))
1242+ .hover(|style| style.text_color(p.ink).underline())
1243+ .tooltip(|window, cx| {
1244+ gpui_kit::component::tooltip::Tooltip::new("Ctrl+Alt+N").build(window, cx)
1245+ })
12341246 .on_click(cx.listener(|_, _, _, cx| cx.emit(ChatEvent::StartWithoutProject)))
12351247 .child("or start without a project"),
12361248 )
12371249 }
1238- })
1239- .child(div().h(px(30.)))
1250+ }))
1251+ .child(div().h(px(24.)))
12401252 .child(self.render_composer(true, window, cx))
12411253 }
12421254