Skip to content

Visual Studio Code, rebuilt in Rust

Rust

feat(testing): draw the results tree as a workbench tree with keys

rokarturfd89e9db3745
diff --git a/native/crates/app/src/workbench/keyboard.rs b/native/crates/app/src/workbench/keyboard.rs
index e3e3feafdf8..d92c3d3a9f9 100644
--- a/native/crates/app/src/workbench/keyboard.rs
+++ b/native/crates/app/src/workbench/keyboard.rs
@@ -619,6 +619,7 @@ impl Workbench {
self.scm_key_context(window, &mut context);
self.debug_context(window, &mut context);
self.testing_service_context(&mut context);
+ self.testing_results_list_context(window, &mut context);
self.testing_continuous_context(&mut context);
self.keybindings_editor_context(window, &mut context);
self.settings_editor_context(window, &mut context);
diff --git a/native/crates/app/src/workbench/search_actions.rs b/native/crates/app/src/workbench/search_actions.rs
index 9df3104a584..6cc0ebfda7a 100644
--- a/native/crates/app/src/workbench/search_actions.rs
+++ b/native/crates/app/src/workbench/search_actions.rs
@@ -408,7 +408,7 @@ impl Workbench {
for id in super::explorer_keyboard::EXPLORER_LIST_COMMANDS {
let search_run = commands.iter().find(|(search_id, _)| *search_id == id).map(|(_, run)| *run);
self.commands.register(id, move |workbench, _, window, cx| {
- if workbench.breadcrumbs_picker_list_command(id, window, cx) || workbench.keybindings_table_list_command(id, window, cx) || workbench.references_peek_list_command(id, window, cx) || workbench.hierarchy_peek_list_command(id, window, cx) || workbench.debug_hover_list_command(id, window, cx) || workbench.notebook_list_command(id, window, cx) || workbench.multi_diff_file_list_command(id, window, cx) || workbench.scm_repositories_list_command(id, window, cx) || workbench.disassembly_list_command(id, window, cx) {
+ if workbench.breadcrumbs_picker_list_command(id, window, cx) || workbench.keybindings_table_list_command(id, window, cx) || workbench.references_peek_list_command(id, window, cx) || workbench.hierarchy_peek_list_command(id, window, cx) || workbench.debug_hover_list_command(id, window, cx) || workbench.notebook_list_command(id, window, cx) || workbench.multi_diff_file_list_command(id, window, cx) || workbench.scm_repositories_list_command(id, window, cx) || workbench.disassembly_list_command(id, window, cx) || workbench.testing_results_list_command(id, window, cx) {
return Outcome::done();
}
match search_run {
diff --git a/native/crates/app/src/workbench/testing_results.rs b/native/crates/app/src/workbench/testing_results.rs
index db13d6536d8..358075a6a7d 100644
--- a/native/crates/app/src/workbench/testing_results.rs
+++ b/native/crates/app/src/workbench/testing_results.rs
@@ -466,6 +466,89 @@ impl Workbench {
actions
}
+ /// listService.ts keys of the focused results tree: `listFocus` and the focused row's `treeElement*` keys.
+ pub(super) fn testing_results_list_context(&self, window: &Window, context: &mut HashMap<String, Value>) {
+ if !self.testing_view.results_focus.is_focused(window) {
+ return;
+ }
+ context.insert("listFocus".into(), json!(true));
+ let rows = self.results_rows();
+ let Some(index) = rows.iter().position(|row| self.testing_view.results_focused.as_ref() == Some(&row.target().id())) else { return };
+ let depths: Vec<usize> = rows.iter().map(|row| row.depth).collect();
+ context.insert("listHasSelectionOrFocus".into(), json!(true));
+ context.insert("treeElementCanCollapse".into(), json!(rows[index].collapsible && !rows[index].collapsed));
+ context.insert("treeElementCanExpand".into(), json!(rows[index].collapsed));
+ context.insert("treeElementHasChild".into(), json!(depths.get(index + 1).is_some_and(|child| *child > depths[index])));
+ context.insert("treeElementHasParent".into(), json!(crate::list_tree::parent(&depths, index).is_some()));
+ }
+
+ /// listCommands.ts on the results tree while it has the focus; false for a command of another list.
+ pub(super) fn testing_results_list_command(&mut self, id: &str, window: &mut Window, cx: &mut Context<Self>) -> bool {
+ if !self.testing_view.results_focus.is_focused(window) {
+ return false;
+ }
+ let rows = self.results_rows();
+ if rows.is_empty() {
+ return true;
+ }
+ let focus = rows.iter().position(|row| self.testing_view.results_focused.as_ref() == Some(&row.target().id()));
+ let depths: Vec<usize> = rows.iter().map(|row| row.depth).collect();
+ let last = rows.len() - 1;
+ let next = match id {
+ "list.focusDown" | "list.focusAnyDown" => focus.map_or(0, |index| (index + 1).min(last)),
+ "list.focusUp" | "list.focusAnyUp" => focus.map_or(last, |index| index.saturating_sub(1)),
+ "list.focusFirst" | "list.focusAnyFirst" => 0,
+ "list.focusLast" | "list.focusAnyLast" => last,
+ "list.focusParent" => {
+ let Some(parent) = focus.and_then(|index| crate::list_tree::parent(&depths, index)) else { return true };
+ parent
+ }
+ // `expand` answers false for an expanded row, which then moves to its first child; `collapse` to the parent.
+ "list.expand" | "list.collapse" | "list.toggleExpand" => {
+ let Some(index) = focus else { return true };
+ let row = &rows[index];
+ let expand = id == "list.expand";
+ match row.collapsible {
+ true if id == "list.toggleExpand" || row.collapsed == expand => {
+ self.toggle_results_row(&row.element);
+ cx.notify();
+ return true;
+ }
+ _ if expand && depths.get(index + 1).is_some_and(|child| *child > depths[index]) => index + 1,
+ _ if id != "list.collapse" => return true,
+ _ => {
+ let Some(parent) = crate::list_tree::parent(&depths, index) else { return true };
+ parent
+ }
+ }
+ }
+ "list.select" | "list.selectAndPreserveFocus" => {
+ let Some(index) = focus else { return true };
+ let target = rows[index].target().clone();
+ self.testing_view.results_selected = Some(target.id());
+ self.open_results_element(&target);
+ cx.notify();
+ return true;
+ }
+ "list.clear" => {
+ self.testing_view.results_selected = None;
+ cx.notify();
+ return true;
+ }
+ _ => return true,
+ };
+ self.testing_view.results_focused = Some(rows[next].target().id());
+ cx.notify();
+ true
+ }
+
+ fn toggle_results_row(&mut self, element: &ResultsElement) {
+ let toggled = &mut self.testing_view.results_toggled;
+ if !toggled.remove(&element.id()) {
+ toggled.insert(element.id());
+ }
+ }
+
/// `onDidOpen`: a message shows itself, a test its first message or else its output, the others nothing.
fn open_results_element(&mut self, element: &ResultsElement) {
let subject = match element {
@@ -496,8 +579,17 @@ impl Workbench {
}
fn results_tree(&self, window: &Window, cx: &mut Context<Self>) -> gpui::Stateful<Div> {
+ let focus = self.testing_view.results_focus.clone();
+ let tree_focused = focus.is_focused(window);
+ let rows = self.results_rows();
+ let selected: Vec<usize> = rows.iter().enumerate().filter(|(_, row)| self.testing_view.results_selected.as_ref() == Some(&row.target().id())).map(|(index, _)| index).collect();
+ let guides = self.tree_guides_in_group("test-results-tree".into(), rows.iter().map(|row| row.depth).collect(), &selected);
+ let inset = self.pane_row_inset();
let mut tree = div()
.id("test-results-tree")
+ .group("test-results-tree")
+ .track_focus(&focus)
+ .capture_any_mouse_down(move |_, window, cx| window.focus(&focus, cx))
.flex_1()
.min_w_0()
.overflow_y_scroll()
@@ -506,21 +598,20 @@ impl Workbench {
.text_color(self.color("editor.foreground"))
.flex()
.flex_col();
- let selected = self.testing_view.results_selected.clone();
- for row in self.results_rows() {
- let is_selected = selected.as_ref() == Some(&row.target().id());
- tree = tree.child(self.results_row(row, is_selected, window, cx));
+ for (index, row) in rows.into_iter().enumerate() {
+ let row = self.results_row(row, selected.contains(&index), tree_focused, window, cx);
+ tree = tree.child(div().relative().child(row).children(guides.row(index, inset)));
}
tree
}
/// `TestRunElementRenderer.doRenderInner`: twistie, state icon, label with its description, and the primary
/// actions while hovered (testing.css `.testing-stdtree-container`).
- fn results_row(&self, row: ResultsRow, selected: bool, window: &Window, cx: &mut Context<Self>) -> gpui::Stateful<Div> {
+ fn results_row(&self, row: ResultsRow, selected: bool, tree_focused: bool, window: &Window, cx: &mut Context<Self>) -> gpui::Stateful<Div> {
let (label, description, state) = self.results_row_label(&row);
let twistie_color = self.foreground_or("icon.foreground");
- let hover = self.color("list.hoverBackground");
let id = row.target().id();
+ let is_focus = self.testing_view.results_focused.as_ref() == Some(&id);
let mut label_box = div().flex_1().min_w_0().flex().items_baseline().overflow_hidden().whitespace_nowrap().child(div().min_w_0().overflow_hidden().text_ellipsis().child(label));
if let Some(description) = description.filter(|description| !description.is_empty()) {
label_box = label_box.child(div().flex_1().min_w_0().overflow_hidden().text_ellipsis().ml(px(6.5)).text_size(px(11.7)).opacity(0.7).child(description));
@@ -530,22 +621,26 @@ impl Workbench {
for action in primary {
actions = actions.child(self.results_action_button(action, cx));
}
- let (toggle, open, menu) = (row.element.id(), row.target().clone(), row.element.clone());
+ let (toggle, open, menu, right_clicked) = (row.element.clone(), row.target().clone(), row.element.clone(), id.clone());
let collapsible = row.collapsible;
- div()
+ let element = div()
.id(gpui::SharedString::from(format!("results-row:{id}")))
.group("results-row")
.h(px(ROW_HEIGHT))
.flex_none()
- .pl(px(8. * row.depth as f32 + 4.))
+ .mx(px(self.pane_row_inset()))
+ .rounded(px(4.))
+ // abstractTree.ts `DefaultIndent` (8px) plus the twistie's translateX(3px) (tree.css).
+ .pl(px(self.tree_indent() * row.depth as f32 + 11.))
.flex()
.items_center()
- .cursor_pointer()
- .hover(move |row| row.bg(hover))
- .when(selected, |row| row.bg(self.color("list.inactiveSelectionBackground")))
+ .cursor_pointer();
+ // tree.css `.monaco-tl-twistie`: 16px and `padding-right: 6px` less the 3px shift.
+ let twistie = div().w(px(19.)).flex_none();
+ self.list_row_selection(element, selected, is_focus, tree_focused)
.child(match row.collapsible {
- true => self.icon(if row.collapsed { "chevron-right" } else { "chevron-down" }, 16., 16., twistie_color),
- false => div().w(px(16.)).flex_none(),
+ true => twistie.child(self.icon(if row.collapsed { "chevron-right" } else { "chevron-down" }, 16., 16., twistie_color)),
+ false => twistie,
})
.child(match state {
Some(state) => {
@@ -558,13 +653,15 @@ impl Workbench {
.child(actions)
.on_click(cx.listener(move |workbench, _: &ClickEvent, _, cx| {
workbench.testing_view.results_selected = Some(open.id());
- if collapsible && !workbench.testing_view.results_toggled.remove(&toggle) {
- workbench.testing_view.results_toggled.insert(toggle.clone());
+ workbench.testing_view.results_focused = Some(open.id());
+ if collapsible {
+ workbench.toggle_results_row(&toggle);
}
workbench.open_results_element(&open);
cx.notify();
}))
.on_mouse_down(MouseButton::Right, cx.listener(move |workbench, event: &MouseDownEvent, window, cx| {
+ workbench.testing_view.results_focused = Some(right_clicked.clone());
workbench.show_results_menu(&menu, event.position, window, cx);
}))
}
diff --git a/native/crates/app/src/workbench/testing_results/tests.rs b/native/crates/app/src/workbench/testing_results/tests.rs
index 90cd408de6c..baa7b889f67 100644
--- a/native/crates/app/src/workbench/testing_results/tests.rs
+++ b/native/crates/app/src/workbench/testing_results/tests.rs
@@ -169,3 +169,29 @@ fn an_opened_message_shows_the_first_message_content_item(cx: &mut TestAppContex
let (command, title, arg) = floating.expect("a floating button");
assert_eq!((command.as_str(), title.as_str(), arg["$mid"].clone(), arg["message"]["message"].clone(), arg["test"]["item"]["extId"].clone()), ("ext.accept", "Accept", json!(18), json!("first"), json!("c\0f\0c")));
}
+
+/// listCommands.ts on the focused results tree: the arrows move the focus, Right on an expanded row goes to its
+/// first child, Left collapses and then goes to the parent, Enter selects and opens the focused row.
+#[gpui::test]
+fn the_results_tree_moves_its_focus_with_the_list_commands(cx: &mut TestAppContext) {
+ let (workbench, cx, _host) = workbench_with_tests("test-results-keys", TESTS, cx);
+ workbench.update_in(cx, |workbench, window, cx| {
+ add_results(workbench);
+ window.focus(&workbench.testing_view.results_focus.clone(), cx);
+ assert_eq!(workbench.key_context(window).get("listFocus"), Some(&json!(true)));
+ let mut run = |workbench: &mut Workbench, id: &str| {
+ assert!(matches!(workbench.execute_command(id, vec![], window, cx), crate::commands::Outcome::Ready(Ok(_))), "{id}");
+ workbench.testing_view.results_focused.clone().unwrap_or_default()
+ };
+ assert_eq!(run(workbench, "list.focusDown"), "r1/0");
+ assert_eq!(run(workbench, "list.expand"), "r1/0/c\0f\0b/message/0");
+ assert_eq!(run(workbench, "list.focusDown"), "r1/c\0f\0c");
+ assert_eq!(run(workbench, "list.collapse"), "r1/c\0f\0c");
+ assert_eq!(drawn_rows(workbench)[2], " throws | math +");
+ assert_eq!(run(workbench, "list.collapse"), "r1/0");
+ assert_eq!(run(workbench, "list.focusDown"), "r1/0/c\0f\0b/message/0");
+ run(workbench, "list.select");
+ let message = InspectSubject::Message { result: "r1".into(), task: 0, test: "c\0f\0b".into(), message: 0 };
+ assert_eq!((workbench.testing_view.results_selected.as_deref(), workbench.testing_view.results_subject.clone()), (Some("r1/0/c\0f\0b/message/0"), Some(message)));
+ });
+}
diff --git a/native/crates/app/src/workbench/testing_view.rs b/native/crates/app/src/workbench/testing_view.rs
index 047f782f2de..1715b575657 100644
--- a/native/crates/app/src/workbench/testing_view.rs
+++ b/native/crates/app/src/workbench/testing_view.rs
@@ -30,11 +30,13 @@ pub struct TestingView {
/// Rows the user collapsed; others below the roots start collapsed until expanded (`expanded`).
pub collapsed: HashSet<String>,
pub expanded: HashSet<String>,
- /// The Test Results view: the opened subject, the selected row and the rows flipped from their default
- /// collapse state.
+ /// The Test Results view: the opened subject, the selected and the focused row, the rows flipped from their
+ /// default collapse state and the tree's focus.
pub results_subject: Option<super::testing_results::InspectSubject>,
pub results_selected: Option<String>,
+ pub results_focused: Option<String>,
pub results_toggled: HashSet<String>,
+ pub results_focus: gpui::FocusHandle,
/// Where the continuous run dropdown's chevron last painted, to anchor its menu.
pub continuous_dropdown_bounds: std::rc::Rc<std::cell::Cell<gpui::Bounds<gpui::Pixels>>>,
/// Where the run and the debug group dropdowns' chevrons last painted.
@@ -59,7 +61,9 @@ impl TestingView {
expanded: HashSet::new(),
results_subject: None,
results_selected: None,
+ results_focused: None,
results_toggled: HashSet::new(),
+ results_focus: cx.focus_handle(),
continuous_dropdown_bounds: Default::default(),
run_dropdown_bounds: Default::default(),
debug_dropdown_bounds: Default::default(),
@@ -248,7 +252,8 @@ impl Workbench {
pub(super) fn show_test_results_on_start(&mut self, run: &str, cx: &mut Context<Self>) {
// testResultsTree.ts `attachToResults`: a new run reveals its first task.
self.testing_view.results_subject = Some(super::testing_results::InspectSubject::Task { result: run.to_owned(), task: 0 });
- self.testing_view.results_selected = None;
+ self.testing_view.results_selected = Some(format!("{run}/0"));
+ self.testing_view.results_focused = Some(format!("{run}/0"));
if self.setting("testing.automaticallyOpenTestResults") == "openOnTestStart" {
self.open_panel_view(TEST_RESULTS_VIEW_ID, cx);
}
diff --git a/port/ledger.md b/port/ledger.md
index f566a1f2494..af30f339851 100644
--- a/port/ledger.md
+++ b/port/ledger.md
@@ -601,7 +601,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston
| workbench/contrib/telemetry | workbench contribution | M19 | verified | | the contribution logs to the NullTelemetryService and registers Show Telemetry only when supportsTelemetry, false in the built product: nothing to port; port/tools/telemetry-source-check no endpoint in 18370 shipped files (SELF_TEST finds 9 in the inert packages) |
| workbench/contrib/terminal | workbench contribution | M15 | verified | | workbench/terminal_view.rs, workbench/terminal_decorations.rs, terminal/marks.rs, terminal/serialize_html.rs, terminal/label.rs: cargo test -p app new_with_profile a_ctrl_d_exit_shows_no_exit_alert terminal::marks serialize_html terminal_decorations hover a_recording_keeps_each_kind_of_event toggle_visibility_writes_the_decorations_setting the_cwd_setting_resolves_its_variables terminal::label terminal_view::tests paths_are_quoted call_operator a_tab_row_is_inset_and_its_label_is_one_line_of_text panel_terminals_revive_in_their_groups_after_a_restart a_terminal_editor_revives_with_its_history_after_a_restart; ui-pair OSC 99, decorations, overview ruler, Copy as HTML, Record Terminal Session, terminal tabs (port/results/terminal.md), m12/folder-terminal.json (but the reference's Ports overflow, removed), m11/task-presentation.json (port/results/manage-menu.md) |
| workbench/contrib/terminalContrib | workbench contribution | M15 | verified | | terminal/link_parsing.rs, link_computer.rs, workbench/terminal_links.rs, terminal/auto_replies.rs, terminal/search.rs, workbench/terminal_find.rs, terminal/prompt_input.rs, workbench/terminal_suggest.rs, terminal/history.rs, workbench/terminal_quick_access.rs, terminal/sticky_scroll.rs, workbench/terminal_environment.rs, terminal/osc99.rs, terminal/quick_fix.rs, terminal/accessible_buffer.rs, workbench/terminal_initial_hint.rs: cargo test -p app link_ terminal::search prompt_input auto_replies terminal_contrib terminal_links terminal::history sticky_scroll quick_access environment_collection terminal::marks osc99 quick_fix accessible; ui-pair Run Recent Command, `term `, sticky scroll, the initial hint. No counterpart: Show Terminal Texture Atlas, Restart Pty Host. Removed: Copilot CLI, chat and voice (AI), wslRecommendation (Windows) (port/notes.md milestone 15) |
-| workbench/contrib/testing | workbench contribution | M16 | ported | [3 M] testing_results.rs `results_tree`: not drawn as a workbench list: the opened row takes `list.inactiveSelectionBackground` where the reference shows the focused selection, a twistie on the task row where the reference has none, no indent guides, no keyboard navigation; content and tree split 1:1 with no sash where the reference opens about 2:1 (ui-pair port/fixtures/debug-node with tests-provider) <br> [3 M] testing_results.rs `results_content`: a message or output is plain text lines, not testResultsOutput.ts's diff, markdown, plain text and terminal peeks; no call stack (`MenuId.TestCallStack`), no `CoverageElement` rows | cargo test -p app testing:: testing_filter the_results_tree_shows_tasks_tests_and_messages_as_testresultstree a_results_rows_menu_shows_its_actions_and_the_contributed_items an_opened_message_shows_the_first_message_content_item the_gutter_menu_shows_the_tests_actions_before_the_line_number_items a_line_with_two_tests_shows_run_all_and_a_submenu_per_test reveal_in_test_explorer_expands_the_tests_parents the_run_group_dropdown_lists_its_profiles_and_runs_the_picked_one select_default_profile_stores_the_picked_defaults the_run_group_chevron_keeps_the_view_title_actions_in_the_side_bar runs_from_the_explorer_exclude_the_tests_the_filter_hides a_hidden_test_leaves_the_tree_and_runs_until_it_is_unhidden a_test_row_shows_the_test_item_menu_s_inline_group a_test_rows_context_menu_shows_and_runs_the_test_item_actions children_sort_by_line_then_by_file_name_order the_view_title_dropdown_starts_and_stops_one_profile_of_several continuous_run_using_picks_from_the_tests_controller_only a_continuous_run_holds_one_cancellable_request_per_profile_until_it_stops the_testing_item_spins view_as_list_shows_the_leaves_and_the_more_menu_checks_the_mode peek_error_opens_the_failed_childs_message_at_the_test a_test_run_waits_for_workspace_trust_and_completes_when_it_is_refused; ui-pair port/fixtures/debug-node with tests-provider (Testing tree, Run All, results tree, row menus, opened message, run glyphs and the gutter menu on port/fixtures/debug-node/math.test.js line 2, the run profile dropdown); cargo test -p app a_contributed_inline_result_action_draws_its_icon retired_tests_take_test_result_outdated a_line_with_more_than_30_tests_picks_the_rest_from_a_quick_pick reveal_in_test_explorer_selects_and_scrolls_to_the_row the_run_group_chevron_is_active_while_its_menu_is_open the_workbench_context_has_the_testing_service_keys |
+| workbench/contrib/testing | workbench contribution | M16 | ported | [3 M] testing_results.rs `results_content`: a message or output is plain text lines, not testResultsOutput.ts's diff, markdown, plain text and terminal peeks; no call stack (`MenuId.TestCallStack`), no `CoverageElement` rows | cargo test -p app testing:: testing_filter the_results_tree_shows_tasks_tests_and_messages_as_testresultstree the_results_tree_moves_its_focus_with_the_list_commands a_results_rows_menu_shows_its_actions_and_the_contributed_items an_opened_message_shows_the_first_message_content_item the_gutter_menu_shows_the_tests_actions_before_the_line_number_items a_line_with_two_tests_shows_run_all_and_a_submenu_per_test reveal_in_test_explorer_expands_the_tests_parents the_run_group_dropdown_lists_its_profiles_and_runs_the_picked_one select_default_profile_stores_the_picked_defaults the_run_group_chevron_keeps_the_view_title_actions_in_the_side_bar runs_from_the_explorer_exclude_the_tests_the_filter_hides a_hidden_test_leaves_the_tree_and_runs_until_it_is_unhidden a_test_row_shows_the_test_item_menu_s_inline_group a_test_rows_context_menu_shows_and_runs_the_test_item_actions children_sort_by_line_then_by_file_name_order the_view_title_dropdown_starts_and_stops_one_profile_of_several continuous_run_using_picks_from_the_tests_controller_only a_continuous_run_holds_one_cancellable_request_per_profile_until_it_stops the_testing_item_spins view_as_list_shows_the_leaves_and_the_more_menu_checks_the_mode peek_error_opens_the_failed_childs_message_at_the_test a_test_run_waits_for_workspace_trust_and_completes_when_it_is_refused; ui-pair port/fixtures/debug-node with tests-provider (Testing tree, Run All, results tree, row menus, opened message, run glyphs and the gutter menu on port/fixtures/debug-node/math.test.js line 2, the run profile dropdown); cargo test -p app a_contributed_inline_result_action_draws_its_icon retired_tests_take_test_result_outdated a_line_with_more_than_30_tests_picks_the_rest_from_a_quick_pick reveal_in_test_explorer_selects_and_scrolls_to_the_row the_run_group_chevron_is_active_while_its_menu_is_open the_workbench_context_has_the_testing_service_keys |
| workbench/contrib/themes | workbench contribution | M9 | verified | | Color Theme picker (`workbench.action.selectTheme`, Cmd+K Cmd+T): rows, order and descriptions as the reference, 200ms preview, Escape restores, accept writes `workbench.colorTheme`; File Icon Theme picker (`workbench.action.selectIconTheme`, Themes submenu): None and the installed themes, preview, Escape restores, accept writes `workbench.iconTheme` (null for None) (cargo test -p app themes); Product Icon Theme picker (`workbench.action.selectProductIconTheme`, Themes submenu): Default and the installed themes, writes `workbench.productIconTheme` (cargo test -p app product_icon; product-icons-pair `picker`: the same rows, except the reference's "Test Product Icon Theme" of vscode-colorize-tests, a test extension the port does not ship); no Marketplace browsing, no `window.autoDetectColorScheme` |
| workbench/contrib/timeline | workbench contribution | M14 | verified | | Timeline view (workbench/timeline_view.rs, timeline.rs): active editor and workspace timelines, paging, follow active editor, excluded sources in profile storage, compare selected, keyboard, `timeline/item/context` and title menus: cargo test -p app timeline; the title toolbar is a tab stop between the pane header and the tree (Shift+Tab focuses its first action with its hover, Left/Right, Enter): cargo test -p app shift_tab_reaches_the_title_toolbar; ui-pair m12/timeline.json header step matches; item labels draw their `$(icon)`s (cargo test -p app an_item_label_draws_its_icons); a `null` `timeline.pageSize` follows the view height (cargo test -p app a_null_page_size_follows_the_view_height) |
| workbench/contrib/typeHierarchy | workbench contribution | M13 | verified | | Peek Type Hierarchy in workbench/hierarchy_peek.rs: supertypes/subtypes toggle, layout `typeHierarchyPeekLayout`, the focused message of an empty answer, `_executePrepareTypeHierarchy`, `_executeProvideSupertypes`, `_executeProvideSubtypes`; cargo test -p app hierarchy; ui-pair port/results/language-features.md (Type hierarchy) |
diff --git a/port/notes.md b/port/notes.md
index 2119addf2fd..d99276fa4ce 100644
--- a/port/notes.md
+++ b/port/notes.md
@@ -877,6 +877,7 @@ Scope as in the M19 Work row of port/ledger.md.
- js-debug: `ms-vscode.js-debug` 1.140.1, `js-debug-companion` 1.1.3 and `vscode-js-profile-table` 1.0.11 (product.json `builtInExtensions`) are MIT and on Open VSX at those versions. Decision: ship them as upstream's dev build does, from `.build/builtInExtensions`, which `port/tools/fetch-builtin-extensions` fills from Open VSX; `exthost::scan::scan_dev_system_extensions` adds them to the built-ins. No marketplace or Microsoft service is contacted.
- Testing (`testing.rs`, `workbench/testing_service.rs`, `testing_view.rs`): MainThreadTesting with the test collection diffs, run profiles, live results (`$runControllerTests`, `$startedExtensionTestRun`, `$applyTestRunUpdates`, `$publishTestResults`), the Testing view (shows once a controller registers), run glyphs in the editor gutter and the Test Results editor. VSBuffer arguments of forwarded requests now reach the workbench as byte arrays (`exthost::session::arg_value`).
- Test Explorer title (testExplorerActions.ts, `testing_view.rs`): the navigation actions end with Show Output (`terminal`, disabled until a result exists); the "..." holds View as List/Tree, Sort by Status/Location/Duration (workspace storage `testing.viewMode` and `testing.viewSorting`, as testingExplorerView.ts) and Collapse All Tests, Clear All Results. Shortcut: View as List lists the tests the collection has resolved; listProjection.ts also asks the controller to resolve every level (`expandElement(root, Infinity)`), which the port does not send.
+- Test Results tree (`workbench/testing_results.rs`; testResultsTree.ts `OutputPeekTree`): rows drawn as the workbench tree rows (4px inset, rounded, `list_row_selection`, indent guides, listCommands.ts keys while focused); a new run selects and focuses its first task without taking the focus (`revealItem` with `preserveFocus`). Decision: the task row always shows its twistie when it has children. The reference renders the task row while the task is still childless (`onNewTask`), and abstractTree.ts `renderTreeElement` redraws a twistie only on a collapse state change, so the reference shows no twistie until the row is toggled or rendered again; the port draws the state a fresh render gives.
- Continuous run (`workbench/testing_continuous.rs`): the view title's dropdown of `getContinuousRunDropdown` runs plain actions upstream; the port's context menu runs commands, so each profile item is an internal `_testing.toggleContinuousRunProfile.<controller>.<profile>` command registered when the menu shows. testingExplorerView.ts re-sorts a parent when a continuous run changes, but `TreeSorter` has no continuous run criterion in 1.147.0, so the order does not change; the port draws rows from the run state each frame and needs no re-sort. The unattended restart participant `testing.continuousRun` waits on the unattended restart service (ledger row workbench/services/lifecycle).
- Inline values (`workbench/debug_inline_values.rs`; debugEditorContribution.ts): `debug.inlineValues` `on` or `auto` with a provider shows the focused frame's values as `InjectionOwner::DebugInlineValue` text after the lines, `editor.inlineValuesForeground` on `editor.inlineValuesBackground`. Shortcuts: only the active editor shows them, where upstream decorates every editor on the frame's file; the scopes and variables are fetched again, not shared with the Variables view's cache; the text area width stands in for `layoutInfo.width` in the line length cut.
- Debug hover (`workbench/debug_hover.rs`; debugHover.ts, debugEditorContribution.ts hover handling): while stopped, the expression at the mouse in the focused frame's file (the first `EvaluatableExpressionProvider` through `$provideEvaluatableExpression`, else `getExactExpressionStartAndEnd`) is evaluated with `context: "hover"` (or looked up in the cheap scopes without `supportsEvaluateForHovers`) after the doubled `editor.hover.delay`, the editor hover off meanwhile; Alt swaps it for the editor hover; Cmd+K Cmd+I shows it at the cursor. The focused tree takes listWidget.ts's and abstractTree.ts's keys through the `list.*` commands (Up, Down, Page Up, Page Down, Home, End, Left, Right, Space, Enter, type navigation by name), Escape clears a selection before it hides the widget; `layoutTree` sizes the tree to its rows plus 10px, at most max(266px, 55% of the editor) and the hovered line's top less 22px. The visualizers are a ledger gap of workbench/contrib/debug; the context menu is under Variable menus. The glyph margin lifts the editor hover lockout; the hovered position is the nearer edge of the character under the mouse, a tab's middle included. Lazy rows (`presentationHint.lazy`) draw the `$(eye)` button after the name in the hover, Variables and Watch trees; a lazy watch, hover or REPL result is evaluated at once (debugModel.ts `evaluateExpression` without `keepLazyVars`). A click on an expandable row focuses and toggles it; with Alt the descendants whose children are loaded follow, the others stay collapsed (indexTreeModel.ts `_setNodeCollapseState` recursive, asyncDataTree.ts collapsing a stale node a deep expand reaches). `list.find` (Cmd+Alt+F, F3) on the focused tree opens abstractTree.ts's find widget over 30px of padding: highlight or filter mode and fuzzy or contiguous match by `workbench.list.defaultFindMode` and `defaultFindMatchType` and the widget's toggles, the filter keeps a collapsed parent of a loaded match, "No results found.", the focus to the first match from the focused row; it outlives each shown value like the tree, and Escape hides the hover and runs `list.closeFind` after it. ui-pair on `port/fixtures/debug-node` (Cmd+K Cmd+I on `numbers` and `greeting`) matches the reference's placement, tree indent and focus outline.