diff --git a/experiments/shell/shell.cpp b/experiments/shell/shell.cpp index 29aa6e1f..52bb2f27 100644 --- a/experiments/shell/shell.cpp +++ b/experiments/shell/shell.cpp @@ -1151,6 +1151,21 @@ class ShellWindow { RECT client{}; GetClientRect(hwnd_, &client); size_changed(client.right, client.bottom); } HWND handle() const { return hwnd_; } + // Read-only diagnostic view used by the workspace failure dump (#73): the + // same counters the per-tab dump prints, without running its teardown path. + std::string diagnostic_line() const { + std::ostringstream out; + out << "input_high_water=" << input_.high_water + << " input_rejected=" << input_.rejected + << " output_bytes=" << session_.output_bytes + << " read_error=" << session_.read_error + << " consumed=" << result_.consumed + << " stage=" << stage_ + << " closing=" << (closing_ ? "true" : "false") + << " child_signaled=" << (session_.child_signaled ? "true" : "false") + << " exit_code=" << session_.exit_code; + return out.str(); + } void enable_operation_observation() { require_ui_thread(); require(!closing_,"operation observation must be enabled before close"); if(operation_observations_.enabled()) return; diff --git a/experiments/shell/workspace.hpp b/experiments/shell/workspace.hpp index c5c439b2..e737f095 100644 --- a/experiments/shell/workspace.hpp +++ b/experiments/shell/workspace.hpp @@ -648,6 +648,15 @@ class Workspace { // Workspace scenarios (selection, actions, shells) fail outside the // per-tab dump, so report the scenario identity and the message here. std::cerr << "workspace-failure mode=" << self->test_mode_ << " what=" << self->failure_ << '\n'; + // Per-tab counters: which session was waiting matters more than the text. + for (const auto group : {Group::bottom, Group::main}) { + auto& tabs = self->group_tabs(group); + for (size_t index = 0; index < tabs.size(); ++index) { + if (!tabs[index].shell) continue; + std::cerr << " tab " << (group == Group::main ? "main" : "bottom") << ':' << index << ' ' + << tabs[index].shell->diagnostic_line() << '\n'; + } + } self->discard_and_close(); } return DefWindowProcW(hwnd,message,wp,lp);