Skip to content

MCP call logs: clickable rows with full request dump + fix pagination#116

Merged
tayyebi merged 2 commits intomainfrom
copilot/make-row-items-clickable
Feb 26, 2026
Merged

MCP call logs: clickable rows with full request dump + fix pagination#116
tayyebi merged 2 commits intomainfrom
copilot/make-row-items-clickable

Conversation

Copy link
Contributor

Copilot AI commented Feb 26, 2026

MCP call log rows were not clickable and didn't store request payloads. Pagination UI existed but the handler always served page 1.

Changes

DB / Migration

  • New migration 014_mcp_log_request_body.sql: adds request_body TEXT to mcp_logs
  • McpLog struct gains request_body: Option<String>; list_mcp_logs SELECTs it; log_mcp_call accepts and INSERTs it

Backend (mcp.rs)

  • McpRequest derives Serialize so the incoming request can be round-tripped to JSON at handler entry
  • handle: captures serde_json::to_string(&req) before dispatch and passes it to all three log_mcp_call call sites (ok, error, unknown-method)
  • McpPageQuery { page: i64 } extractor added; page handler now reads ?page=N, computes offset, and clamps to valid range

Template (mcp/page.html)

  • Each <tr> gets data-body="..." (Askama HTML-escapes), cursor:pointer, and onclick="showMcpLog(this)"
  • Native <dialog> modal displays the full request body as pretty-printed JSON via JSON.parse/JSON.stringify
  • Logs with no stored body (pre-migration rows) show (no request body recorded)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…ation

Co-authored-by: tayyebi <14053493+tayyebi@users.noreply.github.com>
Copilot AI changed the title [WIP] Make row items clickable in MCP calls logs and add pagination MCP call logs: clickable rows with full request dump + fix pagination Feb 26, 2026
@tayyebi tayyebi marked this pull request as ready for review February 26, 2026 16:03
@tayyebi tayyebi merged commit e7ff250 into main Feb 26, 2026
1 check passed
@tayyebi tayyebi deleted the copilot/make-row-items-clickable branch February 26, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants