console icon indicating copy to clipboard operation
console copied to clipboard

NO-JIRA: Add /find-component-pattern command

Open sg00dwin opened this issue 2 months ago • 8 comments

Summary

Adds /find-component-pattern slash command for analyzing component usage consistency across the OpenShift Console codebase.

Features

  • Component Discovery: Locates component definition and all usages across frontend
  • Pattern Analysis: Groups usages by similarity (props, context, wrapper patterns)
  • Inconsistency Detection: Identifies missing required props, deprecated patterns, and outliers
  • Scope Filtering:
    • --scope=all - Search entire frontend (default)
    • --scope=core - Core components only
    • --scope=package:NAME - Specific package
  • Recommendations: Optional prioritized guidance for standardization (via --show-recommendations flag)

Use Cases

  • Code quality audits and consistency reviews
  • Identifying bugs (missing required props)
  • Planning refactoring efforts
  • Understanding component usage before API changes
  • Onboarding new team members to component patterns

sg00dwin avatar Oct 23 '25 22:10 sg00dwin

@sg00dwin: This pull request explicitly references no jira issue.

In response to this:

Summary

Adds /find-component-pattern slash command for analyzing component usage consistency across the OpenShift Console codebase.

Features

  • Component Discovery: Locates component definition and all usages across frontend
  • Pattern Analysis: Groups usages by similarity (props, context, wrapper patterns)
  • Inconsistency Detection: Identifies missing required props, deprecated patterns, and outliers
  • Scope Filtering:
    • --scope=all - Search entire frontend (default)
    • --scope=core - Core components only
    • --scope=package:NAME - Specific package
  • Recommendations: Optional prioritized guidance for standardization (via --show-recommendations flag)

Use Cases

  • Code quality audits and consistency reviews
  • Identifying bugs (missing required props)
  • Planning refactoring efforts
  • Understanding component usage before API changes
  • Onboarding new team members to component patterns

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Oct 23 '25 22:10 openshift-ci-robot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sg00dwin Once this PR has been reviewed and has the lgtm label, please assign rhamilto for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Oct 23 '25 22:10 openshift-ci[bot]

Walkthrough

Adds a new documentation file that documents a CLI workflow to locate and analyze usage patterns of a specified component across the OpenShift Console codebase, including syntax, scope options, phased analysis steps, prompts, examples, edge‑case handling, and performance guidance.

Changes

Cohort / File(s) Summary
Documentation (new CLI command guide)
/.claude/commands/find-component-pattern.md
Adds a comprehensive guide describing command usage and flags (--scope, --show-recommendations), scope rules (all/core/package), a four‑phase analysis workflow (Discovery, Pattern Analysis, Reporting, Recommendations), interactive prompts, edge‑case handling, performance considerations, related standards, and multiple example workflows.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Documentation-only addition; no code or public API changes.
  • Review focus: accuracy of command syntax and flags, clarity of phase workflows and examples, and correctness of scope and performance notes.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

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

coderabbitai[bot] avatar Nov 20 '25 19:11 coderabbitai[bot]

@coderabbit help

sg00dwin avatar Nov 20 '25 20:11 sg00dwin

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

CodeRabbit commands

These commands are invoked using PR/Issue comments.

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>] to validate the custom pre-merge checks instructions. Defaults to error when --mode is omitted.
    • @coderabbitai ignore pre-merge checks to override pre-merge checks and get an approval on PR.
    • @coderabbitai run pre-merge checks to run pre-merge checks on the pull request.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit configuration file (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, support, documentation and community

  • Visit our status page to check the current availability of CodeRabbit.
  • Create a ticket on our support page for assistance with any issues or questions.
  • Visit our documentation site for detailed information on how to use CodeRabbit.
  • Join our Discord community to connect with other users and get help from the community.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Nov 20 '25 20:11 coderabbitai[bot]

@coderabbitai resolve

sg00dwin avatar Nov 20 '25 20:11 sg00dwin

✅ Actions performed

Comments resolved.

coderabbitai[bot] avatar Nov 20 '25 20:11 coderabbitai[bot]

@sg00dwin: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Nov 20 '25 21:11 openshift-ci[bot]