feat(files): fullscreen preview, relative markdown links, and preinstalled Chromium (#369)

* feat(files): add fullscreen preview with a minimal close control

Add a fullscreen toggle to the desktop file preview header. Fullscreen fills the viewport, hides the header, and shows only a small on-top X to exit.

Keep the mobile preview fullscreen by default with its close button layered above the content, and give the headerless mobile preview the same small on-top X.

* fix(files): open relative markdown links and preinstall Chromium

Resolve relative and absolute markdown links against the previewed file
and open them in the file browser; external links open in a new tab.
Install Playwright and Chromium into the Manager image with NODE_PATH
and PLAYWRIGHT_BROWSERS_PATH so agents can run browser automation
without a project-local install.

* refactor(files): share markdown link handling across renderers

* test(docker): cover the preinstalled playwright chromium step
This commit is contained in:
Chris Scott authored and GitHub committed 2026-09-29 00:15:52 -04:00
1 parent 304f636516
commit 7fbb7555b2
16 files changed
+323 -34

No files matched your search

+7 -2
View File
@@ -6,11 +6,13 @@ import rehypeRaw from 'rehype-raw'
import mermaid from 'mermaid'
import { Maximize2, X, AlertCircle } from 'lucide-react'
import { CopyButton } from '@/components/ui/copy-button'
import { MarkdownLink } from '@/components/ui/markdown-link'
import { useTheme } from '@/hooks/useTheme'
import 'highlight.js/styles/github-dark.css'
interface TextPartProps {
text: string
onFileClick?: (filePath: string) => void
}
interface MermaidBlockProps {
@@ -181,7 +183,7 @@ function isMermaidBlockComplete(text: string): boolean {
return false
}
export function TextPart({ text }: TextPartProps) {
export function TextPart({ text, onFileClick }: TextPartProps) {
const mermaidComplete = React.useMemo(() => {
return text ? isMermaidBlockComplete(text) : false
}, [text])
@@ -257,7 +259,10 @@ export function TextPart({ text }: TextPartProps) {
<table>{children}</table>
</div>
)
}
},
a(props) {
return <MarkdownLink {...props} onOpenLocalPath={onFileClick} />
},
}}
>
{text}