[PR #5300] [MERGED] Add support for the DSR-OS operating status report #26249

Open
opened 2026-01-31 09:14:55 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5300
Author: @j4james
Created: 4/9/2020
Status: Merged
Merged: 4/9/2020
Merged by: @DHowett-MSFT

Base: masterHead: feature-dsr-os


📝 Commits (3)

  • 5c46b24 Add support for the DSR-OS operating status report.
  • b95d1fe Extend the existing DSR output engine test to confirm that the DSR-OS subtype is dispatched correctly.
  • be97408 Add an adapter test to confirm that the DSR-OS request generates an appropriate response.

📊 Changes

8 files changed (+48 additions, -5 deletions)

View changed files

📝 src/terminal/adapter/DispatchTypes.hpp (+1 -0)
📝 src/terminal/adapter/ITermDispatch.hpp (+1 -1)
📝 src/terminal/adapter/adaptDispatch.cpp (+15 -0)
📝 src/terminal/adapter/adaptDispatch.hpp (+2 -1)
📝 src/terminal/adapter/termDispatch.hpp (+1 -1)
📝 src/terminal/adapter/ut_adapter/adapterTest.cpp (+11 -0)
📝 src/terminal/parser/OutputStateMachineEngine.cpp (+4 -0)
📝 src/terminal/parser/ut_parser/OutputEngineTest.cpp (+13 -2)

📄 Description

Summary of the Pull Request

This adds support for the VT escape sequence that requests the terminal's operating status. There is no attempt to actually verify the status of the app, though. We always return a response indicating a good operating condition (the same as most terminal emulators).

PR Checklist

Detailed Description of the Pull Request / Additional comments

This required an update to the OutputStateMachineEngine to accept the DSR-OS type, since it only dispatches types that it recognises (I think that's unnecessary, but that's an issue for another day).

The actual processing of the request is handled in the AdaptDispatch class, where it simply responds with a hard coded sequence (CSI 0 n), indicating a good operating condition.

Validation Steps Performed

I've added unit tests to confirm that the request is dispatched correctly, and the appropriate response is returned. I've also manually confirmed that the test of the Device Status Report in Vttest is now succeeding.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/5300 **Author:** [@j4james](https://github.com/j4james) **Created:** 4/9/2020 **Status:** ✅ Merged **Merged:** 4/9/2020 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `feature-dsr-os` --- ### 📝 Commits (3) - [`5c46b24`](https://github.com/microsoft/terminal/commit/5c46b24d9d48548899e888e557a4bba4d3b78a8c) Add support for the DSR-OS operating status report. - [`b95d1fe`](https://github.com/microsoft/terminal/commit/b95d1fe27caf65750c36f4237c613da41a10cd80) Extend the existing DSR output engine test to confirm that the DSR-OS subtype is dispatched correctly. - [`be97408`](https://github.com/microsoft/terminal/commit/be9740820b093bb0672629aa83a687276b7a2791) Add an adapter test to confirm that the DSR-OS request generates an appropriate response. ### 📊 Changes **8 files changed** (+48 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/terminal/adapter/DispatchTypes.hpp` (+1 -0) 📝 `src/terminal/adapter/ITermDispatch.hpp` (+1 -1) 📝 `src/terminal/adapter/adaptDispatch.cpp` (+15 -0) 📝 `src/terminal/adapter/adaptDispatch.hpp` (+2 -1) 📝 `src/terminal/adapter/termDispatch.hpp` (+1 -1) 📝 `src/terminal/adapter/ut_adapter/adapterTest.cpp` (+11 -0) 📝 `src/terminal/parser/OutputStateMachineEngine.cpp` (+4 -0) 📝 `src/terminal/parser/ut_parser/OutputEngineTest.cpp` (+13 -2) </details> ### 📄 Description ## Summary of the Pull Request This adds support for the VT escape sequence that requests the terminal's operating status. There is no attempt to actually verify the status of the app, though. We always return a response indicating a good operating condition (the same as most terminal emulators). ## PR Checklist * [x] Closes #5052 * [x] CLA signed. * [x] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've not discussed this with core contributors already. I'm ready to accept this work might be rejected in favor of a different grand plan. ## Detailed Description of the Pull Request / Additional comments This required an update to the `OutputStateMachineEngine` to accept the `DSR-OS` type, since it only dispatches types that it recognises (I think that's unnecessary, but that's an issue for another day). The actual processing of the request is handled in the `AdaptDispatch` class, where it simply responds with a hard coded sequence (`CSI 0 n`), indicating a good operating condition. ## Validation Steps Performed I've added unit tests to confirm that the request is dispatched correctly, and the appropriate response is returned. I've also manually confirmed that the test of the _Device Status Report_ in _Vttest_ is now succeeding. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:14:55 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26249