Skip to content

refactor: use exported filterIssues function in GoodFirstIssues#5404

Open
nguyenquockhang1610 wants to merge 1 commit into
asyncapi:masterfrom
nguyenquockhang1610:refactor/use-filter-issues-function
Open

refactor: use exported filterIssues function in GoodFirstIssues#5404
nguyenquockhang1610 wants to merge 1 commit into
asyncapi:masterfrom
nguyenquockhang1610:refactor/use-filter-issues-function

Conversation

@nguyenquockhang1610
Copy link
Copy Markdown

@nguyenquockhang1610 nguyenquockhang1610 commented May 12, 2026

Summary

Refactors GoodFirstIssues component to use the exported filterIssues function instead of duplicated inline logic (#4889).

Changes

  • Fixed filterIssues comparison values from Repository - All/Area - All to All (matching actual state values)
  • Replaced inline filtering with filterIssues(issues, { selectedRepo, selectedArea })
  • Net reduction: -11 lines, +3 lines

Fixes #4889

Summary by CodeRabbit

  • Refactor
    • Centralized and simplified issue filtering so list narrowing is applied consistently via a single routine, removing duplicated inline logic.
    • Selected repository and area filters are now respected predictably, improving accuracy and maintainability of the displayed issue list for users.

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2026

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8e984af
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/6a03bf7fccba5c00082ca81a
😎 Deploy Preview https://deploy-preview-5404--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 12, 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: 504324b3-9baf-4c8f-ac04-77d17cd3b70b

📥 Commits

Reviewing files that changed from the base of the PR and between 7c28957 and 8e984af.

📒 Files selected for processing (1)
  • components/dashboard/GoodFirstIssues.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/dashboard/GoodFirstIssues.tsx

📝 Walkthrough

Walkthrough

The PR refactors GoodFirstIssues to delegate filtering to the exported filterIssues function, which now uses the literal 'All' sentinel and progressively narrows results based on selected repo and area.

Changes

Filter Function Integration

Layer / File(s) Summary
Unified filter function and component integration
components/dashboard/GoodFirstIssues.tsx
filterIssues now uses the 'All' sentinel and progressively filters a result array by repo and area when applicable. GoodFirstIssues calls filterIssues(issues, { selectedRepo, selectedArea }) and assigns allIssues directly from issues, removing its previous inline filtering.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

I’m a rabbit with nimble paws and pen,
I hop through filters, then hop back again,
One function now sings the single song,
No duplicates lingering for long,
Clean hops, clean code — hooray, amen! 🐰✨

🚥 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 and concisely describes the main refactoring change: using the exported filterIssues function in the GoodFirstIssues component.
Linked Issues check ✅ Passed The PR successfully addresses issue #4889 by fixing filterIssues comparison values to 'All' and refactoring GoodFirstIssues to use the exported function instead of inline filtering logic.
Out of Scope Changes check ✅ Passed All changes in the PR are directly scoped to resolving the filterIssues function usage issue; no unrelated modifications were introduced.
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.

@asyncapi-bot
Copy link
Copy Markdown
Contributor

asyncapi-bot commented May 12, 2026

⚡️ Lighthouse report for the changes in this PR:

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

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0919f05) to head (8e984af).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #5404   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          830       830           
  Branches       159       159           
=========================================
  Hits           830       830           

☔ 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.

@nguyenquockhang1610 nguyenquockhang1610 force-pushed the refactor/use-filter-issues-function branch from 3db2e84 to 7c28957 Compare May 12, 2026 15:27
…nent

- Fix filterIssues to check 'All' instead of 'Repository - All'/'Area - All'
  to match actual state values used in the component
- Refactor component to use the exported filterIssues function instead of
  inline filtering logic
- Removes code duplication

Fixes asyncapi#4889
@nguyenquockhang1610 nguyenquockhang1610 force-pushed the refactor/use-filter-issues-function branch from 7c28957 to 8e984af Compare May 13, 2026 00:02
@sonarqubecloud
Copy link
Copy Markdown

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