Skip to content

feat: link and unlink from Repository groups (#372) - #401

Merged
bRRRITSCOLD merged 4 commits into
mainfrom
feat/372-group-link-unlink
Nov 23, 2026
Merged

bRRRITSCOLD merged 4 commits into
mainfrom
feat/372-group-link-unlink

Conversation

@bRRRITSCOLD

Copy link
Copy Markdown
Owner

Closes #372

What changes

A Repository group on either Pull requests view now has a … menu, so a Repository can be filed into a Workspace, or taken out, straight from its group, with Undo instead of a dialog.

  • Open on GitHub opens the Repository's page.
  • Link to a workspace is a submenu of the Workspaces that aren't Archived and don't link the Repository, in the sidebar's order, then New workspace. New workspace opens the New workspace dialog with the Repository already picked, and is the only item when no Workspace is eligible. Picking a Workspace links at once and toasts "Linked owner/name to " with Undo, which unlinks.
  • Unlink from this workspace (only on a Workspace's Pull requests) applies at once. The toast reads "Unlinked owner/name from ." with "Its N open PRs no longer show here." and, when no other Workspace links it, "They're in the Pull requests view, under Not in a workspace." ("It's …" for one PR; with no open PR it shows only the title). Undo links it again.

Undo after the Repository is gone

An unlink deletes the Repository when nothing else names it. Before this PR the link route took only owner/name, so linking it again went through GitHub's lookup, which fails while signed out. POST /v1/workspaces/{id}/links now also takes id, url, private and archived. With id the daemon links the Repository it keeps under that GitHub id, whatever its name now. If it no longer keeps one, it stores the Repository again from the body, without a GitHub call. The GUI always links this way, from the Repository it holds, so both the group's Link and Undo work signed out. API_VERSION is now 25, openapi.json and the client are regenerated, and agentdeck_client::repositories gains link and unlink.

Labels

The ticket writes "Link to a workspace…" and "New workspace…". docs/spec.md §11 (Labels) says menu items never end in "…", even when they open a dialog, so the items read Link to a workspace and New workspace.

Spec

docs/spec.md §4 (the link route, the API_VERSION 25 note), §11 (Pull requests view → Group menu, A Workspace's Pull requests → Unlink, New workspace prefilled, Opening PRs) and §12 are rewritten.

Tests

  • Daemon (integration):
    • after an unlink deletes the Repository, signed out, it is linked again by id, while a link by name is not_signed_in;
    • linking by id finds the kept Repository under its current name;
    • changed events fire for the Repository, then the Workspace;
    • 404 for a Workspace that doesn't exist, storing nothing.
  • Client contract tests for repositories::link and repositories::unlink, the two operations added to the GUI's fake API.
  • GUI view tests:
    • the menu shows on every group of both views, in the rows' … column;
    • Open on GitHub works;
    • the submenu leaves out Archived Workspaces and those already linking;
    • New workspace is the only item when none is eligible;
    • New workspace opens the dialog with the Repository picked (shell test);
    • both toasts appear, with both unlink variants, and with no PRs;
    • Undo works for each, including relinking after the unlink deleted the Repository;
    • failures toast.
  • Unit: eligibility, the open-PR count and the toast text.
  • cargo xtask ci is green locally.

Design

New boards on Penpot "Screens · Main", next to the Pull requests boards:

  • "Pull requests · group menu"
  • "· group menu · no workspace to link"
  • "Pull requests · linked"
  • "Workspace · Pull requests · group menu"
  • "· unlinked"
  • "· unlinked · not in a workspace"

Every existing Pull requests board's group headers now carry the ….

Penpot exports and app captures are side by side in ~/Pictures/agentdeck/2026-11-23-group-link-unlink/.

  • What matches: the group … sits in the rows' … column, and the toasts match the boards in Dark. Light app captures are included.
  • What the captures can't show: they run signed out against a temp daemon, so they show the logged-out banner and "No open PRs". Menus only open on a click, which can't be injected here, so the open menus are covered by the view tests.

The library's DropdownMenu SubContent can't hold a separator or a third item, so the submenu is drawn with a Content copy, tracked in #400.

🤖 Generated with Claude Code

bRRRITSCOLD and others added 4 commits November 23, 2026 16:20
…olds

POST /v1/workspaces/{id}/links takes an optional id, url, private and
archived. With an id the daemon links the Repository it keeps with that id,
or stores it again from the body without asking GitHub, so Undo after an
unlink that deleted the Repository works signed out. The client gains
repositories::link and unlink. API_VERSION 25.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each Repository group on both Pull requests views gets a … menu: Open on
GitHub and Link to a workspace, a submenu of the unarchived Workspaces that
don't link it, then New workspace, which opens New workspace with the
Repository picked. A Workspace's Pull requests adds Unlink from this
workspace. Both apply at once with a toast and Undo; Undo after an unlink
links again by GitHub's id, so it works once the Repository is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bRRRITSCOLD
bRRRITSCOLD merged commit 7eacb71 into main Nov 23, 2026
6 checks passed
@bRRRITSCOLD
bRRRITSCOLD deleted the feat/372-group-link-unlink branch November 23, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link and unlink from Repository groups

1 participant