Skip to content

Conversation

@emir-karabeg
Copy link
Collaborator

Summary

Type of Change

  • New feature

Testing

Solo.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Dec 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Dec 12, 2025 4:24am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 12, 2025

Greptile Overview

Greptile Summary

Improved UI/UX for knowledge base modals with better visual feedback and permission controls.

  • Added tooltip to delete button in knowledge base header that shows when users lack edit permissions
  • Replaced AlertCircle icon indicators with red error borders for failed file uploads, creating cleaner visual hierarchy
  • Reorganized file item buttons to show retry button alongside remove button when files fail
  • Updated modal footer layouts to use justify-between with error messages on the left and action buttons on the right
  • Adjusted spacing in knowledge base header from 12px to 16px for better visual balance

Confidence Score: 4/5

  • This PR is safe to merge with minor style considerations
  • Changes are cosmetic UI improvements with consistent patterns. The tooltip implementation follows Radix UI patterns correctly, and the layout changes improve UX. Minor points deducted for use of empty div placeholders instead of more semantic alternatives.
  • No files require special attention - all changes follow established patterns

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/app/workspace/[workspaceId]/knowledge/[id]/base.tsx 5/5 Added permission-aware tooltip to delete button and adjusted spacing from 12px to 16px
apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-documents-modal/add-documents-modal.tsx 4/5 Improved file item UI - replaced AlertCircle icon with error border, reorganized buttons, updated footer layout with empty div placeholder
apps/sim/app/workspace/[workspaceId]/knowledge/components/create-base-modal/create-base-modal.tsx 4/5 Improved file item UI - replaced AlertCircle icon with error border, reorganized buttons, updated footer layout with empty div placeholder

Sequence Diagram

sequenceDiagram
    participant User
    participant KnowledgeBase
    participant DeleteButton
    participant Tooltip
    participant Modal
    participant FileUpload
    
    User->>KnowledgeBase: View knowledge base
    KnowledgeBase->>DeleteButton: Render with disabled state check
    alt User lacks edit permission
        User->>DeleteButton: Hover over button
        DeleteButton->>Tooltip: Show permission message
        Tooltip-->>User: "Write permission required"
    else User has edit permission
        User->>DeleteButton: Click delete
        DeleteButton->>Modal: Open delete dialog
    end
    
    User->>Modal: Open add/create documents modal
    User->>FileUpload: Upload files
    alt Upload fails
        FileUpload->>Modal: Update file status to failed
        Modal->>User: Show red border on file item
        User->>FileUpload: Click retry button
        FileUpload->>Modal: Retry upload
    else Upload succeeds
        FileUpload->>Modal: Update progress
    end
    
    alt Error occurs
        Modal->>User: Display error in footer (left side)
    end
    
    User->>Modal: Click action buttons (right side)
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

{uploadError.message}
</p>
) : (
<div />
Copy link
Contributor

Choose a reason for hiding this comment

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

style: empty <div /> used as placeholder - consider semantic alternative like <span className="flex-1" /> or remove if not needed for layout

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-documents-modal/add-documents-modal.tsx
Line: 348:348

Comment:
**style:** empty `<div />` used as placeholder - consider semantic alternative like `<span className="flex-1" />` or remove if not needed for layout

How can I resolve this? If you propose a fix, please make it concise.

{uploadError?.message || submitStatus?.message}
</p>
) : (
<div />
Copy link
Contributor

Choose a reason for hiding this comment

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

style: empty <div /> used as placeholder - consider semantic alternative like <span className="flex-1" /> or remove if not needed for layout

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/knowledge/components/create-base-modal/create-base-modal.tsx
Line: 521:521

Comment:
**style:** empty `<div />` used as placeholder - consider semantic alternative like `<span className="flex-1" />` or remove if not needed for layout

How can I resolve this? If you propose a fix, please make it concise.

@emir-karabeg emir-karabeg merged commit 06d2db7 into staging Dec 12, 2025
9 checks passed
@emir-karabeg emir-karabeg deleted the improvement/kb branch December 12, 2025 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants