-
Notifications
You must be signed in to change notification settings - Fork 632
UN-2742 [FIX] Show profile name instead of LLM name in Output Analyzer tabs #2030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import { Tabs } from "antd"; | ||
| import { Tabs, Tooltip } from "antd"; | ||
| import TabPane from "antd/es/tabs/TabPane"; | ||
| import Prism from "prismjs"; | ||
| import PropTypes from "prop-types"; | ||
|
|
@@ -70,7 +70,11 @@ function JsonView({ | |
| )} | ||
| {adapterData.map((adapter) => ( | ||
| <TabPane | ||
| tab={<span>{adapter?.llm_model || adapter?.profile_name}</span>} | ||
| tab={ | ||
| <Tooltip title={adapter?.llm_model}> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MEDIUM — Tooltip can render empty, and the tab label can be blank.
Separately, Suggest terminal fallbacks so neither is ever empty: <Tooltip title={adapter?.llm_model || adapter?.profile_name}>
<span>
{adapter?.profile_name || adapter?.llm_model || `Profile ${adapter?.profile_id ?? "?"}`}
</span>
</Tooltip> |
||
| <span>{adapter?.profile_name || adapter?.llm_model}</span> | ||
| </Tooltip> | ||
| } | ||
| key={adapter?.profile_id} | ||
| /> | ||
| ))} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ import { | |
| CloseCircleFilled, | ||
| InfoCircleFilled, | ||
| } from "@ant-design/icons"; | ||
| import { Button, Modal, Table, Tabs, Typography } from "antd"; | ||
| import { Button, Modal, Table, Tabs, Tooltip, Typography } from "antd"; | ||
| import TabPane from "antd/es/tabs/TabPane"; | ||
| import PropTypes from "prop-types"; | ||
| import { useEffect, useState } from "react"; | ||
|
|
@@ -340,7 +340,11 @@ function OutputForDocModal({ | |
| <TabPane tab={<span>Default</span>} key={"0"}></TabPane> | ||
| {adapterData?.map((adapter, index) => ( | ||
| <TabPane | ||
| tab={<span>{adapter?.llm_model || adapter?.profile_name}</span>} | ||
| tab={ | ||
| <Tooltip title={adapter?.llm_model}> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LOW / nit — same as tab={
<Tooltip title={adapter?.profile_name ? adapter?.llm_model : undefined}>
<span>{adapter?.profile_name || adapter?.llm_model || "Unnamed profile"}</span>
</Tooltip>
}Non-blocking.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MEDIUM — same robustness gap as The tooltip binds to Apply the same terminal-fallback fix as in <Tooltip title={adapter?.llm_model || adapter?.profile_name}>
<span>{adapter?.profile_name || adapter?.llm_model || `Profile ${index + 1}`}</span>
</Tooltip> |
||
| <span>{adapter?.profile_name || adapter?.llm_model}</span> | ||
| </Tooltip> | ||
| } | ||
| key={(index + 1)?.toString()} | ||
| ></TabPane> | ||
| ))} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOW / nit — tooltip is redundant or empty in the fallback path.
When
profile_nameis missing, the span already falls back tollm_model, and the tooltiptitleis alsollm_model— so the hover just repeats the visible text. And whenllm_modelitself is undefined (the adapter forprofile.llmdoesn't resolve ingetLLMModelNamesForProfiles), the tooltip is empty and hover reveals nothing. If both fields are falsy the tab renders with no label at all (a blank, anonymous-but-selectable tab) — pre-existing, but the new tooltip was a chance to address it.Suggestion (only show the tooltip when it adds info, and guarantee a visible label):
(antd suppresses the popup when
titleisundefined.) Non-blocking.