Skip to content

Fix Linear filter chips showing UUIDs after dropdown closes - #12564

Merged
AmethystLiang merged 1 commit into
mainfrom
jinjing/sta-3393-bug-linear-filter-chips-show-uuids-after-closing-the
Aug 4, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
jinjing/sta-3393-bug-linear-filter-chips-show-uuids-after-closing-the

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #12520

Summary

Fix a regression where Linear filter chips displayed UUIDs instead of readable names after the filter dropdown was closed. The component was only fetching state/label/member metadata while the popover was open, causing display to fall back to IDs once it closed.

Root Cause

The metadata queries (useTeamsStates, useTeamsLabels, useTeamsMembers) were gated on popoverOpen only. When the popover closed, the memoized dependencies updated to empty arrays, causing the metadata to be cleared.

Solution

Introduce a metadataNeeded flag that keeps metadata loaded whenever:

  • The popover is currently open, OR
  • There are active filters (selected states, labels, or assigned user)

This ensures that once a user selects a filter, the readable name is fetched and remains available even after closing the dropdown.

Changes

  • linear-issue-attribute-filter-dropdowns.tsx: Gate metadata queries on metadataNeeded instead of just popoverOpen
  • linear-issue-attribute-filter-dropdowns.test.tsx: Add unit tests verifying lazy loading and persistent metadata
  • tests/e2e/linear-filter-chip-labels.spec.ts: Add e2e test confirming readable names persist after closing dropdown

Testing

  • Unit tests verify metadata stays lazy when closed with no filters, and loads when filters are active
  • E2e test confirms filter chip displays "In Review" (readable state name) instead of UUID after dropdown closes
  • pnpm test and e2e suite pass

Fetch metadata when filters are selected, not only while the popover
is open, so chip labels remain readable after closing the dropdown.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 22340161-51f4-443e-91db-76d008085eee

📥 Commits

Reviewing files that changed from the base of the PR and between 4734428 and 54b6601.

📒 Files selected for processing (3)
  • src/renderer/src/components/linear-issue-attribute-filter-dropdowns.test.tsx
  • src/renderer/src/components/linear-issue-attribute-filter-dropdowns.tsx
  • tests/e2e/linear-filter-chip-labels.spec.ts

📝 Walkthrough

Walkthrough

The dropdown now loads team and workspace metadata when active state, label, or user-assignee filters need metadata, including while the popover is closed. Component tests cover metadata requests and readable filter values. An end-to-end test verifies that a closed Linear status chip displays “In Review” instead of the state UUID.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the cause, solution, changed files, and testing, but it omits the required Screenshots, AI Review Report, Security Audit, and Notes sections. Add the required sections and document screenshots or no visual change, completed checks, AI review findings, cross-platform review, and security audit results.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary user-visible fix for Linear filter chips after the dropdown closes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AmethystLiang
AmethystLiang merged commit e138d28 into main Aug 4, 2026
46 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…#12564)

Fetch metadata when filters are selected, not only while the popover
is open, so chip labels remain readable after closing the dropdown.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Linear filter chips show UUIDs after closing the dropdown

1 participant