feat(web): add manual file upload and download to the Files panel (#3292)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
This commit is contained in:
Corey Fogg
2026-09-03 08:07:13 +00:00
committed by GitHub
parent a170366e34
commit d4742089fc
77 changed files with 7113 additions and 278 deletions
@@ -28,6 +28,7 @@ import {
import { ResizableMarkdownTable } from "@/components/shared/resizable-markdown-table";
import { cn, toRelativePath } from "@/lib/utils";
import { PanelHeaderBarSplit } from "@/components/task/panel-primitives";
import { FileViewerDownloadButton } from "@/components/task/file-viewer-header";
import { EditorCommentPopover } from "@/components/task/editor-comment-popover";
import { CommentViewPopover } from "@/components/task/comment-view-popover";
import { useMarkdownPreviewComments } from "@/hooks/domains/comments/use-markdown-preview-comments";
@@ -54,6 +55,7 @@ interface MarkdownPreviewToolbarProps {
repositoryId?: string | null;
repositoryName?: string;
showExternalVcsLink: boolean;
onDownload?: () => void;
onTogglePreview: () => void;
}
@@ -67,6 +69,7 @@ function MarkdownPreviewToolbar({
repositoryId,
repositoryName,
showExternalVcsLink,
onDownload,
onTogglePreview,
}: MarkdownPreviewToolbarProps) {
const { t } = useTranslation();
@@ -93,6 +96,7 @@ function MarkdownPreviewToolbar({
size="sm"
/>
)}
<FileViewerDownloadButton onDownload={onDownload} />
{commentsEnabled && commentCount > 0 && (
<div className="flex items-center gap-1 px-2 py-1 text-xs text-primary">
<IconMessagePlus className="h-3.5 w-3.5" />
@@ -105,7 +109,7 @@ function MarkdownPreviewToolbar({
size="sm"
variant="ghost"
onClick={onTogglePreview}
className="h-8 w-8 p-0 cursor-pointer text-foreground"
className="h-11 w-11 p-0 cursor-pointer text-foreground sm:h-8 sm:w-8"
data-testid="markdown-preview-toggle"
>
<IconCode className="h-4 w-4" />
@@ -129,6 +133,7 @@ interface MarkdownPreviewContentProps {
repositoryName?: string;
enableComments?: boolean;
showExternalVcsLink?: boolean;
onDownload?: () => void;
onTogglePreview: () => void;
}
@@ -380,6 +385,7 @@ export const MarkdownPreviewContent = memo(function MarkdownPreviewContent({
repositoryName,
enableComments = false,
showExternalVcsLink = true,
onDownload,
onTogglePreview,
}: MarkdownPreviewContentProps) {
const rootRef = useRef<HTMLDivElement>(null);
@@ -432,6 +438,7 @@ export const MarkdownPreviewContent = memo(function MarkdownPreviewContent({
repositoryId={repositoryId}
repositoryName={repositoryName}
showExternalVcsLink={showExternalVcsLink}
onDownload={onDownload}
onTogglePreview={onTogglePreview}
/>
<div ref={scrollRef} className="flex-1 overflow-auto p-6">