Skip to content

Conversation

kriptonian1
Copy link
Contributor

@kriptonian1 kriptonian1 commented Oct 4, 2025

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"]
Loading

File Walkthrough

Relevant files
Enhancement
20 files
index.ts
Replace response types with direct schema types                   
+15/-29 
index.ts
Fix import paths to use consistent aliases                             
+3/-3     
workspace.ts
Update workspace admin role color code                                     
+1/-1     
index.ts
Add permission badge SVG export                                                   
+3/-0     
global.css
Update background colors and formatting                                   
+4/-3     
index.tsx
Refactor into smaller sub-components                                         
+17/-258
index.tsx
Update role selection and badge usage                                       
+19/-15 
role-action-cell.tsx
Extract role action cell component                                             
+110/-0 
combobox.tsx
Update workspace type and property references                       
+6/-7     
role-members-cell.tsx
Extract role members cell component                                           
+68/-0   
input-tags.tsx
Add new input tags component                                                         
+45/-0   
role-authorities-cell.tsx
Extract role authorities cell component                                   
+60/-0   
role-project-environment-cell.tsx
Extract project environment cell component                             
+66/-0   
button.tsx
Add primary variant and update styling                                     
+3/-1     
index.tsx
Update to use role badge component                                             
+9/-4     
index.tsx
Improve plan name determination logic                                       
+8/-7     
page.tsx
Optimize conditional rendering logic                                         
+8/-2     
index.tsx
Update button variant and text                                                     
+6/-5     
role-name-cell.tsx
Extract role name cell component                                                 
+40/-0   
role-badge.tsx
Add reusable role badge component                                               
+23/-0   
Dependencies
1 files
package.json
Update dependencies and add emblor package                             
+3/-2     
Additional files
32 files
layout.tsx +3/-3     
layout.tsx +1/-1     
layout.tsx +1/-1     
onboarding-stepper.tsx +6/-4     
auth-email-form.tsx +1/-1     
index.tsx +2/-2     
index.tsx +3/-3     
index.tsx +1/-1     
index.tsx +1/-2     
index.tsx +1/-1     
index.tsx +2/-2     
index.tsx +2/-2     
index.tsx +2/-2     
index.tsx +2/-2     
index.tsx +2/-2     
index.tsx +2/-1     
index.tsx +1/-1     
index.tsx +1/-1     
index.tsx +1/-1     
index.tsx +1/-1     
index.tsx +1/-1     
index.tsx +2/-2     
index.tsx +1/-1     
index.tsx +1/-1     
index.tsx +1/-1     
index.tsx +1/-1     
add-workspace-dialog.tsx +2/-2     
index.tsx +1/-1     
index.tsx +1/-1     
index.tsx +2/-2     
input.tsx +1/-1     
pnpm-lock.yaml [link]   

@kriptonian1 kriptonian1 requested a review from rajdip-b as a code owner October 4, 2025 08:00
Copy link
Contributor

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:  

@kriptonian1 kriptonian1 marked this pull request as draft October 4, 2025 08:01
Copy link
Contributor

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:  

Copy link
Contributor

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

Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    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
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
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
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

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

Successfully merging this pull request may close these issues.

1 participant