Skip to content

refactor: use exported filterIssues instead of inline logic#5359

Open
yifanyifan897645 wants to merge 1 commit into
asyncapi:masterfrom
yifanyifan897645:fix/use-filterIssues-4889
Open

refactor: use exported filterIssues instead of inline logic#5359
yifanyifan897645 wants to merge 1 commit into
asyncapi:masterfrom
yifanyifan897645:fix/use-filterIssues-4889

Conversation

@yifanyifan897645
Copy link
Copy Markdown

@yifanyifan897645 yifanyifan897645 commented Apr 23, 2026

Summary

  • Fixed filterIssues function filter values from 'Repository - All'/'Area - All' to 'All' to match the component's actual usage
  • Replaced inline filtering logic in GoodFirstIssues component with a call to the now-consistent filterIssues function
  • Removed redundant allIssues variable alias

Closes #4889

Summary by CodeRabbit

  • Refactor
    • Consolidated issue filtering logic in the dashboard for improved code maintainability.

The exported filterIssues function was defined but never used, while the
component duplicated its logic inline with inconsistent filter values
('Repository - All' vs 'All'). Fix the filter values to match the
component's usage and replace inline logic with a filterIssues call.

Closes asyncapi#4889

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 23, 2026

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 0ea8381
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/69ea9aecaecd170008e308f6
😎 Deploy Preview https://deploy-preview-5359--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 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: 809c5bf1-ff55-48f2-a355-41e1106dd4f0

📥 Commits

Reviewing files that changed from the base of the PR and between 86f23d2 and 0ea8381.

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

📝 Walkthrough

Walkthrough

The issue-filtering logic in GoodFirstIssues is consolidated by centralizing duplicate filtering code into a shared filterIssues function. Sentinel values for filter checks are updated from 'Repository - All' and 'Area - All' to 'All'. The Filters component now receives allIssues directly. JSDoc comments are removed.

Changes

Cohort / File(s) Summary
Filtering Logic Consolidation
components/dashboard/GoodFirstIssues.tsx
Removed duplicate filtering logic and centralized it via shared filterIssues function. Updated sentinel values from 'Repository - All'/'Area - All' to 'All'. Removed JSDoc comments. Net change: +4/-28 lines.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Filters once scattered, now unified and clean,
Sentinel values simplified—what a dream!
From duplication to one truthful source,
Logic flows smoother on its rightful course. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 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: consolidating inline filtering logic by using the exported filterIssues function instead.
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.

✏️ 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 Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (86f23d2) to head (0ea8381).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #5359   +/-   ##
=========================================
  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.

@asyncapi-bot
Copy link
Copy Markdown
Contributor

⚡️ 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-5359--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