Skip to content

[Bug]: Linear label and assignee filters lose their choices when a search has no matches #37970

Closed

Description

@StiensWout

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

  1. Connect Linear in Settings and bind a project to a team with issues, labels and team members.
  2. Open Issues and open Filters to see the available labels and assignees.
  3. Close Filters and enter a search that matches no issues in that team.
  4. Open Filters and inspect Labels or Assignee.

Expected behavior

The bound team’s labels and assignees remain available regardless of whether the issue search matches any rows.

Actual behavior

The team’s label and assignee choices disappear, leaving empty pickers or only choices from other trackers.

Impact

Major degradation or frequent failure. People using Linear on web, desktop or mobile lose filter choices whenever the current search or filters exclude every issue from their team.

Version or commit

main at 0df1967cfa. The cause is at packages/client-runtime/src/issueList.ts:198.

Environment

Linux x64, the repository's own tests.

Logs or stack traces

a search with no matches must retain the team's label choices: expected []
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 3923519abf..6c27f21663 100644
--- a/packages/client-runtime/src/issueList.test.ts
+++ b/packages/client-runtime/src/issueList.test.ts
@@ -7,6 +7,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,
@@ -130,6 +133,37 @@ describe("issueFilterScopes", () => {
     ]);
   });
 
+  it("keeps a Linear team's filter choices after a search returns no issues", () => {
+    const candidates = {
+      labels: [{ name: "bug", color: null, description: null }],
+      assignees: [{ id: "user-1", login: "julius", name: "Julius", avatarUrl: null }],
+      truncated: false,
+    };
+    const merged = createMergedIssueCandidatesAtoms(
+      () => Atom.make(AsyncResult.success(candidates)),
+      () => "Candidates could not be read",
+    );
+    const registry = AtomRegistry.make();
+    try {
+      const first = holdIssuePages(
+        [[environmentId, answer({ trackers: [tracker({})], entries: [linearRow] })]],
+        new Map(),
+      );
+      expect(registry.get(merged(issueFilterScopes(first, []))).labels).toEqual(candidates.labels);
+      const searched = holdIssuePages(
+        [[environmentId, answer({ trackers: [tracker({})], entries: [] })]],
+        first,
+      );
+      const choices = registry.get(merged(issueFilterScopes(searched, [])));
+      expect(choices.labels, "a search with no matches must retain the team's label choices").toEqual(
+        candidates.labels,
+      );
+      expect(choices.assignees).toEqual(candidates.assignees);
+    } finally {
+      registry.dispose();
+    }
+  });
+
   it("skips a tracker that cannot be read", () => {
     const held = new Map([
       [
cd packages/client-runtime && vp test run src/issueList.test.ts

Workaround

No response

Activity

  1. added
    vouch:trusted
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions