Skip to content

Improve Where Was I worktree context and Git history#2342

Open
jamesmontemagno wants to merge 10 commits into
github:mainfrom
jamesmontemagno:motz-debug-where-was-i
Open

Improve Where Was I worktree context and Git history#2342
jamesmontemagno wants to merge 10 commits into
github:mainfrom
jamesmontemagno:motz-debug-where-was-i

Conversation

@jamesmontemagno

Copy link
Copy Markdown
Contributor

Summary

  • gather fresh branch-specific context from the active worktree, including ahead/behind state and staged, unstaged, and untracked changes
  • add a focused Git graph with collapsible base-branch history
  • add clickable in-canvas diffs for tracked and untracked changes, plus a resume prompt that includes the full worktree context
  • add integration coverage for Git context and diff collection and release the extension as 1.1.0

Validation

  • node --test extensions/where-was-i/git-context.test.mjs
  • npm run build
  • npm run plugin:validate -- --plugin where-was-i
  • exercised the canvas and diff drawer in Microsoft Edge

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d224e01-e53f-46f8-beb2-0b8b64c5ee89
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d224e01-e53f-46f8-beb2-0b8b64c5ee89
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d224e01-e53f-46f8-beb2-0b8b64c5ee89
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d224e01-e53f-46f8-beb2-0b8b64c5ee89
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d224e01-e53f-46f8-beb2-0b8b64c5ee89
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d224e01-e53f-46f8-beb2-0b8b64c5ee89
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d224e01-e53f-46f8-beb2-0b8b64c5ee89
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d224e01-e53f-46f8-beb2-0b8b64c5ee89
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d224e01-e53f-46f8-beb2-0b8b64c5ee89
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d224e01-e53f-46f8-beb2-0b8b64c5ee89
Copilot AI review requested due to automatic review settings July 17, 2026 17:59
@github-actions github-actions Bot added the canvas-extension PR touches canvas extensions label Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔴 Contributor Reputation Check: HIGH risk

Check Risk
Profile HIGH
Credential audit NONE

Maintainers: please review this contributor before merging.
See the workflow run for full details.
Automated check powered by AGT.

@github-actions github-actions Bot added the needs-review:HIGH Contributor reputation check flagged HIGH risk label Jul 17, 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

Enhances the Where Was I canvas with richer Git worktree context and diff previews.

Changes:

  • Adds Git history, divergence, and worktree-change collection.
  • Adds interactive diff previews and expanded resume context.
  • Adds integration tests and releases version 1.1.0.
Show a summary per file
File Description
extensions/where-was-i/package.json Updates package version.
extensions/where-was-i/git-context.test.mjs Tests Git context and diff collection.
extensions/where-was-i/git-context.mjs Implements Git context and file diffs.
extensions/where-was-i/extension.mjs Adds graph, diff drawer, and resume behavior.
extensions/where-was-i/.github/plugin/plugin.json Updates extension metadata version.
.github/plugin/marketplace.json Publishes the updated marketplace version.

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 5
  • Review effort level: Medium

Comment on lines +51 to +55
const rawPath = line.slice(3);
const renameMarker = rawPath.lastIndexOf(" -> ");
return {
code,
path: renameMarker >= 0 ? rawPath.slice(renameMarker + 4) : rawPath,

async function renderUntrackedFile(root, path) {
const { absolutePath, relativePath } = assertRepositoryPath(root, path);
const fileStat = await stat(absolutePath);
Comment on lines +138 to +140
const [branch, head] = await Promise.all([
runGit(worktreeRoot, ["branch", "--show-current"]),
runGit(worktreeRoot, ["rev-parse", "--short", "HEAD"]),
Comment on lines +601 to +602
<div id="diff-overlay" class="diff-overlay">
<section class="diff-panel" aria-label="File changes">
Comment on lines +1003 to +1005
} catch (error) {
res.writeHead(500, { "Content-Type": "application/json" });
res.end(JSON.stringify({ error: error.message || "Unable to send the resume prompt." }));
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 needs-review:HIGH Contributor reputation check flagged HIGH risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants