Skip to content

inline-vis reports existing Windows-host files as not found when the server runs on Linux #5701

Closed

Description

@kuntashov

Summary

An inline HTML preview stored on an enrolled native Windows machine fails with Preview file not found when the BB server runs on Linux. The same file is readable through the core thread-storage file route (HTTP 200) and the host-targeted file API. Expected: inline-vis uses the path syntax of the owning host rather than that of the server.

Versions and environment

  • BB 0.46.1, npm-managed installation; also observed on 0.46.0. Live reproduction repeated on 0.46.1 on 2026-10-17.
  • Server: Linux. Execution machine: enrolled native Windows, Microsoft Windows 10.0.22000, Node v24.15.0.
  • The thread runs on Windows while the plugin server runs on Linux. No provider/model request is needed.
  • Current main inspected at 6a639cfc0d66e0c789a1bd7309266973228d1a80; live main was not deployed. Regression tests are being prepared separately.

Steps to reproduce

  1. Run BB server on Linux, enroll a native Windows machine, and open a thread whose environment is on Windows.
  2. In that thread's Windows PowerShell terminal:
$file = Join-Path $env:BB_THREAD_STORAGE 'inline-vis-windows-repro.html'
'<!doctype html><meta charset="utf-8"><h1>inline-vis Windows path repro</h1>' |
  Set-Content -LiteralPath $file -Encoding utf8
$base = $env:BB_SERVER_URL.TrimEnd('/')
$tid = $env:BB_THREAD_ID
Invoke-RestMethod "$base/api/v1/threads/$tid/thread-storage/location"
$response = Invoke-WebRequest "$base/api/v1/threads/$tid/thread-storage/files/inline-vis-windows-repro.html"
$response.StatusCode
$response.Content.Contains('inline-vis Windows path repro')

Location returns the Windows owning host and a Windows drive-letter storage root. File checks return 200 and True.

  1. Invoke the real inline-vis RPC:
$inputFile = Join-Path $env:BB_THREAD_STORAGE 'inline-vis-windows-repro-input.json'
@{
  threadId = $env:BB_THREAD_ID
  file = 'inline-vis-windows-repro.html'
  source = 'thread-storage'
} | ConvertTo-Json -Compress | Set-Content -LiteralPath $inputFile -Encoding utf8
bb plugin rpc call inline-vis preparePreview --input-file $inputFile --json

Rendering ::inline-vis{source="thread-storage" file="inline-vis-windows-repro.html"} in that thread shows the UI error.

Smallest confirmed live case: Linux server, Windows-owned thread storage, tiny regular HTML file, preparePreview. Workspace-source and UNC-root variants have not been tested live.

Expected vs actual

Actual RPC response, verbatim:

{
  "kind": "not-found",
  "file": "inline-vis-windows-repro.html"
}

Actual core-route checks:

{"httpStatus":200,"contentType":"text/html; charset=utf-8","hasRepro":true}

UI: Preview file not found: inline-vis-windows-repro.html.

Expected: the existing file produces an HTML preview target and URL.

Evidence

Observed: threads.storageLocation selects the correct Windows host/root; reading the actual Windows path through host-targeted files.read and the core thread-storage GET both succeed. Only inline-vis preparation fails.

Source explanation: resolveContainedPreviewPath uses server-native node:path (path.resolve/path.relative) for the remote root. On Linux, a drive-letter Windows root is treated as relative POSIX text. The handler obtains the correct remote root/host before passing the incorrectly resolved path to the remote read.

The investigation ran in a private BB session; no public session/report link is available. Internal identifiers and project inventory are omitted. The complete data-free fixture and observed outputs are included above, so the report is self-contained.

What you ruled out

Suggested priority and effort (optional)

Medium: blocks inline previews for Linux-server/Windows-host deployments. Direct core file URLs work; no data loss observed. Likely small plugin-local fix with containment and RPC regression tests.

Checks

  • Reproduced on latest available stable 0.46.1; live-main limits stated.
  • Searched open and closed issues.
  • Agent-generated; private investigation link is unavailable, and the public report contains the full sanitized reproduction.

AGENT GENERATED

Activity

  1. added theissue type on Oct 17, 2026
  2. added
    pluginsPlugin SDK, runtime, marketplace
    inline-visBuilt-in inline-vis plugin
    confirmed-reproBug reproduced again from a clean trusted checkout; see linked report
    on Oct 17, 2026
  3. bb-slop-cop commented on Oct 17, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Low. Labels: plugins, inline-vis, confirmed-repro.
    • Reproduction and root-cause report: REPRODUCED, with high root-cause confidence.
    • Root cause: server-native path resolution corrupts remote Windows roots before the correctly host-targeted file read.
    • Evidence: the actual plugin RPC, exercised with a path-keyed SDK fixture, fails four Windows cases while two POSIX controls pass in each of two clean checkouts at trusted main 6a639cf. All 50 existing plugin tests pass. A live native Windows deployment was not retested; the complete reproduction test and diagnostics are embedded in the report.
    • No PR: the required repair changes source-root containment logic, a security boundary excluded by this rule's simple-fix conditions.

    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

    confirmed-reproBug reproduced again from a clean trusted checkout; see linked reportinline-visBuilt-in inline-vis pluginpluginsPlugin SDK, runtime, marketplace

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions