Repository navigation
Fix line navigation through plugin file openers - #3471
Merged
ymichael merged 3 commits intoSep 11, 2026
Merged
Conversation
ymichael
deleted the
bb/fix-issue-2770-file-line-targets-thr_y2ercp47s9
branch
September 11, 2026 05:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
File-opener tabs retained a linked line range in their owner, but the plugin props and mount omitted it. Monaco therefore opened line-linked files at the top and could not navigate subsequent targets. Tab equivalence also discarded identical targeted opens of an already active file. This reproduces on pristine main at
b04091eca6through a real seeded plugin: clicking line 80 and then range 120–124 leaves Monaco at line 1. See #2770 and its investigation report.What changed
PluginFileOpenerProps.experimental_lineRangeand forward the owner's one-based, inclusive range. Each targeted open supplies a new range object so plugins can observe identical repeat requests.The boot payload measures 1,723,696 raw bytes, 79 bytes over the existing limit. Increase only the raw boot budget by 128 bytes (to 1,723,745) to accommodate the targeted-navigation handling. Compressed and route budgets and forbidden-package guards remain unchanged; the bundle gate passes.
The identical-target refresh extends the issue's proposed forwarding fix. No server-daemon wire changes, authentication or containment changes, or new CLI syntax; no
HOST_DAEMON_PROTOCOL_VERSIONbump is required. Existing SDK/CLI thread-open requests reach the same fixed boundary.How you verified
pnpm exec turbo run build typecheck lint --filter=@bb/app --filter=@bb/client-core --filter=@get-bb/plugin-sdk --filter=@bb/plugin-api-map --filter=bb-plugin-monaco-editor --filter=bb-plugin-plugin-api-docspassed; reran Monaco test/typecheck after the final refinement. SDK declarations and Monaco/Guide plugin bundles build successfully.pnpm exec turbo run build typecheck lint --concurrency=4run passed, and the server authoring-contract tests (22) and SDK version test (1) passed.git diff --checkpassed. Lint has zero errors and existing warnings.pnpm start:worktreein an isolated persistent BB terminal and drove the real installed plugin with dev-browser. Before/after screenshots and actual Monaco selections confirm initial line 80, range 120–124, identical repeats after moving the cursor, and rapid targets ending at line 140. With the read RPC delayed 700 ms, only the latest target is selected. An unsaved edit survives with the same editor/model IDs.thread open ... --line 65, identical repeat, reload restoration, and the updated Guide card. Live traversal, untrusted-Origin, and line-zero requests remain rejected. Final served Monaco bundle hash matches a fresh source build.Native platforms were not exercised. A Monaco close/disposal console exception also reproduces with the unchanged main plugin bundle; this patch leaves that pre-existing disposal behavior unchanged. Detailed logs, screenshots, and the seeded verification environment are retained in the originating BB thread.
Fixes #2770