fix(kb): fix styling inconsistencies, add rename capability for documents, added search preview#2680
Merged
waleedlatif1 merged 1 commit intostagingfrom Jan 5, 2026
Merged
fix(kb): fix styling inconsistencies, add rename capability for documents, added search preview#2680waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1 merged 1 commit intostagingfrom
Conversation
…ents, added search preview
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR enhances the knowledge base UI with several improvements: fixes styling inconsistencies for status badges by migrating to the standard Key Changes:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant UI as Document/Base Component
participant ContextMenu
participant Modal as RenameDocumentModal
participant API as /api/knowledge/[id]/documents/[documentId]
participant QueryClient as React Query Cache
Note over User,QueryClient: Rename Document Flow
User->>UI: Right-click document row
UI->>UI: Update selection if unselected
UI->>ContextMenu: Open context menu
User->>ContextMenu: Click "Rename"
ContextMenu->>Modal: Open RenameDocumentModal
User->>Modal: Enter new name & submit
Modal->>UI: Call handleSaveRename()
UI->>UI: Optimistically update local state
UI->>QueryClient: Update cached document name
UI->>API: PUT request with new filename
alt Success
API-->>UI: {success: true, data}
UI->>UI: Keep optimistic update
else Error
API-->>UI: Error response
UI->>UI: Rollback to previous name
UI->>QueryClient: Restore previous name in cache
UI->>Modal: Display error message
end
Note over User,QueryClient: Search Preview Flow
User->>UI: Enter search query
UI->>UI: Filter chunks/documents
UI->>UI: Call truncateContent(content, 150, searchQuery)
UI->>UI: Find first matching term in content
UI->>UI: Extract 150 chars around match
UI->>UI: Pass to SearchHighlight component
UI-->>User: Display highlighted preview
Note over User,QueryClient: Multi-Select Context Menu Flow
User->>UI: Select multiple items (Shift/Ctrl+Click)
User->>UI: Right-click on selected item
UI->>ContextMenu: Open with selectedCount, enabledCount, disabledCount
ContextMenu->>ContextMenu: Hide single-item actions (Edit, Open, Copy)
ContextMenu->>ContextMenu: Show batch actions (Enable/Disable, Delete)
ContextMenu->>ContextMenu: Dynamic toggle label (Enable if any disabled)
User->>ContextMenu: Click batch action
ContextMenu->>UI: Call bulk handler
UI->>API: Multiple update/delete requests
API-->>UI: Update responses
UI->>QueryClient: Invalidate/update queries
|
waleedlatif1
added a commit
that referenced
this pull request
Jan 8, 2026
…ents, added search preview (#2680)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Tested manually
Checklist