Skip to content

fix(trace): Fixed trace messages not updating#2082

Merged
tadayosi merged 1 commit intohawtio:mainfrom
joshiraezcode:trace-route-not-populating
May 1, 2026
Merged

fix(trace): Fixed trace messages not updating#2082
tadayosi merged 1 commit intohawtio:mainfrom
joshiraezcode:trace-route-not-populating

Conversation

@joshiraezcode
Copy link
Copy Markdown
Contributor

@joshiraezcode joshiraezcode commented Apr 30, 2026

Ok so PR ready. No major changes needed, it was a state change not being detected by react because we were using an useRef. I also added a new comment so the user knows the Tracing is activated and awaiting for messages

Things that are fixed:

The tracing will update without user input while tracing is activated.

New note while awaiting to receive the first messages

When stopping and starting tracing, no user input is required for the tracing to appear

Things that are unknown if are fixed but not reproducible:

Stopping and starting tracing no longer has wrong messages that belong to other routes

Stopping and starting tracing no longer has messages from before the tracing was stopped

Changing tabs no longer has wrong messages that belong to other routes

Changing tabs no longer has messages from before changing tabs

Changing routes no longer has wrong messages that belong to other routes

Changing routes no longer has messages from before changing to another route

Things that I didn’t fix because seems business logic/needs external changes:

All messages on the trace are removed when changing/stopping tracing - Before the bug I think happened because of some leftover while using useRef, but it’s not happening now. The logic explicitly sets the message log to [] when stopping tracing for example.

IDs being skipped - Unsolvable. Right now, it brings the tracing messages from all routes. That means that IDs are assigned to any active routes and any time there are multiple routes their IDs will be alternating between the different routes messages.
Grabacion.de.pantalla.desde.2026-05-01.00-28-47.mp4

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Test Results

  2 files  ±0    2 suites  ±0   16m 40s ⏱️ + 1m 9s
115 tests ±0  113 ✅ ±0  2 💤 ±0  0 ❌ ±0 
232 runs  ±0  225 ✅ ±0  7 💤 ±0  0 ❌ ±0 

Results for commit 98d4ba0. ± Comparison against base commit eaf7f24.

♻️ This comment has been updated with latest results.

@hawtio-ci
Copy link
Copy Markdown

hawtio-ci Bot commented Apr 30, 2026

Test results

Run attempt: 5737
Detailed summary

NAME TESTS PASSED ✅ SKIPPED 💤 FAILED ❌ ERRORS 🚫 TIME 🕖
test-results-quarkus-node(22)-java(17)-firefox 116 113 3 0 0 508.462
test-results-springboot-node(22)-java(17)-firefox 116 112 4 0 0 491.615

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Camel Trace UI so incoming traced messages trigger React re-renders (instead of being stored only in a useRef), and adds an in-UI note when tracing is enabled but no messages have arrived yet.

Changes:

  • Replace messages stored in a useRef with React state (parsedMessages) to ensure the message table updates live.
  • Update message accumulation logic to use the new ref/state pairing (previousMessages + parsedMessages).
  • Add an “Awaiting tracing messages.” empty state when tracing is active but the table is still empty.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/hawtio/src/plugins/camel/trace/Trace.tsx
Comment thread packages/hawtio/src/plugins/camel/trace/Trace.tsx Outdated
Comment thread packages/hawtio/src/plugins/camel/trace/Trace.tsx Outdated
@tadayosi
Copy link
Copy Markdown
Member

tadayosi commented May 1, 2026

@joshiraezcode tried adding copilot as a reviewer. Do those make sense?

@joshiraezcode
Copy link
Copy Markdown
Contributor Author

@tadayosi Some of them make sense. Working on the comments

@joshiraezcode joshiraezcode force-pushed the trace-route-not-populating branch from 5da8fb9 to df8cf32 Compare May 1, 2026 06:34
@joshiraezcode
Copy link
Copy Markdown
Contributor Author

joshiraezcode commented May 1, 2026

Comments reviewed and fixed.

@joshiraezcode joshiraezcode self-assigned this May 1, 2026
@joshiraezcode joshiraezcode force-pushed the trace-route-not-populating branch from df8cf32 to 98d4ba0 Compare May 1, 2026 07:11
@tadayosi tadayosi merged commit 3d76c35 into hawtio:main May 1, 2026
7 checks passed
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