Conversation
Consolidates deployment logic into a shared `deployCloudNotebookForMCPApp` helper and adds a session flag (`$deployCloudNotebooks`) that disables further deployment attempts after a failure. Previously a failed `CloudDeploy` (e.g. on Windows with Claude Desktop) surfaced as an internal failure instead of falling back to the non-UI result. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…eployment Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reflect the new $deployCloudNotebooks gating and deployCloudNotebookForMCPApp helper: Block the flag in UI metadata tests, drop tests for the removed $deployedNotebookRoot constants, and cover the deploy-disabled fallback paths. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reflect the new $deployCloudNotebooks session flag, the shared deployCloudNotebookForMCPApp helper, and the per-tool fallback behavior in the MCP Apps docs and the UIResources.wl file summary. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent WolframLanguageEvaluator and WolframAlpha from surfacing internal failures when cloud notebook deployment fails, by disabling further deployments for the session and falling back to non-UI results.
Changes:
- Introduces shared
deployCloudNotebookForMCPAppand session flag$deployCloudNotebooksto gate/disable cloud notebook deployment after failures. - Updates
WolframAlphaandWolframLanguageEvaluatorto use the shared helper and to degrade to non-UI outputs when deployment is disabled/fails. - Updates tests and docs to cover the new flag, conditional UI association behavior, and fallback paths.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/mcp-apps.md | Documents $deployCloudNotebooks, shared deployment helper, and per-tool fallback behavior |
| AGENTS.md | Notes UIResources now includes a shared cloud notebook deployment helper |
| Kernel/CommonSymbols.wl | Exports $deployCloudNotebooks and deployCloudNotebookForMCPApp via Common symbols |
| Kernel/UIResources.wl | Adds $deployCloudNotebooks, conditional $toolUIAssociations entry for WolframAlpha, and shared deployment helper |
| Kernel/Tools/WolframAlpha.wl | Switches UI gating to $deployCloudNotebooks and uses shared deploy helper for UI results |
| Kernel/Tools/WolframLanguageEvaluator.wl | Switches UI gating to $deployCloudNotebooks and uses shared deploy helper for UI results |
| Tests/MCPApps.wlt | Adds coverage for $deployCloudNotebooks, helper behavior, and conditional _meta for WolframAlpha |
| Tests/WolframAlpha-UI.wlt | Adds fallback test when deployment is disabled and tests conditional UI association |
| Tests/WolframLanguageEvaluator-UI.wlt | Adds fallback test when deployment is disabled and removes obsolete $deployedNotebookRoot test |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
WolframLanguageEvaluator(andWolframAlpha) surfaced an internal failure whenCloudDeployfailed — notably on Windows with Claude Desktop — instead of degrading to their standard text/image output.deployCloudNotebookForMCPApphelper inKernel/UIResources.wl.$deployCloudNotebooks(initialized from$CloudConnected) that the helper flips toFalseafter any deployment failure, disabling further deployment attempts for the rest of the session.WolframAlphahas no text-only fallback app view, so its entry in$toolUIAssociationsis nowRuleDelayedand resolves toNonewhen$deployCloudNotebooksisFalse— the client no longer sees it as a UI-enabled tool in that state.Tests/MCPApps.wlt,Tests/WolframAlpha-UI.wlt, andTests/WolframLanguageEvaluator-UI.wltto cover the new flag, the conditional UI association, and the deploy-disabled fallback paths; drops tests for the removed per-tool$deployedNotebookRootconstants.docs/mcp-apps.mdandAGENTS.mdto document the new helper, the session flag, and the per-tool fallback behavior.Test plan
Tests/MCPApps.wlt— all tests pass, including the new$deployCloudNotebooksanddeployCloudNotebookForMCPAppcases.Tests/WolframAlpha-UI.wltandTests/WolframLanguageEvaluator-UI.wlt— all tests pass, including the new fallback-when-deploy-disabled cases.WolframLanguageEvaluatorreturns a standard result instead of an internal failure when cloud deployment is unavailable.$CloudConnected = True, confirm UI-enhanced results still deploy and returnnotebookUrlin_metaas before.🤖 Generated with Claude Code