Skip to content

Trace UI papercut: highlight searched text and change search box hint's wording.#20841

Merged
PattaraS merged 11 commits intomlflow:masterfrom
PattaraS:trace-ui-papercut-2-highlight
Feb 17, 2026
Merged

Trace UI papercut: highlight searched text and change search box hint's wording.#20841
PattaraS merged 11 commits intomlflow:masterfrom
PattaraS:trace-ui-papercut-2-highlight

Conversation

@PattaraS
Copy link
Collaborator

@PattaraS PattaraS commented Feb 16, 2026

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

  • Changes the search box's hint in Traces and Sessions tab from "Search traces by request" --> "Search traces by id, request, or response"
  • Makes it so that searched text is highlighted.
  • Use trace.text in place of span.attributes.mlflow.spanInputs when searching.

How is this PR tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests
Screen.Recording.2026-02-16.at.12.41.29.PM.mov

Does this PR require documentation update?

  • No. You can skip the rest of this section.
  • Yes. I've updated:
    • Examples
    • API references
    • Instructions

Does this PR require updating the MLflow Skills repository?

  • No. You can skip the rest of this section.
  • Yes. Please link the corresponding PR or explain how you plan to update it.

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.
  • Changes the search box's hint in Traces and Sessions tab from "Search traces by request" to "Search traces by id, request, or response" to match its behavior.
  • Searched text in Traces and Sessions tab is now highlighted.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/tracking: Tracking Service, tracking client APIs, autologging
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflows
  • area/gateway: MLflow AI Gateway client APIs, server, and third-party integrations
  • area/prompts: MLflow prompt engineering features, prompt templates, and prompt management
  • area/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionality
  • area/projects: MLproject format, project running backends
  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages

How should the PR be classified in the release notes? Choose one:

  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Should this PR be included in the next patch release?

Yes should be selected for bug fixes, documentation updates, and other small changes. No should be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.

What is a minor/patch release?
  • Minor release: a release that increments the second part of the version number (e.g., 1.2.0 -> 1.3.0).
    Bug fixes, doc updates and new features usually go into minor releases.
  • Patch release: a release that increments the third part of the version number (e.g., 1.2.0 -> 1.2.1).
    Bug fixes and doc updates usually go into patch releases.
  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)

Signed-off-by: Pat Sukprasert <pattara.sk127@gmail.com>
Signed-off-by: Pat Sukprasert <pattara.sk127@gmail.com>
@github-actions
Copy link
Contributor

🛠 DevTools 🛠

Install mlflow from this PR

# mlflow
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/20841/merge
# mlflow-skinny
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/20841/merge#subdirectory=libs/skinny

For Databricks, use the following command:

%sh curl -LsSf https://raw.githubusercontent.com/mlflow/mlflow/HEAD/dev/install-skinny.sh | sh -s pull/20841/merge

@github-actions github-actions bot added size/M area/tracing MLflow Tracing and its integrations rn/none List under Small Changes in Changelogs. labels Feb 16, 2026
@PattaraS PattaraS requested a review from TomeHirata February 16, 2026 05:41
@PattaraS PattaraS self-assigned this Feb 16, 2026
Signed-off-by: Pat Sukprasert <pattara.sk127@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

Documentation preview for e53f7c4 is available at:

More info
  • Ignore this comment if this PR does not change the documentation.
  • The preview is updated when a new commit is pushed to this PR.
  • This comment was created by this workflow run.
  • The documentation was built by this workflow run.

Signed-off-by: Pat Sukprasert <pattara.sk127@gmail.com>
@github-actions github-actions bot added rn/bug-fix Mention under Bug Fixes in Changelogs. v3.10.0 and removed rn/none List under Small Changes in Changelogs. labels Feb 16, 2026
Signed-off-by: Pat Sukprasert <pattara.sk127@gmail.com>
Signed-off-by: Pat Sukprasert <pattara.sk127@gmail.com>
Signed-off-by: Pat Sukprasert <pattara.sk127@gmail.com>
@PattaraS PattaraS changed the title Trace UI papercut 2 highlight Trace UI papercut: highlight searched text and change search box hint's wording. Feb 17, 2026
@PattaraS
Copy link
Collaborator Author

/autoformat

placeholder ??
intl.formatMessage({
defaultMessage: 'Search traces by request',
defaultMessage: 'Search traces by id, request, and response',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add a comment that this is an OSS behavior and Databricks still continues to search by request only?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Copy link
Collaborator

@TomeHirata TomeHirata left a comment

Choose a reason for hiding this comment

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

Overall LGTM

Copy link
Contributor

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 improves the trace search functionality in the MLflow UI by updating the search box placeholder text to better reflect its capabilities, highlighting matched text in search results, and switching from searching within span.attributes.mlflow.spanInputs to the more comprehensive trace.text field.

Changes:

  • Updated search box placeholder text from "Search traces by request" to "Search traces by id, request, and response"
  • Added text highlighting functionality to visually mark search matches in the Request, Response, and Trace ID columns
  • Changed backend search filter from span.attributes.mlflow.spanInputs to trace.text for broader search coverage

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/store/tracking/test_sqlalchemy_store.py Updated tests to use trace.text instead of span.attributes.mlflow.spanInputs
mlflow/server/js/src/shared/web-shared/genai-traces-table/utils/DisplayUtils.tsx Added highlightSearchInText() function to wrap matched text in <mark> tags
mlflow/server/js/src/shared/web-shared/genai-traces-table/hooks/useMlflowTraces.tsx Changed filter to use trace.text instead of span.attributes.mlflow.spanInputs
mlflow/server/js/src/shared/web-shared/genai-traces-table/hooks/useMlflowTraces.test.tsx Updated test expectations for new filter syntax
mlflow/server/js/src/shared/web-shared/genai-traces-table/cellRenderers/rendererFunctions.tsx Integrated search highlighting for Request, Response, and Trace ID columns
mlflow/server/js/src/shared/web-shared/genai-traces-table/cellRenderers/SessionHeaderCellRenderers.tsx Added search highlighting support for session headers
mlflow/server/js/src/shared/web-shared/genai-traces-table/GenAiTracesTableSessionGroupedRows.tsx Passed searchQuery prop through component hierarchy
mlflow/server/js/src/shared/web-shared/genai-traces-table/GenAiTracesTableSearchInput.tsx Updated placeholder text to reflect broader search capabilities
mlflow/server/js/src/shared/web-shared/genai-traces-table/GenAiTracesTableBody.utils.tsx Extracted searchQuery from table metadata for cell renderers
mlflow/server/js/src/shared/web-shared/genai-traces-table/GenAiTracesTableBody.tsx Added searchQuery to table metadata
mlflow/server/js/src/shared/web-shared/genai-traces-table/GenAITracesTableBodyContainer.tsx Added searchQuery prop and passed it to table body
mlflow/server/js/src/lang/default/en.json Updated localization strings for new placeholder text
mlflow/server/js/src/experiment-tracking/components/experiment-page/components/traces-v3/TracesV3Logs.tsx Passed searchQuery prop to table container
mlflow/server/js/src/experiment-tracking/components/experiment-page/components/traces-v3/TracesV3Logs.intg.test.tsx Updated test to expect new placeholder text
mlflow/server/js/src/experiment-tracking/components/experiment-logged-models/ExperimentLoggedModelDetailsTraces.test.tsx Updated test to expect new placeholder text

}
if (searchQuery) {
filter.push(`span.attributes.\`mlflow.spanInputs\` ILIKE '%${searchQuery}%'`);
filter.push(`trace.text ILIKE '%${searchQuery}%'`);
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The search query is directly interpolated into the filter string without escaping special characters. This could cause the filter to break if users search for text containing single quotes (') or percent signs (%).

According to the Python tests (e.g., test_sqlalchemy_store.py line 5197), single quotes in filter strings need to be escaped as ' and percent signs as %%. Consider adding an escaping function to handle these characters before building the filter string.

For example:

  • A search for "it's working" would generate: trace.text ILIKE '%it's working%' which would break the SQL syntax
  • A search for "90%" would generate: trace.text ILIKE '%90%%' but the percent sign in the search term should be escaped as %%

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

placeholder ??
intl.formatMessage({
defaultMessage: 'Search traces by request',
defaultMessage: 'Search traces by id, request, and response',
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

There's a discrepancy between the PR description and the actual code change. The PR description states the placeholder text should be "Search traces by id, request, or response" (using "or"), but the code implements "Search traces by id, request, and response" (using "and"). Additionally, the release notes mention "Search traces by request & response" which differs from both.

Please clarify which wording is intended and ensure consistency across the PR description, release notes, and code.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed from "and response" to "or response".

Comment on lines 816 to 826
<div css={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }} title={value}>
{value}
{displayValue}
</div>
) : (
<NullCell isComparing={isComparing} />
)
}
second={
isComparing &&
(otherValue ? (
(displayOtherValue ? (
<div css={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }} title={otherValue}>
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The title attribute should check if the value is a string before using it, similar to how it's done in SessionHeaderCellRenderers.tsx (lines 447, 459, 478). While formatResponseTitle() should return a string, adding a type guard would make the code more defensive and consistent with the rest of the codebase.

Consider changing:

  • title={value} to title={typeof value === 'string' ? value : undefined}
  • title={otherValue} to title={typeof otherValue === 'string' ? otherValue : undefined}

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Current behavior, so ignoring this.

@PattaraS PattaraS enabled auto-merge February 17, 2026 09:00
@PattaraS PattaraS disabled auto-merge February 17, 2026 09:01
Signed-off-by: Pat Sukprasert <pattara.sk127@gmail.com>
@PattaraS
Copy link
Collaborator Author

/autoformat

Signed-off-by: mlflow-app[bot] <mlflow-app[bot]@users.noreply.github.com>
@PattaraS PattaraS enabled auto-merge February 17, 2026 09:12
@PattaraS PattaraS added this pull request to the merge queue Feb 17, 2026
Merged via the queue into mlflow:master with commit 0f19559 Feb 17, 2026
55 of 57 checks passed
@PattaraS PattaraS deleted the trace-ui-papercut-2-highlight branch February 17, 2026 09:54
daniellok-db pushed a commit to daniellok-db/mlflow that referenced this pull request Feb 20, 2026
…'s wording. (mlflow#20841)

Signed-off-by: Pat Sukprasert <pattara.sk127@gmail.com>
Signed-off-by: mlflow-app[bot] <mlflow-app[bot]@users.noreply.github.com>
Co-authored-by: mlflow-app[bot] <mlflow-app[bot]@users.noreply.github.com>
daniellok-db pushed a commit that referenced this pull request Feb 20, 2026
…'s wording. (#20841)

Signed-off-by: Pat Sukprasert <pattara.sk127@gmail.com>
Signed-off-by: mlflow-app[bot] <mlflow-app[bot]@users.noreply.github.com>
Co-authored-by: mlflow-app[bot] <mlflow-app[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tracing MLflow Tracing and its integrations rn/bug-fix Mention under Bug Fixes in Changelogs. size/M v3.10.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants