User description
Description
Give a summary of the change that you have made
Fixes #[ISSUENO]
Dependencies
Mention any dependencies/packages used
Future Improvements
Mention any improvements to be done in future related to any file/feature
Mentions
Mention and tag the people
Screenshots of relevant screens
Add screenshots of relevant screens
Developer's checklist
- [ ] My PR follows the style guidelines of this project
- [ ] I have performed a self-check on my work
If changes are made in the code:
- [ ] I have followed the coding guidelines
- [ ] My changes in code generate no new warnings
- [ ] My changes are breaking another fix/feature of the project
- [ ] I have added test cases to show that my feature works
- [ ] I have added relevant screenshots in my PR
- [ ] There are no UI/UX issues
Documentation Update
- [ ] This PR requires an update to the documentation at docs.keyshade.xyz
- [ ] I have made the necessary updates to the documentation, or no documentation changes are required.
PR Type
Enhancement
Description
-
Refactor role card component into smaller sub-components
-
Update type imports to use direct schema types
-
Improve UI styling and color scheme consistency
-
Add new role badge component for better visual consistency
Diagram Walkthrough
flowchart LR
A["RoleCard Component"] --> B["RoleNameCell"]
A --> C["RoleMembersCell"]
A --> D["RoleAuthoritiesCell"]
A --> E["RoleProjectEnvironmentCell"]
A --> F["RoleActionCell"]
G["Type Imports"] --> H["Direct Schema Types"]
I["UI Components"] --> J["Consistent Styling"]
File Walkthrough
| Relevant files |
|---|
| Enhancement | 20 files
index.tsReplace response types with direct schema types |
+15/-29 |
index.tsFix import paths to use consistent aliases |
+3/-3 |
workspace.tsUpdate workspace admin role color code |
+1/-1 |
index.tsAdd permission badge SVG export |
+3/-0 |
global.cssUpdate background colors and formatting |
+4/-3 |
index.tsxRefactor into smaller sub-components |
+17/-258 |
index.tsxUpdate role selection and badge usage |
+19/-15 |
role-action-cell.tsxExtract role action cell component |
+110/-0 |
combobox.tsxUpdate workspace type and property references |
+6/-7 |
role-members-cell.tsxExtract role members cell component |
+68/-0 |
input-tags.tsxAdd new input tags component |
+45/-0 |
role-authorities-cell.tsxExtract role authorities cell component |
+60/-0 |
role-project-environment-cell.tsxExtract project environment cell component |
+66/-0 |
button.tsxAdd primary variant and update styling |
+3/-1 |
index.tsxUpdate to use role badge component |
+9/-4 |
index.tsxImprove plan name determination logic |
+8/-7 |
page.tsxOptimize conditional rendering logic |
+8/-2 |
index.tsxUpdate button variant and text |
+6/-5 |
role-name-cell.tsxExtract role name cell component |
+40/-0 |
role-badge.tsxAdd reusable role badge component |
+23/-0 |
|
| Dependencies | 1 files
package.jsonUpdate dependencies and add emblor package |
+3/-2 |
|
| Additional files | 32 files |
CI Feedback 🧐
A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
Action: Validate PR title |
|
Failed stage: Lint PR [❌]
|
|
Failed test name: Validate PR title
|
|
Failure summary:
The action failed because the PR title "[WIP] fix: refactor and bug fix" does not follow the conventional commits format. The semantic pull request validation action (amannn/action-semantic-pull-request) rejected the title because it contains a "[WIP]" prefix which is not a valid semantic release type according to the conventional commits specification.
|
Relevant error logs:
1: ##[group]Runner Image Provisioner
2: Hosted Compute Agent
...
31: SecurityEvents: write
32: Statuses: write
33: ##[endgroup]
34: Secret source: Actions
35: Prepare workflow directory
36: Prepare all required actions
37: Getting action download info
38: Download action repository 'amannn/action-semantic-pull-request@v5' (SHA:e32d7e603df1aa1ba07e981f2a23455dee596825)
39: Complete job name: Validate PR title
40: ##[group]Run amannn/action-semantic-pull-request@v5
41: with:
42: githubBaseUrl: https://api.github.com
43: env:
44: GITHUB_TOKEN: ***
45: ##[endgroup]
46: ##[error]No release type found in pull request title "[WIP] fix: refactor and bug fix". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/
47:
|
CI Feedback 🧐
A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
Action: Validate PR title |
|
Failed stage: Lint PR [❌]
|
|
Failed test name: Validate PR title
|
|
Failure summary:
The action failed because the PR title "[WIP] fix: refactor and bug fix" does not follow the conventional commits format. The semantic pull request validation action (amannn/action-semantic-pull-request) rejected the title because it contains a "[WIP]" prefix which is not a valid semantic release type according to the conventional commits specification.
|
Relevant error logs:
1: ##[group]Runner Image Provisioner
2: Hosted Compute Agent
...
31: SecurityEvents: write
32: Statuses: write
33: ##[endgroup]
34: Secret source: Actions
35: Prepare workflow directory
36: Prepare all required actions
37: Getting action download info
38: Download action repository 'amannn/action-semantic-pull-request@v5' (SHA:e32d7e603df1aa1ba07e981f2a23455dee596825)
39: Complete job name: Validate PR title
40: ##[group]Run amannn/action-semantic-pull-request@v5
41: with:
42: githubBaseUrl: https://api.github.com
43: env:
44: GITHUB_TOKEN: ***
45: ##[endgroup]
46: ##[error]No release type found in pull request title "[WIP] fix: refactor and bug fix". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/
47:
|
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
| Security Compliance |
| 🟢 | No security concerns identified
No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
|
| Ticket Compliance |
| ⚪ | 🎫 No ticket provided
- [ ] Create ticket/issue <!-- /create_ticket --create_ticket=true -->
|
| Codebase Duplication Compliance |
| ⚪ | Codebase context is not defined
Follow the guide to enable codebase context checks.
|
| Custom Compliance |
| ⚪ | No custom compliance provided
Follow the guide to enable custom compliance check.
|
|
|
Compliance status legend
🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label
PR Code Suggestions ✨
Explore these optional code suggestions:
| Category | Suggestion | Impact |
| High-level |
Revert pnpm lockfile version downgrade
The pnpm lockfile version was downgraded from 9.0 to 6.0. This should be reverted by upgrading the local pnpm version and regenerating the lockfile to prevent build failures and dependency issues.
Examples:
pnpm-lock.yaml [1]
lockfileVersion: '6.0'
Solution Walkthrough:
Before:
# pnpm-lock.yaml
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
...
After:
# pnpm-lock.yaml
lockfileVersion: '9.0'
settings:
autoInstallPeers: true
...
Suggestion importance[1-10]: 9
__
Why: This suggestion correctly identifies a critical downgrade of the pnpm-lock.yaml version, which would break dependency installation and builds for the team.
| High
|
| Possible issue |
Move React key to component
Remove the key prop from the TableRow element inside the RoleCard component, as it should be applied on the RoleCard component itself when rendered within a list.
apps/platform/src/components/roles/roleCard/index.tsx [13-29]
export default function RoleCard({
role
}: RoleListItemProps): React.JSX.Element {
return (
- <TableRow className="group h-full w-full hover:bg-white/5" key={role.id}>
+ <TableRow className="group h-full w-full hover:bg-white/5">
<RoleNameCell
colorCode={role.colorCode}
description={role.description}
name={role.name}
/>
<RoleMembersCell members={role.members} />
<RoleAuthoritiesCell authorities={role.authorities} />
<RoleProjectEnvironmentCell projects={role.projects} />
<RoleActionCell role={role} />
</TableRow>
)
}
- [ ] Apply / Chat <!-- /improve --apply_suggestion=1 -->
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies that the React key prop is misplaced inside the RoleCard component, which is a common mistake that can lead to rendering issues and console warnings.
| Low
|
Improve input validation logic
Improve the email input validation to handle whitespace-only strings. Revert the check from email.length === 0 to email.trim().length === 0.
apps/platform/src/components/members/membersHeader/index.tsx [74-77]
-if (email.length === 0) {
+if (email.trim().length === 0) {
toast.error('Email is required')
return
}
- [ ] Apply / Chat <!-- /improve --apply_suggestion=2 -->
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies a regression in the PR where the email validation no longer accounts for whitespace-only inputs, which is a valid concern.
| Low
|
Fix incorrect pluralization logic
Fix the pluralization logic for "project" to correctly handle the singular case. Change the condition to check if totalProjects is 1, not 0.
apps/platform/src/components/ui/combobox.tsx [163-166]
{selectedWorkspace?.totalProjects}{' '}
-{selectedWorkspace?.totalProjects === 0
+{selectedWorkspace?.totalProjects === 1
? 'project'
: 'projects'}
- [ ] Apply / Chat <!-- /improve --apply_suggestion=3 -->
Suggestion importance[1-10]: 5
__
Why: The suggestion correctly identifies a minor UI bug introduced in the PR where the pluralization of "project" is handled incorrectly for a count of one.
| Low
|
- [ ] More <!-- /improve --more_suggestions=true -->
| |