Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions experiments/shell/shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 9 additions & 0 deletions experiments/shell/workspace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading