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

@ -20,7 +20,7 @@ import {
EMPTY_APPS_UI,
EMPTY_TASKS_UI,
EMPTY_LOGS_UI,
EMPTY_HISTORY_UI,
EMPTY_PROTOCOL_UI,
EMPTY_NETWORK_UI,
} from "../components/screens/screenUiState.js";
@ -106,7 +106,7 @@ describe("oauthResume", () => {
appsUi: EMPTY_APPS_UI,
tasksUi: EMPTY_TASKS_UI,
logsUi: EMPTY_LOGS_UI,
historyUi: EMPTY_HISTORY_UI,
protocolUi: EMPTY_PROTOCOL_UI,
networkUi: EMPTY_NETWORK_UI,
});
const setToolsUi = vi.fn();
@ -117,7 +117,7 @@ describe("oauthResume", () => {
setAppsUi: vi.fn(),
setTasksUi: vi.fn(),
setLogsUi: vi.fn(),
setHistoryUi: vi.fn(),
setProtocolUi: vi.fn(),
setNetworkUi: vi.fn(),
});
expect(setToolsUi).toHaveBeenCalledWith(toolsUi);
@ -209,7 +209,7 @@ describe("oauthResume", () => {
setAppsUi: vi.fn(),
setTasksUi: vi.fn(),
setLogsUi: vi.fn(),
setHistoryUi: vi.fn(),
setProtocolUi: vi.fn(),
setNetworkUi: vi.fn(),
setActiveTab,
clearToolCallState,
@ -399,7 +399,7 @@ describe("oauthResume", () => {
setAppsUi: vi.fn(),
setTasksUi: vi.fn(),
setLogsUi: vi.fn(),
setHistoryUi: vi.fn(),
setProtocolUi: vi.fn(),
setNetworkUi: vi.fn(),
});
expect(setToolsUi).not.toHaveBeenCalled();
@ -413,7 +413,7 @@ describe("oauthResume", () => {
setAppsUi: vi.fn(),
setTasksUi: vi.fn(),
setLogsUi: vi.fn(),
setHistoryUi: vi.fn(),
setProtocolUi: vi.fn(),
setNetworkUi: vi.fn(),
};
restoreTabUiFromSnapshot(
@ -433,7 +433,7 @@ describe("oauthResume", () => {
setAppsUi: vi.fn(),
setTasksUi: vi.fn(),
setLogsUi: vi.fn(),
setHistoryUi: vi.fn(),
setProtocolUi: vi.fn(),
setNetworkUi: vi.fn(),
};
restoreTabUiFromSnapshot(
@ -444,7 +444,7 @@ describe("oauthResume", () => {
Apps: EMPTY_APPS_UI,
Tasks: EMPTY_TASKS_UI,
Logs: EMPTY_LOGS_UI,
History: EMPTY_HISTORY_UI,
Protocol: EMPTY_PROTOCOL_UI,
Network: EMPTY_NETWORK_UI,
},
setters,
@ -455,7 +455,7 @@ describe("oauthResume", () => {
expect(setters.setAppsUi).toHaveBeenCalledWith(EMPTY_APPS_UI);
expect(setters.setTasksUi).toHaveBeenCalledWith(EMPTY_TASKS_UI);
expect(setters.setLogsUi).toHaveBeenCalledWith(EMPTY_LOGS_UI);
expect(setters.setHistoryUi).toHaveBeenCalledWith(EMPTY_HISTORY_UI);
expect(setters.setProtocolUi).toHaveBeenCalledWith(EMPTY_PROTOCOL_UI);
expect(setters.setNetworkUi).toHaveBeenCalledWith(EMPTY_NETWORK_UI);
});
@ -467,7 +467,7 @@ describe("oauthResume", () => {
setAppsUi: vi.fn(),
setTasksUi: vi.fn(),
setLogsUi: vi.fn(),
setHistoryUi: vi.fn(),
setProtocolUi: vi.fn(),
setNetworkUi: vi.fn(),
};
restoreTabUiFromSnapshot(
@ -478,7 +478,7 @@ describe("oauthResume", () => {
Apps: undefined,
Tasks: undefined,
Logs: undefined,
History: undefined,
Protocol: undefined,
Network: undefined,
},
setters,
@ -489,7 +489,7 @@ describe("oauthResume", () => {
expect(setters.setAppsUi).toHaveBeenCalledWith(EMPTY_APPS_UI);
expect(setters.setTasksUi).toHaveBeenCalledWith(EMPTY_TASKS_UI);
expect(setters.setLogsUi).toHaveBeenCalledWith(EMPTY_LOGS_UI);
expect(setters.setHistoryUi).toHaveBeenCalledWith(EMPTY_HISTORY_UI);
expect(setters.setProtocolUi).toHaveBeenCalledWith(EMPTY_PROTOCOL_UI);
expect(setters.setNetworkUi).toHaveBeenCalledWith(EMPTY_NETWORK_UI);
});
});