Repository navigation
Closed
Labels
area/specs.t27 spec files and conformance.t27 spec files and conformanceenhancementNew feature or requestNew feature or requestspec
Description
The window features of the protocol: tell the user something, ask them something, show progress, open a document, log, trace. A server that works but never reports progress looks frozen in the editor. Part of the LSP epic, Refs #12209 (wave 1, standard features). Only .t27: no code in any other language, not even scratch probes or a loader; see skill only-t27.
Depends on specs/lsp/transport.t27 (sending requests and notifications) and specs/lsp/lifecycle.t27 (capabilities).
Prior art:
- rust-analyzer: progress for loading the workspace and for flycheck, with cancel support: https://rust-analyzer.github.io/book/features.html
- gopls:
showDocumentopens web views for the call graph and the assembly: https://go.dev/gopls/ - LSP
window/showMessage,showMessageRequest,logMessage,showDocument,window/workDoneProgress/createandcancel,$/progress,$/setTrace,$/logTrace,telemetry/event: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/
Boundary
- specs/lsp/window.t27
User Scenarios
- Given the workspace index takes a while, when it starts, then the server sends
window/workDoneProgress/createwith a token, then$/progressbegin(titleIndexing),reportevents withpercentageandmessage(41/230 specs), andend. - Given the user presses the cancel button on a progress item, when
window/workDoneProgress/cancelarrives, then the matching job stops at its next check and sendsendwith the messagecancelled. - Given a client without
workDoneProgress, when the same job runs, then the server sends nothing on that channel and logs throughwindow/logMessageinstead. - Given the server needs a choice, when it sends
window/showMessageRequestwith 2 actions, then the answer selects one or isnull, andnullis treated as cancel. - Given a command wants to open a generated view, when it runs, then the server sends
window/showDocumentwithexternalfalse andtakeFocusas asked, and handlessuccessfalse. - Given
$/setTraceverbose, when a request is handled, then$/logTracecarries the message and verbose detail; atoffnothing is sent.
Requirements
- FR-001: The module MUST provide a progress helper (create, begin, report, end, cancelled) usable by every other module, with unique tokens, and MUST support
partialResultandworkDonetokens that arrive in requests. - FR-002: The module MUST implement
showMessage,showMessageRequest,logMessage,showDocument,setTrace,logTraceandtelemetry/event, each gated on the capability or the trace level. - FR-003: Message levels MUST map to one table (Error, Warning, Info, Log), and the minimum level to log is a setting.
- FR-004: A cancelled job MUST always send
end; a test asserts that no token is left open after cancel, error or completion. - FR-005: Telemetry MUST be off by default and MUST send nothing unless a setting names it; a test asserts the default.
Success Criteria
- At least 20 tests in
specs/lsp/window.t27pass, run on the lab witht27c test-report(exit 0), including the open-token check. - A negative control runs the progress helper against a client with no progress support and asserts 0 progress messages were produced.
git diff --name-only masterlists onlyspecs/lsp/window.t27(0 files in other languages).
Metadata
Metadata
Assignees
Labels
area/specs.t27 spec files and conformance.t27 spec files and conformanceenhancementNew feature or requestNew feature or requestspec
Activity
gHashTag commentedon Nov 17, 2026
LSP spec created (typecheck OK, tests pass).