Skip to content

fix(chat): hide the trace UI when isTraceEnabled() is false - #537

Merged
copybara-service[bot] merged 1 commit into
google:mainfrom
nanchen-goog:hide-trace-when-disabled
Sep 29, 2026
Merged

copybara-service[bot] merged 1 commit into
google:mainfrom
nanchen-goog:hide-trace-when-disabled

Conversation

@nanchen-goog

Copy link
Copy Markdown
Contributor

The chat declared FeatureFlagService.isTraceEnabled() but never read it, so a host could not turn traces off: the Events/Traces toggle, the trace view and the event tab's associated spans always showed.

When isTraceEnabled() is false:

  • the Events/Traces toggle is hidden;
  • the chat stays in the events view, ignoring a stored "traces" choice;
  • switchToTraceView() does nothing;
  • the event tab lists no associated spans, whose links open the trace view.

The default FeatureFlagService returns true, so behavior is unchanged unless a host overrides it.

The chat declared FeatureFlagService.isTraceEnabled() but never read it, so a
host could not turn traces off: the Events/Traces toggle, the trace view and
the event tab's associated spans always showed.

When isTraceEnabled() is false:
- the Events/Traces toggle is hidden;
- the chat stays in the events view, ignoring a stored "traces" choice;
- switchToTraceView() does nothing;
- the event tab lists no associated spans, whose links open the trace view.

The default FeatureFlagService returns true, so behavior is unchanged unless a
host overrides it.
@copybara-service
copybara-service Bot merged commit d29001a into google:main Sep 29, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants