Skip to content

Add Branch manager canvas extension - #7468

Merged
lbussell merged 5 commits into
nightlyfrom
lbussell/porting-board-canvas
Nov 13, 2026
Merged

lbussell merged 5 commits into
nightlyfrom
lbussell/porting-board-canvas

Conversation

@lbussell

@lbussell lbussell commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Porting changes between nightly, release/*, and main currently means comparing branch histories by hand on GitHub and keeping track of which changes are still missing.

This PR adds a Copilot canvas extension that helps manage porting changes between branches.

  • Shows one column per tracked branch, with the same change lined up in one row. Changes are matched across branches by identical commits, git cherry-pick -x trailers, and matching titles.
  • Lets you link and unlink changes by hand, including open pull requests. Links are stored under ~/.copilot per repository, so every worktree shares them.
  • Shows where branches are missing individual changes and lets you easily send a prompt to Copilot to port the change.
    • Copilot is instructed to use the existing porting skills in the repo.
    • You can edit the prompt before sending it to Copilot.
    • You can also select multiple changes to batch them together in one message.
  • Exposes canvas actions so Copilot can read the board and link or unlink changes.
  • Updates the porting-changes skill to always use git cherry-pick -x, so ports record the commit they came from.

The Branch manager showing open pull requests and recent changes across main, release/2026-11B, and nightly, with two changes selected

The port dialog with two nightly changes, release/2026-11B as the target branch, and an editable prompt for Copilot

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.

🟡 Changes recommended

Unresolved race conditions can overwrite user edits or lose persisted links, while association and board-calculation errors can hide missing changes or suggest incorrect ports.

8 open issues
What changed in this PR

Adds a Copilot canvas extension for comparing branch histories and preparing port requests using the repository’s existing porting workflow.

Changes:

  • Displays commits and open pull requests across tracked branches, with automatic matching and manual links.
  • Stores repository-specific links and settings across sessions and worktrees.
  • Provides editable single-change and batch port prompts, plus canvas actions for managing the board.
File Description
.github/​extensions/​branch-manager/​web/​util.js Shared text escaping, title formatting, and icons.
.github/​extensions/​branch-manager/​web/​styles.css Board, picker, dialog, and focus styling.
.github/​extensions/​branch-manager/​web/​port.js Port selection, prompt editing, and sending.
.github/​extensions/​branch-manager/​web/​index.html Canvas page structure and controls.
.github/​extensions/​branch-manager/​web/​app.js Board rendering, branch management, and live updates.
.github/​extensions/​branch-manager/​lib/​store.mjs Persistent repository settings and manual associations.
.github/​extensions/​branch-manager/​lib/​service.mjs Shared board operations for UI and canvas actions.
.github/​extensions/​branch-manager/​lib/​server.mjs Token-protected loopback API and static-file server.
.github/​extensions/​branch-manager/​lib/​prompt.mjs Generates porting instructions for Copilot.
.github/​extensions/​branch-manager/​lib/​open.mjs Opens links in the default browser.
.github/​extensions/​branch-manager/​lib/​history.mjs Selects visible changes from merge history.
.github/​extensions/​branch-manager/​lib/​github.mjs Retrieves open pull requests through the GitHub CLI.
.github/​extensions/​branch-manager/​lib/​git.mjs Reads repository history and fetches tracked branches.
.github/​extensions/​branch-manager/​lib/​board.mjs Matches changes and builds branch-aligned rows.
.github/​extensions/​branch-manager/​extension.mjs Registers the canvas, actions, and session lifecycle.

Review effort: Balanced

lbussell and others added 3 commits November 9, 2026 11:57
Add a Copilot canvas extension that shows commits and open pull requests
for several tracked branches side by side, to help with porting changes
between branches.

- One column per tracked branch (configurable in the UI), with commits
  grouped into rows by automatic matching (merges, cherry-pick trailers,
  port references, backport branches, matching titles) or manual links
- Link and unlink changes, including open pull requests; links are stored
  per repo under the Copilot home so all worktrees share them
- Sort rows by any branch, load a month of history at a time
- Placeholders for changes missing from a branch open a dialog to batch
  changes, choose the source branch, and edit the prompt before sending it
  to Copilot
- Canvas actions so Copilot can read the board and link or unlink changes

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Rename the extension folder and canvas id from porting-board to
branch-manager, to match its display name. Saved links move to
~/.copilot/extensions/branch-manager/artifacts.

Interface review fixes:
- Reflow the toolbar at narrow widths
- Show the sorted column with a distinct icon, not color alone
- Keep keyboard focus on the control after board actions, and keep
  focused controls clear of the sticky column header
- Stop announcing the whole board as a live region
- Let the user restore a hand-edited prompt after regenerating it
- Wrap long branch names instead of truncating them
- Give errors and failures a next step, and keep error toasts until
  dismissed
- Raise form field border and excluded-item text contrast

Alignment and dates:
- Center section heading icons on their text and align column names
  with card content
- Align the meta row on text baselines and match chip and Unlink sizes
- Show the full weekday in dates

Find the repository from the session's recorded directories, so the
extension also works when installed in the user's home directory.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Lock saved links across processes so concurrent sessions can't lose
  each other's updates, and recover locks left by crashed processes.
- Keep a change that ports several PRs from fusing independent originals
  into one row.
- Unlinking a merged commit now also removes links stored as an open PR
  alias, keeping the other commits that alias stood for.
- Leave branches whose history failed to load out of the missing-change
  list that is returned to Copilot, and report them separately.
- Ignore late or stale responses in the port dialog after it is closed,
  reopened, edited or regenerated, and clear obsolete generated text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@lbussell
lbussell force-pushed the lbussell/porting-board-canvas branch from 9834de4 to 8422152 Compare November 9, 2026 19:57
@lbussell
lbussell marked this pull request as ready for review November 9, 2026 19:57
@lbussell
lbussell requested a review from a team as a code owner November 9, 2026 19:57
lbussell and others added 2 commits November 9, 2026 21:40
- Detect branch-sync merges from the commits they bring in (commits that
  landed on another tracked branch or through their own PR) instead of a
  commit count, so small syncs no longer hide changes.
- Only treat text as a port reference when a port word introduces it
  ("Ports #1", "Backport of #1") or it is listed under a port intro line,
  so unrelated uses of "port" don't link PRs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Remove matching by port references in PR descriptions and backport
  branch names. Changes now link by identical SHA, `git cherry-pick -x`
  trailers, matching titles, or manual links.
- Ask for `git cherry-pick -x` in the porting-changes skill.
- Trim the port prompt to the changes to port and defer everything else
  to the porting-changes skill.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@lbussell
lbussell merged commit b16cf9a into nightly Nov 13, 2026
8 checks passed
@github-actions github-actions Bot added the needs-backport PR that should be backported to another branch label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-backport PR that should be backported to another branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants