Repository navigation
fix(linear): batch the issue-state filter as an and per issue - #361
Merged
baldurpan merged 1 commit intoNov 23, 2026
Merged
Conversation
Linear does not apply an `or` whose elements each carry two fields (team key and number): it answers with issues from across the workspace and no error, so `list --issues` and `cleanup` read most Linear worktrees as state unknown. Each element is now an `and` of two single-field filters, the shape #358 measured returning exactly the issues asked for. Closes #358
There was a problem hiding this comment.
code-reviewer: looks good
The batch issue-state lookup now sends each or element as an and of a team-key filter and a number filter. Before, each element put both fields in one object, which Linear silently ignored. The tests now assert the new variables shape, and a patch changeset is added. The change is small and consistent, issueStatesFilter is the only producer of the filter, and I found nothing that needs changing; the fix itself rests on the live measurement recorded in #358, which unit tests cannot confirm.
Reviewed 3b83d9c for baldurpan · claude-opus-5-5 · 3 files · $0.22
baldurpan
deleted the
358-linear-ignores-the-batched-issue-state-filter-so
branch
November 23, 2026 13:39
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.
Closes #358
What changed
issueStatesFilter(src/integrations/linear.ts) now sends eachorelement as{ and: [{ team: { key: { eq } } }, { number: { eq } }] }. Linear ignores anorwhose elements each carry two fields: it answers with issues from across the workspace and no error. That madeworktree list --issuesandworktree cleanupread most Linear worktrees asstate unknown, and a canceled issue's worktree was rarely offered for removal. The new shape is the one Linear ignores the batched issue-state filter, so list --issues and cleanup read most issues as state unknown #358 measured against a live workspace as returning exactly the issues asked for.src/integrations/linear.test.tsnow expect that shape, and the comment names Linear ignores the batched issue-state filter, so list --issues and cleanup read most issues as state unknown #358's measurement as their source, not plan linear-cleanup-signal #114's D6..changeset/linear-issue-state-filter.mdis apatchnote. Percontext/release.md,src/**owes one for a fix that changes what a command does, and the level was confirmed.An issue moved to another team still reads
state unknownunder its old identifier. Neither filter shape finds it, and that is the conservative answer recorded on #215.Gates
context/verify.mdexited 0.pnpm checkpassed with 51 warnings and no errors; the warnings were already there and are in files this change does not touch.pnpm docs:audit-distpassed.pnpm testpassed 3826 tests andpnpm docs:testpassed 1655.reviewersubagent.Notes from the review, not acted on
linear.tsdescribes what the code does.