Visual Studio Code, rebuilt in Rust
Rust
feat(testing): show plain text messages in a read-only code editor
rokartur14e3ffe2cf1b
diff --git a/native/crates/app/src/editor.rs b/native/crates/app/src/editor.rsindex a8fb91f4dc5..0b2e4eaa850 100644--- a/native/crates/app/src/editor.rs+++ b/native/crates/app/src/editor.rs@@ -893,6 +893,13 @@ impl GroupState {pub const PANEL_GROUP: u32 = u32::MAX;/// The modal editor part's one group (modalEditorPart.ts), outside the grid like the panel's.pub const MODAL_GROUP: u32 = u32::MAX - 1;+/// The Test Results view's code editors (testResultsOutput.ts content providers), in the panel like the Output view's.+pub const TEST_RESULTS_GROUP: u32 = u32::MAX - 2;++/// Whether `id` is a group of a panel view's code editors.+pub fn is_panel_group(id: u32) -> bool {+ id == PANEL_GROUP || id == TEST_RESULTS_GROUP+}/// A peek widget's embedded code editor: referencesWidget.ts `_preview`, callHierarchyPeek.ts and typeHierarchyPeek.ts/// `_editor`, quickDiffWidget.ts `diffEditor`'s modified editor.@@ -1377,7 +1384,7 @@ impl EditorGroup {/// The editor groups, most recently active first; the panel's group is not one.pub fn group_ids_mru(&self) -> Vec<u32> {- std::iter::once(self.id).chain(self.group_mru.iter().copied()).filter(|id| *id != PANEL_GROUP && !self.is_side_group(*id)).collect()+ std::iter::once(self.id).chain(self.group_mru.iter().copied()).filter(|id| !is_panel_group(*id) && !self.is_side_group(*id)).collect()}/// Whether `id` is the group of a side by side editor's secondary side.@@ -1465,7 +1472,7 @@ impl EditorGroup {/// Whether the part has more than one editor group.pub fn has_several_groups(&self) -> bool {- std::iter::once(self.id).chain(self.other_groups.iter().map(|group| group.id)).filter(|id| *id != PANEL_GROUP && *id != MODAL_GROUP && !self.is_side_group(*id)).count() > 1+ std::iter::once(self.id).chain(self.other_groups.iter().map(|group| group.id)).filter(|id| !is_panel_group(*id) && *id != MODAL_GROUP && !self.is_side_group(*id)).count() > 1}/// The panel's group, made on first use.diff --git a/native/crates/app/src/editor/view.rs b/native/crates/app/src/editor/view.rsindex ae45eab8437..66b261b024f 100644--- a/native/crates/app/src/editor/view.rs+++ b/native/crates/app/src/editor/view.rs@@ -71,8 +71,8 @@ impl OpenEditor {/// `_getContentHeight` with `scrollBeyondLastLine`, at least the viewport.pub fn scroll_height(&self, viewport: Viewport) -> f32 {let lines = self.line_top(self.view_line_count(), viewport);- // walkThroughPart.ts `getEditorOptions`, simpleCommentEditor.ts and referencesWidget.ts set scrollBeyondLastLine false.- if self.peek_preview.is_some() || matches!(self.document().scheme.as_str(), crate::workbench::walkthrough_part::SNIPPET_SCHEME | crate::workbench::comments::INPUT_SCHEME) {+ // walkThroughPart.ts `getEditorOptions`, simpleCommentEditor.ts, referencesWidget.ts and testResultsOutput.ts set scrollBeyondLastLine false.+ if self.peek_preview.is_some() || matches!(self.document().scheme.as_str(), crate::workbench::walkthrough_part::SNIPPET_SCHEME | crate::workbench::comments::INPUT_SCHEME | crate::testing::TEST_DATA_SCHEME) {return viewport.height.max(lines);}viewport.height.max(lines + (viewport.height - viewport.line_height).max(0.))diff --git a/native/crates/app/src/testing.rs b/native/crates/app/src/testing.rsindex e3c0ed1c191..220ae89784c 100644--- a/native/crates/app/src/testing.rs+++ b/native/crates/app/src/testing.rs@@ -9,6 +9,9 @@ use serde_json::{Value, json};use crate::filters::compare_file_names;+/// testingUri.ts `TEST_DATA_SCHEME`: the models of a result's messages and outputs.+pub const TEST_DATA_SCHEME: &str = "vscode-test-data";+#[cfg(test)]mod tests;diff --git a/native/crates/app/src/workbench/editor_groups.rs b/native/crates/app/src/workbench/editor_groups.rsindex fa0d2e6d9e4..4f32a2be768 100644--- a/native/crates/app/src/workbench/editor_groups.rs+++ b/native/crates/app/src/workbench/editor_groups.rs@@ -19,7 +19,7 @@ use crate::editor::minimap::MinimapLayoutInfo;use super::search_editor_view::SEARCH_EDITOR_SCHEME;use super::webview_panels::WEBVIEW_PANEL_SCHEME;use crate::commands::Outcome;-use crate::editor::{MODAL_GROUP, PANEL_GROUP};+use crate::editor::{MODAL_GROUP, is_panel_group};use crate::editor_grid::{Direction, EditorGrid, GridSash, GroupLayout, Orientation, SashId, SplitSizing};use crate::split_view::SashState;@@ -161,7 +161,7 @@ impl Workbench {self.commands.register("workbench.action.closeEditorsInOtherGroups", |workbench, _, window, cx| {workbench.leave_panel_group();let keep = workbench.editors.id;- let others = workbench.editors.group_ids_mru().into_iter().filter(|group| *group != keep && *group != PANEL_GROUP).collect();+ let others = workbench.editors.group_ids_mru().into_iter().filter(|group| *group != keep && !is_panel_group(*group)).collect();workbench.close_editors_in_groups(others, keep, window, cx)});let splits = [@@ -394,7 +394,7 @@ impl Workbench {/// The part `group` is in; `None` for a group in no part's grid: the modal and panel groups and a side by side/// editor's secondary side.pub(super) fn part_of_group(&self, group: u32) -> Option<u32> {- if group == MODAL_GROUP || group == PANEL_GROUP || self.editors.is_side_group(group) {+ if group == MODAL_GROUP || is_panel_group(group) || self.editors.is_side_group(group) {return None;}Some(self.editor_groups.auxiliary_part_of(group).unwrap_or(MAIN_PART))@@ -416,7 +416,7 @@ impl Workbench {/// Editor group commands act on the editor groups: focus in the panel's editor gives way to the last group first.pub(super) fn leave_panel_group(&mut self) {- if self.editors.id == PANEL_GROUP {+ if is_panel_group(self.editors.id) {let group = self.editor_group_id();self.activate_group(group);}@@ -712,7 +712,7 @@ impl Workbench {let removable = match self.part_of_group(group) {Some(MAIN_PART) => self.part_groups(MAIN_PART).len() > 1,Some(_) => true,- None => group != PANEL_GROUP,+ None => !is_panel_group(group),};// The modal part enforces `closeEmptyGroups`: its group goes with its last editor.if empty && (group == MODAL_GROUP || removable && self.setting("workbench.editor.closeEmptyGroups") != json!(false)) {diff --git a/native/crates/app/src/workbench/editor_view.rs b/native/crates/app/src/workbench/editor_view.rsindex f0e344ddb84..febda981f8d 100644--- a/native/crates/app/src/workbench/editor_view.rs+++ b/native/crates/app/src/workbench/editor_view.rs@@ -1093,6 +1093,9 @@ impl Workbench {// editor also has no glyph margin (ui-pair steps-comment-reply-editor.json).metrics.decorations_width = 0.;metrics.glyph_margin = !is_comment_input(editor);+ } else if editor.document().scheme == crate::testing::TEST_DATA_SCHEME {+ // testResultsOutput.ts `commonEditorOptions`: glyphMargin false.+ metrics.glyph_margin = false;} else if editor.document().scheme == crate::notebook::CELL_SCHEME {// cellEditorOptions.ts: lineDecorationsWidth 0, only the folding controls.metrics.decorations_width = DECORATIONS_WIDTH - 10.;@@ -1127,6 +1130,8 @@ impl Workbench {match editor.line_numbers_override.or_else(|| setting.as_ref().and_then(|value| value.as_str())) {// outputView.ts `OutputEditor.getConfigurationOverrides`: the Output view's editor hides line numbers._ if self.editors.id == crate::editor::PANEL_GROUP && editor.document().scheme == crate::output::OUTPUT_SCHEME => LineNumbers::Off,+ // testResultsOutput.ts `commonEditorOptions`: lineNumbers off in a result message's editor.+ _ if editor.document().scheme == crate::testing::TEST_DATA_SCHEME => LineNumbers::Off,_ if self.zen_mode_hides_line_numbers() => LineNumbers::Off,// simpleEditorOptions.ts: an interactive window's or REPL editor's input has none._ if self.is_interactive_input(editor) || is_comment_input(editor) => LineNumbers::Off,@@ -1415,7 +1420,8 @@ impl Workbench {cx.notify();})),)- .when(!in_cell, |area| area.child(div().debug_selector(move || format!("overview-ruler-{model_id}")).absolute().top_0().right_0().h_full().child(self.overview_ruler(editor).h_full())))+ // testResultsOutput.ts `commonEditorOptions`: `overviewRulerLanes: 0` in a result message's editor.+ .when(!in_cell && editor.document().scheme != crate::testing::TEST_DATA_SCHEME, |area| area.child(div().debug_selector(move || format!("overview-ruler-{model_id}")).absolute().top_0().right_0().h_full().child(self.overview_ruler(editor).h_full()))).when(!in_multi_diff, |area| area.child(self.scrollbars_canvas(editor, metrics, cx).absolute().inset_0()))// contextmenu.ts: a right press on the scrollbar (MouseTargetType.SCROLLBAR) shows the minimap menu..child(div().absolute().top_0().bottom_0().right_0().w(px(VERTICAL_SCROLLBAR_WIDTH)).on_mouse_down(@@ -1677,7 +1683,10 @@ impl Workbench {/// on a track centers the slider on the pointer, then the slider follows the pointer until release.fn scrollbars_canvas(&self, editor: &OpenEditor, metrics: EditorMetrics, cx: &mut Context<Self>) -> gpui::Canvas<Vec<(Hitbox, Bounds<Pixels>, Axis)>> {let viewport = self.editors.viewport;- let bars = [(Axis::Vertical, editor.vertical_scrollbar(viewport)), (Axis::Horizontal, editor.horizontal_scrollbar(viewport))];+ let mut vertical = editor.vertical_scrollbar(viewport);+ // testResultsOutput.ts `commonEditorOptions`: `scrollbar.vertical` hidden in a result message's editor.+ vertical.needed &= editor.document().scheme != crate::testing::TEST_DATA_SCHEME;+ let bars = [(Axis::Vertical, vertical), (Axis::Horizontal, editor.horizontal_scrollbar(viewport))];let opacity = self.scrollbars.opacity(Instant::now());let shown = self.scrollbars.shown;let drag = self.scrollbars.drag;@@ -2689,10 +2698,10 @@ impl Workbench {/// diffEditorEditors.ts `_adjustOptionsForSubEditor` turns the minimap off in a diff's sides, mergeEditor.ts/// `applyOptions` in a merge editor's, walkThroughPart.ts `getEditorOptions` in the playground's editors,- /// simpleCommentEditor.ts in a comment's, referencesWidget.ts in the peek's.+ /// simpleCommentEditor.ts in a comment's, referencesWidget.ts in the peek's, testResultsOutput.ts in a result message's.fn minimap_enabled(&self, editor: &OpenEditor) -> bool {- let in_snippet = editor.document().scheme == super::walkthrough_part::SNIPPET_SCHEME;- self.editors.active_diff().is_none() && self.editors.active_multi_diff().is_none() && self.editors.active_merge().is_none() && !self.in_cell_editor(editor) && !in_snippet && !is_comment_input(editor) && editor.peek_preview.is_none() && self.minimap_settings().enabled+ let minimap_off_scheme = matches!(editor.document().scheme.as_str(), super::walkthrough_part::SNIPPET_SCHEME | crate::testing::TEST_DATA_SCHEME);+ self.editors.active_diff().is_none() && self.editors.active_multi_diff().is_none() && self.editors.active_merge().is_none() && !self.in_cell_editor(editor) && !minimap_off_scheme && !is_comment_input(editor) && editor.peek_preview.is_none() && self.minimap_settings().enabled}/// `editorOverviewRuler.background`, else the tokens' default background while the minimap is on the right, so@@ -2742,8 +2751,8 @@ impl Workbench {let decoration_marks = self.text_decoration_ruler_marks(editor);// diffEditorItemTemplate.ts: a multi diff file's editor has `overviewRulerBorder: false` and `scrollBeyondLastLine: false`.let in_multi_diff = self.editors.multi_diff_side(editor.model_id).is_some();- // simpleCommentEditor.ts and referencesWidget.ts also set `scrollBeyondLastLine: false`.- let scroll_beyond_last_line = !in_multi_diff && !is_comment_input(editor) && editor.peek_preview.is_none();+ // simpleCommentEditor.ts, referencesWidget.ts and testResultsOutput.ts also set `scrollBeyondLastLine: false`.+ let scroll_beyond_last_line = !in_multi_diff && !is_comment_input(editor) && editor.peek_preview.is_none() && editor.document().scheme != crate::testing::TEST_DATA_SCHEME;let border = self.theme.color("editorOverviewRuler.border").filter(|_| !in_multi_diff);let background = self.overview_ruler_background(editor);let Viewport { top_whitespace, line_height, .. } = self.editors.viewport;diff --git a/native/crates/app/src/workbench/readonly.rs b/native/crates/app/src/workbench/readonly.rsindex f601d142b0d..8255246b6d6 100644--- a/native/crates/app/src/workbench/readonly.rs+++ b/native/crates/app/src/workbench/readonly.rs@@ -102,7 +102,7 @@ impl Workbench {if scheme == "untitled" {return None;}- if scheme == crate::output::OUTPUT_SCHEME {+ if scheme == crate::output::OUTPUT_SCHEME || scheme == crate::testing::TEST_DATA_SCHEME {return Some(Readonly::Editor);}// The interactive window's and REPL editor's lists are read-only (`isReadOnly: true`), their input is not.diff --git a/native/crates/app/src/workbench/testing_results.rs b/native/crates/app/src/workbench/testing_results.rsindex 358075a6a7d..ee9591b0764 100644--- a/native/crates/app/src/workbench/testing_results.rs+++ b/native/crates/app/src/workbench/testing_results.rs@@ -3,6 +3,7 @@use std::cmp::Reverse;use std::collections::HashMap;+use std::path::PathBuf;use gpui::{ClickEvent, Context, Div, MouseButton, MouseDownEvent, Window, div, prelude::*, px};use serde_json::{Value, json};@@ -12,8 +13,9 @@ use super::hover::{HoverContent, HoverOptions};use super::testing_item_menu::result_state_context;use super::testing_view::state_icon;use crate::commands::Outcome;+use crate::editor::{TEST_RESULTS_GROUP, TextDocument};use crate::menus::{MenuAction, MenuId, menu_actions, menu_group_actions};-use crate::testing::{GROUP_DEBUG, GROUP_RUN, ResultState, TestResult, parent_id};+use crate::testing::{GROUP_DEBUG, GROUP_RUN, ResultState, TEST_DATA_SCHEME, TestResult, parent_id};/// marshallingIds.ts `MarshalledId.TestItemContext` and `TestMessageMenuArgs`.const TEST_ITEM_CONTEXT_MID: u64 = 16;@@ -122,6 +124,17 @@ fn is_error_message(message: &Value) -> bool {message["type"] == 0}+/// PlainTextMessagePeek `update`: a string message that is no `TestMessageType.Output` and not `ITestMessage.isDiffable`.+fn is_plain_text_message(message: &Value) -> bool {+ let diffable = is_error_message(message) && !message["expected"].is_null() && !message["actual"].is_null();+ message["message"].is_string() && message["type"] != 1 && !diffable+}++/// testingUri.ts `buildTestUri` of a `TestUriType.ResultMessage`, with its authority and query in the path as models keep them.+fn message_path(result: &str, task: usize, test: &str, message: usize) -> PathBuf {+ PathBuf::from(format!("//results/{result}/message/{task}/{message}/TestFailureMessage?{test}"))+}+/// `getResultChildren`: a node per task with its tests that ran or have messages, worst state first, each with/// its error messages.fn result_children(result: &TestResult) -> Vec<Node> {@@ -564,11 +577,42 @@ impl Workbench {_ => return,};self.testing_view.results_subject = Some(subject);+ self.show_message_editor();+ }++ /// PlainTextMessagePeek `update`: a plain text message opens as its `messageUri` model in a read-only code editor.+ fn show_message_editor(&mut self) {+ let Some(InspectSubject::Message { result, task, test, message }) = &self.testing_view.results_subject else { return };+ let value = &self.result_by_id(result).expect("the subject is a result's").items[test].tasks[*task].messages[*message];+ if !is_plain_text_message(value) {+ return;+ }+ let path = message_path(result, *task, test, *message);+ let text = super::debug_console::strip_ansi(message_text(value));+ let document = TextDocument::from_text(TEST_DATA_SCHEME, &path, &text, "utf8".into(), None, &self.languages, &self.settings.lock().unwrap());+ self.editors.ensure_detached_group(TEST_RESULTS_GROUP);+ self.with_group(TEST_RESULTS_GROUP, |workbench| {+ match workbench.editors.editors.first() {+ Some(editor) if editor.document().path == path => workbench.editors.activate(0),+ Some(_) => workbench.editors.replace(0, document),+ None => workbench.editors.open(document, false),+ }+ // wordHighlighter.ts runs on an explicit cursor move or the text focus, which a model set here is not.+ workbench.editors.active_mut().expect("just opened").highlights.clear();+ });+ }++ /// The code editor of the opened message, while it shows that message.+ fn message_editor(&self) -> Option<&crate::editor::OpenEditor> {+ let Some(InspectSubject::Message { result, task, test, message }) = &self.testing_view.results_subject else { return None };+ let in_group = self.editors.id == TEST_RESULTS_GROUP || self.editors.group(TEST_RESULTS_GROUP).is_some();+ let path = message_path(result, *task, test, *message);+ self.editors.group_tabs(TEST_RESULTS_GROUP).0.first().filter(|editor| in_group && editor.document().is(TEST_DATA_SCHEME, &path))}/// The Test Results view: the opened subject's text and, by `testing.resultsView.layout`, the tree on its right/// or left, each half the width (`Sizing.Distribute`).- pub(super) fn test_results_body(&self, window: &Window, cx: &mut Context<Self>) -> Div {+ pub(super) fn test_results_body(&mut self, window: &mut Window, cx: &mut Context<Self>) -> Div {let content = self.results_content(window, cx);let tree = self.results_tree(window, cx);let body = div().flex_1().min_h_0().flex();@@ -683,9 +727,22 @@ impl Workbench {.child(self.hover_target(gpui::SharedString::from(format!("results-action-hover-{}", action.title)), HoverContent::Text(action.title), HoverOptions::action_item()))}- /// The subject's text: a message, a task's output or a test's output in a task, as plain lines; a message+ /// The subject: a plain text message in its code editor, else a task's or a test's output as plain lines; a message/// with testResultsViewContent.ts `populateFloatingClick`'s button.- fn results_content(&self, window: &Window, cx: &mut Context<Self>) -> gpui::Stateful<Div> {+ fn results_content(&mut self, window: &mut Window, cx: &mut Context<Self>) -> gpui::Stateful<Div> {+ if self.message_editor().is_some() {+ let body = |workbench: &mut Self, window: &mut Window, cx: &mut Context<Self>| {+ let editor = workbench.editors.active().expect("the message's editor");+ div().flex_1().min_h_0().flex().flex_col().child(workbench.text_area(editor, window, cx))+ };+ let editor = match self.editors.id == TEST_RESULTS_GROUP {+ true => body(self, window, cx),+ false => self.swapped_group_body(TEST_RESULTS_GROUP, body, window, cx),+ };+ let floating = self.results_floating_button(window, cx);+ // callStackWidget.ts hosts the message in a list row, so the pane's list row inset applies.+ return div().id("test-results-output").flex_1().min_w_0().relative().px(px(self.pane_row_inset())).flex().flex_col().child(editor).children(floating);+ }let content = div().id("test-results-output").flex_1().min_w_0().relative().overflow_y_scroll().p(px(8.)).font_family("Menlo").text_size(px(12.)).flex().flex_col();let text = self.testing_view.results_subject.as_ref().and_then(|subject| self.subject_text(subject));let lines = super::debug_console::strip_ansi(&text.unwrap_or_default()).lines().map(|line| div().whitespace_nowrap().child(line.to_owned())).collect::<Vec<_>>();diff --git a/native/crates/app/src/workbench/testing_results/tests.rs b/native/crates/app/src/workbench/testing_results/tests.rsindex baa7b889f67..8b848bc6845 100644--- a/native/crates/app/src/workbench/testing_results/tests.rs+++ b/native/crates/app/src/workbench/testing_results/tests.rs@@ -40,6 +40,26 @@ fn add_results(workbench: &mut Workbench) {workbench.testing.results = vec![newest, older];}+/// testResultsOutput.ts `PlainTextMessagePeek`: an opened plain text message shows its `messageUri` model in a+/// read-only code editor without line numbers, in a group outside the grid; another message replaces it.+#[gpui::test]+fn an_opened_plain_text_message_shows_in_a_read_only_code_editor(cx: &mut TestAppContext) {+ let (workbench, cx, _host) = workbench_with_tests("test-results-plain-text", TESTS, cx);+ workbench.update_in(cx, |workbench, _, _| {+ add_results(workbench);+ workbench.open_results_element(&ResultsElement::Message { result: "r1".into(), task: 0, test: "c\0f\0b".into(), message: 0 });+ let editor = workbench.message_editor().expect("the message's code editor");+ assert_eq!((editor.document().uri_string(), editor.document().lines.clone()), ("vscode-test-data://results/r1/message/0/0/TestFailureMessage?c%00f%00b".to_owned(), vec!["expected 1".to_owned(), "but got 2".to_owned()]));+ assert_eq!(workbench.line_numbers(editor), crate::workbench::editor_view::LineNumbers::Off);+ assert!(editor.highlights.is_empty(), "no word highlight before a cursor move");+ assert!(workbench.readonly(crate::testing::TEST_DATA_SCHEME, &editor.document().path).is_some());+ assert!(!workbench.editors.group_ids_mru().contains(&crate::editor::TEST_RESULTS_GROUP));+ workbench.open_results_element(&ResultsElement::Message { result: "r1".into(), task: 0, test: "c\0f\0c".into(), message: 1 });+ let (editors, _) = workbench.editors.group_tabs(crate::editor::TEST_RESULTS_GROUP);+ assert_eq!(editors.iter().map(|editor| editor.document().lines.clone()).collect::<Vec<_>>(), vec![vec!["second".to_owned()]]);+ });+}+fn drawn_rows(workbench: &Workbench) -> Vec<String> {workbench.results_rows()diff --git a/port/ledger.md b/port/ledger.mdindex aa2da392897..9f843010180 100644--- a/port/ledger.md+++ b/port/ledger.md@@ -602,7 +602,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_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/testing | workbench contribution | M16 | ported | [3 M] testing_results.rs `results_content`: an output, a diffable message and a markdown message are plain text lines, not testResultsOutput.ts's terminal, diff and markdown peeks; a plain text message's ANSI colors are stripped (`colorizeTestMessageInEditor`); 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 an_opened_plain_text_message_shows_in_a_read_only_code_editor 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.mdindex 78af3234b55..3548d79d6c5 100644--- a/port/notes.md+++ b/port/notes.md@@ -880,6 +880,7 @@ Scope as in the M19 Work row of port/ledger.md.- 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.- Test resolution timing: treeProjection.ts `storeItem` expands only depth-0 items, the controller roots; a single root's children show on the explorer's top level collapsed (index.ts `getChildrenForParent`, `depth > 0`) and resolve only when the user expands them, and testService.ts `testsInFile` yields an open file's item without expanding it. The port expanded those file items at publish, so the tests-provider fixture's `resolveHandler` ran for every file and Run All ran each test, where the reference's run handler finds the unresolved file item and runs it as one test (`math.test.js` without children in the results). `TestCollection::apply` now answers only the roots.+- Test Results content editors (`workbench/testing_results.rs`; testResultsOutput.ts content providers): the view's code editors live in `TEST_RESULTS_GROUP`, a group outside the grid like the Output view's `PANEL_GROUP` (`is_panel_group`), so they select, copy and take the editor keys through the same code; `PlainTextMessagePeek` opens a plain text message's `messageUri` model (`vscode-test-data://results/<result>/message/<task>/<message>/TestFailureMessage?<test>`) there read-only, without line numbers, glyph margin, minimap or `scrollBeyondLastLine` (`commonEditorOptions`). Shortcut: ANSI escapes in the message are stripped, not colored as `colorizeTestMessageInEditor` does.- 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.