Repository navigation
Copy long strLs whole, stop a timed-out restore from rerunning, keep piped parse output, and fix four Send to Stata slips - #421
Merged
Conversation
Contributor
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 29 minutes. View limit details
|
jbearak
force-pushed
the
t3/fix-extension-release-bugs
branch
from
November 19, 2026 14:50
a1db60d to
16b5380
Compare
With one file failing, the CLI called process.exit while stdout still held output the pipe hadn't taken, so a slow reader got the first 64 KiB and no complete record. A failing sight check, graph, or parse now sets the exit code and lets the process end once output flushes, with a 5 s limit in case a handle keeps it alive. A write callback can't stand in: Bun calls it before the pipe has the data. Co-authored-by: Claude Opus 5.5 <[email protected]>
…not run it twice When the combined restore job ran out its deadline, the panel fell back to computing the sort and filter again on their own, so a saved filter that took over ten minutes ran a second time. A deadline now settles the restore unapplied after the one attempt, keeps the saved prefs, and warns that it was stopped after 10 minutes. Co-authored-by: Claude Opus 5.5 <[email protected]>
…pboard as it was Copying a selection holding a strL longer than its 256-byte preview fetched the value from the host, and Glide then wrote it to the copy event after the event was over, which does nothing. A capture-phase copy listener now takes such a copy before Glide sees it, fetches the values, and has the host write the text with vscode.env.clipboard. A failed write shows an error; previews copied because the full values couldn't be read show a warning. Selections Glide can copy at once still go to Glide. Co-authored-by: Claude Opus 5.5 <[email protected]>
… warning The extension still reads auto as ask, but the manifest's enum dropped it, so settings that held it got an invalid-value squiggle. It is back in the enum, last, with a description that points to ask. A test checks the enum holds every value the extension reads and that each value has a description. Co-authored-by: Claude Opus 5.5 <[email protected]>
A send queued for a console still starting hands its temp file to the queue, but disposing the queue (on deactivation) forgot its entries without cleaning them up, leaking the files. Dispose now deletes the files of sends it never typed, and schedules cleanup for a send on a console's command line, which the console may still run. Co-authored-by: Claude Opus 5.5 <[email protected]>
With a Stata session from another window, a send first asks which session to use. Dismissing that choice returned the same result as a delivered send, so with cursor advancement on the editor moved past code that never ran. The send now rejects with SendCancelledError, which the send and cd commands take as nothing sent: no error and no cursor move. A send waiting behind a session open the user cancelled is cancelled the same way. Co-authored-by: Claude Opus 5.5 <[email protected]>
jbearak
force-pushed
the
t3/fix-extension-release-bugs
branch
from
November 19, 2026 14:53
16b5380 to
85d9e0f
Compare
This was referenced Nov 19, 2026
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.
A review of
v0.15.1..mainbefore a stable release found six bugs outside the statement detector. Two are regressions: copying a long strL leaves the clipboard unchanged, and a setting that was valid in v0.15.1 now shows as invalid. The others: a slow restore runs twice,sight parse --jsontruncates piped output, queued sends leak temp files, and the cursor moves after a cancelled send. Part 1 (Send Statement under#delimit ;and the release workflow's tests) is a separate PR. Each case below reproduces on main with a failing test.preventDefault()andstopImmediatePropagation()before any await, fetches the values, builds Glide's text withgetCopyBufferContents, and has the host write it withvscode.env.clipboard, as Copy Column already does. That avoids depending on webview clipboard permissions. A failed write shows an error. Previews copied because the full values couldn't be read show a warning. Selections Glide can copy at once still go to Glide.sight parse --jsontruncated piped output when a file failed.src/cli.tscalledprocess.exitwhile stdout still held data the pipe hadn't taken, so a slow reader got 65,536 bytes and no complete record. Any non-zero exit fromcheck,graphorparsenow setsprocess.exitCodeand lets the process end on its own, with a 5 s limit in case a handle keeps it alive. A write callback can't stand in for this, because Bun calls it before the pipe has the data.sight consolestill exits at once. Not changed:src/console/editor-console-tty.tsalso callsprocess.exit, but that file is outside this PR's scope."sight.sendToStata.target": "auto"showed an invalid-value warning (regression). The extension reads it asask, but the manifest enum dropped it. It is back as the last enum value, described as the older name forask. A test checks that the enum holds every value the extension reads and that each value has a description.SendCancelledError. The send command (commands.ts), the cd commands and the resend path treat that as "nothing sent": no error, and no cursor move. A send waiting on a session open that was cancelled is cancelled too.Proof: each fix has a test that fails on main. Those tests are
tests/unit/data-browser/copy-selection.test.ts, a copied-text case and a deadline case inrestore-cancel.test.ts,tests/integration/cli-exit-drain.test.ts, the manifest cases intarget-choice-core.test.ts, the dispose case inconsole-terminal-core.test.ts, and the dismissed-picker case insend-to-stata-integrated-terminal.test.ts. The CLI test pipes into a reader that waits before reading. It fails on main under bothbun src/cli.tsand the bundlednode dist/sight-server.js, and passes on both here. The bundled case is skipped whendist/isn't built. The copy fix is tested at module level and through the host message. It has not been run by hand in a VS Code webview.check:line-endings,typecheck,bun test ./tests(10,019 pass, 0 fail) andlinteach pass when run separately on this branch.bun run packagebuilds the extension, and the bundled webview includes the new listener.Created with Claude Opus 5.5 in Claude Code.