Skip to content

Fix multi-binlog crashes in timeline, tree view, and diagnostics#11

Merged
YuliiaKovalova merged 1 commit into
mainfrom
users/ykovalova/fix-multi-binlog
May 22, 2026
Merged

Fix multi-binlog crashes in timeline, tree view, and diagnostics#11
YuliiaKovalova merged 1 commit into
mainfrom
users/ykovalova/fix-multi-binlog

Conversation

@YuliiaKovalova
Copy link
Copy Markdown
Contributor

Fixes "requires explicit binlog_file" crashes when multiple binlogs are loaded.

Bug

Opening the Build Timeline, expanding tree nodes, or loading diagnostics failed with multi-binlog because four call sites did not inject binlog_file into MCP tool calls.

Fixes

  1. extension.ts callMcpTool — also checks mcpClient.loadedBinlogs (not just sidebar list) to detect multi-binlog
  2. binlogTreeView.ts prefetch — was calling client.callTool directly, now uses mcpCall wrapper
  3. binlogTreeView.ts mcpCall — was mutating args in-place, now makes a shallow copy
  4. diagnostics.ts — was calling callTool with no args at all

Version

0.10.21 → 0.10.22

Four call sites failed with 'requires explicit binlog_file' when the
MCP server was started with multiple binlogs:

1. extension.ts callMcpTool — checked allBinlogPaths (sidebar) but not
   mcpClient.loadedBinlogs (server). After removing a binlog from the
   sidebar the two lists diverged, skipping binlog_file injection.

2. binlogTreeView.ts prefetch — called client.callTool directly,
   bypassing the mcpCall wrapper entirely.

3. binlogTreeView.ts mcpCall — mutated the args object in-place instead
   of making a copy, causing side effects on shared arg literals.

4. diagnostics.ts loadFromMcpClient — called callTool with no args at
   all, never injecting binlog_file.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@YuliiaKovalova YuliiaKovalova merged commit 2d530f2 into main May 22, 2026
3 checks passed
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.

1 participant