Skip to content

Preview images and markdown files in the review - #187

Merged
splitbrain merged 1 commit into
splitbrain:mainfrom
splitbrain-bot:review-preview
Nov 14, 2026
Merged

splitbrain merged 1 commit into
splitbrain:mainfrom
splitbrain-bot:review-preview

Conversation

@splitbrain-bot

Copy link
Copy Markdown

Summary: The review toolbar gets a preview button for images and markdown files, so they show as the thread shows them.

Changes:

  • An image (PNG, JPEG, GIF, WebP, SVG) opens full screen in the lightbox of the thread. Binary images get the button too. The image URL changes with the file hash, so the lightbox shows the current file after the agent changes it.
  • A markdown file renders in the pane with the renderer of the thread, including mermaid diagrams and images. The button switches back to the source. Edit mode has no preview. A file over the 2 MiB read limit renders its first part, with the existing warning.
  • A relative path in a markdown file starts at the directory of the file. Paths in markdown now resolve "." and ".." parts, because the file service refuses them. This also applies to thread messages.
  • doc/review.md names the preview button.

Tests: unit tests for the path helper, and e2e tests for the rendered markdown, the image lightbox and the hidden button in edit mode.

The review showed the source of every file, and a binary image only got a
link to open it in a new tab. The toolbar now has a preview button for
images and markdown files. An image opens full screen in the lightbox of
the thread. A markdown file renders in the pane like a message in the
thread, with mermaid diagrams and images, and the button switches back to
the source. Edit mode has no preview.

A relative path in a markdown file starts at the directory of the file.
Paths in markdown now resolve "." and ".." parts, because the file service
refuses them. A link with such parts in a thread message failed before.

The review document names the preview button and no longer says that the
review tool cannot display binary files.
@splitbrain
splitbrain merged commit 1c6534a into splitbrain:main Nov 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants