Skip to content

Fix canvas repo detection and shrink oversized preview images#2227

Merged
aaronpowell merged 1 commit into
github:mainfrom
jamesmontemagno:fix-canvas-repo-detection-and-preview-sizes
Jul 7, 2026
Merged

Fix canvas repo detection and shrink oversized preview images#2227
aaronpowell merged 1 commit into
github:mainfrom
jamesmontemagno:fix-canvas-repo-detection-and-preview-sizes

Conversation

@jamesmontemagno

Copy link
Copy Markdown
Contributor

Canvas extensions (accessibility-kanban, where-was-i) resolved git state against the extension's install directory or the session-state folder instead of the repo the session was opened in. This broke repo/branch detection for user-scoped installs and worktrees ("unknown/unknown", "detached HEAD"). Both now read the active session's working directory from the canvas request context on open and on each action, so they follow whichever project/worktree opened them.

where-was-i also re-gathers context on open when the saved branch is blank, so it never opens stuck on stale data.

Also compress oversized extension preview images (pngquant, with a mild resize for the photographic arcade-canvas art) so every preview.png is comfortably under the installer's inline-byte cap that was blocking release-notes-showcase from installing.

Update release-notes-showcase author to Kayla Cinnamon.

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the main branch for this pull request.

Description


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • New canvas extension.
  • Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
  • Other (please specify):

Additional Notes


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Canvas extensions (accessibility-kanban, where-was-i) resolved git state
against the extension's install directory or the session-state folder
instead of the repo the session was opened in. This broke repo/branch
detection for user-scoped installs and worktrees ("unknown/unknown",
"detached HEAD"). Both now read the active session's working directory
from the canvas request context on open and on each action, so they
follow whichever project/worktree opened them.

where-was-i also re-gathers context on open when the saved branch is
blank, so it never opens stuck on stale data.

Also compress oversized extension preview images (pngquant, with a mild
resize for the photographic arcade-canvas art) so every preview.png is
comfortably under the installer's inline-byte cap that was blocking
release-notes-showcase from installing.

Update release-notes-showcase author to Kayla Cinnamon.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 6, 2026 14:57
@github-actions github-actions Bot added the canvas-extension PR touches canvas extensions label Jul 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates canvas extensions to resolve git repository/branch context against the active canvas session’s working directory (rather than the extension install directory or session-state folder), improving repo/branch detection across user-scoped installs and worktrees. It also updates metadata for the release-notes-showcase extension (and, per PR description, includes preview image size reductions).

Changes:

  • Update where-was-i and accessibility-kanban to capture ctx.session.workingDirectory and use it as the working directory for git/repo resolution and refresh flows.
  • Ensure where-was-i re-gathers context on open when persisted context is missing a branch.
  • Update release-notes-showcase plugin author metadata.
Show a summary per file
File Description
extensions/where-was-i/extension.mjs Captures the canvas session working directory and uses it for git context gathering; re-gathers on open when branch is missing.
extensions/accessibility-kanban/extension.mjs Switches repo resolution to prefer the session working directory and captures it on open/actions.
extensions/release-notes-showcase/.github/plugin/plugin.json Updates the extension author metadata.

Review details

  • Files reviewed: 3/9 changed files
  • Comments generated: 2
  • Review effort level: Low

// ─── Join session (tools + canvas) ───

const session = await joinSession({
await joinSession({

if (url.pathname === "/refresh" && req.method === "POST") {
const data = await gatherContext(cwd);
const data = await gatherContext(repoCwd());
@aaronpowell aaronpowell merged commit e370b97 into github:main Jul 7, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

canvas-extension PR touches canvas extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants