Skip to content

UN-2742 [FIX] Show profile name instead of LLM name in Output Analyzer tabs#2030

Open
athul-rs wants to merge 1 commit into
mainfrom
UN-2742-profile-name-output-analyzer
Open

UN-2742 [FIX] Show profile name instead of LLM name in Output Analyzer tabs#2030
athul-rs wants to merge 1 commit into
mainfrom
UN-2742-profile-name-output-analyzer

Conversation

@athul-rs

@athul-rs athul-rs commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

What

  • Output tabs in Prompt Studio now show the LLM profile name as the label, with the LLM model name available as a tooltip on hover. Previously the tab label was the model name, falling back to profile name.

Why

UN-2742 — users create profiles with specific intent (the same model can be used with different LLMWhisperer modes, chunking, retrieval settings). When comparing outputs across profiles, the model name is ambiguous — two tabs can read identically while being different profiles. The profile name is the meaningful identity; the model is secondary context, now preserved in a tooltip.

How

  • combined-output/JsonView.jsx — flipped label preference to profile_name || llm_model, wrapped in <Tooltip title={llm_model}>. This is the shared tab strip used by both the Output Analyzer and the main combined-output view, so both stay consistent.
  • output-for-doc-modal/OutputForDocModal.jsx — same pattern applied to the identical tab strip there.

Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)

  • No. Tab selection is keyed on profile_id (JsonView) / index (OutputForDocModal), never on the label text, so behavior is unchanged — only the visible label flips. No tests, e2e selectors, or CSS reference the label text. profile_name is a required, whitespace-validated field at profile creation, so labels can't be blank. If a profile's adapter was deleted (no resolvable model), the tooltip simply doesn't render (antd disables tooltips with undefined title) — previously that case showed the profile name with no tooltip, so nothing is lost.

Database Migrations

  • None

Env Config

  • None

Relevant Docs

  • N/A

Related Issues or PRs

  • Jira: UN-2742

Dependent Features

  • None

Notes on Testing

  • Biome lint clean; vite build succeeds.
  • Manual: open a Prompt Studio project with 2+ profiles → Output Analyzer and combined output tabs show profile names; hovering a tab shows the model name; tab switching unaffected.

Screenshots

N/A

Checklist

I have read and understood the Contribution Guidelines.

🤖 Generated with Claude Code

Profiles encode user intent (same model can differ by LLMWhisperer
mode, chunking, etc.), so the profile name is the meaningful label
when comparing outputs. The LLM model name stays available as a
tooltip on each tab.

Applies to the shared tab strip used by the Output Analyzer and the
main combined-output view (JsonView), and the same pattern in
OutputForDocModal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Frontend Lint Report (Biome)

All checks passed! No linting or formatting issues found.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 444a516e-fc21-4e2b-9c6e-d444cdf1e57d

📥 Commits

Reviewing files that changed from the base of the PR and between c14a3b3 and 677940f.

📒 Files selected for processing (2)
  • frontend/src/components/custom-tools/combined-output/JsonView.jsx
  • frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx

Summary by CodeRabbit

  • New Features
    • Added hover tooltips to adapter tabs displaying additional model information in tool output views.
    • Enhanced adapter tab labels for improved visibility and clarity.

Walkthrough

Two output components add Ant Design Tooltip to adapter tab labels, displaying the LLM model on hover while preferring the profile name for the visible text. Imports are updated in both files, and tab rendering logic is adjusted to wrap labels in tooltip components with updated fallback display priorities.

Changes

Adapter Model Tooltips

Layer / File(s) Summary
Add tooltips displaying adapter LLM model to output tabs
frontend/src/components/custom-tools/combined-output/JsonView.jsx, frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx
Both components import Tooltip from antd and wrap adapter tab labels to display llm_model in a tooltip on hover. Visible tab text prioritizes profile_name over llm_model instead of the previous fallback order.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: swapping the tab label priority to show profile name instead of LLM model name in Output Analyzer tabs.
Description check ✅ Passed The PR description is comprehensive and follows the template structure, covering What, Why, How, breaking changes assessment, testing notes, and all required sections.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch UN-2742-profile-name-output-analyzer

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@greptile-apps

greptile-apps Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR swaps the display priority of LLM profile tabs in the Output Analyzer and Output-for-Doc modal: the tab label now shows profile name (previously model name), and the LLM model name is exposed as a hover tooltip via antd's Tooltip. The change is applied consistently across both JsonView.jsx and OutputForDocModal.jsx.

  • Label flip: llm_model || profile_nameprofile_name || llm_model, wrapping each tab in <Tooltip title={adapter?.llm_model}> — purely presentational, no impact on tab-selection keying or data-fetch logic.
  • Tooltip behavior: antd silently suppresses the tooltip when title is undefined (e.g., when a profile's adapter has been deleted), so no blank-tooltip regressions are introduced.

Confidence Score: 5/5

Safe to merge — only the tab label text and tooltip are changing; all tab-selection, data-fetching, and rendering logic are untouched.

Both changed files receive an identical, symmetric treatment: import Tooltip, flip the label preference, wrap with tooltip. Tab keys in JsonView remain profile_id and in OutputForDocModal remain (index + 1).toString(), so no tab-switching behavior changes. The getLLMModelNamesForProfiles helper confirms llm_model can be undefined when an adapter is deleted; antd's Tooltip correctly suppresses itself in that case. No tests, route handlers, or data contracts are touched.

No files require special attention.

Important Files Changed

Filename Overview
frontend/src/components/custom-tools/combined-output/JsonView.jsx Added Tooltip import; tab label priority flipped from llm_model
frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx Same Tooltip-wrapping pattern applied consistently; tab selection (handleTabChange) is keyed on index, unchanged by the label swap

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[adapterData array] --> B{profile_name truthy?}
    B -- Yes --> C[Tab label = profile_name]
    B -- No --> D[Tab label = llm_model]
    C --> E{llm_model defined?}
    D --> E
    E -- Yes --> F[Tooltip shows llm_model on hover]
    E -- No --> G[No tooltip rendered]
    F --> H[Tab rendered in strip]
    G --> H
Loading

Reviews (1): Last reviewed commit: "UN-2742 Show profile name instead of LLM..." | Re-trigger Greptile

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.

2 participants