refactor(web): rename "History" tab/feature to "Protocol" (#1623)

Rename the web client's History tab and its supporting code to Protocol
so the feature reads as the MCP "Protocol" view.

- Tab renders as "Protocol"; INSPECTOR_TAB_IDS, InspectorView tab
  constants/MonitorTab, TAB_UI_REGISTRY key, and navigation.ts tab id all
  updated to Protocol.
- Rename components + folders: HistoryScreen -> ProtocolScreen,
  HistoryListPanel -> ProtocolListPanel, HistoryEntry -> ProtocolEntry,
  HistoryControls -> ProtocolControls, historyUtils -> protocolUtils
  (plus their tests and stories, and exported types).
- Rename App/InspectorView plumbing: historyUi, pinnedHistoryIds,
  on*History* handlers/props, replayHistoryRequest,
  isReplayableHistoryMethod, sort/compact scopes, etc. -> Protocol names.
- Export filenames use the "protocol" slug (buildExportFilename +
  ExportKind).

Preserved (per issue #1623 decisions):
- The in-panel section discriminator keeps its "pinned" | "history"
  values, and the sub-sections stay labeled Pinned / History.
- window.history and core message-log/replay concepts are untouched.

npm run ci passes (format, lint, build, unit tests, >=90 per-file
coverage gate, smoke, Storybook).

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:
cliffhall 2026-07-09 19:04:54 -04:00
commit ace4250d31

View file

@ -6,7 +6,7 @@
import {
EMPTY_APPS_UI,
EMPTY_HISTORY_UI,
EMPTY_PROTOCOL_UI,
EMPTY_LOGS_UI,
EMPTY_NETWORK_UI,
EMPTY_PROMPTS_UI,
@ -15,7 +15,7 @@ import {
EMPTY_TOOLS_UI,
} from "../components/screens/screenUiState.js";
import type { AppsUiState } from "../components/screens/AppsScreen/AppsScreen.js";
import type { HistoryUiState } from "../components/screens/HistoryScreen/HistoryScreen.js";
import type { ProtocolUiState } from "../components/screens/ProtocolScreen/ProtocolScreen.js";
import type { LogsUiState } from "../components/screens/LoggingScreen/LoggingScreen.js";
import type { NetworkUiState } from "../components/screens/NetworkScreen/NetworkScreen.js";
import type { PromptsUiState } from "../components/screens/PromptsScreen/PromptsScreen.js";
@ -65,7 +65,7 @@ export interface LiftedTabUiState {
appsUi: AppsUiState;
tasksUi: TasksUiState;
logsUi: LogsUiState;
historyUi: HistoryUiState;
protocolUi: ProtocolUiState;
networkUi: NetworkUiState;
}
@ -76,7 +76,7 @@ export interface TabUiSetters {
setAppsUi: (next: AppsUiState) => void;
setTasksUi: (next: TasksUiState) => void;
setLogsUi: (next: LogsUiState) => void;
setHistoryUi: (next: HistoryUiState) => void;
setProtocolUi: (next: ProtocolUiState) => void;
setNetworkUi: (next: NetworkUiState) => void;
}
@ -90,7 +90,7 @@ export function buildTabUiSnapshot(
Resources: state.resourcesUi,
Tasks: state.tasksUi,
Logs: state.logsUi,
History: state.historyUi,
Protocol: state.protocolUi,
Network: state.networkUi,
};
}
@ -134,9 +134,9 @@ export function restoreTabUiFromSnapshot(
case "Logs":
setters.setLogsUi((value as LogsUiState | undefined) ?? EMPTY_LOGS_UI);
break;
case "History":
setters.setHistoryUi(
(value as HistoryUiState | undefined) ?? EMPTY_HISTORY_UI,
case "Protocol":
setters.setProtocolUi(
(value as ProtocolUiState | undefined) ?? EMPTY_PROTOCOL_UI,
);
break;
case "Network":