Skip to content

fix(notifications): clarify command and lsp outcomes - #321

Merged
fcoury-oai merged 2 commits into
mainfrom
fcoury/notification-clarity
Aug 23, 2026
Merged

fcoury-oai merged 2 commits into
mainfrom
fcoury/notification-clarity

Conversation

@fcoury-oai

Copy link
Copy Markdown
Collaborator

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. :wa now 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

  1. Leave an error requiring attention active, modify two named buffers, and run :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.
  2. Run :wa with no modified buffers and confirm it reports :wa — no modified buffers.
  3. Run :wa with modified named and unnamed buffers. Confirm named buffers are written and the result reports the partial count plus the unnamed-buffer error.
  4. Run the focused regression tests:
    • cargo test --lib notification::tests
    • cargo test --lib editor::notifications::tests
    • cargo test --test editing wall_
    • cargo test --lib diagnostic_cancellation_handling_preserves_other_request_errors
    • cargo test --lib correlated_lsp_error_has_contextual_summary_and_details

Expected: 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.

@fcoury-oai
fcoury-oai merged commit c4c22bc into main Aug 23, 2026
10 checks passed
@fcoury-oai
fcoury-oai deleted the fcoury/notification-clarity branch August 23, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant