Repository navigation
fix(notifications): clarify command and lsp outcomes - #321
Merged
Merged
Conversation
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.
Persistent errors can remain on the bottom line while users run unrelated commands, which makes an old failure look like the result of the latest command. LSP failures also currently surface raw server text without identifying the request, document, or age of the error.
This change lets foreground command results temporarily lead the bottom line without acknowledging or hiding retained errors.
:wanow reports how many buffers were written, whether format-on-save work is pending, when no buffers were modified, and partial failures. Once the foreground result expires, the retained error resurfaces with its source and relative age.LSP error responses now retain their originating request so Red can show a concise operation-and-file summary while preserving the server name, request method, error code, document path, response data, and raw message in
:messages.How to Test
:wa. Confirm the bottom line immediately reports:wa — wrote 2 buffers, keeps the existing attention badge, and resurfaces the older error after the command result expires.:wawith no modified buffers and confirm it reports:wa — no modified buffers.:wawith modified named and unnamed buffers. Confirm named buffers are written and the result reports the partial count plus the unnamed-buffer error.cargo test --lib notification::testscargo test --lib editor::notifications::testscargo test --test editing wall_cargo test --lib diagnostic_cancellation_handling_preserves_other_request_errorscargo test --lib correlated_lsp_error_has_contextual_summary_and_detailsExpected: foreground results temporarily outrank retained failures without resolving them, save-all summaries reflect the actual outcome, and correlated LSP failures include contextual summaries with full details retained in message history.