-
Notifications
You must be signed in to change notification settings - Fork 3.3k
improvement(ui): improved skills UI, validation, and permissions #3156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR enhances the skills feature with improved UI, validation, and permission handling. The main changes include:
The changes follow established patterns for validation, permissions, and data hydration. Minor style improvements suggested for type safety and theme consistency. Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant SkillModal
participant SkillInput
participant useEditorSubblockLayout
participant WorkflowBlock
participant PermissionConfig
participant SkillsAPI
Note over User,SkillsAPI: Skill Creation/Edit Flow
User->>SkillModal: Opens modal to create/edit skill
SkillModal->>SkillModal: Validates name (kebab-case, max 64 chars)
SkillModal->>SkillModal: Validates description (required)
SkillModal->>SkillModal: Validates content (required)
alt Validation Fails
SkillModal->>User: Shows field-specific error messages
else Validation Succeeds
SkillModal->>SkillsAPI: createSkill or updateSkill mutation
SkillsAPI-->>SkillModal: Success/Error response
SkillModal->>User: Closes modal or shows general error
end
Note over User,SkillsAPI: Permission Check Flow
User->>useEditorSubblockLayout: Opens editor panel
useEditorSubblockLayout->>PermissionConfig: Check disableSkills flag
alt Skills Disabled
useEditorSubblockLayout->>User: Hides skill-input subblock
else Skills Enabled
useEditorSubblockLayout->>SkillInput: Renders skill-input component
end
Note over User,SkillsAPI: Skill Selection & Display Flow
User->>SkillInput: Selects skill from dropdown
SkillInput->>SkillsAPI: Fetch workspace skills
SkillsAPI-->>SkillInput: Returns skill list
SkillInput->>SkillInput: Stores {skillId, name} in value
SkillInput->>User: Displays skill card with name and icon
Note over User,SkillsAPI: Skill Name Hydration Flow
User->>WorkflowBlock: Views block in workflow canvas
WorkflowBlock->>SkillsAPI: Fetch workspace skills
SkillsAPI-->>WorkflowBlock: Returns fresh skill data
WorkflowBlock->>WorkflowBlock: Resolves skill names with priority:<br/>1. Fresh data from API<br/>2. Stored name (fallback)<br/>3. skillId (last resort)
WorkflowBlock->>User: Displays hydrated skill names
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, 3 comments
.../sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx
Outdated
Show resolved
Hide resolved
.../sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx
Outdated
Show resolved
Hide resolved
...mponents/panel/components/editor/components/sub-block/components/skill-input/skill-input.tsx
Show resolved
Hide resolved
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Summary
Type of Change
Testing
tested manually
Checklist