Repository navigation
feat(issue-pane): pick between a workspace's issues in the pane header - #253
Merged
Merged
Conversation
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.
…he switch is exhaustive
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.
…sing the last review MINOR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 theattribute merge in
shared/workspace-attachments.tsdeletes 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 ofbuildIssueUnlinkUpdates'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#7intwo 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).
useStableTaskSourcegained a nullable overload because a normalized attachment source is a newobject per render and the panes refetch on identity.
The sync with
nplez1/mainis part of this branch, so it also carries: the switcher's label in thefork string catalog (
verify:localization-extractionfails on an uncatalogued key), anddata-link-urlon 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
SHOULD-FIX— a picked GitHub issue was read from the workspace's repo, not its own. Fixed atR2: the issue carries its attachment's
repoId,linked-issue-repotakes it, and identity isrepo-scoped (including the unlink target). Re-checked resolved.
MINOR— the Linear pane named its unlink target with the fetched identifier, so a moved issuefell back to clearing every slot. Fixed: the linked identifier is passed down.
MINOR— the switcher test'sopenUrloverride turned an explicitnullback into the default,so the no-URL branch was never rendered. Fixed with
Object.hasOwn.MINOR— no test pinned that a picked issue's owntaskSourceContextdrives its reads. Lineararm 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.tstakes the inline exemption the otherupstream-owned over-cap files have; the upstream-comment budget baseline is regenerated with its
reason recorded).
Verification
pnpm teston 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.pnpm fixtures:shot right-sidebar/IssuePaneHeader --theme bothrenders 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
90943300dereports 50 failures — 8 allowlisted, 42 unexpected, all inconfig/scripts/*,tests/tools/fork-release-guard.test.mjsandsrc/main/*key-store/ssh tests. Checking outorigin/nplez1/main(24ebadb5a8d) with none of this branch's changes and running those 19 filesreproduces all 50. None of the flagged files are in this diff, and the
config/files this branchtouches 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