Fix sentry-triage bug bash issues and stream org project pagination (#2948)

Bug-bash fixes for the sentry-triage canvas extension:

- Model list: auto-refresh via session.rpc.model.list() with a static
  fallback, instead of a hardcoded list that went stale.
- Plain-English toggle: gate the toggle until enrichPlainEnglish()
  completes, fixing a race where it was interactive before enrichment
  finished. Add a preparing hint while it runs.
- Copy: 'Plain-English titles' -> 'Plain-English messages'; simplify the
  loading hint.
- Work status labels: distinguish 'starting Copilot fix session' vs
  'filing tracking issue' instead of a generic 'working', and mark the
  Fix-with-Copilot toast as non-blocking.
- Org project pagination: page the traversal as discrete queued tasks
  bounded by page count, driven by the SDK envelope hasMore flag, so a
  mega-org no longer starves interactive lookups and an incomplete
  traversal is never cached as complete. No Promise.race timeout is used
  because sentry@0.42.2 exposes no per-call cancellation and an abandoned
  call would corrupt module-global cursor state.

Bump plugin to 1.2.0 and regenerate marketplace.json.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Liz Tom
2026-09-07 14:11:08 +10:00
committed by GitHub
co-authored by Copilot App
parent 5f7e3d0c68
commit c2e1edf8c9
10 changed files with 386 additions and 84 deletions
+12
View File
@@ -108,11 +108,13 @@ export function startServer({ port = 0, onRefresh, onAction, onWorkSelected, onR
periods: PERIODS,
projects: state.getProjects(),
projectsOrg: state.getProjectsOrg(),
projectsComplete: state.getProjectsComplete(),
connections: state.getConnections(),
prTargets: state.getPrTargets(),
availableModels: state.getAvailableModels(),
prSettingsOpen: state.getPrSettingsOpen(),
plainEnglishView: state.getPlainEnglishView(),
plainEnglishEnriching: state.getPlainEnglishEnriching(),
issueTrackers: state.getIssueTrackers(),
selectedTracker: state.getSelectedTracker(),
workByIssueKey: state.getWorkByIssueKey(),
@@ -153,6 +155,15 @@ export function startServer({ port = 0, onRefresh, onAction, onWorkSelected, onR
}
}
// Broadcast plain-English enrichment start/stop so the client can disable the
// toggle (and show a "preparing…" hint) until summaries are ready.
function notifyPlainEnglishEnriching(isEnriching) {
const data = JSON.stringify({ plainEnglishEnriching: Boolean(isEnriching) })
for (const res of sseClients) {
res.write(`data: ${data}\n\n`)
}
}
function handleRequest(req, res) {
// Reject DNS-rebinding hosts on EVERY request (see the trust-model comment):
// a rebinding page still carries its own hostname in `Host`, so anything but
@@ -546,6 +557,7 @@ export function startServer({ port = 0, onRefresh, onAction, onWorkSelected, onR
notifyWork,
notifyFlash,
notifyScanning,
notifyPlainEnglishEnriching,
close,
})
})