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:
parent
0fde2d0024
commit
ace4250d31
4 changed files with 413 additions and 405 deletions
|
|
@ -19,7 +19,7 @@ describe("inspectorTabs", () => {
|
|||
"Resources",
|
||||
"Tasks",
|
||||
"Logs",
|
||||
"History",
|
||||
"Protocol",
|
||||
"Network",
|
||||
]);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export const INSPECTOR_TAB_IDS = [
|
|||
"Resources",
|
||||
"Tasks",
|
||||
"Logs",
|
||||
"History",
|
||||
"Protocol",
|
||||
"Network",
|
||||
] as const;
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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":
|
||||
|
|
|
|||
Loading…
Reference in a new issue