Repository navigation
fix(linear): union filter options across every selected team - #10042
Conversation
|
Warning Review limit reached
Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 34dbadfb60f1524621e61f08f76ec8fc14ea523f and 9c99c23. 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughLinear issue attribute filters now receive selected team IDs and available teams. New helpers resolve valid team IDs and union metadata by ID. Multi-team hooks load and combine states, labels, and members across selected teams, while the dropdown updates active-team handling and filter pruning for team sets. Tests cover team resolution, metadata unioning, and multi-team workflow state loading. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 94867968-f84d-4102-8c55-bd6cb441a524
📥 Commits
Reviewing files that changed from the base of the PR and between 0326594 and 34dbadfb60f1524621e61f08f76ec8fc14ea523f.
📒 Files selected for processing (6)
src/renderer/src/components/TaskPage.tsxsrc/renderer/src/components/linear-issue-attribute-filter-dropdowns.tsxsrc/renderer/src/components/linear-issue-attribute-filter-team-ids.test.tssrc/renderer/src/components/linear-issue-attribute-filter-team-ids.tssrc/renderer/src/hooks/useIssueMetadata.test.tsxsrc/renderer/src/hooks/useIssueMetadata.ts
Linear attribute filters (status / assignee / label) only loaded metadata for the primary selected team, so multi-team and All-teams views dropped other teams' options. Load every selected team (sharing the per-team metadata cache), union by id, and drop the single-team-only banner.
34dbadf to
9c99c23
Compare
|
Thanks so much for this, @innocarpe — union filter options across every selected team. Reviewed, rebased on latest |
Summary
On Tasks → Linear issues, selecting multiple teams (or "All teams") now lists Filter → Status / Assignee / Label options from every selected team, deduped by id, instead of only the primary team's.
ELI5
Each Linear team has its own statuses, labels, and people. If you pick two teams, the filter menu should show both teams' options — but Orca only asked the first team. Now it asks every selected team and merges the lists.
Root cause & fix
The attribute filter dropdowns resolved a single
primaryTeamand loaded metadata only for that team, showing an "Options from {team}" banner while ignoring the rest of the multi-select. The fix addsresolveLinearIssueAttributeFilterTeamIds()(name-stable ordering, falls back to the primary team on empty selection, drops ids absent fromavailableTeams) andunionLinearMetadataById()(dedupe by id, first-seen order), plususeTeamsStates/useTeamsLabels/useTeamsMembershooks that fan out through the existing per-team cache stores and union the results.TaskPagenow passesselectedTeamIds+availableTeams, active filter pills prune against the unioned option set, and the stale banner is removed.Evidence
Validated & rebased onto latest main during a bug-bash triage on 2026-07-23.
origin/main(base8a23618310, head34dbadfb60).linear-issue-attribute-filter-team-ids.test.tsanduseIssueMetadata.test.tsx— 2 files, 11 tests passed on branch.team-ids.test.tscannot resolve the new module, anduseIssueMetadata.test.tsx"unions workflow states across every selected team ([Bug]: Linear filters only show options from the first selected team #8739)" throwsTypeError: useTeamsStates is not a function.oxlinton the 4 changed source files — EXIT 0, clean.Trade-offs
None — pure fix. Filter lists grow under multi-team selection, which is the intended behavior; results are deduped by id and reuse the same per-team TTL cache as the single-team hooks.
Regression risk
Effectively zero. The change is additive (new module + new hooks); single-team paths keep their behavior via the empty-selection fallback, and the pre-existing single-team cache/TTL tests stay green.
useTeamsMetadataListkeys effects on a joined cache key so freshly-passed arrays don't thrash, and an active-key ref guards stale async results.Credit to original author @innocarpe. Validated, rebased, and (where applicable) hardened via automated bug-bash review; original fix design preserved.