[PR #367] [MERGED] feat(core): emit capabilities event on terminal capability response #1263

Closed
opened 2026-03-14 09:27:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/367
Author: @melMass
Created: 11/30/2025
Status: Merged
Merged: 11/30/2025
Merged by: @kommander

Base: mainHead: feat-emit-caps


📝 Commits (6)

  • 1d636f4 feat(core): emit capabilities event on terminal capability response
  • 2f26c16 test: 🚨 add renderer capabilities event test for kitty terminal
  • bb74e94 chore: format
  • 6c908d2 Merge branch 'main' into feat-emit-caps
  • 5dccdb9 test: use public stdin API instead of private property
  • 4b4ff16 Merge branch 'main' into feat-emit-caps

📊 Changes

2 files changed (+65 additions, -0 deletions)

View changed files

📝 packages/core/src/lib/terminal-capability-detection.test.ts (+64 -0)
📝 packages/core/src/renderer.ts (+1 -0)

📄 Description

As far as I can tell the only way to get the end of the detections sequence:

  1. \x1b[?1016;2$y - sgr_pixels
  2. \x1b[?2027;0$y - unicode query
  3. \x1b[?2031;2$y - color_scheme_updates
  4. \x1b[?1004;2$y - focus_tracking
  5. \x1b[?2004;2$y - bracketed_paste
  6. \x1b[?2026;2$y - sync
  7. \x1b[1;2R - explicit_width (CPR)
  8. \x1b[1;3R - scaled_text (CPR)
  9. \x1bP>|kitty(0.42.2)\x1b\\ - xtversion
  10. \x1b[?0u - kitty keyboard

Is by using a timeout or similar, this just adds an event you can subscribe too. At my app layer I count it and settle at 10 but I'm not sure of all the implications in adding that to core but it could be a nice addition too like capabilities:ready


🔄 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/anomalyco/opentui/pull/367 **Author:** [@melMass](https://github.com/melMass) **Created:** 11/30/2025 **Status:** ✅ Merged **Merged:** 11/30/2025 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `feat-emit-caps` --- ### 📝 Commits (6) - [`1d636f4`](https://github.com/anomalyco/opentui/commit/1d636f4ee271436faee73ee6d3dc7d10e0d7f3a1) feat(core): emit capabilities event on terminal capability response - [`2f26c16`](https://github.com/anomalyco/opentui/commit/2f26c16510e36ab9cbe80f1653252211b44335ef) test: 🚨 add renderer capabilities event test for kitty terminal - [`bb74e94`](https://github.com/anomalyco/opentui/commit/bb74e94a19b44480a2baace3c3d3db92298b800c) chore: format - [`6c908d2`](https://github.com/anomalyco/opentui/commit/6c908d2095c1454335b2c36ff1966b685a932672) Merge branch 'main' into feat-emit-caps - [`5dccdb9`](https://github.com/anomalyco/opentui/commit/5dccdb9bceb08a07368ef4104b541874762fb7d1) test: use public stdin API instead of private property - [`4b4ff16`](https://github.com/anomalyco/opentui/commit/4b4ff16403a3f545ec41e8d5a9e3d28a06fd7a57) Merge branch 'main' into feat-emit-caps ### 📊 Changes **2 files changed** (+65 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/lib/terminal-capability-detection.test.ts` (+64 -0) 📝 `packages/core/src/renderer.ts` (+1 -0) </details> ### 📄 Description As far as I can tell the only way to get the end of the detections sequence: 1. `\x1b[?1016;2$y` - sgr_pixels 2. `\x1b[?2027;0$y` - unicode query 3. `\x1b[?2031;2$y` - color_scheme_updates 4. `\x1b[?1004;2$y` - focus_tracking 5. `\x1b[?2004;2$y` - bracketed_paste 6. `\x1b[?2026;2$y` - sync 7. `\x1b[1;2R` - explicit_width (CPR) 8. `\x1b[1;3R` - scaled_text (CPR) 9. `\x1bP>|kitty(0.42.2)\x1b\\` - xtversion 10. `\x1b[?0u` - kitty keyboard Is by using a timeout or similar, this just adds an event you can subscribe too. At my app layer I count it and settle at 10 but I'm not sure of all the implications in adding that to core but it could be a nice addition too like `capabilities:ready` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:27:24 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1263
No description provided.