* Fix sentry-triage canvas crash when the `sentry` package isn't bundled Published awesome-copilot plugins ship extension source only, so the optional `sentry` npm package the canvas depends on at runtime may be absent. Previously that made the canvas crash on open instead of guiding the user through setup. - Load the optional `sentry` package lazily and translate only the top-level ERR_MODULE_NOT_FOUND for `sentry` into a package-missing setup state; any other import failure (missing transitive dep, entrypoint throwing) is rethrown so a real defect isn't masked behind a misleading "reinstall" message. - Add a dedicated package-missing branch to the connection preflight and a matching setup gate, kept distinct from the auth and transient-network gates so the user never sees contradictory guidance. The canvas now opens and explains what to do rather than crashing. - Clear `configured` for the package-missing state so the status is no longer the contradictory `configured:true` + `setup:'package-missing'`. - Tell users to sign in with the package-local CLI via `npx sentry auth login` run from the extension folder — the only form that resolves after a local `npm install`, since a package-local binary isn't on the shell PATH. - Update the README so the sign-in step and install guidance cover the published-plugin layout (`com.github.copilot/extensions/sentry-triage`), not just the standalone user/project extension paths. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Add an exact-slug Sentry project resolver to the sentry-triage canvas The project picker previously only offered projects from the paged list the canvas had already loaded. Teams with many projects (or a project outside the first page) had no way to target one by slug. This adds a verify-on-commit resolver: when a user types a slug that isn't a local match, pressing Enter checks it against Sentry and only commits the canonical slug once verified, so a scan never runs against an unverified or wrong-org project. Canvas / UX (components/page.mjs, styles.mjs): - Autocomplete accepts an exact slug not in the local list; Enter is the explicit commit that triggers resolution (never an as-typed lookup). - A visually-hidden aria-live region announces checking / verified / not found / couldn't-check state, and the resolved state is rendered before commit so screen readers hear the outcome. - Footer/menu surfaces checking, prompt, missing, and error states, including when local partial matches are present. - Project choices are read from an org-keyed cache so a slug from a previously selected org can never be treated as local after a free-text org switch; the stale-completion guard also compares the org captured for the request. Server / resolution (server.mjs, sentry.mjs, sentryClient.mjs, extension.mjs): - CSRF-gated /api/resolve-project verifies a single slug against Sentry. - Resolution runs on the shared serial request chain and is hardened against Sentry outages and queue contention (transient errors are retryable, a confirmed miss is cached as "missing"). Also bumps sentry-triage to 1.1.0 (package.json, plugin.json, marketplace.json). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sentry Triage Canvas
A GitHub Copilot canvas for on-call error triage. It scans your live Sentry issues, groups them by why they need attention, and lets you hand a selected issue off to Copilot — either to file a tracking issue or to spin up a session that drafts a fix pull request.
Features
- Live scan of Sentry issues for an organization (optionally narrowed to a single project), grouped by urgency.
- Plain-English titles toggle that rewrites the raw Sentry error into a one-sentence, user-facing summary.
- Tracking detection so already-triaged issues (filed with the
sentry-triagelabel) are recognized on later scans. - 📝 Create issue files or reuses a tracking issue only — no code, branch, or PR.
- 🔧 Fix with Copilot files/reuses the tracking issue and spawns a dedicated session that drafts a fix PR.
- Settings panel to confirm the repository, local checkout, base branch, and issue tracker before anything is created.
Files
extension.mjs— canvas declaration, agent hand-off tools, and orchestration.server.mjs— loopback HTTP server that backs the canvas webview.state.mjs— per-canvas state and render coordination.styles.mjs— canvas styling.sentry.mjs/sentryClient.mjs— Sentry CLI (library mode) access: scan issues, list orgs and projects.preflight.mjs— Sentry sign-in / connection checks with the setup gate.prefs.mjs— persisted user preferences.escape.mjs— prompt/HTML escaping helpers.components/—page.mjs,card.mjs, andcategory.mjswebview components.assets/preview.png— preview image for the extensions gallery.package.json— ESM entry point and runtime dependencies.copilot-extension.json— Copilot extension name/version metadata.
Prerequisites
-
Node.js 22 or newer.
-
The GitHub Copilot app canvas / UI-extensions experiment enabled.
-
A Sentry sign-in. This canvas reads issues through the Sentry CLI in library mode — there is no MCP server to configure. After installing the dependency (see Install below), sign in once with the package-local CLI, run from the extension folder:
npx sentry auth loginThis stores an OAuth credential the canvas auto-detects. For non-interactive environments, export a token instead:
export SENTRY_AUTH_TOKEN=<your-token>The login or token needs these scopes:
event:read,org:read,project:read. The canvas checks for a valid sign-in each time it opens; if you aren't signed in it shows a setup gate with the exact reason.
Install
Drop this folder at ~/.copilot/extensions/sentry-triage/ for user scope, or in a
repository at .github/extensions/sentry-triage/ for project scope.
This canvas depends on the sentry npm package at
runtime, which isn't bundled with the extension source. If it's missing, the canvas
still opens and shows a setup gate explaining what to do instead of crashing.
Let Copilot set it up (recommended)
Because the canvas runs inside GitHub Copilot, the agent can install the dependency for you. Paste this into Copilot:
Locate the loaded
sentry-triagecanvas extension folder — the directory that contains itspackage.json— runnpm installthere, then reload extensions.
(That folder is ~/.copilot/extensions/sentry-triage/ for user scope,
.github/extensions/sentry-triage/ for project scope, or, if you installed the
published plugin, com.github.copilot/extensions/sentry-triage inside the
installed plugin.)
Then finish the one interactive step yourself — sign in so Copilot never handles a
raw secret. Run this from the same extension folder (npx resolves the CLI the
local npm install just placed in node_modules):
npx sentry auth login
Or install it manually
# User scope
cd ~/.copilot/extensions/sentry-triage
# Or project scope, from the repository root
cd .github/extensions/sentry-triage
# Or, if you installed the published plugin (`copilot plugin install`), the source
# lives inside the installed plugin — cd into its extension folder:
cd <installed-plugin-path>/com.github.copilot/extensions/sentry-triage
npm install
npx sentry auth login
Reload extensions in the GitHub Copilot app, then open the sentry-triage canvas.
Open the canvas in the correct repository scope
Open the canvas from a Copilot session scoped to the repository where you want issues and draft pull requests created, so it can detect the repository, local checkout, and base branch automatically. If you opened it outside the intended repository, open Settings and confirm the targets before selecting Create issue or Fix with Copilot.
Use the canvas
- Open the canvas from the repository you want to work in.
- Confirm the Sentry organization (auto-detected from your sign-in). If your account has more than one org, pick it from the dropdown. Scan issues stays disabled until an organization is set.
- Optionally narrow to a single project using the autocomplete field. Leave it blank to scan the whole org.
- Review the issues grouped by why they need attention. Toggle Plain-English titles to swap the raw Sentry error for a readable summary.
- Select issues and choose an action in the toolbar — 📝 Create issue or 🔧 Fix with Copilot.
Agent tools
The canvas exposes structured hand-off tools the agent calls instead of printing
JSON into the timeline: submit_issue_summaries,
submit_tracking, submit_related, and submit_work_pr.
License
MIT — see LICENSE.