Repository navigation
Conversation
Return formatter command errors to the Run Format dialog when requested. Keep the diagnostic beside the history if the user dismisses the dialog, and keep a late result associated with its original run. Preserve the existing RPC rejection for default callers and for history storage failures after Oxfmt has finished.
@vitejs/devtools
@vitejs/devtools-kit
@vitejs/devtools-oxc
@vitejs/devtools-rolldown
@vitejs/devtools-vite
@vitejs/devtools-vite-task
@vitejs/devtools-vitest
commit: |
Run Format has one in-tree UI caller. Use the same command result for every caller and keep history storage failures on the RPC rejection path. BREAKING CHANGE: Callers of devtools-oxc:run-format must inspect result.error for formatter command failures. Handle RPC rejection for storage or transport failures.
SaKaNa-Y
marked this pull request as ready for review
December 5, 2026 07:19
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.
Summary
When Oxfmt finds a syntax error during Run Format, the Oxc error screen replaces the entire panel. The fix keeps the diagnostic in the dialog so users can open previous results, correct the file, and retry. If users dismiss the dialog before the run fails, the diagnostic appears above the format history.
Evidence
After: On
7e6fbc5b, Check and Write both showedUnexpected tokenatexample.js:1:18. The previous result stayed accessible. After correcting the file, Check passed in the same document.ENOTDIRand the file on disk contained the formatted source.fb9bb3c5, a late Write failure left a new Check dialog open. A late Check success preserved a new Write selection. Stopping Vite showed the connection screen.Merge Danger
Door: Two-way. A revert restores the previous RPC contract. The format history needs no migration.
Blast Radius: Oxc and direct callers of
devtools-oxc:run-format. Run Format is the only direct caller in this repository. Direct callers must checkresult.errorfor formatter failures and handle rejected calls for storage or connection failures.Change Risk: Medium. Write can change a file before its history entry is saved. The RPC still rejects a storage failure, so the inspector can show that error after the file changes.