🐛 Bugfix: Fix incomplete display of tenant resources page after window resize#3215
Open
xuyaqist wants to merge 3 commits into
Open
🐛 Bugfix: Fix incomplete display of tenant resources page after window resize#3215xuyaqist wants to merge 3 commits into
xuyaqist wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reorganizes frontend components by moving non-shadcn UI components out of components/ui into components/common, and updates all consuming imports accordingly. This helps keep components/ui reserved for shadcn-style primitives while housing app-specific widgets/renderers under common.
Changes:
- Added non-shadcn components under
frontend/components/common(e.g.,PdfViewer,Diagram,CopyButton,TokenUsageIndicator). - Updated imports across chat/agents/knowledge pages to reference
@/components/common/*instead of@/components/ui/*. - Updated internal common components (e.g.,
markdownRenderer,filePreviewDrawer) to reference the relocated components.
Reviewed changes
Copilot reviewed 10 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/components/common/tokenUsageIndicator.tsx | Adds token usage ring + tooltip as a common component. |
| frontend/components/common/PdfViewer.tsx | Adds PDF viewer as a common component and wires it for file preview usage. |
| frontend/components/common/Diagram.tsx | Adds Mermaid diagram renderer as a common component. |
| frontend/components/common/copyButton.tsx | Adds reusable copy-to-clipboard button as a common component. |
| frontend/components/common/markdownRenderer.tsx | Updates imports to use common CopyButton/Diagram. |
| frontend/components/common/filePreviewDrawer.tsx | Updates imports/dynamic import to use common markdown renderer and PdfViewer. |
| frontend/app/[locale]/tenant-resources/components/resources/KnowledgeList.tsx | Updates MarkdownRenderer import to common. |
| frontend/app/[locale]/knowledges/components/document/DocumentList.tsx | Updates MarkdownRenderer/FilePreviewDrawer imports to common. |
| frontend/app/[locale]/chat/streaming/taskWindow.tsx | Updates MarkdownRenderer/CodeBlock import to common. |
| frontend/app/[locale]/chat/streaming/chatStreamFinalMessage.tsx | Updates MarkdownRenderer import to common. |
| frontend/app/[locale]/chat/components/chatInput.tsx | Updates FilePreviewDrawer/TokenUsageIndicator imports to common. |
| frontend/app/[locale]/chat/components/chatAttachment.tsx | Updates FilePreviewDrawer import to common. |
| frontend/app/[locale]/agents/components/agentConfig/SkillDetailModal.tsx | Updates MarkdownRenderer import to common. |
| frontend/app/[locale]/agents/components/agentConfig/SkillBuildModal.tsx | Updates MarkdownRenderer import to common. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
#3214 Bugfix: Fix incomplete display of tenant resources page after window resize