Visual Studio Code, rebuilt in Rust
Rust
feat(extensions): lay out the Extensions views as view panes
rokartur023655258b74
diff --git a/README.md b/README.mdindex 5e4eb56bdbd..cef46fd93f2 100644--- a/README.md+++ b/README.md@@ -11,8 +11,8 @@ Coverage of VS Code 1.147.0, from [port/ledger.md](port/ledger.md) (584 rows). V```mermaidpie showData- "verified" : 413- "ported" : 17+ "verified" : 414+ "ported" : 16"removed" : 126"n/a" : 28```@@ -20,7 +20,7 @@ pie showData| area | verified | ported | removed | n/a | verified of in scope ||---|---:|---:|---:|---:|---|| src/vs/platform | 68 | 1 | 30 | 13 | `████████████████████ 99%` |-| workbench contribution | 64 | 4 | 30 | 3 | `███████████████████░ 94%` |+| workbench contribution | 65 | 3 | 30 | 3 | `███████████████████░ 96%` || built-in extension | 88 | 1 | 6 | 0 | `████████████████████ 99%` || MainThread* shape (Rust side) | 58 | 1 | 30 | 0 | `████████████████████ 98%` || workbench service | 58 | 7 | 23 | 7 | `██████████████████░░ 89%` |@@ -31,7 +31,7 @@ pie showData| src/vs/editor | 0 | 2 | 1 | 1 | `░░░░░░░░░░░░░░░░░░░░ 0%` || src/vs/base | 0 | 0 | 2 | 3 | `████████████████████ 100%` || port feature | 1 | 0 | 0 | 0 | `████████████████████ 100%` |-| **all** | **413** | **17** | **126** | **28** | `███████████████████░ 96%` |+| **all** | **414** | **16** | **126** | **28** | `███████████████████░ 96%` |<!-- coverage:end -->`removed` are parts left out by decision: AI features, Microsoft services, telemetry, remote and tunnels ([port/notes.md](port/notes.md)). `n/a` are upstream test infrastructure and the Electron process, IPC and DOM layers the native architecture replaces.diff --git a/native/crates/app/src/workbench/extensions_list_view.rs b/native/crates/app/src/workbench/extensions_list_view.rsindex add933921df..5014a2deece 100644--- a/native/crates/app/src/workbench/extensions_list_view.rs+++ b/native/crates/app/src/workbench/extensions_list_view.rs@@ -8,7 +8,8 @@ use serde_json::{Value, json};use super::Workbench;use super::input_box_view::{InputId, InputLook};-use super::extensions_view::Pane;+use super::extensions_view::{Pane, SEARCH_HEADER_HEIGHT};+use super::view_panes::{PaneContainer, ViewPane};use crate::extension_enablement::EnablementState;use crate::extensions_model::{Extension, ExtensionState};use crate::menus::MenuAction;@@ -77,26 +78,60 @@ impl Workbench {.collect()}- /// The viewlet's body: the search header and the views.+ /// The viewlet's body: the search header, then the views as the panes of its `ViewPaneContainer`. A single view+ /// merges with the container (`mergeViewWithContainerWhenSingleView`): no header, always expanded.pub(super) fn extensions_view(&self, window: &Window, cx: &mut Context<Self>) -> Div {let panes = &self.extensions_viewlet.panes;let list_focused = self.extensions_viewlet.list_focus.is_focused(window);- div()- .flex_1()- .min_h_0()- .flex()- .flex_col()- .child(self.extensions_search_header(window, cx))- .child(- div()- .id("extensions-panes")- .track_focus(&self.extensions_viewlet.list_focus)- .flex_1()- .min_h_0()- .flex()- .flex_col()- .children(panes.iter().enumerate().map(|(index, pane)| self.extensions_pane(index, pane, panes.len() == 1, list_focused, cx))),- )+ let body = div().id("extensions-panes").track_focus(&self.extensions_viewlet.list_focus).flex_1().min_h_0().flex().flex_col();+ let body = match panes.as_slice() {+ [] => body,+ [pane] => body.children(self.extensions_pane_body(0, pane, list_focused, cx)),+ _ => {+ let view_panes = panes.iter().enumerate().map(|(index, pane)| ViewPane {+ id: pane.descriptor.id,+ title: pane.descriptor.title.to_owned(),+ description: None,+ actions: self.extensions_pane_actions(pane, cx),+ draws_more: false,+ // extensionsViews.ts: `showActions: ViewPaneShowActions.Always`.+ show_actions: true,+ body: self.extensions_pane_body(index, pane, list_focused, cx).unwrap_or_else(|| div().into_any_element()),+ });+ let ids = self.panes(PaneContainer::Extensions).view.as_ref().expect("panes are laid out before they draw").ids().to_vec();+ let ordered = self.ordered_panes(&ids, view_panes.collect(), window, cx);+ body.child(self.pane_view_element(PaneContainer::Extensions, ordered, window, cx))+ }+ };+ div().flex_1().min_h_0().flex().flex_col().child(self.extensions_search_header(window, cx)).child(body)+ }++ /// The view's `view/title` navigation actions (extensions.contribution.ts): Update All Extensions while there are+ /// updates (the `.disabled` item is `display: none`), Install and Configure for the workspace recommendations.+ fn extensions_pane_actions(&self, pane: &Pane, cx: &mut Context<Self>) -> Option<AnyElement> {+ match pane.descriptor.id {+ "workbench.views.extensions.searchOutdated" if !pane.extensions.is_empty() => {+ let command = "workbench.extensions.action.updateAllExtensions";+ // actionbar.css `.action-label` of an action without an icon: its title, 11px, 3px padding.+ let label = div().id(command).px(px(3.)).rounded(px(5.)).text_size(px(11.)).cursor_pointer().hover(|label| label.bg(self.color("toolbar.hoverBackground"))).child("Update All Extensions").on_click(cx.listener(move |workbench, _: &ClickEvent, window, cx| {+ cx.stop_propagation();+ drop(workbench.execute_command(command, Vec::new(), window, cx));+ }));+ Some(div().flex().child(label).into_any_element())+ }+ "workbench.views.extensions.workspaceRecommendations" => {+ let install = self.search_action("cloud-download", "workbench.extensions.action.installWorkspaceRecommendedExtensions", true, cx);+ let configure = self.search_action("edit", "workbench.extensions.action.configureWorkspaceFolderRecommendedExtensions", true, cx);+ Some(div().flex().child(install).child(configure).into_any_element())+ }+ _ => None,+ }+ }++ /// The count badge after a view's header title, except Popular's (`hideBadge`).+ pub(super) fn extensions_view_badge(&self, id: &str) -> Option<Div> {+ let pane = self.extensions_viewlet.panes.iter().find(|pane| pane.descriptor.id == id)?;+ (id != "workbench.views.extensions.popular").then(|| self.count_badge(pane.extensions.len()))}/// extensionsViewlet.css `.header`: 41px, the 28px search box with its clear and filter actions inside.@@ -130,45 +165,20 @@ impl Workbench {.child(div().flex_1().min_w_0().h_full().flex().child(self.input_text(InputId::ExtensionsSearch, InputLook { password: false, placeholder, focused }, cx))).child(div().flex().gap(px(2.)).child(clear).child(filter));// Modern UI padding.css: 4px 8px around the 28px box.- div().h(px(41.)).flex_none().py(px(4.)).px(px(8.)).child(input)+ div().h(px(SEARCH_HEADER_HEIGHT)).flex_none().py(px(4.)).px(px(8.)).child(input)}- /// A view: its header, then its list, its message or nothing. A single view merges with the container- /// (`mergeViewWithContainerWhenSingleView`): no header, always expanded.- fn extensions_pane(&self, index: usize, pane: &Pane, single: bool, list_focused: bool, cx: &mut Context<Self>) -> AnyElement {- let expanded = pane.expanded || single;- // ExtensionsListView `updateSize`: a flexible view without results takes no height.- let flexible = matches!(pane.descriptor.id, "workbench.views.extensions.installed" | "extensions.recommendedList");- let badge = (pane.descriptor.id != "workbench.views.extensions.popular").then(|| self.count_badge(pane.extensions.len()));- let header = self- .section_header(&crate::nls::localize_in(pane.descriptor.id, pane.descriptor.title), expanded, index > 0)- .id(("extensions-pane-header", index))- .child(div().flex_1())- .children(badge)- .on_click(cx.listener(move |workbench, _: &ClickEvent, _, cx| {- let pane = &mut workbench.extensions_viewlet.panes[index];- pane.expanded = !pane.expanded;- let (id, expanded) = (pane.descriptor.id, pane.expanded);- workbench.extensions_viewlet.expansion.insert(id, expanded);- cx.notify();- }));- let body: Option<AnyElement> = match () {- _ if !expanded => None,- _ if !pane.extensions.is_empty() => Some(self.extensions_list(index, pane, list_focused, cx)),- _ if flexible => None,- _ if pane.loading => None,- _ => pane.message.as_ref().map(|(_, message)| {- div().flex_1().child(div().pt(px(5.)).pr(px(9.)).pb(px(5.)).pl(px(20.)).cursor_default().text_color(self.foreground_or("sideBar.foreground")).child(message.clone())).into_any_element()- }),- };- let grows = body.is_some();- div()- .flex()- .flex_col()- .when(grows, |pane| pane.flex_1().min_h_0())- .when(!single, |pane| pane.child(header))- .children(body)- .into_any_element()+ /// A view's body: its list, its message or nothing while it loads.+ fn extensions_pane_body(&self, index: usize, pane: &Pane, list_focused: bool, cx: &mut Context<Self>) -> Option<AnyElement> {+ if !pane.extensions.is_empty() {+ return Some(self.extensions_list(index, pane, list_focused, cx));+ }+ if pane.loading {+ return None;+ }+ pane.message.as_ref().map(|(_, message)| {+ div().flex_1().child(div().pt(px(5.)).pr(px(9.)).pb(px(5.)).pl(px(20.)).cursor_default().text_color(self.foreground_or("sideBar.foreground")).child(message.clone())).into_any_element()+ })}/// countBadge.ts under Modern UI (padding.css, roundedCorners.css, fontRamp.css): 19px circle, 10px text.@@ -577,7 +587,7 @@ impl Workbench {/// Up, Down, Home, End and Enter in the focused list (listWidget.ts), across the views.pub(super) fn move_extensions_focus(&mut self, delta: isize, window: &mut Window, cx: &mut Context<Self>) {- let rows: Vec<(usize, usize)> = self.extensions_viewlet.panes.iter().enumerate().filter(|(_, pane)| pane.expanded).flat_map(|(index, pane)| (0..pane.extensions.len()).map(move |row| (index, row))).collect();+ let rows: Vec<(usize, usize)> = self.extensions_viewlet.panes.iter().enumerate().filter(|(_, pane)| self.view_pane_expanded(PaneContainer::Extensions, pane.descriptor.id)).flat_map(|(index, pane)| (0..pane.extensions.len()).map(move |row| (index, row))).collect();if rows.is_empty() {return;}diff --git a/native/crates/app/src/workbench/extensions_view.rs b/native/crates/app/src/workbench/extensions_view.rsindex 16d618e840e..95324ac76df 100644--- a/native/crates/app/src/workbench/extensions_view.rs+++ b/native/crates/app/src/workbench/extensions_view.rs@@ -17,6 +17,7 @@ use super::Workbench;use super::extension_bisect::BisectState;use super::input_box_view::InputView;use super::search_view::SideBarView;+use super::view_panes::{MINIMUM_BODY_SIZE, PaneContainer};use crate::commands::Outcome;use crate::extension_recommendations as recommendations;use crate::extension_enablement::{Enablement, EnablementInput, EnablementState, Identifier};@@ -30,6 +31,8 @@ pub const VIEWLET_ID: &str = "workbench.view.extensions";const UPDATES_CHECK_INTERVAL: Duration = Duration::from_secs(12 * 60 * 60);/// The gallery pager's page size (`queryGallery` `pageSize`).const PAGE_SIZE: usize = 50;+/// extensionsViewlet.ts `layout`: the search box's 20px and its 21px margin.+pub(super) const SEARCH_HEADER_HEIGHT: f32 = 41.;/// One view of the container: its id, its title and the query it shows.#[derive(Clone, Copy, PartialEq, Eq, Debug)]@@ -179,6 +182,11 @@ pub fn visible_views(value: &str, has_installed: bool, has_workspace: bool) -> Vviews}+/// extensionsViewlet.ts `registerViews`: the views made with `flexibleHeight`.+fn is_flexible_view(id: &str) -> bool {+ matches!(id, "workbench.views.extensions.installed" | "extensions.recommendedList")+}+/// extensionsViewlet.ts `otherCategoriesQuery`: every category but themes and programming languages, and none.const BUILTIN_FEATURES_QUERY: &str = "@builtin category:none category:\"ai\" category:\"azure\" category:\"chat\" category:\"data science\" category:\"debuggers\" category:\"extension packs\" category:\"education\" category:\"formatters\" category:\"keymaps\" category:\"language packs\" category:\"linters\" category:\"machine learning\" category:\"notebooks\" category:\"scm providers\" category:\"snippets\" category:\"testing\" category:\"visualization\" category:\"other\"";@@ -192,7 +200,8 @@ pub struct Pane {pub loading: bool,/// The message of an empty or failed result (`IMessage`).pub message: Option<(Severity, String)>,- pub expanded: bool,+ /// A `setExpanded` waiting for the view's pane to be laid out.+ expand: Option<bool>,pub scroll: UniformListScrollHandle,/// The gallery results behind `extensions`, merged again with the installed ones on each change.gallery: Option<Vec<GalleryExtension>>,@@ -226,8 +235,6 @@ pub struct ExtensionsViewlet {/// The focused and the selected row: pane index and row.pub focused: Option<(usize, usize)>,pub selected: Option<(usize, usize)>,- /// The expansion the user gave a view by its id.- pub expansion: HashMap<&'static str, bool>,pub(super) search_task: Option<Task<()>>,pub(super) update_check: Option<Task<()>>,}@@ -253,7 +260,6 @@ impl ExtensionsViewlet {icons: HashMap::new(),focused: None,selected: None,- expansion: HashMap::new(),search_task: None,update_check: None,}@@ -662,7 +668,7 @@ impl Workbench {total: 0,loading: false,message: None,- expanded: true,+ expand: None,scroll: UniformListScrollHandle::new(),gallery: None,pages_loaded: 0,@@ -694,25 +700,62 @@ impl Workbench {pane.total = extensions.len();pane.extensions = extensions;pane.message = pane.extensions.is_empty().then(|| (Severity::Info, "No extensions found.".to_owned()));- let expanded = self.pane_expanded(index);- self.extensions_viewlet.panes[index].expanded = expanded;- return;+ return self.extensions_pane_updated(index, true, cx);}self.load_gallery_page(index, 1, window, cx);}- /// Whether a view starts expanded: the user's choice, else collapsed for an empty recommended view of the- /// default views without installed extensions (`DefaultRecommendedExtensionsView`) and for empty- /// `OutdatedExtensionsView` and `WorkspaceRecommendedExtensionsView`.- fn pane_expanded(&self, index: usize) -> bool {- let pane = &self.extensions_viewlet.panes[index];- if let Some(expanded) = self.extensions_viewlet.expansion.get(pane.descriptor.id) {- return *expanded;+ /// `updateBody` after a view's model changes, `shown` after its `show`: `updateSize` stores the count of a+ /// `flexibleHeight` view, `OutdatedExtensionsView` expands while it lists any, and on `show`+ /// `WorkspaceRecommendedExtensionsView` and, without installed extensions, `DefaultRecommendedExtensionsView` do.+ fn extensions_pane_updated(&mut self, index: usize, shown: bool, cx: &mut Context<Self>) {+ let has_installed = self.extensions_viewlet.has_installed();+ let pane = &mut self.extensions_viewlet.panes[index];+ let count = pane.extensions.len();+ if is_flexible_view(pane.descriptor.id) {+ self.profile_storage.lock().unwrap().set(&format!("{}.size", pane.descriptor.id), count.to_string());+ }+ let expands = match pane.descriptor.kind {+ ViewKind::Outdated => true,+ ViewKind::WorkspaceRecommended => shown,+ ViewKind::DefaultRecommended => shown && !has_installed,+ _ => false,+ };+ if expands {+ pane.expand = Some(count > 0);+ }+ self.update_extensions_panes(cx);+ }++ /// extensionsViewlet.ts `layout`: the views as panes under the search header.+ pub(super) fn layout_extensions_panes(&mut self, height: f32, cx: &mut Context<Self>) {+ let views: Vec<_> = self.extensions_viewlet.panes.iter().map(|pane| (pane.descriptor.id, false)).collect();+ if views.is_empty() {+ return;}- match pane.descriptor.kind {- ViewKind::DefaultRecommended if !self.extensions_viewlet.has_installed() => !pane.extensions.is_empty(),- ViewKind::Outdated | ViewKind::WorkspaceRecommended => !pane.extensions.is_empty(),- _ => true,+ self.layout_panes(PaneContainer::Extensions, height - SEARCH_HEADER_HEIGHT, views, false, cx);+ self.update_extensions_panes(cx);+ }++ /// The laid out panes take their views' waiting `setExpanded` and `maximumBodySize`: a `flexibleHeight` view's+ /// body is 0 while its stored count is, as `updateSize` and the constructor set it.+ fn update_extensions_panes(&mut self, cx: &mut Context<Self>) {+ if !self.panes_laid_out(PaneContainer::Extensions) {+ return;+ }+ let Some(view) = self.panes(PaneContainer::Extensions).view.as_ref() else { return };+ let ids = view.ids().to_vec();+ for (index, id) in ids.into_iter().enumerate() {+ let Some(pane) = self.extensions_viewlet.panes.iter_mut().find(|pane| pane.descriptor.id == id) else { continue };+ let expand = pane.expand.take();+ let stored = self.profile_storage.lock().unwrap().get(&format!("{id}.size")).and_then(|size| size.parse::<f64>().ok()).unwrap_or(0.);+ let maximum = if is_flexible_view(id) && stored == 0. { 0. } else { f32::INFINITY };+ // numbers.ts `clamp` lets the maximum win over the minimum; the pane view's `f32::clamp` needs minimum <= maximum.+ let view = self.panes_mut(PaneContainer::Extensions).view.as_mut().expect("checked above");+ view.set_body_limits(index, MINIMUM_BODY_SIZE.min(maximum), maximum);+ if let Some(expanded) = expand {+ self.set_pane_expanded(PaneContainer::Extensions, index, expanded, cx);+ }}}@@ -762,10 +805,8 @@ impl Workbench {Ok((found, _)) => found.iter().map(|gallery| workbench.gallery_extension(gallery, &local)).collect(),Err(_) => Vec::new(),};- let expanded = workbench.pane_expanded(index);let pane = &mut workbench.extensions_viewlet.panes[index];pane.loading = false;- pane.expanded = expanded;match result {Ok((found, total)) => {pane.total = total;@@ -780,6 +821,7 @@ impl Workbench {pane.message = Some((Severity::Warning, "Unable to search the Marketplace when offline, please check your network connection.".into()));}}+ workbench.extensions_pane_updated(index, page == 1, cx);cx.notify();});})@@ -836,11 +878,8 @@ impl Workbench {let query = self.extensions_viewlet.panes[index].query.clone();let ids = self.recommendations_for(&query);if ids.is_empty() {- let expanded = self.pane_expanded(index);- let pane = &mut self.extensions_viewlet.panes[index];- pane.expanded = expanded;- pane.message = Some((Severity::Info, "No extensions found.".into()));- return;+ self.extensions_viewlet.panes[index].message = Some((Severity::Info, "No extensions found.".into()));+ return self.extensions_pane_updated(index, true, cx);}let pane = &mut self.extensions_viewlet.panes[index];pane.loading = true;@@ -873,8 +912,7 @@ impl Workbench {pane.gallery = Some(found);pane.extensions = merged;pane.message = pane.extensions.is_empty().then(|| (Severity::Info, "No extensions found.".to_owned()));- let expanded = workbench.pane_expanded(index);- workbench.extensions_viewlet.panes[index].expanded = expanded;+ workbench.extensions_pane_updated(index, true, cx);cx.notify();});})@@ -901,6 +939,7 @@ impl Workbench {pane.total = pane.total.max(extensions.len());pane.message = extensions.is_empty().then(|| (Severity::Info, "No extensions found.".to_owned()));pane.extensions = extensions;+ self.extensions_pane_updated(index, false, cx);}self.refresh_extension_editors();cx.notify();diff --git a/native/crates/app/src/workbench/extensions_view/tests.rs b/native/crates/app/src/workbench/extensions_view/tests.rsindex 003df587f64..ca254897da7 100644--- a/native/crates/app/src/workbench/extensions_view/tests.rs+++ b/native/crates/app/src/workbench/extensions_view/tests.rs@@ -51,3 +51,29 @@ fn reads_gallery_dates() {assert_eq!(iso_millis("2024-03-01T12:30:15.5Z"), Some(1_709_296_215_500.));assert_eq!(iso_millis("not a date"), None);}++/// extensionsViewlet.ts `ExtensionsViewPaneContainer`: the views are panes; an empty `OutdatedExtensionsView`+/// collapses to its header (`setExpanded(count > 0)`), and a header click stores the expansion in the container's state.+#[gpui::test]+fn the_views_are_panes_and_an_empty_outdated_view_collapses(cx: &mut gpui::TestAppContext) {+ let app_root = std::path::Path::new(env!("VSCODE_SRC")).to_path_buf();+ let themes = exthost::scan::scan_extension(&app_root.join("extensions/theme-defaults"), true).unwrap();+ let theme = crate::theme::load_theme(&[themes], "Dark Modern").unwrap();+ let (workbench, cx) = cx.add_window_view(|_, cx| {+ let mut workbench = Workbench::new(theme, app_root.clone(), None, crate::languages::Languages::new(&[]), crate::default_settings(), crate::host_sync::HostSync::new(std::sync::mpsc::channel().0), cx);+ // An empty window starts without the side bar.+ workbench.set_part_hidden(crate::workbench::layout::Part::SideBar, false, cx);+ workbench+ });+ cx.simulate_resize(gpui::size(gpui::px(1024.), gpui::px(768.)));+ workbench.update_in(cx, |workbench, window, cx| drop(workbench.execute_command("workbench.extensions.search", vec![serde_json::json!("@updates")], window, cx)));+ cx.run_until_parked();+ let outdated = cx.debug_bounds("pane-header-workbench.views.extensions.searchOutdated").expect("Available Updates is a pane");+ let recent = cx.debug_bounds("pane-header-workbench.views.extensions.searchRecentlyUpdated").expect("Recently Updated is a pane");+ assert_eq!(recent.top() - outdated.top(), gpui::px(28.), "the empty Available Updates view is its header");+ cx.simulate_click(outdated.center(), gpui::Modifiers::none());+ cx.run_until_parked();+ let state = workbench.read_with(cx, |workbench, _| workbench.workspace_storage.lock().unwrap().get("workbench.view.extensions.state").map(str::to_owned));+ let state: serde_json::Value = serde_json::from_str(&state.expect("the click stores the views' state")).unwrap();+ assert_eq!(state["workbench.views.extensions.searchOutdated"]["collapsed"], serde_json::json!(false));+}diff --git a/native/crates/app/src/workbench/scm_view.rs b/native/crates/app/src/workbench/scm_view.rsindex b91ac5e5f77..6a43c9810f0 100644--- a/native/crates/app/src/workbench/scm_view.rs+++ b/native/crates/app/src/workbench/scm_view.rs@@ -111,30 +111,6 @@ impl ScmView {}impl Workbench {- // shortcut: the Extensions view headers are drawn here, not as panes of view_panes.rs; the viewlet moves there- // with a `PaneContainer` variant.- pub(super) fn section_header(&self, title: &str, expanded: bool, separated: bool) -> Div {- let foreground = self.foreground_or("sideBarSectionHeader.foreground");- let border = self.theme.color("sideBarSectionHeader.border").or(self.theme.color("surface.border")).filter(|_| separated);- div()- .relative()- .h(px(28.))- // paneview.css: .pane-header is cursor: pointer.- .cursor_pointer()- .flex_none()- .mx(px(4.))- .pl(px(4.))- .flex()- .items_center()- .rounded(px(4.))- .bg(self.color("sideBar.background"))- .hover(|header| header.bg(self.color("list.hoverBackground")))- .text_color(foreground)- .when_some(border, |header, border| header.child(div().absolute().top_0().left(px(4.)).right(px(4.)).h(px(1.)).bg(border)))- .child(self.icon(if expanded { "chevron-down" } else { "chevron-right" }, 16., 16., foreground).mx(px(2.)))- .child(div().text_size(px(12.)).font_weight(gpui::FontWeight::SEMIBOLD).child(title.to_string()))- }-pub(in crate::workbench) fn register_scm_commands(&mut self) {self.commands.register("workbench.view.scm", |workbench, _, window, cx| {workbench.side_bar_view = super::search_view::SideBarView::Scm;diff --git a/native/crates/app/src/workbench/view_locations.rs b/native/crates/app/src/workbench/view_locations.rsindex f5d74c30cea..8334245f29c 100644--- a/native/crates/app/src/workbench/view_locations.rs+++ b/native/crates/app/src/workbench/view_locations.rs@@ -630,6 +630,7 @@ pub(super) fn pane_container(container: &'static str) -> PaneContainer {SCM_CONTAINER => PaneContainer::Scm,SEARCH_CONTAINER => PaneContainer::Search,DEBUG_CONTAINER => PaneContainer::Debug,+ super::extensions_view::VIEWLET_ID => PaneContainer::Extensions,other => PaneContainer::Generated(other),}}diff --git a/native/crates/app/src/workbench/view_panes.rs b/native/crates/app/src/workbench/view_panes.rsindex a26f73eabe2..117dd40d67f 100644--- a/native/crates/app/src/workbench/view_panes.rs+++ b/native/crates/app/src/workbench/view_panes.rs@@ -14,6 +14,7 @@ use gpui::{use serde_json::{Value, json};use super::Workbench;+use super::extensions_view::VIEWLET_ID as EXTENSIONS_CONTAINER;use super::debug_view::{BREAKPOINTS_VIEW, CALL_STACK_VIEW, DEBUG_CONTAINER, LOADED_SCRIPTS_VIEW, VARIABLES_VIEW, WATCH_VIEW};use super::view_locations::{EXPLORER_CONTAINER, SCM_CONTAINER, SEARCH_CONTAINER, SEARCH_VIEW};use super::view_visibility::container_storage_id;@@ -22,7 +23,7 @@ use crate::split_view::{SashState, SplitView, View};/// `--vscode-workbench-paneHeaderHeight` of the modern layout.pub const HEADER_SIZE: f32 = 28.;/// paneview.ts: a vertical pane's default `minimumBodySize`.-const MINIMUM_BODY_SIZE: f32 = 120.;+pub(super) const MINIMUM_BODY_SIZE: f32 = 120.;/// viewPaneContainer.ts `layout`: the modern layout's gap below the last pane, `FLOATING_PANEL_MARGIN` and the/// part's 1px border; compact density has no margin.const BOTTOM_GAP: f32 = 5.;@@ -44,6 +45,8 @@ pub(super) enum PaneContainer {Scm,Search,Debug,+ /// extensionsViewlet.ts `ExtensionsViewPaneContainer`: the panes under its search box.+ Extensions,/// A container generated for moved views (view_locations.rs), by its id.Generated(&'static str),}@@ -56,6 +59,7 @@ impl PaneContainer {PaneContainer::Scm => "scm",PaneContainer::Search => "search",PaneContainer::Debug => "debug",+ PaneContainer::Extensions => EXTENSIONS_CONTAINER,PaneContainer::Generated(id) => id,}}@@ -66,6 +70,7 @@ impl PaneContainer {PaneContainer::Scm => SCM_CONTAINER,PaneContainer::Search => SEARCH_CONTAINER,PaneContainer::Debug => DEBUG_CONTAINER,+ PaneContainer::Extensions => EXTENSIONS_CONTAINER,PaneContainer::Generated(id) => id,}}@@ -88,7 +93,10 @@ pub struct PaneView {/// The descriptors' `weight`, 20 where they set none.fn view_weight(id: &str) -> f32 {match id {- VARIABLES_VIEW | SCM_CHANGES_VIEW | SCM_HISTORY_VIEW => 40.,+ // extensionsViewlet.ts `registerViews`.+ "workbench.views.extensions.installed" => 100.,+ "workbench.views.extensions.popular" => 60.,+ VARIABLES_VIEW | SCM_CHANGES_VIEW | SCM_HISTORY_VIEW | "extensions.recommendedList" => 40.,OUTLINE_VIEW | TIMELINE_VIEW | CALL_STACK_VIEW => 30.,WATCH_VIEW => 10.,LOADED_SCRIPTS_VIEW => 5.,@@ -317,7 +325,7 @@ impl Workbench {}}- fn panes_laid_out(&self, container: PaneContainer) -> bool {+ pub(super) fn panes_laid_out(&self, container: PaneContainer) -> bool {matches!(container, PaneContainer::Explorer | PaneContainer::Scm) || self.generated_panes.contains_key(container.container_id())}@@ -371,6 +379,7 @@ impl Workbench {let mut debug = self.debug_views();debug.extend(self.shown_views_of("debug").into_iter().map(|id| (id, true)));self.layout_container(PaneContainer::Debug, height, debug, cx);+ self.layout_extensions_panes(height, cx);}/// The container's own views still in it, then the views moved into it.@@ -702,6 +711,7 @@ impl Workbench {#[allow(clippy::too_many_arguments)]fn pane_header(&self, container: PaneContainer, index: usize, id: &'static str, title: &str, description: Option<String>, actions: Option<AnyElement>, show_actions: bool, expanded: bool, count: usize, window: &Window, cx: &mut Context<Self>) -> Div {let title = crate::nls::localize_in(id, title);+ let has_actions = expanded && actions.is_some();let focus = &self.panes(container).focus[id];let focused = focus.is_focused(window);// paneview.css: the actions show on `.pane:focus-within` and with `workbench.view.alwaysShowHeaderActions`.@@ -763,6 +773,8 @@ impl Workbench {let bar = div().flex_none().ml_auto().mr(px(4.)).invisible().when(show_actions || self.pane_hovered(container, id, window), |actions| actions.visible()).child(actions);self.action_bar(id, false, Default::default(), bar, cx)}))+ // extensionsViews.ts `renderHeader`: the count badge after the actions, at the right end.+ .when(container == PaneContainer::Extensions, |header| header.children(self.extensions_view_badge(id).map(|badge| badge.when(!has_actions, |badge| badge.ml_auto())))).when(id == FILE_VIEW, |header| header.child(self.explorer_title_actions(window, cx))).when(focused && self.panes(container).pointer_focused != Some(id), |header| header.child(div().absolute().inset_0().rounded(px(4.)).border_1().border_color(self.color("focusBorder")))).on_click(cx.listener(move |workbench, event: &gpui::ClickEvent, window, cx| {diff --git a/native/crates/app/src/workbench/view_visibility.rs b/native/crates/app/src/workbench/view_visibility.rsindex bd4af801c68..84e53dd3a08 100644--- a/native/crates/app/src/workbench/view_visibility.rs+++ b/native/crates/app/src/workbench/view_visibility.rs@@ -31,6 +31,7 @@ pub(super) fn container_storage_id(container: &str) -> String {"debug" => "workbench.view.debug.state".into(),"search" => "workbench.view.search.state".into(),"test" => "workbench.view.extension.test.state".into(),+ super::extensions_view::VIEWLET_ID => format!("{}.state", super::extensions_view::VIEWLET_ID),generated if super::view_locations::is_generated_container(generated) => format!("{generated}.state"),other => format!("workbench.view.extension.{other}.state"),}diff --git a/port/ledger.md b/port/ledger.mdindex 068b73191bb..a1654545588 100644--- a/port/ledger.md+++ b/port/ledger.md@@ -28,7 +28,7 @@ Status: `open`, `in progress`, `waiting on Artur`, `later` (postponed), `done`,| Milestones | M11 workbench layout and chrome | in progress | The part grid with sashes and hidden parts, panel and secondary side bar, view containers and collapsible views, tree views from extensions (with the Refactor Preview of workbench/contrib/bulkEdit, which file operation participants open), editor groups and splits, notifications, dialogs (native open/save), progress, banner, status bar entries from extensions, decorations, window lifecycle (close, quit, hot exit backup), multiple windows, focus and inactive look. Open gaps: the gaps column of its unit rows. | api-tests `window.test` (messages, progress, tree views, status bar) pass as in the reference; pixel-check gains a window with panel and split editor; hot exit restores an unsaved buffer after quit. || Milestones | M12 files, explorer, search, workspace | in progress | File system service with watcher (FSEvents) and extension file system providers, Explorer file operations (new, rename, delete to Trash, drag and drop, copy/paste), Seti file icons, numeric name collation, workspace trust, multi-root `.code-workspace`, recent workspaces, text search through ripgrep, search view and search editor, bulk edits, local history, opener and URL handling. Open gaps: the gaps column of its unit rows. | api-tests `workspace.test`, `workspace.fs.test`, `workspace.event.test`, `workspace.tasks` excluded, and the api-workspace suite pass as in the reference; pixel-check folder window with Seti icons (reference captured without `workbench.iconTheme: null`); `cargo test -p app` sorting test with `file9`/`file10`. || Milestones | M13 language features | in progress | Everything `MainThreadLanguageFeatures` registers, drawn by the native editor: completion, hover, signature help, code actions and lightbulb, code lens, inlay hints, go to definition and peek, references, rename, formatting, document symbols and Outline, semantic tokens, semantic word highlight, links, color picker, linked editing, snippets, call and type hierarchy, inline completions from extensions; diagnostics with squiggles and the Problems panel; comments threads; Emmet; the language status item. Open gaps: the gaps column of its unit rows. | api-tests `languages.test`, `languagefeatures.test`-family and `comments` cases pass as in the reference; with `src/main.ts` open TypeScript completion, hover, go to definition and a diagnostic squiggle work (pixel-check window with a squiggle and the suggest widget). |-| Milestones | M14 source control and diff | in progress | SCM view and input box, quick diff gutter, the diff editor (side by side and inline), multi-file diff, merge editor and merge-conflict decorations, timeline, the git, git-base and github extensions fully working (no sign-in: github features that need a token stay off). Open gaps: the gaps column of its unit rows. | api-tests SCM cases pass as in the reference; with the fixture copied into a git repository the SCM view lists a changed file and opening it shows the diff (pixel-check window). |+| Milestones | M14 source control and diff | done | SCM view and input box, quick diff gutter, the diff editor (side by side and inline), multi-file diff, merge editor and merge-conflict decorations, timeline, the git, git-base and github extensions fully working (no sign-in: github features that need a token stay off). Open gaps: the gaps column of its unit rows. | api-tests SCM cases pass as in the reference; with the fixture copied into a git repository the SCM view lists a changed file and opening it shows the diff (pixel-check window). || Milestones | M15 terminal, tasks, output | done | Integrated terminal (PTY from Rust, VT parser and renderer in GPUI), shell integration, extension terminals and pseudoterminals, tasks and problem matchers, npm/grunt/gulp/jake task providers, external terminal, Output panel and log viewer. Open gaps: the gaps column of its unit rows. | api-tests `terminal.test`, `terminal.shellIntegration.test` and `workspace.tasks.test` pass as in the reference (run with `SHELL=/bin/bash` as the baseline was); `npm: build` task from the fixture runs in a terminal. || Milestones | M16 debug and testing | in progress | Debug adapter protocol client, launch.json, breakpoints in the gutter, call stack, variables, watch, debug console, JS debugger (`ms-vscode.js-debug`), Test Explorer and test results. Open gaps: the gaps column of its unit rows. | api-tests `debug.test` and testing cases pass as in the reference; a breakpoint in a Node script from the fixture stops and shows variables. || Milestones | M17 webviews and notebooks | in progress | A WKWebView embedded in the GPUI window for webview panels, webview views and custom editors, with the upstream message and resource protocol; Markdown preview, image/media preview, simple browser, editor insets; notebooks (ipynb) with renderers and kernels. Open gaps: the gaps column of its unit rows. | api-tests `webview.test`, `customEditor` and `notebook*.test` cases pass as in the reference; Markdown preview of the fixture README draws next to its source. |@@ -482,7 +482,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| workbench/contrib/emergencyAlert | workbench contribution | | removed | | no AI or Microsoft services by decision (port/notes.md); API stays inert || workbench/contrib/emmet | workbench contribution | M13 | verified | | workbench/emmet.rs: Emmet: Expand Abbreviation (`emmet.expandAbbreviation` with the language at the cursor and the emmet parent mode of its grammar's scope, emmetAction.test.ts cases), Tab with `emmet.triggerExpansionOnTab`, the Edit menu entry: cargo test -p app emmet menubar || workbench/contrib/encryption | workbench contribution | M10 | n/a | | encryption.contribution.ts only migrates Linux `password-store` argv values to gnome-libsecret; the port runs on macOS and keeps secrets in the Keychain |-| workbench/contrib/extensions | workbench contribution | M18 | verified | | Extensions view, queries, details editor, enablement, updates, badge, Help: Start/Continue/Stop Extension Bisect (services/extensionManagement/browser/extensionBisect.ts: state in the application storage across reloads, bisect-disabled extensions as DisabledByEnvironment in the window and out of the host, the urgent sticky prompt, the default-checked Keep this extension disabled; Report Issue & Continue is out with the removed contrib/issue): cargo test -p app extension_bisect, bisect_finds_the_extension_and_keeps_it_disabled; cargo test -p app extension (extensionsViews.test.ts, extensionQuery.test.ts, extensionEnablementService.test.ts cases); Features tab tables and markdown of extensionFeaturesTab.ts and the registered renderers: cargo test -p app extension_features; Runtime Status Uncaught Errors from `$onExtensionRuntimeError` and Messages: cargo test -p app the_runtime_status_lists_uncaught_errors_and_messages, invalid_contributed, static_entries_need_the_proposal, group_needs_the_proposal, debuggers_merge_by_type_and_keep_the_built_in_values, skipped_menu_contributions_are_extension_messages, contributed_command_messages, invalid_views_and_view_containers_are_extension_messages, invalid_configuration_is_an_extension_message, invalid_json_validation_is_an_extension_message, invalid_colors_and_icons_are_extension_messages, invalid_semantic_token_contributions_are_extension_messages, invalid_problem_patterns_and_matchers_are_extension_messages, invalid_grammars_are_extension_messages, invalid_notebook_contributions_are_extension_messages (the authentication point is out with the removed services/authentication); ui-pair port/fixtures/extensions/ui-view.json (view, search, details) against the reference |+| workbench/contrib/extensions | workbench contribution | M18 | verified | | Extensions view as view panes (cargo test -p app the_views_are_panes; ui-pair port/fixtures/extensions/ui-view.json), queries, details editor, enablement, updates, badge, Help: Start/Continue/Stop Extension Bisect (services/extensionManagement/browser/extensionBisect.ts: state in the application storage across reloads, bisect-disabled extensions as DisabledByEnvironment in the window and out of the host, the urgent sticky prompt, the default-checked Keep this extension disabled; Report Issue & Continue is out with the removed contrib/issue): cargo test -p app extension_bisect, bisect_finds_the_extension_and_keeps_it_disabled; cargo test -p app extension (extensionsViews.test.ts, extensionQuery.test.ts, extensionEnablementService.test.ts cases); Features tab tables and markdown of extensionFeaturesTab.ts and the registered renderers: cargo test -p app extension_features; Runtime Status Uncaught Errors from `$onExtensionRuntimeError` and Messages: cargo test -p app the_runtime_status_lists_uncaught_errors_and_messages, invalid_contributed, static_entries_need_the_proposal, group_needs_the_proposal, debuggers_merge_by_type_and_keep_the_built_in_values, skipped_menu_contributions_are_extension_messages, contributed_command_messages, invalid_views_and_view_containers_are_extension_messages, invalid_configuration_is_an_extension_message, invalid_json_validation_is_an_extension_message, invalid_colors_and_icons_are_extension_messages, invalid_semantic_token_contributions_are_extension_messages, invalid_problem_patterns_and_matchers_are_extension_messages, invalid_grammars_are_extension_messages, invalid_notebook_contributions_are_extension_messages (the authentication point is out with the removed services/authentication); ui-pair port/fixtures/extensions/ui-view.json (view, search, details) against the reference || workbench/contrib/externalTerminal | workbench contribution | M15 | verified | | workbench/external_terminal.rs: Open New External Terminal (`workbench.action.terminal.openNativeConsole`, cmd+shift+c), with several workspace folders after the Select workspace folder pick (cargo test -p app open_native_console_picks_a_folder_in_a_multi_root_workspace); cargo test -p app external_terminal; ui-pair (port/results/terminal.md) || workbench/contrib/externalUriOpener | workbench contribution | M12 | verified | | workbench/opener.rs: externalUriOpenerService.ts getRequestedOpener (workbench.externalUriOpeners globs), chooseOpener, "How would you like to open: {0}" picker; no Simple Browser (out of scope); verified at port-m12b-verify: cargo test -p app opener 4/4; Simple Browser is out of scope by decision || workbench/contrib/files | workbench contribution | M12 | ported | [3 M] Files m12: non-file workspace folders | Cmd+V pastes the files another app copied after explorer.confirmPasteNative (explorerView.ts paste listener, fileActions.ts `pasteFileHandler`: cargo test -p app cmd_v_pastes_the_files_finder_copied); Dragged workspace roots reorder before or after a root by the pointer's half, or to the end, with the list.dropBetweenBackground line (explorerViewer.ts `doHandleRootDrop`: cargo test -p app dragging_a_root_reorders_the_workspace_folders; ui-pair dragShot of a three-root workspace, line over a root and below the rows matches); Compact folders off while optimized for a screen reader (explorerView.ts `isCompressionEnabled`: cargo test -p app compacts_single_child_folders_into_one_row); A workspace root that fails to resolve: the single folder's file item of its own resource, the "!" decoration in `list.invalidItemForeground` with "Unable to resolve workspace folder (...)" (explorerViewer.ts `getChildren`, explorerDecorationsProvider.ts: cargo test -p app a_workspace_root_that_fails_to_resolve_is_decorated_with_its_error; ui-pair of a two-root workspace with a missing folder, row and hover match); a copy soft-reverts the target's dirty model, which shows the copied file (workingCopyFileService.ts `doMoveOrCopy`: cargo test -p app a_copy_onto_a_dirty_model_reverts_it_to_the_copied_file); An unreadable folder expands to no children without an error (fileService.ts `toFileStat`: cargo test -p app an_unreadable_folder_expands_to_no_children); Explorer tree read from disk (explorer.rs): folders first, default excludes, click to expand, click opens a file as preview, double click pins, selection follows the active editor; Seti file icons and compareFileNamesDefault sort; workspace folders as roots, first five expanded (cargo test -p app); new file and folder, rename, delete, copy, cut, paste, drag and drop and undo through the working copy file operations (cargo test -p app explorer_actions, file_actions); "Do not ask me again" as the NSAlert suppression checkbox (dialog.rs); the context menu with the items whose commands the port has (port/results/contextmenu.md); tree view state in workspace storage (cargo test -p app view_state); file nesting with the explorerFileNestingTrie.test.ts cases (cargo test -p app nest); copyFilePath, copyRelativeFilePath and revealFileInOS (cargo test -p app copy_path, copied_path_labels); compact folders (cargo test -p app compact, get_context, compressed_navigation); Explorer find (cargo test -p app explorer_find find_filters); Finder drops through ExternalFileImport (cargo test -p app files_dropped_from_finder); explorer.sortOrder and sortOrderLexicographicOptions; explorer.autoReveal; list keyboard commands; the view title actions on hover or focus, revealInExplorer, showActiveFileInExplorer and the other file actions (cargo test -p app view_title_and_file_actions); workbench.action.files.newFile and showOpenedFileInNewWindow (cargo test -p app new_file_creates); Add Folder to Workspace and removeRootFolder (workbench/workspace_editing.rs, ui-pair port/fixtures/ui-pair/m12/workspace-folders.json); the compare commands compareFiles, selectForCompare, compareSelected, compareFileWith, compareWithSaved, compareWithClipboard, compareNewUntitledTextFiles (workbench/file_compare.rs: cargo test -p app file_compare); compare with saved by its chord: ui-pair port/fixtures/ui-pair/m12/compare-saved.json (the modified side has its own editor and cursor, at the first change: cargo test -p app file_compare; left the breadcrumbs editor type picker); Find in Folder..., Open in Integrated/External Terminal (cargo test -p app explorer_actions; ui-pair m12/find-in-folder.json and m12/folder-terminal.json), high contrast list outline (icons.json hc matches); rename, delete, new file and drag and drop with its move confirmation: ui-pair m12/explorer-ops.json matches; `<view id>.focus` of the Explorer panes (cargo test -p app focus_view_commands); the editor placeholders: binary, too large, not found and read errors with their actions (cargo test -p app files_that_do_not_resolve; ui-pair m12/editor-placeholders.json matches); the Open Editors view: pane size limits, group rows, unsaved badge, title actions, row close and dirty actions, drag to groups (cargo test -p app open_editors body_limits_clamp; ui-pair m12/open-editors.json); pinned (sticky) editors and scrolling tab bars, sticky shrink tabs in place with the `m…` label (cargo test -p app sticky pinned_editors tab_scroll; ui-pair m12/tab-scroll.json); Explorer indent guides at the reference x, row hover background, decoration badges at 11px 8px from the end, the Unpin Editor hover again after the tab menu closes (cargo test -p app tree_guides hover unpin_hover; ui-pair m12/explorer-guides.json and m12/pinned-tabs.json match). Differences left (port/notes.md milestone 12, session m12-files-done): a long tooltip breaks one path segment earlier (GPUI's line wrapper), the pin action loses its hover style after Cmd+W until the pointer moves (gpui keyboard modality), a shrink sticky tab with a badge and no room for its name; Open With... (`explorer.openWith`, `explorerResourceAvailableEditorIds`: cargo test -p app open_with_opens_the_resource the_context_menu_selects_the_row); Compare Active File With... from a file it opens itself: ui-pair m12/compare.json, the picker, the diff and the README.md menu match (port/notes.md session compare-fix); `explorerResourceReadonly` and `explorerResourceParentReadOnly` from `isReadonly` (cargo test -p app readonly_keys_follow_the_focused_item_and_its_parent); a failed create as an error notification with Retry, a dropped folder added to the workspace (cargo test -p app a_failed_create_offers a_folder_dropped_on_the_root) |@@ -529,7 +529,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| workbench/contrib/remoteTunnel | workbench contribution | | removed | | no sign-in/AI by decision (port/notes.md); not ported || workbench/contrib/replNotebook | workbench contribution | M17 | verified | | verified (session m17d): cargo test -p app repl; ui-pair m17/interactive-restart.json with replPair.open repl (executed, restored, executed again, status bar) matches (/tmp/m17f); repl_notebook.rs: `$tryShowNotebookDocument` with view type `repl` (ReplEditorInput: one editor per notebook, `ensureInputBoxCell`, `REPL - N` label or `asRepl` label, scratchpad close without asking, soft revert on dispose, tab kind 4 `jupyter-notebook` editor `repl`, `debug-line-by-line` icon), the last cell as the input box under the list of the others (interactive.rs draws and runs both), `repl.execute` (insert before the input), `repl.input.focus`, `repl.focusLastItemExecuted`, `mostRecentReplEditor`, editors delta `viewType: repl`: cargo test -p app repl_notebook, ui-pair m17/interactive-window.json (replPair.open repl). The REPL editor comes back after a reload (ReplEditorSerializer `workbench.editorinputs.replEditorInput`, notebooks.rs). REPL hot exit (ReplWindowWorkingCopyEditorHandler: `notebook/<type>/repl` backups, a REPL editor opened on the restored notebook): cargo test -p app a_repl_backup_opens_a_repl_editor. Not done: the status bar while the REPL input has the focus (reference: `LF` only, then `Spaces: 4 LF Cell 1 of 1`; port: `Ln 1, Col 1 Spaces: 4 LF`), ui-pair m17/interactive-window.json (replPair.open repl) || workbench/contrib/sash | workbench contribution | M11 | verified | | `workbench.sash.size` (editor group sashes 4..20, their highlight 1..8; the part grid's sashes are its 4px gaps) and `workbench.sash.hoverDelay` on every sash (part grid, view panes, editor groups, find widget, keybindings table), three-dot grippers on the part sashes with `workbench.sash.autoHideGrippers` and its delay (part_grid.rs); cargo test -p app part_grid; verified: ui-pair hot-exit.json `sash` vs the reference (port/results/windows.md, milestone 11 verification) |-| workbench/contrib/scm | workbench contribution | M14 | ported | [3 L] scm_view.rs:116: the Extensions views are headers drawn by `section_header`, not view_panes panes (no sashes, header drag or stored sizes); the Extensions viewlet's own expansion rules (extensions_view.rs) move onto `PaneView` | SCM view: input box, action button, groups, resources with decorations, inline and title actions, activity badge, status bar commands (workbench/scm_view.rs); same-named repositories told apart by labels.ts `shorten` of their parent folders (quick_input.rs `shorten` with labels.test.ts's posix cases): cargo test -p app shorten_cuts same_named_repositories; quick diff gutter and peek (quick_diff.rs, quick_diff_widget.rs), multiple repositories, tree view mode and sort (scm_tree.rs), Graph view (scm_history.rs, scm_graph_view.rs) with its history item ref picker and filters (scm_graph_view/ref_picker.rs; ui-pair m11/scm-graph-refs.json), view actions (scm_actions.rs), editor commands run from the resource row: cargo test -p app scm; Graph subjects draw their `$(icon)`s (cargo test -p app a_subject_draws_its_icons); Repositories view with selection modes, sort keys, nested repositories and explorer mode's artifact groups, folders and artifacts with their menus (scm_repositories_view.rs; cargo test -p app the_repositories_ explorer_mode_), its Shift+click range and list keys (cargo test -p app the_repositories_tree_takes_shift_clicks_and_keys), Escape and `list.toggleSelection` (cargo test -p app escape_and_toggle_selection_leave_the_shown_repositories), the lone repository's expansion and `scm.repositoriesViewState` (cargo test -p app lone_repository), the shown repositories and sort key across sessions (cargo test -p app the_shown_repositories_come_back_with_their_sort_key), inline submenus with their contributed icon (cargo test -p app an_inline_submenu_opens_with_the_toolbar_arguments extension_submenus), the Repositories rows' inset, indent guides and "..." (cargo test -p app the_repositories_rows_draw_inset_guides_and_more_actions) |+| workbench/contrib/scm | workbench contribution | M14 | verified | | SCM view: input box, action button, groups, resources with decorations, inline and title actions, activity badge, status bar commands (workbench/scm_view.rs); same-named repositories told apart by labels.ts `shorten` of their parent folders (quick_input.rs `shorten` with labels.test.ts's posix cases): cargo test -p app shorten_cuts same_named_repositories; quick diff gutter and peek (quick_diff.rs, quick_diff_widget.rs), multiple repositories, tree view mode and sort (scm_tree.rs), Graph view (scm_history.rs, scm_graph_view.rs) with its history item ref picker and filters (scm_graph_view/ref_picker.rs; ui-pair m11/scm-graph-refs.json), view actions (scm_actions.rs), editor commands run from the resource row: cargo test -p app scm; Graph subjects draw their `$(icon)`s (cargo test -p app a_subject_draws_its_icons); Repositories view with selection modes, sort keys, nested repositories and explorer mode's artifact groups, folders and artifacts with their menus (scm_repositories_view.rs; cargo test -p app the_repositories_ explorer_mode_), its Shift+click range and list keys (cargo test -p app the_repositories_tree_takes_shift_clicks_and_keys), Escape and `list.toggleSelection` (cargo test -p app escape_and_toggle_selection_leave_the_shown_repositories), the lone repository's expansion and `scm.repositoriesViewState` (cargo test -p app lone_repository), the shown repositories and sort key across sessions (cargo test -p app the_shown_repositories_come_back_with_their_sort_key), inline submenus with their contributed icon (cargo test -p app an_inline_submenu_opens_with_the_toolbar_arguments extension_submenus), the Repositories rows' inset, indent guides and "..." (cargo test -p app the_repositories_rows_draw_inset_guides_and_more_actions) || workbench/contrib/screenshotTool | workbench contribution | | removed | | Artur: internal infrastructure or developer tool with no 1:1 counterpart in the native port || workbench/contrib/scrollLocking | workbench contribution | M14 | verified | | workbench/scroll_locking.rs: Toggle and Hold Locked Scrolling and the prominent `status.scrollLockingEnabled` entry: cargo test -p app scroll_locking; a locked wheel scroll moves every other visible editor as far from its position when tracked (`onDidEditorPaneScroll`; cargo test -p app a_locked_scroll_moves_every_other_visible_editor); Hold locks while its key is down and unlocks on the key up (keybindingService.ts `enableKeybindingHoldMode`; cargo test -p app a_held_key_locks_scrolling_until_it_goes_up); without a focused element Hold toggles, as the key up reaches the workbench through the focus path || workbench/contrib/search | workbench contribution | M12 | verified | | Search view (workbench/search_view.rs, search_actions.rs) and its model (search_model.rs): cargo test -p app search_model (searchResult, fileMatch and replace tests) and workbench::search_actions (context menu, input history, hover right click, the replace preview opened and updated with the replace string), port/tools/ui-pair frames match the reference in dark, light and hc (port/notes.md milestone 12); anythingQuickAccess.ts file picks: cargo test -p app anything_quick_access quick_open. No notebook or AI results; Find in Folder from the Explorer (cargo test -p app find_in_folder; ui-pair m12/find-in-folder.json with `search.mode` newEditor matches); ui-pair m12/search-replace.json (query, Replace input, preview) matches; the message words at their exact widths, so "2 results in 2 files - Open in editor" fits one line as in the reference (cargo test -p app the_message_words_take_their_exact_width; pair: same box, 408 device px wide) |diff --git a/port/notes.md b/port/notes.mdindex e337ca7ed6c..8da1c27f76e 100644--- a/port/notes.md+++ b/port/notes.md@@ -588,7 +588,7 @@ Scope (roadmap section 13): diagnostics, hover, completion, go to definition and- Panel and secondary side bar (`workbench/panel.rs`; panelPart.ts, auxiliaryBarPart.ts, paneCompositePart.ts): cards with a 32px composite title (view tabs, Maximize/Restore and Close for the panel, Toggle Maximized and Hide for the secondary side bar) over the active view or "Drag a view here to display.". Views register with `register_panel_view(PanelView { id, title, render })`; the active one is `workbench.panelpart.activepanelid` (`workbench.auxiliarybar.activepanelid` in the secondary side bar) in workspace storage. Commands: Toggle Panel (Cmd+J), Close Panel, Toggle Maximized Panel (the editor column's editor view hidden), Toggle Secondary Side Bar (Alt+Cmd+B), Close Secondary Side Bar, Maximize/Restore/Toggle Maximized Secondary Side Bar (layout.ts `setAuxiliaryBarMaximized`: side bar, panel and editor hidden and brought back as they were, the bar back at `auxiliaryBar.lastNonMaximizedSize`; showing another part or hiding the bar leaves the state first). Context keys `panelVisible`, `panelMaximized`, `panelPosition`, `panelAlignment`, `auxiliaryBarVisible`, `auxiliaryBarMaximized`. A composite tab dragged onto the other part moves its container there (`moveViewContainerToLocation`, `views.customizations` in profile storage, only moved containers kept) and opens it; the panel falls back to Terminal. While a tab is over a part without an active view, its title and message take `editorGroup.dropBackground`; over a part with one there is no feedback (the composite bar's insertion markers and reordering are not ported), and the drag shows the tab's label as GPUI's drag preview where Chromium's OS drag image is not in a window capture. Filter views (Problems, Output, Comments) put their filter at the top of the view when it is narrower than 600px and taller than 100px (viewPane.ts `shouldShowFilterInHeader`), its badge hidden below 400px. Tabs take Chromium's fractional text widths: GPUI rounds a text element's width up, which made the Problems tab with its badge 2px wider. Not ported: moving side bar containers or single views (Move View), the title's actions-grow relayout is approximated (`tabs_that_fit`).- Side bar card and compact activity bar (`workbench/side_bar.rs`): with `workbench.activityBar.location` `top` or `bottom` the view containers are 36x32 tabs in the side bar's header or footer on the tab strip's background, and the Manage gear moves to the title bar (`workbench.action.activityBarLocation.top`/`.bottom`).- Empty window Explorer (`workbench/empty_view.rs`; emptyView.ts, explorerViewlet.ts): No Folder Opened expanded with "You have not yet opened a folder." and Open Folder, plus the `noFolderButEditorsHelp` line while editors are open. `workbench.action.files.openFolder` picks a folder and relaunches the binary with this window's flags and the folder, then quits (as upstream replaces the window). shortcut: with unsaved editors this window stays open (hot exit is item 5); the git extension's Clone Repository welcome item and `workbench.action.addRootFolder` are not ported.-- View panes (`workbench/view_panes.rs`; paneview.ts, viewPaneContainer.ts, viewContainerModel.ts): the Explorer's views (the folder's or No Folder Opened, Outline, Timeline) and Source Control's (Changes, Graph while the active repository has a history provider, contributed views collapsed) in a split view per `PaneContainer`, a collapsed pane its 28px header, an expanded one at least the header and 120px. A header click, Enter or Space toggles, Left collapses, Right expands, Up and Down move between headers; an expanded pane comes back at its last size. Sashes between panes as the grid's (300 ms hover, mac cursors). Dragging a header onto another pane moves it before or after that pane by the half it is over, with the `sideBar.dropBackground` overlay (dashed `contrastActiveBorder` outline in high contrast). State as `ViewDescriptorsState`: collapsed and size per view in workspace storage `workbench.explorer.views.state` (`workbench.scm.views.state`), order in profile storage `<storageId>.hidden`. A single view merges into the container (`mergeViewWithContainerWhenSingleView`): no header, the composite title is its `singleViewPaneContainerTitle` ("Source Control") or "Container: View", its actions beside it. A header's actions show on hover, with focus in the header or the body (`:focus-within`), for Graph whenever expanded (`ViewPaneShowActions.WhenExpanded`), or with `workbench.view.alwaysShowHeaderActions`; a header focused by a click has no outline (`:focus-visible`). The Changes header carries SCMTitle's navigation actions and "..." (`isHiddenByDefault` View as List/Tree not listed: no toolbar menu shows a hidden action); the container title's "..." is the Views submenu. ui-pair port/fixtures/ui-pair/m11/scm-panes.json (FOLDER: port/fixtures/workspace as a git repository with two commits and notes.txt changed): the Changes and Graph headers with their actions, Graph collapsed, Changes collapsed, as the reference. Session m11f, the pair again with FOLDER a git repository of port/fixtures/workspace (two commits, notes.txt changed; the script makes it in /tmp): the Changes group row and resource rows at the reference's x (group twistie 7px further in and the label 3px after it, resource icon 4px past its indent, measured), the Graph header's "Auto" ref picker (`SCMHistoryItemRefsActionViewItem` of the 'auto' filter: `git-branch`, "Auto" at 11px in `icon.foreground`, the current, remote and base refs as tooltip), disabled header actions at 0.4 opacity (git.pullRef without a remote), the decoration letter in `gitDecoration.*` colors and the name in the row's foreground (`fileDecorations: { colors: false }`), from contributed colors (theme.rs `extension_colors`, colorExtensionPoint.ts). Since the fourth pass equal there too: the header actions 24px apart with the title ellipsized ("Gr..."), `git-fetch` drawn as `repo-fetch` (codicons.ts registers it again at 0xec1d over codiconsLibrary.ts's 0xecb2), and the Graph pane 3px above the middle (`computeInitialSizes` shares the container's height with its 5px bottom gap). The Run and Debug, Extensions and webview containers still use `section_header`.+- View panes (`workbench/view_panes.rs`; paneview.ts, viewPaneContainer.ts, viewContainerModel.ts): the Explorer's views (the folder's or No Folder Opened, Outline, Timeline) and Source Control's (Changes, Graph while the active repository has a history provider, contributed views collapsed) and the Extensions viewlet's (extensionsViewlet.ts: below its 41px search header, one view merged with the container; `flexibleHeight` Installed and Recommended store their count as `{id}.size` and take no body while it is 0, Outdated expands while it lists any, Workspace Recommendations and, without installed extensions, Recommended expand on show if not empty; header count badges except Popular's, Update All Extensions and the workspace recommendation actions always shown; `cargo test -p app the_views_are_panes`) in a split view per `PaneContainer`, a collapsed pane its 28px header, an expanded one at least the header and 120px. A header click, Enter or Space toggles, Left collapses, Right expands, Up and Down move between headers; an expanded pane comes back at its last size. Sashes between panes as the grid's (300 ms hover, mac cursors). Dragging a header onto another pane moves it before or after that pane by the half it is over, with the `sideBar.dropBackground` overlay (dashed `contrastActiveBorder` outline in high contrast). State as `ViewDescriptorsState`: collapsed and size per view in workspace storage `workbench.explorer.views.state` (`workbench.scm.views.state`), order in profile storage `<storageId>.hidden`. A single view merges into the container (`mergeViewWithContainerWhenSingleView`): no header, the composite title is its `singleViewPaneContainerTitle` ("Source Control") or "Container: View", its actions beside it. A header's actions show on hover, with focus in the header or the body (`:focus-within`), for Graph whenever expanded (`ViewPaneShowActions.WhenExpanded`), or with `workbench.view.alwaysShowHeaderActions`; a header focused by a click has no outline (`:focus-visible`). The Changes header carries SCMTitle's navigation actions and "..." (`isHiddenByDefault` View as List/Tree not listed: no toolbar menu shows a hidden action); the container title's "..." is the Views submenu. ui-pair port/fixtures/ui-pair/m11/scm-panes.json (FOLDER: port/fixtures/workspace as a git repository with two commits and notes.txt changed): the Changes and Graph headers with their actions, Graph collapsed, Changes collapsed, as the reference. Session m11f, the pair again with FOLDER a git repository of port/fixtures/workspace (two commits, notes.txt changed; the script makes it in /tmp): the Changes group row and resource rows at the reference's x (group twistie 7px further in and the label 3px after it, resource icon 4px past its indent, measured), the Graph header's "Auto" ref picker (`SCMHistoryItemRefsActionViewItem` of the 'auto' filter: `git-branch`, "Auto" at 11px in `icon.foreground`, the current, remote and base refs as tooltip), disabled header actions at 0.4 opacity (git.pullRef without a remote), the decoration letter in `gitDecoration.*` colors and the name in the row's foreground (`fileDecorations: { colors: false }`), from contributed colors (theme.rs `extension_colors`, colorExtensionPoint.ts). Since the fourth pass equal there too: the header actions 24px apart with the title ellipsized ("Gr..."), `git-fetch` drawn as `repo-fetch` (codicons.ts registers it again at 0xec1d over codiconsLibrary.ts's 0xecb2), and the Graph pane 3px above the middle (`computeInitialSizes` shares the container's height with its 5px bottom gap). The Run and Debug, Extensions and webview containers still use `section_header`.- Text models and editors (coordinator decision, option A): `TextModel` (document, version, undo stack, guides, markers, host reference) is shared as `SharedModel = Rc<RefCell<TextModel>>` by every editor of its resource in any group; `OpenEditor` keeps the view state (selections, scroll, folding, highlights, view zones). An edit is logged on the model (`TextModel.edits`, 1000 replaces); an editor of another group follows it in `sync_with_model` (cursors tracked as decorations are, else clamped), run each frame and on group activation.- Editor groups (`editor_grid.rs`, `workbench/editor_groups.rs`; gridview.ts, grid.ts, editorPart.ts, editorCommands.ts): `EditorGroup` holds the active group in its fields and the others in `other_groups`; `activate_group` swaps them, and another group draws through the same editor code while swapped in (`with_group`, `drawing_inactive` leaves out its focus, input handler and widgets; a press activates it first). Models, diffs, disposed models and view states are the part's. The host sees one text editor per group showing one (`editorPosition` = grid order) and every group in `$acceptEditorTabModel`; tab ids start with the group id. A tab drags within its group, onto another group's tabs, or onto a group's body, whose edges split it (editorDropTarget.ts `getSplitDirection`, `split_direction`). The grid and each group's file editors (tab order, MRU, preview) persist in the workspace memento `memento/workbench.parts.editor` under `editorpart.state` in upstream's JSON shape, saved on every editor change and restored with the workspace state (`editor_groups/part_state.rs`; the `sticky` count per group restores pinned file and notebook editors; other editor kinds and locked groups store `locked`). shortcut: `$closeTab` across several groups at once is not ported yet.- History (`navigation.rs`, `workbench/history_actions.rs`; historyService.ts): the three navigation stacks per `workbench.editor.navigationScope` key, fed by editor changes (`editors_changed`), cursor moves (`cursors_changed`, source to reason as textEditor.ts) and edits. Reopen Closed Editor keeps file editors only (a diff or untitled editor has no reopenable input in the port). shortcut: mouse buttons 4 and 5 (`workbench.editor.mouseBackForwardToNavigate`) are not read.diff --git a/port/results/extensions.md b/port/results/extensions.mdindex 3230a3fdaef..1517813c424 100644--- a/port/results/extensions.md+++ b/port/results/extensions.md@@ -36,7 +36,7 @@ Run on the Mac Studio from the m18b-gallery mirror.- `cargo test -p app -- nls localization recommendation extension`: 49 passed (extensionsViews.test.ts and extensionQuery.test.ts queries, extensionEnablementService.test.ts states, extensions.json from `.vscode/` and `.vsrustium/`, prompt text, NLS index, Configure Display Language items). `cargo test -p exthost -- language_packs scan`: 5 passed.- `ONLY=port port/tools/ui-pair /tmp/m18-port port/fixtures/extensions/ui-view.json dark` against the reference shots of `REF=~/Developer/vscode-ref-openvsx` (product.overrides.json pointing at open-vsx.org): default views (Installed 0, Popular, Recommended), the `yaml` search (Marketplace view, rows with installs, rating, Install and Install Pre-Release) and the YAML details editor (header, Details README, Marketplace, Categories, Resources) match; the port wraps the Marketplace table's values at a different width.-- Workspace recommendations: `.vscode/extensions.json` with `redhat.vscode-yaml` and `rust-lang.rust-analyzer`, `port/fixtures/extensions/ui-recommendations.json`. Reference and port (`ONLY=port` against the reference shots) both show the prompt "Do you want to install the recommended extensions from rust-lang and Red Hat for this repository?" (Install, Show Recommendations, gear) 8 s after start and the Recommended view with 2 entries, YAML then rust-analyzer. The port's Popular view takes less height above it than the reference's. cua-driver cannot type `@`, so the `@recommended` search is covered by `cargo test -p app extension` only.+- Workspace recommendations: `.vscode/extensions.json` with `redhat.vscode-yaml` and `rust-lang.rust-analyzer`, `port/fixtures/extensions/ui-recommendations.json`. Reference and port (`ONLY=port` against the reference shots) both show the prompt "Do you want to install the recommended extensions from rust-lang and Red Hat for this repository?" (Install, Show Recommendations, gear) 8 s after start and the Recommended view with 2 entries, YAML then rust-analyzer. The port's Popular view takes less height above it than the reference's; with the views as view panes (audit of view panes) the default views match the reference's (`port/fixtures/extensions/ui-view.json`: Installed 0, Popular, Recommended collapsed at the same height). cua-driver cannot type `@`, so the `@recommended` search is covered by `cargo test -p app extension` only.- Display language: with MS-CEINTL.vscode-language-pack-de from Open VSX in `--extensions-dir`, the first start writes `languagepacks.json` (`["de"]`); `--locale de` then shows the Command Palette in German ("Alle Befehle anzeigen", "Ansehen: Erweiterungen anzeigen") and the Outline and Timeline panes as "Gliederung" and "Zeitachse". The dev reference cannot be compared: base/node/nls.ts keeps English for builds without a commit.- Configure Display Language (`port/fixtures/extensions/ui-display-language.json`, both apps): the picker matches the reference row for row (English (en) (Current) under Installed, then the Open VSX packs under Available with locale and install count: 中文(简体) (zh-cn) 4M, 日本語 (ja) 1.7M, ...). Picking Deutsch: the reference first asks "Do you trust the publisher "MS-CEINTL"?" (Learn More, Cancel, Trust Publisher & Install); the port has no trusted publisher check yet, installs at once ("Installing Deutsch language support...") and asks "Restart VSRustium to switch to Deutsch?" (Cancel, Restart).- `PORT_GALLERY=1 port/tools/extensions-check`: 5 ok, exit 0.