Skip to content

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

Merged
cliffhall merged 5 commits into
v2/mainfrom
1623-rename-history-to-protocol
Jul 10, 2026
Merged

cliffhall merged 5 commits into
v2/mainfrom
1623-rename-history-to-protocol

Conversation

@cliffhall

@cliffhall cliffhall commented Jul 9, 2026 •

Copy link
Copy Markdown
Member

Closes #1623

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

Screenshot 2026-07-09 at 9 47 12 PM

What changed

  • Tab label renders as Protocol — INSPECTOR_TAB_IDS, InspectorView tab constants + MonitorTab, TAB_UI_REGISTRY key, and navigation.ts tab id.
  • Components + folders renamed (with tests, stories, and exported types):
    • HistoryScreen → ProtocolScreen
    • HistoryListPanel → ProtocolListPanel
    • HistoryEntry → ProtocolEntry
    • HistoryControls → ProtocolControls
    • historyUtils → protocolUtils
  • App / InspectorView plumbing renamed: historyUi/setHistoryUi, pinnedHistoryIds, the on*History* handlers/props, replayHistoryRequest, isReplayableHistoryMethod/REPLAYABLE_HISTORY_METHODS, the history prop, and the sort/compact/localStorage scopes.
  • Export filenames use the protocol slug (buildExportFilename + ExportKind).
  • Comments referring to the tab/feature updated; the ProtocolControls sidebar title now reads Protocol.

Preserved (per the settled decisions in #1623)

  • The ProtocolListPanel section discriminator keeps its "pinned" | "history" values, and the two sub-sections stay labeled Pinned / History (including the "History (N)" header, the "History sort direction" sort control, and the "No request history" empty state).
  • window.history and the core/ message-log/replay concepts are untouched.

Testing

npm run ci passes locally — format, lint, build, unit tests (2951), the ≥90 per-file coverage gate, smoke, and Storybook play tests (394).

🤖 Generated with Claude Code

https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw

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) <[email protected]>
Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw
@cliffhall cliffhall added the v2 Issues and PRs for v2 label Jul 9, 2026
cliffhall and others added 3 commits July 9, 2026 19:21
…on (#1623)

- Direction labels now both point right so the arrow reads clearly at
  badge size: incoming "client ← server" becomes "server → client"
  (from → to), in MessageDirectionBadge and MessageDirectionFilter
  (shared by the Protocol and Network views).
- The Protocol list's pinned section header now reads "Pinned Messages"
  (was "Pinned Requests"), matching the "Messages" panel title.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw
…1623)

Long request URLs stretched every Network card to their own max-content
width, bleeding the cards (and their status badges) past the pinned
monitoring column. Mantine's ScrollArea `content` slot defaults to
`min-width: max-content`, so a non-wrapping URL forced the whole list wider
than its viewport.

Add an opt-in `constrainContentWidth` prop to EmbeddableScrollArea that
relaxes that slot to `min-width: 0`, so the list can't grow past its
viewport and each row manages its own overflow — the URL already lives in a
horizontal ScrollArea, which now actually scrolls. Scoped to the Network
stream panel (Logs/Protocol rows wrap or truncate, so they keep the default
where a long line scrolls the list).

Verified in Storybook (embedded 380px column): cards clamp to the viewport,
no list/page horizontal overflow, and the URL scrolls within its own area.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw
@cliffhall

Copy link
Copy Markdown
Member Author

@claude review

@claude

claude Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @cliffhall's task in 1m 41s —— View job


Review: rename "History" → "Protocol"

  • Gather context (diff vs origin/v2/main)
  • Review rename consistency & completeness
  • Check preserved concepts (window.history, core message-log, "pinned" | "history" discriminator)
  • Check behavior-changing risks (localStorage keys, export filenames)
  • Post review

This is a clean, well-scoped mechanical rename. I read the full diff across App.tsx, InspectorView.tsx, the renamed component folders, and the supporting navigation.ts / inspectorTabs.ts / oauthResume.ts / downloadFile.ts / screenUiState.ts plumbing. It's internally consistent and CI is green. No correctness bugs found. One behavioral note and a couple of observations below.

Behavioral note — persisted user preferences silently reset ⚠️

useSortDirection and useListCompact are keyed by scope, and the scope string moved from "history" → "protocol":

// InspectorView.tsx:641
const [protocolSort, setProtocolSort] = useSortDirection("protocol");
// InspectorView.tsx:648
const [protocolCompact, setProtocolCompact] = useListCompact("protocol", ...);

Those feed the localStorage keys inspector.sortDirection.history → inspector.sortDirection.protocol and inspector.listCompact.history → inspector.listCompact.protocol. Any existing user who had customized this tab's sort direction or compact toggle will silently revert to defaults after this ships, since the new keys are unread.

Severity is low (it's a UI preference, not data, and it self-heals on next toggle), and for a pre-release v2 a one-time reset is very likely acceptable — I'd just flag it as a conscious call rather than an oversight. If you'd rather not reset, a tiny one-time read-old-key/write-new-key migration would preserve it. Fine to knowingly accept as-is.

Preserved concepts — correctly untouched ✅

Verified the boundary the PR body claims is exactly what's in the diff:

  • The "pinned" | "history" section discriminator is preserved everywhere (ProtocolScreen, InspectorView prop signatures, onExportSection("history")).
  • The Pinned / History (N) sub-section labels, the "History sort direction" sort control, and the "No request history" empty state all still read "History" (ProtocolListPanel.formatHistoryTitle → History (${count})).
  • window.history and the core/ message-log / replay concepts are not renamed. The other lingering History identifiers I found are unrelated features (TaskListPanel's ClearHistoryButton, ExperimentalFeaturesPanel's RequestHistory*) — correctly left alone.

Minor observations (no action needed)

  • Mixed vocabulary inside the preserved boundary: a future reader will find formatHistoryTitle returning "History (N)" inside a file named ProtocolListPanel a little surprising. It's intentional per the settled Refactor: rename web "History" tab/feature to "Protocol" #1623 decisions, so keeping it is correct — a one-line comment noting "section labels intentionally stay 'History' per Refactor: rename web "History" tab/feature to "Protocol" #1623" could save the next person a double-take, but optional.
  • Cosmetic test-local names: demoHistory, historyEntry, loadingHistory remain in a few test/story files. Purely cosmetic; no functional impact.

Verdict

Looks good to merge. The rename is complete and consistent, tests/stories were updated alongside, and the preserved-concept boundary matches the stated intent. The only thing worth an explicit decision is the localStorage preference reset above.
· 1623-rename-history-to-protocol

@cliffhall

Copy link
Copy Markdown
Member Author

Thanks for the thorough review! Responses:

localStorage preference reset (⚠️) — Making this an explicit conscious call: accepting the one-time reset as-is. The affected keys (inspector.sortDirection.protocol, inspector.listCompact.protocol) are UI-only preferences that self-heal on the next toggle, and this is pre-release v2 where the whole surface is churning — a migration shim for a soon-obsolete history key would be over-engineering. Noted, intentional, not an oversight.

Preserved-concept boundary — Confirmed, and I added a short comment above formatPinnedTitle/formatHistoryTitle in ProtocolListPanel (da12054) documenting that the "History" section labels + "history" discriminator intentionally stay per #1623, to save the next reader the double-take you flagged.

Cosmetic test-local names (demoHistory, historyEntry, loadingHistory) — Left as-is; they name message-log fixture data, not the tab/feature, so they're accurate and out of scope for this rename.

No correctness changes needed. Re-requesting to confirm clean.

@cliffhall

Copy link
Copy Markdown
Member Author

@claude review

@claude

claude Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @cliffhall's task in 1m 2s —— View job


Review: rename "History" → "Protocol" (re-review)

  • Gather context (diff vs origin/v2/main)
  • Verify rename completeness & consistency
  • Confirm preserved-concept boundary (window.history, core message-log, "pinned" | "history")
  • Check the follow-up commit (da12054 doc comment)
  • Post review

I re-read the full diff (52 files, 5 commits ace4250d..da120544) and grepped the whole clients/web/src tree. Since my first pass, da120544 landed the doc comment I'd suggested. Clean — approving-in-spirit, good to merge.

Rename completeness ✅

The old identifiers are fully gone outside preserved contexts — a grep for HistoryScreen, HistoryListPanel, HistoryEntry, HistoryControls, historyUtils, historyUi/setHistoryUi, pinnedHistoryIds, replayHistoryRequest, REPLAYABLE_HISTORY_METHODS, isReplayableHistoryMethod returns 0 non-test hits. Components, folders, tests, stories, and the App/InspectorView plumbing all moved together.

Preserved boundary — matches the stated intent exactly ✅

Every surviving history/History reference falls into one of the intended-to-stay buckets:

  • The "pinned" | "history" section discriminator (ProtocolScreen, InspectorView prop signatures, onClearSection/onExportSection).
  • The Pinned / History (N) sub-section labels + formatHistoryTitle, sort control, and "No request history" empty state.
  • window.history and the core message-log/"notification history" concepts (referenced in App.tsx comments — the underlying data genuinely is a message history).
  • Unrelated features left correctly alone: ExperimentalFeaturesPanel's Request History section, PinColumnButton/ReplayButton comments about "history entries".

The da120544 comment above formatPinnedTitle/formatHistoryTitle in ProtocolListPanel.tsx:100-104 now spells out the boundary explicitly — that resolves the "mixed vocabulary double-take" observation from my prior review.

Prior localStorage note — resolved as a conscious call ✅

The scope rename "history" → "protocol" (keys inspector.sortDirection.* / inspector.listCompact.*) still one-time-resets those two UI preferences, which you've explicitly accepted as fine for pre-release v2. No change needed; recording that it remains the only behavioral effect of the rename.

Verdict

Complete, internally consistent, tests/stories moved in lockstep, and the preserved-concept boundary is now documented in-source. No correctness issues. LGTM. ✅
· 1623-rename-history-to-protocol

@cliffhall cliffhall linked an issue Jul 10, 2026 that may be closed by this pull request
@cliffhall
cliffhall merged commit 50e780f into v2/main Jul 10, 2026
1 check passed
@cliffhall
cliffhall deleted the 1623-rename-history-to-protocol branch July 10, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Issues and PRs for v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant