Repository navigation
Description
Summary
Clicking a local file link with a line or line range opens the matching file-opener plugin, but the plugin receives no location. With the built-in Monaco File Editor selected, the file therefore opens at the top instead of revealing the linked line.
The host parses and retains the line range. It drops the range only when it crosses the PluginFileOpenerProps boundary.
Versions and environment
- bb 0.40.0, source checkout at
f4bbc2fe81a9b7639ff9a7396e172bddd89109e4 - macOS 26.3
- Node.js 24.6.0
- Local workspace, built-in Monaco File Editor enabled for the file extension
Steps to reproduce
- Enable the built-in Monaco File Editor for TypeScript files.
- Open a thread whose workspace contains a TypeScript file with at least 20 lines.
- Add or receive a Markdown link targeting line 12, for example
[app.ts](/workspace/src/app.ts:12)or[app.ts](/workspace/src/app.ts#L12)with the path adjusted to the workspace. - Click the link.
- Click a second link to another line in the same file.
Minimal automated probe at the plugin mount boundary:
pnpm exec turbo run test --filter=@bb/app --force -- --testNamePattern="renders a registered opener with parsed path and source" src/components/plugin/plugin-slot-mounts.test.tsxTemporarily asserting that the opener receives the owner's { startLineNumber: 7, endLineNumber: 9 } makes this focused test fail deterministically in about two seconds. The temporary assertion was removed after the probe.
Expected vs actual
Expected:
{
"lineRange": {
"startLineNumber": 7,
"endLineNumber": 9
}
}
Received:
{
"path": "notes/todo.md",
"source": {
"kind": "workspace",
"environmentId": "env_1",
"projectId": null,
"threadId": null
},
"Original": [Function],
"experimental_Original": [Function]
}
Expected: the selected file opener receives the requested location, and Monaco selects or reveals it after creating the model. A later click to another line in the same file updates the existing tab and editor position.
Actual: the plugin receives file identity only. Monaco creates the editor without a position or selection, so it opens at the file head. Reopening the same file at another line also cannot update Monaco's position.
Evidence
Observed data flow on f4bbc2fe81a9b7639ff9a7396e172bddd89109e4:
- The local-link parser produces a
lineRange. - The file-opener owner retains the range, including a later range for the same reused tab.
PluginFileOpenerPropsexposespath,source, and the native preview, but no location.- The app mount passes only those props to the opener.
- Monaco consequently creates its editor without an initial position or reveal call.
The complete investigation is included here because the originating bb thread is local-only and has no shareable URL.
What you ruled out
- Not a Markdown parsing bug: both
:12and#L12produce a line range. - Not a tab-state bug: the owner retains the initial range and updates it when the same tab is reused.
- Not a Monaco reveal bug: the location never reaches the plugin, so Monaco has nothing to reveal.
- No matching open or closed issue was found for
Monaco line number,file opener line range,Monaco jump line, orfile opener location. - Still reproduces at the plugin boundary on current
maincommitf4bbc2fe81a9b7639ff9a7396e172bddd89109e4.
Suggested priority and effort
Medium priority. It affects every line-linked file opened through any file-opener plugin. The workaround is to select BB's built-in preview or an external editor. No data is lost. Likely medium effort because the fix needs an experimental SDK field, app forwarding, Monaco initial and same-file navigation, API-map/audit documentation, and regression coverage.
Checks
- Reproduced on current
main. - Searched open and closed issues for the same problem.
- Included a complete investigation and code permalinks without machine-local or personal information.
AGENT GENERATED
Activity
bb-slop-cop commentedon Aug 31, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotplugins,uiconfirmed-reproFix line navigation through plugin file openers (#3471)