You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(code-tutor): wire canvas-kit deep links into code-review fixes (#19)
The vendored canvas-kit (2026-07-04.1) shipped deep-link builders that no
extension used. Code Tutor's "Request fix session" button only copied the
prompt to the clipboard and set a flag, leaving the user to ask Copilot
manually, even though a finding's fixPrompt is described as a ready-to-run
prompt for a new session.
Findings now render a real "Fix in a new session" deep-link anchor
(ghapp://session/new, mode=autopilot) when the board knows its GitHub
owner/repo, with a graceful fallback to the original copy-prompt button
when it does not.
- canvas.mjs: set_codebase gains an optional repo (owner/repo), validated
with the kit's isRepoFullName and stored with the same lenient fallback
as its sibling fields so a bogus value never yields a dead link.
- web/app.mjs: build the link with buildSessionDeepLink and thread repo
through ReviewTab into FindingCard; anchor uses target=_blank.
- web/styles.css: one rule so the anchor reads as a button.
- extension.mjs: refresh stale kit-version comments.
- test/smoke.test.mjs: valid repo stored, invalid repo ignored.
- README.md: document the CTA and the optional repo.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: extensions/code-tutor/README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ A GitHub Copilot App **canvas extension**: the agent and the user share the same
12
12
-**Points at real code**: every topic and finding links to a file and line range. Click a reference to expand the actual source with language-aware syntax highlighting (read straight from disk under the codebase root).
13
13
-**Mark your understanding** per topic: Understood, Not understood, Revisit, or New. A progress ring tracks how much you have understood.
14
14
-**Ask and clarify**: ask questions per topic or globally; the agent answers in the panel.
15
-
-**Code review**: flags good / ok / bad spots (perf, wrong data structures, suboptimal algorithms) with a one-click "Request fix session" the agent can pick up.
15
+
-**Code review**: flags good / ok / bad spots (perf, wrong data structures, suboptimal algorithms). When the board knows its GitHub `owner/repo`, each issue gets a one-click **Fix in a new session** deep link (`ghapp://session/new`) that opens a dedicated Copilot session to run the fix; otherwise it copies a ready-to-run prompt for the agent to pick up.
16
16
-**Freshness tracking**: fingerprints the code (git HEAD + newest file mtime) at analysis time, re-checks on a visibility-gated timer, and shows a "code changed, refresh" banner plus an always-available Refresh button. Code Tutor never re-analyzes on its own; analysis is the agent's job, so the Refresh button injects a re-analysis prompt into the current Copilot session.
17
17
18
18
## Layout
@@ -41,7 +41,9 @@ Copy this folder into `.github/extensions/code-tutor` (in-repo) or
41
41
`$COPILOT_HOME/extensions/code-tutor` (personal), then run `extensions_reload` and
42
42
open it with `open_canvas` (`canvasId: "code-tutor"`). Point it at a codebase by
43
43
asking Copilot to analyze the repo; it calls `set_codebase` (with a `root` so
44
-
code references resolve) and then authors the topics, references and findings.
44
+
code references resolve, and optionally `repo` as `owner/repo` to enable the
45
+
"Fix in a new session" deep links) and then authors the topics, references and
0 commit comments