Revert "Add hook to Canvas plugin to encourage using the sync tool on every turn start" - #327
Merged
Conversation
… every t…" This reverts commit cf84f38.
Contributor
Author
|
Copilot change the versions to be 2.2.1 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reverts the canvas-apps prompt hook introduced in #320 because it broke in Claude, restoring the plugin to a no-hooks configuration while keeping the newer unified /canvas-app skill as the recommended entrypoint.
Changes:
- Remove the canvas-apps lifecycle hook registration and its .NET prompt-transform implementation.
- Update canvas-apps plugin manifests to drop the
hooksfield and revert the plugin version. - Add/restore a deprecated
generate-canvas-appskill stub that redirects users to/canvas-app.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/canvas-apps/skills/generate-canvas-app/SKILL.md | Adds a deprecated skill wrapper that instructs users to use /canvas-app instead. |
| plugins/canvas-apps/hooks/inject-sync-reminder.cs | Removes the .NET hook that injected a sync reminder into prompts. |
| plugins/canvas-apps/hooks/hooks.json | Removes hook registration for Claude/Copilot prompt events. |
| plugins/canvas-apps/AGENTS.md | Updates plugin architecture docs to remove the hooks section and references. |
| plugins/canvas-apps/.plugin/plugin.json | Removes hooks registration and reverts the plugin version. |
| plugins/canvas-apps/.claude-plugin/plugin.json | Mirrors the Open Plugins manifest change (remove hooks, revert version). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Akshay Maloo (akshaymaloo)
approved these changes
Jul 28, 2026
Copilot stopped work on behalf of
McCall Saltzman (lesaltzm) due to an error
July 28, 2026 15:09
Ryan Gammon (rggammon)
added a commit
to rggammon/power-platform-skills
that referenced
this pull request
Jul 29, 2026
Re-applies the hook from microsoft#320, which was reverted in microsoft#327 because it broke Claude Code. The hook logic (inject-sync-reminder.cs) is restored byte-for-byte; only the registration wiring changed. Two defects in microsoft#320, either one fatal: 1. `"hooks": "hooks/hooks.json"` in .claude-plugin/plugin.json. Claude Code's manifest schema rejects a string path, failing installation outright with `Validation errors: hooks: Invalid input`. Claude auto-discovers hooks/hooks.json, so the field is unnecessary — model-apps and power-pages both ship working hooks without it. 2. The `userPromptTransformed` key in hooks/hooks.json. Claude Code reads that file too and rejects unrecognized event keys. The resulting hook-load-failure silently discards the whole file, and also disables the plugin's canvas-authoring MCP server: [ERROR] Failed to load hooks for canvas-apps [DEBUG] Plugin not available for MCP - error type: hook-load-failed Registration is now split by host. Claude Code reads only .claude-plugin/plugin.json; Copilot CLI prefers .plugin/plugin.json and falls back to .claude-plugin/ only when absent. So the Copilot-only event lives inline in .plugin/plugin.json, where Claude Code never sees it: Claude Code | hooks/hooks.json (auto-discovered) | UserPromptSubmit Copilot CLI | .plugin/plugin.json (inline) | userPromptTransformed Two events are required because the hosts share no usable one: Copilot accepts UserPromptSubmit as an alias for userPromptSubmitted, but that event has no output processing, so the reminder would be generated and silently discarded. Also re-applies microsoft#320's removal of the deprecated generate-canvas-app skill, which the revert restored, and corrects the AGENTS.md claim that Claude Code "ignores the Copilot-only event and continues loading UserPromptSubmit" — the behaviour that caused this outage. Verified on Claude Code 2.1.220 and Copilot CLI 1.0.76-1: plugin installs and loads (status enabled, MCP intact) and the reminder reaches the model in both hosts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Ryan Gammon (rggammon)
added a commit
to rggammon/power-platform-skills
that referenced
this pull request
Jul 29, 2026
Re-applies the hook from microsoft#320, which was reverted in microsoft#327 because it broke Claude Code. The hook logic (inject-sync-reminder.cs) is restored byte-for-byte; only the registration wiring changed. Two defects in microsoft#320, either one fatal: 1. `"hooks": "hooks/hooks.json"` in .claude-plugin/plugin.json. Claude Code rejects the path unless it is `./`-relative, failing installation with `Validation errors: hooks: Invalid input`. Even written as `"./hooks/hooks.json"` it is redundant — Claude auto-discovers the file, then reports the explicit reference as a duplicate hook source and disables the plugin's MCP servers. model-apps and power-pages ship working hooks with no `hooks` field at all. 2. `userPromptTransformed` in hooks/hooks.json. Claude Code reads that file and rejects unrecognized event names, silently discarding the whole file and disabling the plugin's canvas-authoring MCP server: [ERROR] Failed to load hooks for canvas-apps [DEBUG] Plugin not available for MCP - error type: hook-load-failed Registration now uses the two documented plugin hook formats, so each host reads only the events it supports: Claude Code | hooks/hooks.json (Claude format) | UserPromptSubmit Copilot CLI | hooks.json at plugin root (Copilot) | userPromptTransformed Two events are required because the hosts share no usable one: Copilot accepts UserPromptSubmit as an alias for userPromptSubmitted, but that event has no output processing, so the reminder would be generated and silently discarded. Both manifests stay byte-identical mirrors, so the legacy compatibility check is unaffected. Also re-applies microsoft#320's removal of the deprecated generate-canvas-app skill, which the revert restored, and corrects the AGENTS.md claim that Claude Code "ignores the Copilot-only event and continues loading UserPromptSubmit" — the behaviour that caused this outage. Verified on Claude Code 2.1.220 and Copilot CLI 1.0.76-1: plugin installs and loads (status enabled, MCP intact) and the reminder reaches the model in both hosts. All four repository validation scripts pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Ryan Gammon (rggammon)
added a commit
that referenced
this pull request
Jul 29, 2026
Re-applies the hook from #320, which was reverted in #327 because it broke Claude Code. The hook logic (inject-sync-reminder.cs) is restored byte-for-byte; only the registration wiring changed. Two defects in #320, either one fatal: 1. `"hooks": "hooks/hooks.json"` in .claude-plugin/plugin.json. Claude Code rejects the path unless it is `./`-relative, failing installation with `Validation errors: hooks: Invalid input`. Even written as `"./hooks/hooks.json"` it is redundant — Claude auto-discovers the file, then reports the explicit reference as a duplicate hook source and disables the plugin's MCP servers. model-apps and power-pages ship working hooks with no `hooks` field at all. 2. `userPromptTransformed` in hooks/hooks.json. Claude Code reads that file and rejects unrecognized event names, silently discarding the whole file and disabling the plugin's canvas-authoring MCP server: [ERROR] Failed to load hooks for canvas-apps [DEBUG] Plugin not available for MCP - error type: hook-load-failed Registration now uses the two documented plugin hook formats, so each host reads only the events it supports: Claude Code | hooks/hooks.json (Claude format) | UserPromptSubmit Copilot CLI | hooks.json at plugin root (Copilot) | userPromptTransformed Two events are required because the hosts share no usable one: Copilot accepts UserPromptSubmit as an alias for userPromptSubmitted, but that event has no output processing, so the reminder would be generated and silently discarded. Both manifests stay byte-identical mirrors, so the legacy compatibility check is unaffected. Also re-applies #320's removal of the deprecated generate-canvas-app skill, which the revert restored, and corrects the AGENTS.md claim that Claude Code "ignores the Copilot-only event and continues loading UserPromptSubmit" — the behaviour that caused this outage. Verified on Claude Code 2.1.220 and Copilot CLI 1.0.76-1: plugin installs and loads (status enabled, MCP intact) and the reminder reaches the model in both hosts. All four repository validation scripts pass. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Reverts #320. The hooks change broke in Claude