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

@@ -91,6 +91,23 @@ describe('MessagePart', () => {
expect(screen.getByText('Hello, this is a text message')).toBeInTheDocument()
})
it('opens local markdown links in a text part through onFileClick and external links in a new tab', () => {
const onFileClick = vi.fn()
renderWithProviders(
<MessagePart
part={textPart('[recap](recaps/daily-overview.html)\n\n[site](https://example.com)')}
onFileClick={onFileClick}
/>,
)
fireEvent.click(screen.getByRole('link', { name: 'recap' }))
expect(onFileClick).toHaveBeenCalledWith('recaps/daily-overview.html')
const external = screen.getByRole('link', { name: 'site' })
expect(external).toHaveAttribute('target', '_blank')
expect(external).toHaveAttribute('rel', 'noopener noreferrer')
})
it('renders null for an empty text part', () => {
const { container } = renderWithProviders(<MessagePart part={textPart(' ')} />)