Skip to content

Refactor: rename web "History" tab/feature to "Protocol" #1623

Closed

Description

@cliffhall

Summary

Rename the web client's "History" tab/feature to "Protocol" throughout the codebase. This is a terminology change covering the user-facing tab name, component names, folders, tests, and Storybook stories, so the feature reads as the MCP "Protocol" view rather than "History".

Scope

User-facing tab name

  • clients/web/src/utils/inspectorTabs.ts — "History" in the INSPECTOR_TAB_IDS tuple (drives the displayed tab name and the InspectorTabId union).
  • clients/web/src/components/views/InspectorView/InspectorView.tsx — HISTORY_TAB label constant (line ~153) and the MonitorTab union member "History" (line ~175). The TAB_UI_REGISTRY keys, INSPECTOR_TAB_IDS, and the ScreenStage/panel-map keys are string-matched to this label, so they must change together.
  • clients/web/src/components/screens/screenUiState.ts — TAB_UI_REGISTRY.History key and EMPTY_HISTORY_UI const.

Component files / folders (rename component + directory)

  • clients/web/src/components/screens/HistoryScreen/HistoryScreen.tsx (+ exported HistoryUiState type)
  • clients/web/src/components/groups/HistoryListPanel/HistoryListPanel.tsx (+ HistorySectionName type)
  • clients/web/src/components/groups/HistoryEntry/HistoryEntry.tsx
  • clients/web/src/components/groups/HistoryControls/HistoryControls.tsx
  • clients/web/src/components/groups/historyUtils.ts

Tests

  • HistoryScreen.test.tsx, HistoryListPanel.test.tsx, HistoryEntry.test.tsx, HistoryControls.test.tsx, historyUtils.test.ts
  • clients/web/src/utils/inspectorTabs.test.ts
  • clients/web/src/test/lib/downloadFile.test.ts (asserts buildExportFilename("history", …))

Storybook stories (rename file + meta.title)

  • HistoryScreen.stories.tsx, HistoryListPanel.stories.tsx, HistoryEntry.stories.tsx, HistoryControls.stories.tsx
  • clients/web/src/components/groups/ViewHeader/ViewHeader.stories.tsx — "History" fixture in a sample tab-list

Types / props / constants / store keys (App + InspectorView plumbing)

  • clients/web/src/types/navigation.ts — InspectorTab union "history" id → "protocol"
  • clients/web/src/App.tsx — pervasive internal identifiers: historyUi/setHistoryUi, pinnedHistoryIds, onClearHistory, onExportHistory, onClearHistorySection, onExportHistorySection, onReplayHistory, onTogglePinHistory, replayHistoryRequest, isReplayableHistoryMethod, buildExportFilename("history", …) → buildExportFilename("protocol", …)
  • clients/web/src/components/views/InspectorView/InspectorView.tsx — prop names (history, historyUi, pinnedHistoryIds, onHistoryUiChange, and the on*History* handlers), local historySort/historyCompact, and the "history" scope strings.

Decisions (settled)

  • Export-filename slug: ✅ changes — buildExportFilename("history", …) → buildExportFilename("protocol", …). Exported filenames will use the "protocol" slug. Update downloadFile.test.ts assertions accordingly.
  • navigation.ts internal id: ✅ changes — InspectorTab union "history" → "protocol".
  • List section discriminator stays as-is: ❌ do not rename. The HistoryListPanel section discriminator keeps its "pinned" | "history" values and the sections remain labeled Pinned / History. (These are the two sub-sections within the panel — "History" here names the un-pinned entries, not the tab.)
  • core/ message-log/replay concepts (messageLogState.ts, etc.) are out of scope.

Acceptance criteria

  • Tab renders as "Protocol" in the UI.
  • Components, folders, tests, and stories renamed consistently; no stale "History" naming in the web client for the tab/feature (excluding build artifacts).
  • Export filenames and the navigation.ts tab id use "protocol".
  • The in-panel section discriminator/labels remain Pinned / History.
  • npm run ci passes (format, lint, build, unit tests, ≥90 per-file coverage gate, smoke, Storybook).

Activity

  1. added
    v2
    on Jul 9, 2026
  2. self-assigned this
    on Jul 9, 2026
  3. added a commit that references this issue on Jul 10, 2026
  4. cliffhall commented on Jul 10, 2026

    @cliffhall
    MemberAuthor

    Merged via #1634 into v2/main. (Closing manually since v2/main is a non-default branch, so the PR's Closes #1623 cross-reference doesn't auto-close.)

  5. added this to the v2.0.0 milestone on Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

v2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions