Skip to content

Render Markdown files in inline previews - #3165

Closed
IlyaM wants to merge 1 commit into
get-bb:mainfrom
IlyaM:bb/plan-implementation-for-issue-3159-thr_2rzdcjpe5n
Closed

IlyaM wants to merge 1 commit into
get-bb:mainfrom
IlyaM:bb/plan-implementation-for-issue-3159-thr_2rzdcjpe5n

Conversation

@IlyaM

@IlyaM IlyaM commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

The inline-vis plugin hard-coded HTML extensions in its server validation and always rendered accepted files through an iframe, leaving no path for workspace Markdown documents to use the existing inline preview chrome. This meant agents had to convert Markdown artifacts to HTML or paste their contents directly into messages. Fixes #3159.

What changed

Generalized inline-vis file validation and its plugin-private RPC to support .md and .markdown files alongside HTML. The RPC now returns a discriminated HTML or Markdown result, including validated UTF-8 content for Markdown.

Markdown previews use BB's host Markdown renderer inside the existing bounded, scrollable preview card. HTML iframe behavior and sandboxing remain unchanged. Updated the plugin metadata, README, overview, and bundled agent skill with the new supported formats.

The plugin-private RPC was renamed from prepareHtmlPreview to preparePreview. No server/daemon wire contract changed, so HOST_DAEMON_PROTOCOL_VERSION was not incremented. No CLI changes were required.

How you verified

Added red-first server coverage for Markdown content and extension handling, followed by frontend coverage for host-rendered Markdown, sidebar opening, bounded height, scrolling, and loading-to-ready layout stability.

Ran:

  • pnpm exec turbo run test typecheck --filter=bb-plugin-inline-vis — 20 tests passed; typecheck passed.
  • bb plugin build plugins/inline-vis — server and app bundles built successfully.
  • git diff --check — passed.

Fixes #3159

AGENT GENERATED

@SawyerHood

Copy link
Copy Markdown
Collaborator

Superseded by #3439, which integrates this PR with #3163 since the two conflicted in every file. The commits there credit @IlyaM as co-author. Thanks for both changes!

@SawyerHood SawyerHood closed this Sep 10, 2026
SawyerHood added a commit that referenced this pull request Sep 10, 2026
Integrates #3163 and #3165: inline-vis accepts source="workspace" | "thread-storage" and renders .md/.markdown files with the host Markdown renderer alongside sandboxed HTML previews.

Fixes #3158
Fixes #3159

Co-authored-by: Ilya Martynov <[email protected]>
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.

Support rendering Markdown files in inline-vis blocks

2 participants