Repository navigation
fix(mcp): keep embedded MCP requests' intermediate results off the GUI - #1172
Draft
Claudius-Maginificent wants to merge 2 commits into
Draft
Claudius-Maginificent wants to merge 2 commits into
Claudius-Maginificent wants to merge 2 commits into
Conversation
…bedded in A task requested through the MCP server embedded in the GUI reported through the GUI's frame loop. Progress and other intermediate results it sent there had no screen owner, so they went to the screen in view and could raise banners for an operation the user did not start. The requested task now reports through a sender that passes only cache changes and repaints; the caller still gets the result from the call. The sender stays unfiltered where the task keeps it for good: a network switch, which registers its new context with the GUI, and the first wallet-touching task, which wires the wallet backend on it. <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A filtered request sender must never be kept for good. The context's frame loop, the wallet backend and a network switch's context registration now take the sender's unfiltered copy, whoever handed it over, so every MCP request reports through the filtered sender with no exception for the request that wires the wallet backend or switches the network. The raw channel accessor that bypassed the filter is removed, as nothing used it. <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Collaborator
|
🕓 Review not started yet because this PR is a draft.
Commit 51987fb. Normal review starts when eligible; priority review starts as soon as a slot is available. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
When an AI assistant or the command-line tool works with the running app through its built-in MCP server, the progress and errors of that work no longer pop up on whatever screen you have open. The app only refreshes the data that changed.
User story
As a user running Dash Evo Tool while an assistant uses its MCP server, I want the screen I'm looking at to show only what I started, so that I'm not shown banners or state changes from someone else's request.
Scenario
Steps to reproduce
det-cliover HTTP), call a tool whose task reports intermediate results.Actual behavior
Intermediate results of the MCP request, such as progress, a fetched nonce or a logged proof error, reach the screen in view. Nothing records an owner for them, so they are routed to the visible screen.
Expected behavior
The GUI hears only that cached data changed, plus a network switch's context registration. The MCP caller still gets its result from the call.
Detailed discussion
SenderAsync::keeping_only(fn(&T) -> bool)(utils/egui_mpsc.rs) adds a synchronous filter. A rejected message is accepted and dropped, returningOk, so no task fails with a send error.Clonekeeps the filter.SenderAsync::unfiltered()returns a copy without it.mcp::dispatch::task_reporter(ctx)hands every MCP request the frame-loop sender filtered toCacheUpdated | Repaint.Every site that keeps a sender for good now takes
unfiltered(), whoever handed it over:AppContext::install_frame_loopensure_wallet_backend(the sender stored inWalletBackend)NetworkContextRegisteredsend inrun_switch_networkA filtered per-request sender can therefore never be stored. A network switch requested over MCP still registers its context with
AppState, and the backend's events (event bridge, identity and shielded sync, platform-ready trigger) keep reaching the GUI.GUI-dispatched tasks are unaffected: they already pass an unfiltered sender.
The one subtask that outlives a request,
fee_payer_balance_refresh, sends onlyCacheUpdated.SenderAsync::sender()is removed (it had no callers and bypassed the filter).The AGENTS.md "Result routing" sentence is updated.
Regression from refactor(app): let each domain decide its reactions to backend results #1157, which routed embedded-MCP reports to the GUI's frame loop. Found during the 2026-11-10 weekly release review.
Testing
utils::egui_mpsc::tests::a_filtered_sender_passes_only_what_it_keepsmcp::dispatch::tests::a_request_tells_the_frame_loop_only_that_cached_data_changed(throughdispatch_task)backend_task::tests::a_switch_through_a_filtered_sender_installs_the_frame_loop_unfiltered--lib mcp:: …gave 78 passed. Clippy is clean.dispatch_task_withthat an intermediate is filtered, because no MCP-dispatchable task emits a non-cache intermediate offline.🤖 Co-authored by Claudius the Magnificent AI Agent
🤖 Generated with Claude Code