Skip to content

ThreadChat drops local-file link routing on full-page plugin routes: inline-code file mentions, @thread mentions, and workspace-relative images render dead #4466

Closed as not planned

Description

@cristoslc

Summary

When a plugin renders the SDK's ThreadChat component on a full-page plugin route, message-body link routing for workspace-local content is missing. Inline code spans holding workspace-relative .md paths render as inert code instead of clickable file-preview links, @thread: mentions are not clickable, and workspace-relative images do not resolve. The same message in the main thread pane renders all three correctly. The SDK's Markdown component, used in the very same plugin surface, links everything correctly, which shows the routing data is reachable from plugin surfaces; ThreadChat just does not get it.

Versions and environment

  • bb 0.44.0 (desktop app), macOS 26 / arm64
  • @get-bb/plugin-sdk 0.5.29
  • focus-board 0.5.3 as the repro consumer (source: https://github.com/cristoslc/bb-plugin-focus-board, installed from a local path, not yet on the bb-community marketplace); any plugin embedding ThreadChat on a full-page route should behave the same
  • No agent CLI involved; this is app-shell rendering, not provider behavior
  • Setup notes: plugin full-page route (/plugins/focus-board/board), not a docked panel; no remote machine or custom ports

Steps to reproduce

  1. Install focus-board 0.5.3 from https://github.com/cristoslc/bb-plugin-focus-board (or a minimal plugin that renders <ThreadChat threadId={…} variant="full" …/> on a full-page plugin route).
  2. Have an agent post a message in any thread that contains:
    • an inline code span with a workspace-relative markdown path, e.g. `docs/rfcs/rfc-support-triage-process.md`
    • an @thread: mention of another thread
    • a workspace-relative image reference
  3. Open that thread in the main thread pane and note the rendering.
  4. Open the same thread's chat in the plugin's full-page board route and compare.

Minimal-repro shape: the smallest plugin that mounts ThreadChat on a full-page route and displays a thread whose last message contains one .md inline code span is enough; no provider-specific behavior is involved.

Did not involve / not needed: external https:// links (they route fine), and the .md-only linkify gate itself (that filter is by design).

Expected vs actual

Expected: the full-page ThreadChat renders the same local-file routing as the main pane: .md inline code spans become clickable file-preview links (underline + external-link icon), @thread: mentions open the referenced thread, and workspace-relative images resolve against the workspace root.

Actual: in the full-page route the .md code span renders as plain dead code with no link affordance, the @thread: mention is not clickable, and the workspace-relative image does not resolve. Side-by-side, the main pane is fully wired and the plugin surface is fully inert for local content.

Workarounds: focus-board 0.5.3 ships a plugin-side stopgap: decorate rendered code spans in the chat DOM and capture clicks, then call the plugin's own file-open surface. It works but duplicates host routing logic and does not cover mentions or images. The clean fix is upstream.

Evidence

From reverse-engineering the shipped 0.44.0 desktop bundle (app asar extracted; evidence is minified identifiers as shipped, so no repo permalink; I can re-verify against main and supply a commit SHA if useful):

  • The SDK Markdown component reads the app-panel context unconditionally, so it receives onOpenLocalFileLink, workspaceRootPath, and resolveMentionLink wherever it is used, including plugin surfaces. This is why local-file links work from Markdown in the same full-page route.
  • ThreadChat accepts no routing props at all and derives its timeline link routing from the app-panel context, gated on panel.environmentId === thread.environmentId. Docked panels therefore only route correctly for threads in the docked panel's environment. On a full-page plugin route the app-panel context has no onOpenLocalFileLink, so the internal timeline link-routing builder (the PV builder in the workspace-checkout-display chunk) omits localFile routing entirely, so those spans never become links, rather than becoming broken links.
  • Repro consumer and investigation thread: bb thread thr_sdmg6j5iqt (focus-board), verified 2026-09-28 against bb 0.44.0 desktop.

What you ruled out

Suggested priority and effort (optional)

Medium priority, low-to-moderate effort. Hits every plugin embedding ThreadChat on a full-page route; the same embedding pattern is public in focus-board (https://github.com/cristoslc/bb-plugin-focus-board), Pins, and Cascade. A workaround exists (plugin-side click capture) and no data is lost.

Recommendation: either

  1. Accept explicit routing props on ThreadChat (onOpenLocalFileLink, workspaceRootPath, resolveMentionLink) so embedding plugins (or the host) can supply them without relying on ambient context, or
  2. Un-gate ThreadChat's app-panel context read the way Markdown already does, so local-file routing follows the same availability rule everywhere.

Option 2 has a working precedent in the shipped Markdown component; focus-board 0.5.3's stopgap shows the data the host needs is already present in the panel context. Happy to attempt a PR after contributor approval (per CONTRIBUTING.md, joining #contributors first).

Checks

AGENT GENERATED

Activity

  1. added theissue type on Sep 30, 2026
  2. added
    ui
    plugins
    partial-repro
    on Sep 30, 2026
  3. SawyerHood commented on Sep 30, 2026

    @SawyerHood
    Collaborator

    Verified report: https://get-bb.github.io/reports/issues/4466.html

    PARTIALLY REPRODUCED: two clean same-SHA fixtures show inert inline .md paths without the local-file callback, with working file-link controls. Thread resolver navigation succeeds and synthetic workspace images load in these scoped tests; actual mention UI/full plugin-page integration remains untested. Includes genuine screenshots and preserves #4438’s narrower report.

  4. SawyerHood commented on Oct 19, 2026

    @SawyerHood
    Collaborator

    Consolidated into #4438 at the maintainer's request. Added the source context, evidence links and any distinct/unverified follow-up scope to the canonical tracker: #4438 (comment)

    Closing this report for tracking consolidation, not as fixed. Please continue investigation and updates in #4438; this report remains linked as original evidence.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    partial-repropluginsui

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions