Skip to content

Fix visibility toggle button in chart tooltip not working#21071

Merged
B-Step62 merged 1 commit intomlflow:masterfrom
daniellok-db:fix-visibility-button
Feb 27, 2026
Merged

Fix visibility toggle button in chart tooltip not working#21071
B-Step62 merged 1 commit intomlflow:masterfrom
daniellok-db:fix-visibility-button

Conversation

@daniellok-db
Copy link
Collaborator

@daniellok-db daniellok-db commented Feb 23, 2026

Related Issues/PRs

#21046

What changes are proposed in this pull request?

Fix the visibility toggle button in RunsChartsTooltipWrapper which was not correctly hiding/showing runs.

Root cause: The onHideRun callback was not passing the current visibility state to the underlying toggleRunVisibility function. When isCurrentlyVisible is not provided, the code does !isCurrentlyVisible which becomes !undefined = true, causing the run to always be set to visible instead of toggling.

Changes:

  • Update onHideRun interface to accept isCurrentlyVisible parameter
  • Pass !activeRun.hidden state when calling onHideRun from tooltip button
  • Update RunsCompare callback to pass visibility state through to toggleRunVisibility

How is this PR tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests

Verified that the visibility toggle button now correctly hides runs when clicked in the chart tooltip.

Screen.Recording.2026-02-23.at.2.54.41.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.

Fix visibility toggle button in chart tooltip not correctly hiding runs.

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 (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)

The visibility toggle button in RunsChartsTooltipWrapper was not
correctly hiding/showing runs because the onHideRun callback was not
passing the current visibility state to the underlying
toggleRunVisibility function.

When isCurrentlyVisible is not provided, the code does
`!isCurrentlyVisible` which becomes `!undefined` = `true`, causing
the run to always be set to visible instead of toggling.

Changes:
- Update onHideRun interface to accept isCurrentlyVisible parameter
- Pass activeRun.hidden state when calling onHideRun from tooltip
- Update RunsCompare callback to pass visibility state through

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Daniel Lok <daniel.lok@databricks.com>
Copilot AI review requested due to automatic review settings February 23, 2026 06:55
@github-actions
Copy link
Contributor

🛠 DevTools 🛠

Install mlflow from this PR

# mlflow
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/21071/merge
# mlflow-skinny
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/21071/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/21071/merge

@github-actions github-actions bot added size/XS v3.10.1 area/uiux Front-end, user experience, plotting, JavaScript, JavaScript dev server rn/bug-fix Mention under Bug Fixes in Changelogs. labels Feb 23, 2026
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

Fixes the run visibility toggle in the runs charts tooltip by correctly passing the current visibility state through the onHideRun callback so useToggleRowVisibilityCallback can compute the next visibility value properly.

Changes:

  • Updates onHideRun callback signature in RunsCompare to accept isCurrentlyVisible and forwards it to toggleRunVisibility.
  • Updates RunsChartsTooltipBody’s context contract for onHideRun to include the visibility argument.
  • Passes !activeRun.hidden from the tooltip visibility button to ensure correct toggling.

Reviewed changes

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

File Description
mlflow/server/js/src/experiment-tracking/components/runs-compare/RunsCompare.tsx Propagates isCurrentlyVisible into the visibility toggle callback used by the tooltip.
mlflow/server/js/src/experiment-tracking/components/runs-charts/components/RunsChartsTooltipBody.tsx Extends tooltip context callback typing and passes current visibility state on click.

@github-actions
Copy link
Contributor

Documentation preview for 84526bc 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.

@daniellok-db daniellok-db added the team-review Trigger a team review request label Feb 24, 2026
Copy link
Collaborator

@serena-ruan serena-ruan left a comment

Choose a reason for hiding this comment

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

LGTM!

@B-Step62 B-Step62 added this pull request to the merge queue Feb 27, 2026
Merged via the queue into mlflow:master with commit dc3c037 Feb 27, 2026
38 of 40 checks passed
daniellok-db added a commit to daniellok-db/mlflow that referenced this pull request Mar 5, 2026
Signed-off-by: Daniel Lok <daniel.lok@databricks.com>
Co-authored-by: Claude <noreply@anthropic.com>
daniellok-db added a commit to daniellok-db/mlflow that referenced this pull request Mar 5, 2026
Signed-off-by: Daniel Lok <daniel.lok@databricks.com>
Co-authored-by: Claude <noreply@anthropic.com>
daniellok-db added a commit that referenced this pull request Mar 5, 2026
Signed-off-by: Daniel Lok <daniel.lok@databricks.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/uiux Front-end, user experience, plotting, JavaScript, JavaScript dev server rn/bug-fix Mention under Bug Fixes in Changelogs. size/XS team-review Trigger a team review request v3.10.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants