Skip to content

refactor: use exported filterIssues function in GoodFirstIssues component#5446

Open
Timmmmmo wants to merge 1 commit into
asyncapi:masterfrom
Timmmmmo:refactor/remove-unused-filterissues-4889
Open

refactor: use exported filterIssues function in GoodFirstIssues component#5446
Timmmmmo wants to merge 1 commit into
asyncapi:masterfrom
Timmmmmo:refactor/remove-unused-filterissues-4889

Conversation

@Timmmmmo
Copy link
Copy Markdown

@Timmmmmo Timmmmmo commented May 21, 2026

Description

Fixes #4889

Problem: The exported filterIssues function in GoodFirstIssues.tsx was never used - the component had inline filtering logic. Additionally, filterIssues compared against 'Repository - All' and 'Area - All', while the component state uses 'All', making the function incompatible with the component.

Changes:

  • Updated filterIssues to compare against 'All' (matching the component's state defaults)
  • Replaced inline filtering logic with a call to the exported filterIssues function
  • Made filteredIssues a const (no longer needs let since filtering is done in the function)

This eliminates dead code and ensures the filtering logic is in one place.

Summary by CodeRabbit

  • Refactor
    • Improved internal code organization and filtering logic by consolidating duplicate code and using a shared utility function.

Review Change Stack

…nent

Fixes asyncapi#4889

The exported filterIssues function was never used — the component had
inline filtering logic instead. Additionally, the function compared
against 'Repository - All' and 'Area - All' while the component used
'All', making them incompatible.

Fix both issues:
- Update filterIssues to use 'All' (matching component state)
- Replace inline filtering with the exported filterIssues function
@netlify
Copy link
Copy Markdown

netlify Bot commented May 21, 2026

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 677f42c
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/6a0f0f72e0dabb00082369f5
😎 Deploy Preview https://deploy-preview-5446--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 73d232b8-b910-4760-b65b-bab3482c0a5e

📥 Commits

Reviewing files that changed from the base of the PR and between 33a01a5 and 677f42c.

📒 Files selected for processing (1)
  • components/dashboard/GoodFirstIssues.tsx

📝 Walkthrough

Walkthrough

This PR unifies issue filtering logic by having GoodFirstIssues use the shared filterIssues helper instead of duplicating filtering inline. The filterIssues function is updated to use 'All' as the sentinel value for both selectedRepo and selectedArea, removing prior string-based sentinels and eliminating code duplication.

Changes

Filter refactoring

Layer / File(s) Summary
Unify filtering with updated sentinel values
components/dashboard/GoodFirstIssues.tsx
filterIssues function updates "skip filtering" sentinel checks to use 'All' instead of prior strings, conditionally filtering by issue.repo and issue.area only when the selection is not 'All'. GoodFirstIssues component refactors to call filterIssues(issues, { selectedRepo, selectedArea }) instead of inline filtering logic, reducing duplication.

🎯 2 (Simple) | ⏱️ ~10 minutes

A filter that lived in two places at once, ✨
Now unified cleanly—no more redundant stunts,
With 'All' as the guard, the logic shines bright, 🐰
DRY principles honored, the refactoring's right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main refactoring change: using the exported filterIssues function in the GoodFirstIssues component instead of duplicate inline logic.
Linked Issues check ✅ Passed The PR fully addresses issue #4889 by refactoring filterIssues to use 'All' as the sentinel value, removing duplicate inline filtering logic, and centralizing the filtering in the exported function.
Out of Scope Changes check ✅ Passed All changes are directly related to the objective of fixing issue #4889: updating filterIssues comparison values and replacing inline filtering with the exported function call.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (33a01a5) to head (677f42c).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #5446   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          906       906           
  Branches       171       171           
=========================================
  Hits           906       906           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asyncapi-bot
Copy link
Copy Markdown
Contributor

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 44
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on https://deploy-preview-5446--asyncapi-website.netlify.app/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Be Triaged

Development

Successfully merging this pull request may close these issues.

refactor: Remove or use unused exported filterIssues function

2 participants