Skip to content

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

Merged
jaseemjaskp merged 3 commits into
mainfrom
UN-2742-profile-name-output-analyzer
Jul 14, 2026
Merged

UN-2742 [FIX] Show profile name instead of LLM name in Output Analyzer tabs#2030
jaseemjaskp merged 3 commits 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

@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: cd89f930-3f1f-4d5c-817f-1d4e31de9b55

📥 Commits

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

📒 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
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx

Summary by CodeRabbit

  • New Features
    • Added hover tooltips to adapter tabs in output views, showing additional model/profile details.
    • Improved adapter tab label display by refining the text shown (including better preference for profile name vs model).

Walkthrough

Two output components add Ant Design tooltips to adapter tabs, show the LLM model on hover, and prefer profile names for visible labels with model and generated profile fallbacks.

Changes

Adapter tab labels

Layer / File(s) Summary
Tooltip-wrapped adapter labels
frontend/src/components/custom-tools/combined-output/JsonView.jsx, frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx
Both components import Tooltip, display the adapter model on hover, and update visible tab label fallback order to profile name, LLM model, then a generated profile label.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: hari-kuriakose

🚥 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 clearly states the main UI change: showing profile names instead of LLM names in Output Analyzer tabs.
Description check ✅ Passed The description mostly matches the template and covers What/Why/How, risk, migrations, env, testing, links, and checklist.
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.
✨ 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.

@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 Prompt Studio output tab labels so the LLM profile name is the primary identifier and the model name is demoted to a hover tooltip, addressing ambiguity when the same model appears in multiple profiles with different settings.

  • JsonView.jsx and OutputForDocModal.jsx both receive the same change: Tooltip wraps each TabPane label, with profile_name as the visible text and llm_model as the tooltip title, plus a graceful fallback label when both fields are absent.
  • Tab key strategy (profile_id / index-based) is unchanged, so tab switching and selection state are unaffected.

Confidence Score: 5/5

Safe to merge — the change only affects visible tab label text and tooltip content; tab keys and all selection logic are untouched.

Both files receive a narrow, isolated UI change: swapping the tab label source and adding a tooltip. No state, routing, data-fetching, or key logic is modified. The only observation is that the tooltip title falls back to profile_name when llm_model is absent, producing a redundant tooltip rather than the suppressed tooltip the PR description implies — this does not affect functionality.

No files require special attention.

Important Files Changed

Filename Overview
frontend/src/components/custom-tools/combined-output/JsonView.jsx Adds Tooltip wrapper around tab labels; flips label preference to profile_name with llm_model as tooltip. Logic is correct; minor observation on tooltip fallback.
frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx Mirrors the same tab label / tooltip flip from JsonView; uses index-based fallback label instead of profile_id-based, consistent with its pre-existing key strategy.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[adapter object] --> B{profile_name present?}
    B -- Yes --> C[Label = profile_name]
    B -- No --> D{llm_model present?}
    D -- Yes --> E["Label = llm_model"]
    D -- No --> F["Label = Profile {id/index}"]

    A --> G{llm_model present?}
    G -- Yes --> H["Tooltip = llm_model"]
    G -- No --> I["Tooltip = profile_name (redundant) or undefined"]

    C --> J[Render TabPane]
    E --> J
    F --> J
    H --> J
    I --> J
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[adapter object] --> B{profile_name present?}
    B -- Yes --> C[Label = profile_name]
    B -- No --> D{llm_model present?}
    D -- Yes --> E["Label = llm_model"]
    D -- No --> F["Label = Profile {id/index}"]

    A --> G{llm_model present?}
    G -- Yes --> H["Tooltip = llm_model"]
    G -- No --> I["Tooltip = profile_name (redundant) or undefined"]

    C --> J[Render TabPane]
    E --> J
    F --> J
    H --> J
    I --> J
Loading

Reviews (3): Last reviewed commit: "Merge branch 'main' into UN-2742-profile..." | Re-trigger Greptile

@jaseemjaskp jaseemjaskp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated PR review (PR Review Toolkit: code-reviewer, silent-failure-hunter, type-design-analyzer, pr-test-analyzer, comment-analyzer, code-simplifier).

Verdict: Clean, focused change — correctly implements UN-2742 (profile name as the tab label, LLM model in a hover tooltip). Change is consistent across both files. No critical/high issues. Findings below are LOW/nit.

Inline comments cover the two behavioral edge cases (blank tab + redundant/empty tooltip when fields are missing).

Additional non-blocking notes (lines outside the diff, so not inlined):

  • Weak prop contract (LOW)JsonView.jsx:111 declares adapterData: PropTypes.array, which permits any array. The producer getLLMModelNamesForProfiles (GetStaticData.js:476-491) always emits { profile_name, llm_model, profile_id }, so tightening to PropTypes.arrayOf(PropTypes.shape({ profile_id: PropTypes.string.isRequired, profile_name: PropTypes.string, llm_model: PropTypes.string })) would document the contract and surface dev-mode warnings. profile_id is load-bearing (tab key + selection).
  • Duplication (nit, no action) — the tab-label JSX is now identical in both files. A shared ProfileTabLabel is not worth it for two call sites with no existing shared-component precedent in these sibling directories; extract only if a third call site appears.
  • Tests (optional) — frontend has Vitest infra but minimal coverage; this presentational change doesn't warrant new tests under current conventions. If anything, a single guard around the empty-string profile_name fallback.

Comment thread frontend/src/components/custom-tools/combined-output/JsonView.jsx Outdated
Comment thread frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx Outdated

@jaseemjaskp jaseemjaskp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated PR review (PR Review Toolkit: Code Reviewer, Silent Failure Hunter, Type Design Analyzer, Test Analyzer, Comment Analyzer, Code Simplifier).

Verdict: ship-able. The change is correct, symmetric across both files, null-safe (optional chaining), and matches the stated intent (profile name as label, model in tooltip). No blocking issues.

Two MEDIUM robustness findings are inline below. The recurring root cause is that llm_model — the field the new tooltip relies on — is exactly the field most likely to be undefined: getLLMModelNamesForProfiles (frontend/src/helpers/GetStaticData.js:484-490) derives it from adapterMap[profile?.llm], which misses whenever the profile's adapter isn't in the returned adapter list (deleted/renamed adapter, or a partial list).

Non-blocking, no inline comment posted:

  • Type/data contract (weak): adapterData is declared only as PropTypes.array (JsonView.jsx:111); the { profile_name, llm_model, profile_id } shape lives implicitly in the producer. The new behavior now depends on profile_name, but that contract is expressed nowhere. Cheap fix: PropTypes.arrayOf(PropTypes.shape({ profile_name: PropTypes.string, llm_model: PropTypes.string, profile_id: PropTypes.string })), plus a JSDoc @returns typedef on the helper (the shape also reaches OutputForDocModal via local state, which PropTypes can't cover).
  • Comment (optional): A one-line comment explaining the profile_name || llm_model label + llm_model tooltip intent would guard the fallback from being misread as redundant/dead code.
  • Simplification: None warranted — extracting a shared <ProfileTabLabel> for a 4-line snippet duplicated twice is disproportionate.
  • Tests: No test required. Frontend uses Vitest + RTL but only for non-trivial branching logic; this presentational change is consistent with leaving such code untested.

Comment thread frontend/src/components/custom-tools/combined-output/JsonView.jsx Outdated
Comment thread frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx Outdated
athul-rs and others added 2 commits July 14, 2026 08:17
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>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@athul-rs
athul-rs force-pushed the UN-2742-profile-name-output-analyzer branch from 677940f to 83ba681 Compare July 14, 2026 02:47
@athul-rs
athul-rs requested a review from jaseemjaskp July 14, 2026 04:29
@github-actions

Copy link
Copy Markdown
Contributor

Frontend Lint Report (Biome)

All checks passed! No linting or formatting issues found.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Unstract test results

Per-group results

Status Group Tier Passed Failed Errors Skipped Duration (s)
e2e-login e2e 2 0 0 0 1.0
e2e-smoke e2e 2 0 0 0 0.7
unit-sdk1 unit 435 0 0 0 22.4
unit-workers unit 0 0 0 0 21.0
TOTAL 439 0 0 0 45.2

Critical paths

❌ Regressions (must be zero)

  • adapter-register-llm — Register and validate an LLM adapter. (entry: POST /api/v1/adapter/)

⚠️ Critical paths not yet covered

  • workflow-create-execute — Create a workflow, configure source+destination, execute, poll, fetch result. (entry: POST /api/v1/workflow/{id}/execute/; declared coverage: e2e-workflow)
  • api-deployment-run — Deploy a workflow as an API, POST a document, receive structured JSON. (entry: POST /deployment/api/{org}/{name}/; declared coverage: e2e-api-deployment)
  • prompt-studio-fetch-response — Prompt Studio: create project, add prompt, run single-pass, get response. (entry: POST /api/v1/prompt-studio/prompt-studio-tool/{id}/fetch_response/; declared coverage: e2e-prompt-studio)
  • pipeline-etl-execute — Run an ETL pipeline from source connector to destination. (entry: POST /api/v1/pipeline/{id}/execute/; declared coverage: no groups declared)
  • usage-token-tracking — Per-execution token usage is recorded and retrievable. (entry: GET /api/v1/usage/get_token_usage/; declared coverage: no groups declared)
  • workflow-execution-fan-out — Multi-file workflow execution fans out to file-processing workers and rejoins. (entry: internal: backend → rabbitmq → workers/file_processing; declared coverage: no groups declared)
  • callback-result-delivery — Async results are posted back via the callback worker. (entry: internal: workers/callback → backend /internal endpoints; declared coverage: no groups declared)
✅ Covered critical paths
  • auth-login — covered by e2e-login

@jaseemjaskp
jaseemjaskp merged commit 94d78da into main Jul 14, 2026
11 checks passed
@jaseemjaskp
jaseemjaskp deleted the UN-2742-profile-name-output-analyzer branch July 14, 2026 12:56
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.

3 participants