Visual Studio Code, rebuilt in Rust
Rust
feat(views): drop a composite at its index, reorder its own bar and open it focused
rokartur838e258395c5
diff --git a/native/crates/app/src/workbench.rs b/native/crates/app/src/workbench.rsindex 19c4eac8bad..87291692e66 100644--- a/native/crates/app/src/workbench.rs+++ b/native/crates/app/src/workbench.rs@@ -1557,10 +1557,10 @@ impl Workbench {let inactive = self.color("activityBar.inactiveForeground");let unpinned = self.unpinned_containers(layout::Part::SideBar);let containers = side_bar::VIEW_CONTAINERS.into_iter().filter(|(_, _, _, command, _)| !self.container_hidden_if_empty(command) && !unpinned.iter().any(|id| id == command) && self.container_location(command) == layout::Part::SideBar);- let items: Vec<_> = containers.map(|(icon, _, title, command, view)| {+ let mut items: Vec<_> = containers.map(|(icon, _, title, command, view)| {let active = view.is_some_and(|view| self.side_bar_view == view) && self.side_bar_visible();let icon = if active { self.active_view_icon(icon) } else { self.icon(icon, 36., 24., inactive) };- self.activity_composite_item(self.action_bar_item("activity", command, icon.id(command), cx), command, title, cx)+ let item = self.activity_composite_item(self.action_bar_item("activity", command, icon.id(command), cx), command, title, cx).debug_selector(move || command.to_owned()).cursor_pointer().child(self.action_hover(title, command, hover))@@ -1573,8 +1573,14 @@ impl Workbench {cx.stop_propagation();workbench.drop_view_on_container(dragged.id, command, cx);}))- })+ });+ (command, item)}).collect();+ items.extend(self.testing_activity_item(hover, inactive, cx).map(|item| ("workbench.view.testing", item)));+ items.extend(self.contributed_activity_items(hover, inactive, cx));+ items.extend(self.generated_activity_items(hover, inactive, cx));+ let order = self.activity_bar_containers();+ items.sort_by_key(|(id, _)| order.iter().position(|(other, _)| other == id));// floatingPanels.css and activitybarPart.ts: compact density narrows the lane to 4px and the item gap to 4px.let compact = self.compact_density();div()@@ -1603,16 +1609,17 @@ impl Workbench {.flex().flex_col().gap(px(if compact { 4. } else { 8. }))- .children(items)- .children(self.testing_activity_item(hover, inactive, cx))- .children(self.contributed_activity_items(hover, inactive, cx))- .children(self.generated_activity_items(hover, inactive, cx)),+ .children(items.into_iter().map(|(_, item)| item)),cx,))// compositeBar.ts `CompositeBarDndCallbacks.drop`: a view dropped on the bar moves to a new side bar entry..on_drop(cx.listener(|workbench, dragged: &view_panes::DraggedPane, _, cx| workbench.drop_view_on_location(dragged.id, layout::Part::SideBar, cx)))- // compositeBar.ts `CompositeDragAndDrop.drop` of a composite from another bar: it moves here and opens.- .on_drop(cx.listener(|workbench, dragged: &panel::DraggedComposite, window, cx| workbench.move_view_container(dragged.id, layout::Part::SideBar, window, cx)))+ // compositeBar.ts `CompositeBarDndCallbacks.onDrop`: a composite dropped past the items goes after the last one.+ .on_drop(cx.listener(|workbench, dragged: &panel::DraggedComposite, window, cx| {+ let unpinned = workbench.unpinned_containers(layout::Part::SideBar);+ let last = workbench.activity_bar_containers().into_iter().map(|(id, _)| id).rfind(|id| !unpinned.iter().any(|other| other == id));+ workbench.drop_composite(dragged.id, layout::Part::SideBar, last.map(|id| (id, false)), window, cx);+ })).on_mouse_down(MouseButton::Right, cx.listener(|workbench, event: &MouseDownEvent, window, cx| workbench.show_activity_bar_context_menu(event.position, window, cx))).child(self.action_bar("global-activity", true, div().child(self.action_bar_item("global-activity", "manage",self.icon(self.manage_activity_icon(), 36., 24., inactive)diff --git a/native/crates/app/src/workbench/activity_bar_menu.rs b/native/crates/app/src/workbench/activity_bar_menu.rsindex 81fb5dfd944..7021878f722 100644--- a/native/crates/app/src/workbench/activity_bar_menu.rs+++ b/native/crates/app/src/workbench/activity_bar_menu.rs@@ -101,7 +101,7 @@ impl Workbench {for id in self.generated_containers_in(super::layout::Part::SideBar) {containers.push((id, super::tree_view::static_id(&self.container_title(id))));}- containers+ self.in_bar_order(Part::SideBar, containers, |(id, _)| id)}/// The composite bar's items, pinned or not: id and title.@@ -114,9 +114,70 @@ impl Workbench {/// The containers unpinned from the part's composite bar.pub(super) fn unpinned_containers(&self, part: Part) -> Vec<String> {+ self.stored_bar_items(part).into_iter().filter(|item| item["pinned"] == false).filter_map(|item| item["id"].as_str().map(str::to_owned)).collect()+ }++ fn stored_bar_items(&self, part: Part) -> Vec<Value> {let storage = self.profile_storage.lock().unwrap();- let items: Vec<Value> = storage.get(pinned_key(part)).and_then(|stored| serde_json::from_str(stored).ok()).unwrap_or_default();- items.into_iter().filter(|item| item["pinned"] == false).filter_map(|item| item["id"].as_str().map(str::to_owned)).collect()+ storage.get(pinned_key(part)).and_then(|stored| serde_json::from_str(stored).ok()).unwrap_or_default()+ }++ /// `CompositeBarModel.items` order: the stored items take the places they hold among `items` in their stored+ /// order, the others keep their registration place.+ pub(super) fn in_bar_order<T>(&self, part: Part, items: Vec<T>, id: impl Fn(&T) -> &str) -> Vec<T> {+ let stored: Vec<String> = self.stored_bar_items(part).into_iter().filter_map(|item| item["id"].as_str().map(str::to_owned)).collect();+ let stored_index = |item: &T| stored.iter().position(|other| other == id(item));+ let slots: Vec<usize> = (0..items.len()).filter(|index| stored_index(&items[*index]).is_some()).collect();+ let mut by_stored = slots.clone();+ by_stored.sort_by_key(|index| stored_index(&items[*index]));+ let mut order: Vec<usize> = (0..items.len()).collect();+ for (slot, index) in slots.into_iter().zip(by_stored) {+ order[slot] = index;+ }+ let mut items: Vec<Option<T>> = items.into_iter().map(Some).collect();+ order.into_iter().map(|index| items[index].take().expect("each item once")).collect()+ }++ /// paneCompositeBar.ts `saveCachedViewContainers`: the bar's items in order with their pinned state.+ fn save_bar_items(&self, part: Part, ids: &[&str], unpinned: &[String]) {+ let stored: Vec<_> = ids.iter().map(|id| json!({ "id": id, "pinned": !unpinned.iter().any(|other| other == id), "visible": true })).collect();+ self.profile_storage.lock().unwrap().set(pinned_key(part), json!(stored).to_string());+ }++ /// compositeBar.ts `CompositeDragAndDrop.drop` of a composite on `part`'s bar, onto `target` (an item and whether+ /// it goes before it): on its own bar it moves there (`move`), from another bar it moves to the target's index+ /// (`getTargetIndex`, `CompositeBarModel.add`); either way it opens focused.+ pub(super) fn drop_composite(&mut self, container: &'static str, part: Part, target: Option<(&'static str, bool)>, window: &mut Window, cx: &mut Context<Self>) {+ let id = if part == Part::SideBar && container == TESTING_CONTAINER { TESTING_ITEM } else { container };+ if self.container_location(container) != part {+ self.move_view_container(container, part, window, cx);+ let Some((target, before)) = target else { return };+ let mut ids: Vec<_> = self.bar_items(part).into_iter().map(|(item, _)| item).filter(|item| *item != id).collect();+ let index = ids.iter().position(|item| *item == target).map_or(ids.len(), |index| index + usize::from(!before));+ ids.insert(index, id);+ self.save_bar_items(part, &ids, &self.unpinned_containers(part));+ return cx.notify();+ }+ let Some((target, before)) = target else { return };+ let mut ids: Vec<_> = self.bar_items(part).into_iter().map(|(item, _)| item).collect();+ let (Some(from), Some(mut to)) = (ids.iter().position(|item| *item == id), ids.iter().position(|item| *item == target)) else { return };+ if !before && from > to {+ to += 1;+ }+ if before && from < to {+ to -= 1;+ }+ if to >= ids.len() || to == from {+ return;+ }+ ids.remove(from);+ ids.insert(to, id);+ // `CompositeBarModel.move`: a moved composite gets pinned.+ let mut unpinned = self.unpinned_containers(part);+ unpinned.retain(|other| other != id);+ self.save_bar_items(part, &ids, &unpinned);+ self.open_bar_composite(id, part, window, cx);+ self.focus_pane_composite(part, window, cx);}/// viewDescriptorService.ts `getViewContainerBadgeEnablementState`.@@ -295,7 +356,20 @@ impl Workbench {/// side bar take.pub(super) fn activity_composite_item(&self, item: Stateful<Div>, id: &'static str, title: &'static str, cx: &mut Context<Self>) -> Stateful<Div> {let dragged = DraggedComposite { id: composite_container(id), label: title.into(), foreground: self.color("modernActivityBarItem.activeForeground"), background: self.color("modernActivityBar.background") };- self.with_composite_menu(item, "activity", id, Part::SideBar, cx).on_drag(dragged, |dragged, _, _, cx| cx.new(|_| dragged.clone()))+ let item = self.with_composite_menu(item, "activity", id, Part::SideBar, cx).on_drag(dragged, |dragged, _, _, cx| cx.new(|_| dragged.clone()));+ self.with_composite_drop(item, "activity", id, Part::SideBar, cx)+ }++ /// compositeBarActions.ts `onDrop` on an item: the composite goes before it when the pointer is in the item's first+ /// half along the bar (`updateFromDragging`'s `preferTop` and `preferLeft`).+ pub(super) fn with_composite_drop(&self, item: Stateful<Div>, bar: &'static str, id: &'static str, part: Part, cx: &mut Context<Self>) -> Stateful<Div> {+ item.on_drop(cx.listener(move |workbench, dragged: &DraggedComposite, window, cx| {+ cx.stop_propagation();+ let bounds = workbench.drawn_action_bar_item_bounds(bar, id, cx);+ let pointer = window.mouse_position();+ let before = if part == Part::SideBar { pointer.y <= bounds.center().y } else { pointer.x <= bounds.center().x };+ workbench.drop_composite(dragged.id, part, Some((id, before)), window, cx);+ }))}/// paneCompositeBar.ts: a container at its default location with one view whose default container is another@@ -379,8 +453,8 @@ impl Workbench {true => unpinned.push(id.to_owned()),false => unpinned.retain(|other| other != id),}- let stored: Vec<_> = items.iter().map(|(container, _)| json!({ "id": container, "pinned": !unpinned.iter().any(|other| other == container), "visible": true })).collect();- self.profile_storage.lock().unwrap().set(pinned_key(part), json!(stored).to_string());+ let ids: Vec<_> = items.iter().map(|(container, _)| *container).collect();+ self.save_bar_items(part, &ids, &unpinned);if !was_pinned && open_on_pin {self.open_bar_composite(id, part, window, cx);}diff --git a/native/crates/app/src/workbench/panel.rs b/native/crates/app/src/workbench/panel.rsindex 008625c78f4..336e60a2b58 100644--- a/native/crates/app/src/workbench/panel.rs+++ b/native/crates/app/src/workbench/panel.rs@@ -197,7 +197,10 @@ impl Workbench {self.leave_moved_side_bar_container();match self.panel.views.iter().find(|view| view.id == id) {Some(view) => (view.open)(self, window, cx),- None => self.show_view_container(id, cx),+ None => {+ self.show_view_container(id, cx);+ self.focus_pane_composite(part, window, cx);+ }}}@@ -326,7 +329,8 @@ impl Workbench {/// The part's composite bar items, pinned or not (`visibleItems`): the built-in containers by registration order/// while their view is in them, then the generated ones.pub(super) fn part_composites(&self, part: Part) -> Vec<CompositeTab> {- self.part_containers(part).into_iter().filter(|tab| self.panel.views.iter().find(|view| view.view_id == tab.view).is_none_or(|view| (view.visible)(self))).collect()+ let tabs = self.part_containers(part).into_iter().filter(|tab| self.panel.views.iter().find(|view| view.view_id == tab.view).is_none_or(|view| (view.visible)(self))).collect();+ self.in_bar_order(part, tabs, |tab| tab.id)}/// The part's containers that hold a view, shown or not.@@ -430,7 +434,8 @@ impl Workbench {match shown.contains(&tab.id) {true => {let item = self.action_bar_item(tabs_bar, tab.id, self.panel_tab(&tab, Some(tab.id) == active, tabs.is_empty(), background, window, cx), cx);- tabs.push(self.with_composite_menu(item, tabs_bar, tab.id, part, cx).into_any_element());+ let item = self.with_composite_menu(item, tabs_bar, tab.id, part, cx);+ tabs.push(self.with_composite_drop(item, tabs_bar, tab.id, part, cx).into_any_element());}false => overflowing.push(MenuAction::Command { id: format!("{}.focus", tab.view), title: panel_tab_label(&tab, self), enabled: true, checked: Some(tab.id) == active, alt: None }),}@@ -462,10 +467,17 @@ impl Workbench {})).on_drop(cx.listener(move |workbench, dragged: &DraggedComposite, window, cx| {workbench.panel.drop_target = None;- workbench.move_view_container(dragged.id, part, window, cx);+ workbench.drop_composite(dragged.id, part, None, window, cx);})).child(self.pane_composite_title(part, tabs, view_actions, actions, drop_feedback, cx).on_drop(cx.listener(move |workbench, dragged: &super::view_panes::DraggedPane, _, cx| {workbench.drop_view_on_location(dragged.id, part, cx);+ }))+ // compositeBar.ts `CompositeBarDndCallbacks.onDrop`: a composite dropped past the tabs goes after the last one.+ .on_drop(cx.listener(move |workbench, dragged: &DraggedComposite, window, cx| {+ cx.stop_propagation();+ workbench.panel.drop_target = None;+ let last = workbench.part_tabs(part).last().map(|tab| (tab.id, false));+ workbench.drop_composite(dragged.id, part, last, window, cx);}))).child(div().relative().flex_1().min_h_0().flex().flex_col().child(size_tracker(content_bounds)).child(content).children(progress_bars))}diff --git a/native/crates/app/src/workbench/view_containers.rs b/native/crates/app/src/workbench/view_containers.rsindex a0e27531837..f7175f1dea0 100644--- a/native/crates/app/src/workbench/view_containers.rs+++ b/native/crates/app/src/workbench/view_containers.rs@@ -309,7 +309,7 @@ impl Workbench {}/// The activity bar items of contributed containers with an active view.- pub(super) fn contributed_activity_items(&self, hover: HoverOptions, inactive: gpui::Rgba, cx: &mut Context<Self>) -> Vec<gpui::Stateful<Div>> {+ pub(super) fn contributed_activity_items(&self, hover: HoverOptions, inactive: gpui::Rgba, cx: &mut Context<Self>) -> Vec<(&'static str, gpui::Stateful<Div>)> {let mut items = Vec::new();let unpinned = self.unpinned_containers(super::layout::Part::SideBar);for container in &self.tree_views.containers {@@ -327,7 +327,7 @@ impl Workbench {}};let title: &'static str = static_id(&container.title);- items.push(self.activity_composite_item(self.action_bar_item("activity", id, icon.id(id), cx), id, title, cx).relative().children(self.container_activity_badge(id)).cursor_pointer().child(self.action_hover(title, id, hover)).on_click(cx.listener(move |workbench, event: &ClickEvent, window, cx| workbench.activity_item_clicked(active, id, event, window, cx))));+ items.push((id, self.activity_composite_item(self.action_bar_item("activity", id, icon.id(id), cx), id, title, cx).relative().children(self.container_activity_badge(id)).cursor_pointer().child(self.action_hover(title, id, hover)).on_click(cx.listener(move |workbench, event: &ClickEvent, window, cx| workbench.activity_item_clicked(active, id, event, window, cx)))));}items}diff --git a/native/crates/app/src/workbench/view_locations.rs b/native/crates/app/src/workbench/view_locations.rsindex bb33642a35f..2b612874a21 100644--- a/native/crates/app/src/workbench/view_locations.rs+++ b/native/crates/app/src/workbench/view_locations.rs@@ -368,14 +368,14 @@ impl Workbench {}/// The activity bar items of the generated side bar containers: their view's icon and name.- pub(super) fn generated_activity_items(&self, hover: HoverOptions, inactive: Rgba, cx: &mut Context<Self>) -> Vec<Stateful<Div>> {+ pub(super) fn generated_activity_items(&self, hover: HoverOptions, inactive: Rgba, cx: &mut Context<Self>) -> Vec<(&'static str, Stateful<Div>)> {let mut items = Vec::new();let unpinned = self.unpinned_containers(Part::SideBar);for id in self.generated_containers_in(Part::SideBar).into_iter().filter(|id| !unpinned.iter().any(|other| other == id)) {let view = self.generated_container_view(id).expect("a container with a view");let active = self.side_bar_view == SideBarView::Generated(id) && self.is_part_visible(Part::SideBar);let icon = if active { self.active_view_icon(view.icon) } else { self.icon(view.icon, 36., 24., inactive) };- items.push(self.activity_composite_item(self.action_bar_item("activity", id, icon.id(id), cx), id, view.name, cx).relative().cursor_pointer().child(self.action_hover(view.name, id, hover)).on_click(cx.listener(move |workbench, event: &ClickEvent, _, cx| workbench.generated_activity_item_clicked(active, id, event, cx))));+ items.push((id, self.activity_composite_item(self.action_bar_item("activity", id, icon.id(id), cx), id, view.name, cx).relative().cursor_pointer().child(self.action_hover(view.name, id, hover)).on_click(cx.listener(move |workbench, event: &ClickEvent, _, cx| workbench.generated_activity_item_clicked(active, id, event, cx)))));}items}diff --git a/native/crates/app/src/workbench/view_locations/tests.rs b/native/crates/app/src/workbench/view_locations/tests.rsindex 85883d79dca..b0ceca8519d 100644--- a/native/crates/app/src/workbench/view_locations/tests.rs+++ b/native/crates/app/src/workbench/view_locations/tests.rs@@ -408,6 +408,32 @@ fn the_explorer_item_drags_to_the_secondary_side_bar_and_its_tab_back_to_the_actassert_eq!(workbench.read_with(cx, |workbench, _| workbench.side_bar_view), SideBarView::Explorer);}+/// compositeBar.ts `CompositeDragAndDrop.drop`: an item dropped on a tab's first half lands before it and opens+/// focused; an item dropped on its own bar's item moves there and stays there on restart.+#[gpui::test]+fn a_dropped_composite_takes_the_drop_index_and_reorders_its_own_bar(cx: &mut TestAppContext) {+ let profile = Arc::new(Mutex::new(Storage::in_memory()));+ let (workbench, window_cx) = open(profile.clone(), cx);+ workbench.update(window_cx, |workbench, cx| workbench.open_panel_view(MARKERS_CONTAINER_ID, cx));+ window_cx.update(|window, cx| drop(window.draw(cx)));+ let output = workbench.read_with(window_cx, |workbench, cx| workbench.drawn_action_bar_item_bounds("panel-composite-bar", crate::workbench::output_view::OUTPUT_VIEW_ID, cx));+ let item = window_cx.debug_bounds(SEARCH_CONTAINER).unwrap().center();+ drag(item, output.left_center() + gpui::point(gpui::px(3.), gpui::px(0.)), window_cx);+ let tabs: Vec<_> = workbench.read_with(window_cx, |workbench, _| workbench.part_tabs(Part::Panel).iter().map(|tab| tab.id).collect());+ let search = tabs.iter().position(|id| *id == SEARCH_CONTAINER).unwrap();+ assert_eq!(tabs[search + 1], crate::workbench::output_view::OUTPUT_VIEW_ID, "{tabs:?}");+ assert_eq!(window_cx.update(|window, cx| workbench.read(cx).focused_part(window, cx)), Some(crate::workbench::part_navigation::FocusPart::Panel));++ window_cx.update(|window, cx| drop(window.draw(cx)));+ let explorer = window_cx.debug_bounds(EXPLORER_CONTAINER).unwrap();+ let scm = window_cx.debug_bounds(SCM_CONTAINER).unwrap();+ drag(scm.center(), explorer.center() - gpui::point(gpui::px(0.), gpui::px(5.)), window_cx);+ let bar: Vec<_> = workbench.read_with(window_cx, |workbench, _| workbench.activity_bar_containers().into_iter().map(|(id, _)| id).collect());+ assert_eq!(bar[..2], [SCM_CONTAINER, EXPLORER_CONTAINER]);+ let (restarted, window_cx) = open(profile, cx);+ assert_eq!(restarted.read_with(window_cx, |workbench, _| workbench.activity_bar_containers()[0].0), SCM_CONTAINER);+}+/// extensions.contribution.ts and testing.contribution.ts register their containers without a fixed location: Move/// To takes them to the panel and the secondary side bar, where their open commands show them.#[gpui::test]diff --git a/port/ledger.md b/port/ledger.mdindex e86fd1abae3..74d6fb7ff56 100644--- a/port/ledger.md+++ b/port/ledger.md@@ -456,7 +456,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| workbench/services/userDataProfile | workbench service | M10 | verified | | one app-wide `UserDataProfilesService` (a gpui Global in app/src/user_data_profile.rs) for every window of the process: profile windows open in this process, a transient profile lives while a window runs it (userDataProfilesHandler.ts cleanup on close), and `onDidChangeProfiles` reaches every window (cargo test -p app workbench::user_data_profile: profile_windows_open_in_this_process, every_window_sees_a_profile_another_window_creates_and_removes); userDataProfileManagement.ts `switchProfile`, `removeProfile` and `changeCurrentProfile` (configuration, keybindings, global state and user extensions move to the profile's files, the extension host restarts, workbench/extension_host_restart.rs) in workbench/user_data_profile.rs; the configuration layers of a profile (`ApplicationConfiguration`, PROFILE_SCOPES, `workbench.settings.applyToAllProfiles`) with configurationService.test.ts's Profiles suite (cargo test -p config profile_tests); the settings, keybindings, tasks, snippets, globalState and extensions resources and the `.code-profile` template of userDataProfileImportExportService.ts as app/src/profile_template.rs (cargo test -p app profile_template); a template's extensions install the way extensionsResource.ts `apply` does, one publisher trust dialog for all of them and an error naming the ones that failed (cargo test -p app template_extensions_ask_for_publisher_trust_once); per-profile extensions.json (cargo test -p exthost extension_management); `createTroubleshootProfile` is removed with contrib/issue, its only caller (issueTroubleshoot.ts); profile templates from `profileTemplatesUrl` have no source, the product.json has none || workbench/services/userDataSync | workbench service | | removed | | no sign-in/AI by decision (port/notes.md); not ported || workbench/services/utilityProcess | workbench service | | verified | | no utility process workers: the file watcher worker, the one kept client, is files/src/watcher.rs on an FSEvents thread (platform/files; api-tests `vscode API - workspace-watcher` passes in the milestone 20 whole-suite run); localTranscription is AI, removed (port/notes.md milestone 20) |-| workbench/services/views | workbench service | M11 | ported | [3 S] panel.rs:189: a composite dropped on another bar goes to that bar's end, not the drop index (compositeBar.ts `getTargetIndex`), one dropped on its own bar does not reorder (`moveComposite`), and the moved container opens without focus (`openComposite(id, true)`; ui-pair contributed-panes.json "moved": the reference puts Port Panes before Terminal and focuses its first pane); [3 S] activity_bar_menu.rs:153: an activity item drags as its title, the reference as its icon; [3 S] side_bar.rs:62: the compact activity bar's tabs have no item menu and no drag; [3 S] view_panes.rs:535: a collapsed pane of a container in the panel draws expanded, the reference as a narrow strip (ui-pair contributed-panes.json "moved", Third); [3 S] panel.rs:553: after a composite drop the tab under the pointer shows its hover, the reference none (contributed-panes.json "moved"); [3 S] panel.rs:762 `tab_badge`: a panel or secondary side bar tab draws number badges only, no `IconBadge` or `ProgressBadge` (compositeBarActions.ts `updateActivity`: a moved Testing container's spinner during a run and eye while watching, a container's progress) | view containers of `viewsContainers.activitybar` and `viewsContainers.panel` and the tree views of every container (workbench/view_containers.rs): activity bar items while a view's `when` holds, `workbench.view.extension.<id>` with its "View: Show <title>" Command Palette item while `viewContainer.<id>.enabled` (cargo test -p app an_extension_container_is_shown), a panel container's tab after the built-in ones, its views as side-by-side panes under its "..." and "View: Toggle <title>" (cargo test -p app an_extension_panel_container_is_a_panel_tab), each contributed view's "<container>: Focus on <view> View" palette item (ui-pair port/fixtures/ui-pair/contributed-panes.json "palette" and "panel" match the reference but its Ports tab, removed by decision), `<view id>.focus`, `<view id>.active`, merged single views, view_panes.rs panes for the views of an extension container and of Testing (`PaneContainer::Contributed`: cargo test -p app view_containers::; ui-pair port/fixtures/ui-pair/contributed-panes.json with port/fixtures/extensions/contributed-panes, the Port Panes and Testing side bars as the reference), treeView.ts `noDataProviderMessage` (cargo test -p app tree_view::), contributed views of scm and debug as panes of those containers; the Explorer's ViewDescriptorsState (view_panes.rs); ui-pair port/results/references-view.md; `visibility` (`hidden` views stay out until the Views submenu of the Explorer's "..." shows them, `collapsed`; workbench/view_visibility.rs: cargo test -p app view_visibility); the Explorer container's ViewDescriptorsState (view_panes.rs); moving views (workbench/view_locations.rs, verified): `views.customizations` viewLocations and generated containers `workbench.views.service.<location>.<uuid>` with their activity bar items and panel tabs, View: Move View, Move Focused View, Reset Focused View Location, a view header dropped on another container's pane (at its position), on the activity bar or on a panel's title (a new entry), `focusedView`; the folder view, Open Editors, Outline, Timeline, Source Control's Changes, Search, the debug views and the panel's views move into any built-in container or a new entry and back, the moved view opens focused, the picker lists only visible views, a moved view's hidden state is in its current container's state (cargo test -p app a_moved_view_is_hidden); an activity item's and a tab's context menu with Move To (the other locations) and Reset Location away from the default location or for a lone view at home (paneCompositeBar.ts `getContextMenuActionsForComposite`: cargo test -p app the_explorer_item_menu), above them Configure Keybinding, Hide/Keep '{name}' and Show/Hide Badge, a panel or secondary side bar tab's menu ending with its bar's actions and its unpinned tabs hidden (compositeBarActions.ts `showContextMenu`, panelPart.ts `fillExtraContextMenuActions`: cargo test -p app an_item_menu_hides), an activity item dragged onto the panel or secondary side bar and a tab dropped on the activity bar (compositeBar.ts `CompositeDragAndDrop.drop`: cargo test -p app the_explorer_item_drags; ui-pair contributed-panes.json "moved": Port Panes moves into the panel and opens in both), the Extensions and Testing containers move to the panel and the secondary side bar and back with their views and open commands (cargo test -p app the_extensions_and_testing_containers; ui-pair contributed-panes.json "extensions-moved" and "testing-moved": both items dragged onto the panel open there as in the reference); cargo test -p app (2594 passed); ui-pair port/fixtures/ui-pair/m11/move-view.json, port/results/move-view.md (8 steps match, Ports removed by decision); verified: ui-pair port/results/references-view.md (milestone 11 verification) |+| workbench/services/views | workbench service | M11 | ported | [3 S] activity_bar_menu.rs:153: an activity item drags as its title, the reference as its icon; [3 S] side_bar.rs:62: the compact activity bar's tabs have no item menu and no drag; [3 S] view_panes.rs:535: a collapsed pane of a container in the panel draws expanded, the reference as a narrow strip (ui-pair contributed-panes.json "moved", Third); [3 S] panel.rs:553: after a composite drop the tab under the pointer shows its hover, the reference none (contributed-panes.json "moved"); [3 S] panel.rs:762 `tab_badge`: a panel or secondary side bar tab draws number badges only, no `IconBadge` or `ProgressBadge` (compositeBarActions.ts `updateActivity`: a moved Testing container's spinner during a run and eye while watching, a container's progress) | view containers of `viewsContainers.activitybar` and `viewsContainers.panel` and the tree views of every container (workbench/view_containers.rs): activity bar items while a view's `when` holds, `workbench.view.extension.<id>` with its "View: Show <title>" Command Palette item while `viewContainer.<id>.enabled` (cargo test -p app an_extension_container_is_shown), a panel container's tab after the built-in ones, its views as side-by-side panes under its "..." and "View: Toggle <title>" (cargo test -p app an_extension_panel_container_is_a_panel_tab), each contributed view's "<container>: Focus on <view> View" palette item (ui-pair port/fixtures/ui-pair/contributed-panes.json "palette" and "panel" match the reference but its Ports tab, removed by decision), `<view id>.focus`, `<view id>.active`, merged single views, view_panes.rs panes for the views of an extension container and of Testing (`PaneContainer::Contributed`: cargo test -p app view_containers::; ui-pair port/fixtures/ui-pair/contributed-panes.json with port/fixtures/extensions/contributed-panes, the Port Panes and Testing side bars as the reference), treeView.ts `noDataProviderMessage` (cargo test -p app tree_view::), contributed views of scm and debug as panes of those containers; the Explorer's ViewDescriptorsState (view_panes.rs); ui-pair port/results/references-view.md; `visibility` (`hidden` views stay out until the Views submenu of the Explorer's "..." shows them, `collapsed`; workbench/view_visibility.rs: cargo test -p app view_visibility); the Explorer container's ViewDescriptorsState (view_panes.rs); moving views (workbench/view_locations.rs, verified): `views.customizations` viewLocations and generated containers `workbench.views.service.<location>.<uuid>` with their activity bar items and panel tabs, View: Move View, Move Focused View, Reset Focused View Location, a view header dropped on another container's pane (at its position), on the activity bar or on a panel's title (a new entry), `focusedView`; the folder view, Open Editors, Outline, Timeline, Source Control's Changes, Search, the debug views and the panel's views move into any built-in container or a new entry and back, the moved view opens focused, the picker lists only visible views, a moved view's hidden state is in its current container's state (cargo test -p app a_moved_view_is_hidden); an activity item's and a tab's context menu with Move To (the other locations) and Reset Location away from the default location or for a lone view at home (paneCompositeBar.ts `getContextMenuActionsForComposite`: cargo test -p app the_explorer_item_menu), above them Configure Keybinding, Hide/Keep '{name}' and Show/Hide Badge, a panel or secondary side bar tab's menu ending with its bar's actions and its unpinned tabs hidden (compositeBarActions.ts `showContextMenu`, panelPart.ts `fillExtraContextMenuActions`: cargo test -p app an_item_menu_hides), an activity item dragged onto the panel or secondary side bar and a tab dropped on the activity bar (compositeBar.ts `CompositeDragAndDrop.drop`: cargo test -p app the_explorer_item_drags; at the drop index, reordered on its own bar and stored in its pinned items, opened focused: cargo test -p app a_dropped_composite; ui-pair contributed-panes.json "moved": Port Panes moves into the panel and opens in both), the Extensions and Testing containers move to the panel and the secondary side bar and back with their views and open commands (cargo test -p app the_extensions_and_testing_containers; ui-pair contributed-panes.json "extensions-moved" and "testing-moved": both items dragged onto the panel open there as in the reference); cargo test -p app (2594 passed); ui-pair port/fixtures/ui-pair/m11/move-view.json, port/results/move-view.md (8 steps match, Ports removed by decision); verified: ui-pair port/results/references-view.md (milestone 11 verification) || workbench/services/workingCopy | workbench service | M8 | verified | | the text file and untitled working copies are the editor models (dirty state, save, revert, the window's edited dot of `onDidChangeDirty`): cargo test -p app untitled (30), lifecycle (3); WorkingCopyFileService create, move, copy, delete with participants: cargo test -p files operations (12); WorkingCopyHistoryService and its tracker for saves into User/History, entries following renames and folder moves (`moveEntries`): cargo test -p app local_history (10); WorkingCopyBackupService and the backup tracker with hot exit (backups.rs, workbench/backup_tracker.rs), a backup of a deleted file restoring as an orphaned model (`doResolveFromBackup`), modified scratchpads backing up: cargo test -p app backup (19); the working copies of editable custom documents (MainThreadCustomEditorModel, workbench/custom_documents.rs: `$onDidEdit` edits for undo and redo with `$disposeEdits`, `$onContentChange`, dirty tabs, `$onSave`, Save As with `$onSaveAs` and the editor moved to the target, `$revert`, `$backup` into a `vscode-custom-editor` backup restored with its backup id): cargo test -p app custom_documents (3), and port/fixtures/extensions/custom-document-tests (FIXTURE=custom-document-tests port/tools/webview-check: 4/4 in the reference and 4/4 in the port). Notebook working copies are the contrib/notebook row's; their backups are typed (`hashIdentifier` with a type id, backups.rs: cargo test -p app backups::, the upstream typed hashes) and the shutdown joins backups still being written || workbench/services/workspaces | workbench service | M12 | verified | | workspace_trust.rs: WorkspaceTrustManagementService (uriTrustInfo in shared storage, longest trusted parent, empty window memento, parent folder trust) and WorkspaceTrustRequestService: cargo test -p app workspace_trust; workbench/workspace_editing.rs: abstractWorkspaceEditingService.ts addFolders, removeFolders, updateFolders, saveAndEnterWorkspace, enterWorkspace in the same window (stopped and started host, settings, backups, storage, Explorer, title), duplicate workspace: cargo test -p app folders_added_and_removed_in_a_workspace_reach_its_file_the_explorer_settings_and_host adding_a_folder_enters_an_untitled_workspace_in_the_same_window workspace_editing (the Remove Folder picker's ROOT_FOLDER icons, `setProfileForWorkspace`: a_new_workspace_keeps_the_window_profile); ui-pair port/fixtures/ui-pair/m12/workspace-folders.json, verified at port-m12b-verify || workbench/contrib/accessibility | workbench contribution | M19 | verified | | workbench/accessible_view.rs and workbench/accessibility.rs: accessible view and accessibility help (Alt+F2, Alt+F1 with the editor, hover, view help providers, the hover's and a workbench hover's accessible view, Escape from the latter focusing the hover again, a focused contributed tree or webview view's `accessibilityHelpContent`, a webview view the `focusedView` while its webview has the keyboard; Alt+F6, Alt+H, Alt+K, Alt+A, Alt+]/[), notification aria labels with the verbosity hint, unfocused editor dimming, Toggle Screen Reader Accessibility Mode, status entry; cargo test -p app accessib (alt_f1_shows_the_editor_help..., alt_f1_in_a_contributed_view..., alt_f1_in_a_webview_view..., dimming), cargo test -p app content_hover (the hover's accessible view), port/tools/a11y-check reads the help text area (port/notes.md milestone 19) |