Skip to content

feat(vt): add damage callbacks for terminal updates#652

Draft
aymanbagabas wants to merge 1 commit intomainfrom
vtdamage
Draft

feat(vt): add damage callbacks for terminal updates#652
aymanbagabas wants to merge 1 commit intomainfrom
vtdamage

Conversation

@aymanbagabas
Copy link
Copy Markdown
Contributor

This commit introduces a new Damage callback in the vt package that notifies when regions of the terminal are modified. This allows clients to efficiently track changes and update their displays accordingly.

This commit introduces a new Damage callback in the vt package that
notifies when regions of the terminal are modified. This allows clients
to efficiently track changes and update their displays accordingly.
@aymanbagabas aymanbagabas requested review from a team, andreynering and raphamorim and removed request for a team November 18, 2025 16:31
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 18, 2025

Codecov Report

❌ Patch coverage is 16.48352% with 76 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.10%. Comparing base (74ce264) to head (4186797).
⚠️ Report is 160 commits behind head on main.

Files with missing lines Patch % Lines
vt/handlers.go 3.84% 37 Missing and 13 partials ⚠️
vt/csi_cursor.go 0.00% 8 Missing ⚠️
vt/utf8.go 40.00% 4 Missing and 2 partials ⚠️
vt/cc.go 20.00% 2 Missing and 2 partials ⚠️
vt/dcs.go 0.00% 4 Missing ⚠️
vt/csi_screen.go 0.00% 1 Missing and 1 partial ⚠️
vt/emulator.go 0.00% 1 Missing ⚠️
vt/osc.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #652      +/-   ##
==========================================
+ Coverage   30.95%   33.10%   +2.15%     
==========================================
  Files         168       20     -148     
  Lines       14865     1752   -13113     
==========================================
- Hits         4601      580    -4021     
+ Misses       9983     1075    -8908     
+ Partials      281       97     -184     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread vt/utf8.go
// flushGrapheme flushes the current grapheme buffer, if any, and handles the
// grapheme as a single unit.
func (e *Emulator) flushGrapheme() {
func (e *Emulator) flushGrapheme(damage bool) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(hasDamage bool)

@taigrr taigrr mentioned this pull request Mar 4, 2026
2 tasks
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.

2 participants