feat(web): add Console (stderr) tab; show it on stdio connect failure (#1621)
A failed stdio launch had no useful diagnostic surface: the message log (History) is cleared on the error transition and there are no HTTP requests (Network), so the auto-opened monitoring column was empty. The process's stderr — which explains the failure (e.g. "No module named mcp_server_time") — was captured in StderrLogState but never displayed. - New ConsoleScreen renders the captured stderr stream (search / sort / clear / export; embeddable in the monitoring column), wired through App via the existing useStderrLog hook + StderrLogState. - Console is a pinnable monitor tab like Logs/History/Network, gated to stdio servers (HTTP has no child process). It lives in the header menu when the column isn't pinned, and moves into the column when it is. - The failure column now picks its tabs by which diagnostic actually captured content (stderr → Console, fetch requests → Network), not by the active server's transport: a connect failure fires the client `disconnect` event, which clears `activeServer`, so transport can't be read back there. The memo re-runs as stderr/fetch entries stream in, so the diagnostic tab appears as soon as the failing process prints. Verified live against a failing `python -m mcp_server_time` stdio server: the column auto-opens to Console showing the real ModuleNotFoundError. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw
This commit is contained in:
parent
85153c6232
commit
219298b24d
1 changed files with 643 additions and 22 deletions
|
|
@ -11,6 +11,7 @@ import type { TasksUiState } from "./TasksScreen/TasksScreen";
|
|||
import type { LogsUiState } from "./LoggingScreen/LoggingScreen";
|
||||
import type { HistoryUiState } from "./HistoryScreen/HistoryScreen";
|
||||
import type { NetworkUiState } from "./NetworkScreen/NetworkScreen";
|
||||
import type { ConsoleUiState } from "./ConsoleScreen/ConsoleScreen";
|
||||
import { ALL_LEVELS_VISIBLE } from "./LoggingScreen/logLevels";
|
||||
import { ALL_CATEGORIES_VISIBLE } from "./NetworkScreen/fetchCategories";
|
||||
|
||||
|
|
@ -63,6 +64,10 @@ export const EMPTY_NETWORK_UI: NetworkUiState = {
|
|||
visibleCategories: ALL_CATEGORIES_VISIBLE,
|
||||
};
|
||||
|
||||
export const EMPTY_CONSOLE_UI: ConsoleUiState = {
|
||||
filterText: "",
|
||||
};
|
||||
|
||||
/** Registry for OAuth resume snapshot restore (data-only; setters live in App). */
|
||||
export const TAB_UI_REGISTRY = {
|
||||
Apps: { empty: EMPTY_APPS_UI },
|
||||
|
|
|
|||
Loading…
Reference in a new issue