Skip to content

feat(issue-pane): pick between a workspace's issues in the pane header - #253

Merged
nplez1 merged 7 commits into
nplez1/mainfrom
nplez1/Multi-Issue-Support
Oct 30, 2026
Merged

nplez1 merged 7 commits into
nplez1/mainfrom
nplez1/Multi-Issue-Support

Conversation

@nplez1

@nplez1 nplez1 commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

What

A workspace can hold several issues, but the right-sidebar Issue panel only ever showed the one
its compatibility slot named. The header's identifier becomes a split control: it keeps its old
action (open the issue through Link Routing, so the in-app browser or the system browser, with the
Shift escape), and a chevron opens a menu of every attached issue — provider mark, identifier,
title, the shown one checked. With one issue attached the header renders exactly as before.

How the selection works

The selection is the pane's view, not the workspace's active issue. An "active issue" is one
compatibility slot per provider (linkedIssue / linkedLinearIssue / linkedWorkItem), and the
attribute merge in shared/workspace-attachments.ts deletes an attachment when its slot is cleared —
so promoting a picked issue to active across providers would unlink a sibling rather than reorder
them. Selection therefore lives in the pane, keyed by workspace and issue identity, and falls back to
the active issue when the picked one stops being attached or the workspace changes.

Because of that, "Unlink issue" now removes the attachment the pane shows
(buildWorkspaceAttachmentEdits), instead of buildIssueUnlinkUpdates's one-slot-per-provider rule,
which would have unlinked an issue the user is not looking at. The old rule stays as the fallback for
a link with no matching attachment, and is still what the workspace dialog uses.

Each issue carries the account its own attachment recorded, so a picked issue is read from its own
host and site rather than the workspace's. A GitHub issue keeps its attachment's repoId, so #7 in
two repos is two entries and each is read from its own repo — without it a picked issue was read from
the workspace repo (nothing at all in a folder workspace, the wrong issue when a fork shares a number).
useStableTaskSource gained a nullable overload because a normalized attachment source is a new
object per render and the panes refetch on identity.

The sync with nplez1/main is part of this branch, so it also carries: the switcher's label in the
fork string catalog (verify:localization-extraction fails on an uncatalogued key), and data-link-url
on the identifier button so the new app-wide link menu reaches it.

Review

Reviewed by Opus 5.5, high: R1 (1 blocking fixed), delta clean on R2

  • R1 SHOULD-FIX — a picked GitHub issue was read from the workspace's repo, not its own. Fixed at
    R2: the issue carries its attachment's repoId, linked-issue-repo takes it, and identity is
    repo-scoped (including the unlink target). Re-checked resolved.
  • R1 MINOR — the Linear pane named its unlink target with the fetched identifier, so a moved issue
    fell back to clearing every slot. Fixed: the linked identifier is passed down.
  • R1 MINOR — the switcher test's openUrl override turned an explicit null back into the default,
    so the no-URL branch was never rendered. Fixed with Object.hasOwn.
  • R1 MINOR — no test pinned that a picked issue's own taskSourceContext drives its reads. Linear
    arm at R2; the Jira arm was closed after the re-check with a test that fails when the arm is swapped.

The four lint reds the sync arrived with were fixed rather than exempted, except the two line-count
items the fork allowlists to keep upstream merges cheap (vm.ts takes the inline exemption the other
upstream-owned over-cap files have; the upstream-comment budget baseline is regenerated with its
reason recorded).

Verification

  • pnpm test on the branch's own files: 108 passing, plus 11 for the resolver/repo-lookup additions.
  • pnpm tc — all three projects clean.
  • pnpm check:changed --maxWorkers=2 — 29/29 checks.
  • node local/gate-lint.mjs @90943300def — PASS, 41 steps green, 0 known red, 0 new.
  • Fixtures: pnpm fixtures:shot right-sidebar/IssuePaneHeader --theme both renders the one-issue,
    several-issue and open-menu states in both themes.

Full unit suite: it cannot go green on this machine, for reasons that predate the branch. The gate on
90943300de reports 50 failures — 8 allowlisted, 42 unexpected, all in config/scripts/*,
tests/tools/fork-release-guard.test.mjs and src/main/* key-store/ssh tests. Checking out
origin/nplez1/main (24ebadb5a8d) with none of this branch's changes and running those 19 files
reproduces all 50. None of the flagged files are in this diff, and the config/ files this branch
touches are lint baselines no test reads.

Gate 1 waived: full suite's 42 unexpected failures reproduce on origin/nplez1/main (24ebadb) without this branch; the config/ changes are lint baselines no test reads

A workspace can hold several issues; the pane only ever showed the active
one. The header's identifier is now a split control: it still opens the issue,
and a chevron lists every attached issue (provider mark, identifier, title)
with the shown one checked.

The selection is the pane's view, not the workspace's active link: the active
issue is one compatibility slot per provider, and clearing a slot deletes the
attachment, so promoting one across providers would unlink a sibling rather
than reorder them.

Unlinking now removes the issue the pane shows instead of one slot per
provider, which would have unlinked an issue the user is not looking at.
…er the sync

The sync's link work gives every non-anchor web affordance the app's link
menu through `data-link-url`, so the pane's identifier declares the address it
opens.

`verify:localization-extraction` now fails on a translated key with no catalog
entry, so the switcher's label joins the fork overlay.
None of these are this branch's files; they arrived through the merge and
`local/gate-lint.mjs` reports them as new reds, so PR gate 1 could not pass.

Fixed rather than exempted, except the line counts the fork allowlists to keep
upstream merges cheap:

- `test-no-wall-clock` in the three AI Vault scanner parser tests dated their
  fixture by the wall clock; they now use a fixed instant, because the parser
  only carries the mtime through.
- `test-no-real-time-wait` in the session-fold tests used a 1 ms and a 20 ms
  sleep to keep a fake brain in flight; a zero-delay yield does that without
  making the test the clock's problem.
- `vm-recipe-extend.test.ts` measured a hang guard with `Date.now()`; a
  monotonic `performance.now()` is what an elapsed-time assertion wants.
- `contextual-http-link.ts` is a transitive Link Routing reader, the same
  accepted class as `use-linked-issue-pane-actions.ts`, so it joins the
  focus-read overlay with its reason.
- `tests/tools/upstream-file-comments.test.mjs` shipped a literal
  `eslint-disable max-lines` inside a fixture, which the max-lines ratchet
  read as a real suppression; the fixture assembles the directive instead.
- `src/cli/handlers/vm.ts` is upstream's file carrying the fork's VM recipe
  entry points, so it takes the inline exemption every other over-cap upstream
  file has, and the stale `register-core-handlers.ts` row is pruned.
- The comment budget for upstream files grew with the sync's link work, so the
  baseline is regenerated with that reason recorded.
Round 1 (Opus 5.5, high) found one blocking defect and three minors.

The blocker: the resolver dropped an attachment's `repoId`, so a GitHub
issue picked from the switcher that is not the workspace's active link was
read from the workspace's repo. In a folder workspace (synthetic repo id) it
showed nothing; in a worktree it could read the same number from another repo,
which is the "unrelated issue of the same number" failure `linked-issue-repo`
exists to prevent. The GitHub issue now carries its attachment's repo, the
repo lookup takes it, and the issue's identity is repo-scoped so `#7` in two
repos is two entries — including for the unlink target.

Minors: the Linear pane's unlink target now names the linked identifier rather
than the fetched one, so a moved issue still resolves to its attachment; the
switcher test's `openUrl` override no longer turns an explicit null back into
the default; and a test pins that a picked issue's own account drives its reads
instead of the workspace's.
@nplez1
nplez1 merged commit 9c34d51 into nplez1/main Oct 30, 2026
2 checks passed
@nplez1
nplez1 deleted the nplez1/Multi-Issue-Support branch October 30, 2026 04:32
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.

1 participant