Skip to content

Highlight changing expressions in Live Watch#991

Open
omarArm wants to merge 15 commits into
mainfrom
highlightLiveWatch
Open

Highlight changing expressions in Live Watch#991
omarArm wants to merge 15 commits into
mainfrom
highlightLiveWatch

Conversation

@omarArm

@omarArm omarArm commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Fixes

Changes

  • Now changing expressions will get highlighted in the Live Watch

Screenshots

image

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • [] 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

@omarArm

omarArm commented May 12, 2026

Copy link
Copy Markdown
Collaborator Author

@JonatanAntoni @thorstendb-ARM I acknowledge that there might be some opinions on which parts of the expression should get highlighted. We can discuss it together in a meeting, but these are just some details that can easily be changed

@qltysh

qltysh Bot commented May 12, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

⬆️ Merging this pull request will increase total coverage on main by 0.01%.

Modified Files with Diff Coverage (1)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
src/views/live-watch/live-watch.ts100.0%
Total100.0%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Copilot AI left a comment

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.

Pull request overview

Adds change-highlighting behavior to the Live Watch tree so users can more easily spot updated values during debugging (fixes #850).

Changes:

  • Introduces a highlightedLabel on Live Watch values and uses it to render highlighted tree item labels.
  • Splits evaluation into initial evaluation vs per-node refresh evaluation to detect value changes.
  • Updates and extends Jest tests to cover highlight vs non-highlight behavior on refresh.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/views/live-watch/live-watch.ts Adds highlightedLabel support and refresh-time change detection to apply label highlighting.
src/views/live-watch/live-watch.test.ts Updates mocks for renamed evaluation methods and adds tests for highlight behavior.

Comment thread src/views/live-watch/live-watch.ts
Comment thread src/views/live-watch/live-watch.test.ts Outdated
Comment thread src/views/live-watch/live-watch.ts
Comment thread src/views/live-watch/live-watch.ts Outdated
Comment thread src/views/live-watch/live-watch.ts
omarArm and others added 3 commits May 12, 2026 13:15
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@omarArm omarArm force-pushed the highlightLiveWatch branch from 84a56f4 to 9aa36f2 Compare May 13, 2026 16:45
@omarArm omarArm requested a review from jreineckearm May 21, 2026 12:20
Comment thread src/views/live-watch/live-watch.ts Outdated

@jreineckearm jreineckearm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Gave it a test: Logic for a single update trigger looks good.

Will certainly provoke comments because of the name/expression, not the value ("description") getting highlighted. But the alternative of putting expression and value on the label isn't great either. Might work better for variables, but misleading for watch expressions which themselves can include = characters.

I see however troubles with the highlight getting immediately removed by multiple refresh requests coming in for the same expression after stopping the CPU. Can you confirm this?
Probably needs some debouncing logic....

@jreineckearm

Copy link
Copy Markdown
Collaborator

Retested with a VSIX build from CI. Situation regarding unexpected highlight behavior improves a little.
But it still is a bit unpredictable. Some of it caused by glitches when switching from run to pause state which one didn't necessarily spot before. Let's discuss what can be done to mitigate such confusion until it can be addressed in the adapter.

@omarArm

omarArm commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator Author

I added a coalescing mechanism to help with the flickering behaviour, please let me know if there are anymore bugs you have found

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.

3 participants