Repository navigation
Closed
Labels
vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
Not sure
Steps to reproduce
- Start a stand-in for Linear that answers two workspaces. The API key workspace-one is a workspace whose team ENG has the label From workspace one and an open issue titled Alpha issue. The API key workspace-two is a workspace whose team ENG has the label From workspace two and an open issue titled Beta issue.
- Start a T3 server with T3CODE_LINEAR_API_URL set to that stand-in. Add a project, connect Linear with the key workspace-one, and bind the project to team ENG.
- Start a second T3 server the same way. Add a project, connect Linear with the key workspace-two, and bind the project to team ENG.
- Open the web app on a T3 server that is not connected to Linear, with a project already added so it is past the first-run page.
- Open Settings, then Connections. Choose Add environment, enter the first server address and its pairing code, and add it.
- Choose Add environment again, enter the second server address and its pairing code, and add it.
- Open Issues and wait until both Alpha issue and Beta issue are listed.
- Choose Filters, then Labels.
Expected behavior
The Labels menu offers both From workspace one and From workspace two.
Actual behavior
The Labels menu offers From workspace one and does not offer From workspace two.
Impact
Minor bug or occasional failure. People using multiple environments connected to different Linear workspaces with matching team keys encounter missing choices whenever they open the issue filters.
Version or commit
main at 100ba49a65. The cause is at packages/client-runtime/src/issueList.ts:210.
Environment
The web app in Chromium on Linux x64, a fresh checkout.
Logs or stack traces
expected [ 'workspace-one' ] to deeply equal [ 'workspace-one', 'workspace-two' ]Automated repro
Fails in 2 of 2 runs on main: apply the patch with git apply, then run the command.
diff --git a/packages/client-runtime/src/issueList.test.ts b/packages/client-runtime/src/issueList.test.ts
index 591c410876..a19d81f21f 100644
--- a/packages/client-runtime/src/issueList.test.ts
+++ b/packages/client-runtime/src/issueList.test.ts
@@ -1,5 +1,6 @@
import type {
EnvironmentId,
+ IssueCandidates,
IssueListEntry,
IssueListResult,
IssueTrackerKind,
@@ -7,6 +8,9 @@ import type {
ProjectId,
} from "@t3tools/contracts";
import { describe, expect, it } from "vite-plus/test";
+import { AsyncResult, Atom, AtomRegistry } from "effect/reactivity";
+
+import { createMergedIssueCandidatesAtoms } from "./state/issues.ts";
import {
continueIssuePage,
@@ -143,6 +147,52 @@ describe("issueFilterScopes", () => {
expect(issueFilterScopes(held, [])).toEqual([{ environmentId, input: scope }]);
});
+ it("keeps filter candidates from separate environments with the same Linear team key", () => {
+ const secondEnvironmentId = "env-2" as EnvironmentId;
+ const scope = {
+ projectId: api,
+ tracker: "linear" as IssueTrackerKind,
+ host: "linear.app",
+ scope: "ENG",
+ };
+ const first = answer({ trackers: [tracker({})], scopes: [scope] });
+ const second = answer({
+ trackers: [tracker({})],
+ scopes: [{ ...scope, projectId: "api-2" as ProjectId }],
+ });
+ const held = holdIssuePages(
+ [
+ [environmentId, first],
+ [secondEnvironmentId, second],
+ ],
+ new Map(),
+ );
+ const candidates = (name: string) =>
+ Atom.make(
+ AsyncResult.success<IssueCandidates>({
+ labels: [{ name, color: null, description: null }],
+ assignees: [],
+ truncated: false,
+ }),
+ );
+ const byEnvironment = new Map([
+ [environmentId, candidates("workspace-one")],
+ [secondEnvironmentId, candidates("workspace-two")],
+ ]);
+ const merged = createMergedIssueCandidatesAtoms(
+ (target) => byEnvironment.get(target.environmentId)!,
+ () => "Could not read candidates",
+ );
+ const registry = AtomRegistry.make();
+ try {
+ expect(
+ registry.get(merged(issueFilterScopes(held, []))).labels.map((label) => label.name),
+ ).toEqual(["workspace-one", "workspace-two"]);
+ } finally {
+ registry.dispose();
+ }
+ });
+
it("skips a tracker that cannot be read", () => {
const held = new Map([
[cd packages/client-runtime && pnpm exec vp test run src/issueList.test.tsWorkaround
No response
Metadata
Metadata
Assignees
Labels
vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.


Activity
juliusmarminge commentedon Nov 23, 2026
Fixed by #39179, now on main: With two environments connected to different Linear workspaces whose teams both use ENG, Issues → Filters → Labels now offers labels from both workspaces.