Summary
The History (Requests) and Logging screens each render an Export JSON button, but the handlers wired from App.tsx are still todoNoop placeholders. Clicking the button does nothing. This is the follow-up to #1352-era observation that these buttons are no-ops in v2 today.
Files
clients/web/src/components/screens/HistoryScreen/HistoryScreen.tsx — onExport: () => void prop, already wired through HistoryListPanel.
clients/web/src/components/screens/LoggingScreen/LoggingScreen.tsx — onExport: () => void prop, already wired through LogStreamPanel.
clients/web/src/App.tsx — currently passes onExportHistory={todoNoop} and onExportLogs={todoNoop}.
Proposal
- Build a small
useExport helper (or inline handlers in App.tsx) that serializes the current in-memory entries to JSON and triggers a download via the existing downloadJsonFile helper in clients/web/src/lib/downloadFile.ts (already used by onServerExport).
- History export shape: array of
MessageEntry objects from the active MessageLogState. Include direction, timestamp, message, response, duration so a round-trip is meaningful for offline review.
- Logging export shape: array of
LogEntryData objects (the notifications/message entries the screen already renders). Use the same shape the screen consumes.
- Filename suggestion:
inspector-history-<server-id>-<iso-timestamp>.json and inspector-logs-<server-id>-<iso-timestamp>.json so multiple exports stay sortable.
Test plan
- Unit-level: assert the exported JSON contains the expected entries when given a populated
MessageLogState / log entries.
- Manual: connect to a server, exercise a few tool calls, click Export JSON on each screen, verify a file downloads and re-importing into a JSON viewer shows the expected entries.
Out of scope
- Re-importing exported files (load-from-file). That can be a separate feature.
- Filtering exports by method / level. The current screen filters affect display only; export the full list and let the user filter offline.
Summary
The History (Requests) and Logging screens each render an Export JSON button, but the handlers wired from
App.tsxare stilltodoNoopplaceholders. Clicking the button does nothing. This is the follow-up to #1352-era observation that these buttons are no-ops in v2 today.Files
clients/web/src/components/screens/HistoryScreen/HistoryScreen.tsx—onExport: () => voidprop, already wired throughHistoryListPanel.clients/web/src/components/screens/LoggingScreen/LoggingScreen.tsx—onExport: () => voidprop, already wired throughLogStreamPanel.clients/web/src/App.tsx— currently passesonExportHistory={todoNoop}andonExportLogs={todoNoop}.Proposal
useExporthelper (or inline handlers inApp.tsx) that serializes the current in-memory entries to JSON and triggers a download via the existingdownloadJsonFilehelper inclients/web/src/lib/downloadFile.ts(already used byonServerExport).MessageEntryobjects from the activeMessageLogState. Include direction, timestamp, message, response, duration so a round-trip is meaningful for offline review.LogEntryDataobjects (thenotifications/messageentries the screen already renders). Use the same shape the screen consumes.inspector-history-<server-id>-<iso-timestamp>.jsonandinspector-logs-<server-id>-<iso-timestamp>.jsonso multiple exports stay sortable.Test plan
MessageLogState/ log entries.Out of scope