Skip to content

Conversation

@krishagarwal278
Copy link
Member

@krishagarwal278 krishagarwal278 commented Oct 16, 2025

Screenshot 2025-10-23 at 10 17 38 AM Screenshot 2025-10-23 at 10 18 22 AM Screenshot 2025-10-23 at 10 18 12 AM Screenshot 2025-10-23 at 10 18 30 AM

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 16, 2025
@openshift-ci-robot
Copy link
Contributor

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

In response to this:

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 openshift-ci bot requested review from jhadvig and spadgett October 16, 2025 17:31
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 16, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: krishagarwal278
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

@krishagarwal278
Copy link
Member Author

/retest

3 similar comments
@krishagarwal278
Copy link
Member Author

/retest

@krishagarwal278
Copy link
Member Author

/retest

@krishagarwal278
Copy link
Member Author

/retest

@krishagarwal278
Copy link
Member Author

/label docs-approved
/label px-approved

@openshift-ci openshift-ci bot added docs-approved Signifies that Docs has signed off on this PR px-approved Signifies that Product Support has signed off on this PR labels Oct 21, 2025
@krishagarwal278
Copy link
Member Author

/retest

@krishagarwal278 krishagarwal278 changed the title NO-JIRA: Add Claude Code command /checkstrict NO-JIRA: Add Claude Code command /check-best-practices Oct 23, 2025
@krishagarwal278 krishagarwal278 force-pushed the claude-command branch 2 times, most recently from 4df651c to e778905 Compare October 24, 2025 19:59
### Additional OpenShift Console Specific Practices

**React Component Patterns**:
- Use `React.FCC` instead of `React.FC` for components (fixes legacy dependency issues)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Use `React.FCC` instead of `React.FC` for components (fixes legacy dependency issues)
- Use `React.FCC` instead of `React.FC` for components (fixes an issue with implicit `children` in `React.FC` provided by React 17, our current React version)


### Additional OpenShift Console Specific Practices

**React Component Patterns**:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**React Component Patterns**:
### React Component Patterns

**React Component Patterns**:
- Use `React.FCC` instead of `React.FC` for components (fixes legacy dependency issues)

**Type Safety & Kubernetes Integration**:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Type Safety & Kubernetes Integration**:
### Type Safety & Kubernetes Integration

- Use optional chaining for safe property access
- Initialize with proper defaults instead of repeated null checks

**Code Organization**:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Code Organization**:
### Code Organization

- Never use absolute paths in code. The app should be able to run behind a proxy under an arbitrary path.
- TESTS: Should follow a similar "test tables" convention as used in Go where applicable.

### Additional OpenShift Console Specific Practices
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can integrate this better into the styleguide?

Comment on lines +16 to +72
### Directory and File Names
-**Use lowercase dash-separated names for all files** (avoids git issues with case-insensitive file systems)
-**Exceptions only for conventional files** (Dockerfile, Makefile, README)

### Go Best Practices
-**All Go code should be formatted by gofmt**
-**Import statements should be separated into 3 groups**: stdlib, external dependency, current project
-**Tests should follow "test tables" convention**

### TypeScript and JavaScript Best Practices
-**New code should be written in TypeScript, not JavaScript**
-**Prefer functional components to class-based components**
-**Use React hooks with functional components if you need state**
-**Prefer composition to inheritance**
-**Follow all rules defined in .eslintrc**
-**Never use absolute paths in code** - app should run behind a proxy under arbitrary path
-**Tests should follow "test tables" convention** (similar to Go)

### SCSS/CSS Best Practices
-**All SCSS files imported from top-level** `/frontend/public/style.scss`
-**No need to import SCSS files as dependencies** - top-level file handles this
-**All SCSS files prefixed with underscore** (`_my-custom-file.scss`)
-**Avoid element selectors, prefer class selectors**
-**Scope all classes with `co-` prefix** to avoid collisions with imported CSS
-**Class names lowercase and dash-separated**
-**All SCSS variables scoped within their component**
-**Use BEM naming conventions**

### Additional OpenShift Console Specific Practices

**React Component Patterns**:
- Use `React.FCC` instead of `React.FC` for components (fixes legacy dependency issues)
- Prefer functional components with hooks over class components
- Use composition over inheritance patterns

**Type Safety & Kubernetes Integration**:
- Use specific Kubernetes resource types instead of generic `K8sResourceCommon` when possible
- Avoid excessive use of `any` types
- Avoid type assertions with `as any`
- Use optional chaining for safe property access
- Initialize with proper defaults instead of repeated null checks

**Code Organization**:
- Follow established directory structure patterns
- Use consistent import organization
- Maintain clear separation of concerns

### Analysis Process

1. **File Structure**: Check file naming and organization
2. **Go Code Quality**: Verify gofmt formatting and import grouping
3. **TypeScript Usage**: Verify modern TypeScript patterns
4. **React Patterns**: Assess component structure and hooks usage
5. **SCSS/CSS Patterns**: Check BEM naming, prefixing, and organization
6. **Style Guide Compliance**: Check against official OpenShift Console style guide
7. **Code Quality**: Evaluate maintainability and consistency
8. **OpenShift Specific**: Review Kubernetes integration patterns
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this stuff is in the styleguide, do we need to deduplicate it for claude?

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

Labels

docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. px-approved Signifies that Product Support has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants