Skip to content

fix: move list models output to response tab and hide tools tab for list models logs#3087

Merged
akshaydeo merged 7 commits intomainfrom
04-27-fix_list_models_log_sheet_ui_fixes
Apr 28, 2026
Merged

fix: move list models output to response tab and hide tools tab for list models logs#3087
akshaydeo merged 7 commits intomainfrom
04-27-fix_list_models_log_sheet_ui_fixes

Conversation

@Pratham-Mishra04
Copy link
Copy Markdown
Collaborator

Summary

Improves the display of list_models_output logs in the log detail view by moving the output to a more appropriate location and hiding the irrelevant "Tools" tab for these log types.

Changes

  • Moved the list_models_output collapsible block from the raw JSON tab section to the response/output section, so it appears alongside other response data rather than raw request/response content.
  • Hidden the "Tools" tab when viewing a list_models_output log, since tools are not relevant to model listing requests.
  • Removed the !log.list_models_output condition from the "No raw JSON available" empty state check, since the list models output is no longer rendered in that tab section — the empty state will now correctly show when there is truly no raw JSON.

Type of change

  • Bug fix
  • Refactor
  • Feature
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

  1. Trigger a list_models request that gets logged.
  2. Open the log detail view for that entry.
  3. Verify the "Tools" tab is not visible.
  4. Verify the "List Models Output" collapsible box appears in the response section.
  5. Verify the raw JSON tab shows "No raw JSON available" if no raw request/response data exists.
cd ui
pnpm i || npm i
pnpm build || npm run build

Breaking changes

  • Yes
  • No

Related issues

Security considerations

None.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

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: 8cd58aa8-f37c-4c8d-97ed-437130c12dba

📥 Commits

Reviewing files that changed from the base of the PR and between e1baf67 and 930c72d.

📒 Files selected for processing (1)
  • ui/app/workspace/logs/sheets/logDetailView.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • ui/app/workspace/logs/sheets/logDetailView.tsx

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Fixed tab visibility so Tools no longer appears incorrectly and raw JSON placeholder behaves consistently.
  • UI/UX Improvements

    • Moved model output into the Messages tab with a collapsible JSON viewer.
    • Added read-only view with copy-to-clipboard for quick access to model output.
    • Improved overall tab organization and trigger behavior.

Walkthrough

Moves the List Models Output JSON viewer from the raw tab into the messages tab, rendering it as a read-only collapsible JSON CodeEditor when log.list_models_output exists. Adjusts tab trigger visibility to hide the Tools tab when that output is present and decouples the raw “no JSON available” placeholder from this field.

Changes

Cohort / File(s) Summary
Log Detail View Reorganization
ui/app/workspace/logs/sheets/logDetailView.tsx
Relocates log.list_models_output rendering from the raw tab to TabsContent value="messages" with a read-only collapsible JSON CodeEditor and copy-to-clipboard. Removes the old list_models_output block from the raw tab, hides the Tools tab trigger when list_models_output exists (still suppressed for passthrough logs), and updates the raw-tab "No raw JSON available" fallback to no longer consider list_models_output.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through tabs to tuck JSON in Messages bright,
Folded in a read-only box that gleams with copy-light,
Tools takes a bow when models appear,
Raw shows its own truth, independent and clear,
One file rearranged — a tidy rabbit's delight. 🥕

🚥 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 changes: moving list models output to the response tab and hiding the tools tab for list models logs.
Description check ✅ Passed The description covers all required sections including summary, changes, type of change, affected areas, testing steps, breaking changes, and security considerations with appropriate detail.
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 04-27-fix_list_models_log_sheet_ui_fixes

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

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 27, 2026

Confidence Score: 5/5

Safe to merge — purely a UI display refactor with no logic regressions.

All three changes are internally consistent: the block was removed from one tab and added to another, the tab guard condition was updated to match, and the empty-state condition was corrected accordingly. No P0/P1 issues found.

No files require special attention.

Important Files Changed

Filename Overview
ui/app/workspace/logs/sheets/logDetailView.tsx Moved list_models_output CollapsibleBox from Raw JSON tab to response/messages section, hid Tools tab for list_models logs, and corrected the "No raw JSON available" empty-state guard — all changes are logically consistent and cleanly implemented.

Reviews (2): Last reviewed commit: "fix: list models log sheet ui fixes" | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
ui/app/workspace/logs/sheets/logDetailView.tsx (1)

1786-1806: Avoid serializing list_models_output twice per render.

JSON.stringify(log.list_models_output, null, 2) is repeated for both onCopy and code. Compute once and reuse to reduce render work on large payloads.

♻️ Proposed refactor
+  const listModelsOutputJson = log.list_models_output
+    ? JSON.stringify(log.list_models_output, null, 2)
+    : "";
...
           {log.list_models_output && (
             <CollapsibleBox
               title={`List Models Output (${log.list_models_output.length})`}
-              onCopy={() => JSON.stringify(log.list_models_output, null, 2)}
+              onCopy={() => listModelsOutputJson}
             >
               <CodeEditor
                 className="z-0 w-full"
                 shouldAdjustInitialHeight={true}
                 maxHeight={450}
                 wrap={true}
-                code={JSON.stringify(log.list_models_output, null, 2)}
+                code={listModelsOutputJson}
                 lang="json"
                 readonly={true}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ui/app/workspace/logs/sheets/logDetailView.tsx` around lines 1786 - 1806, The
code serializes log.list_models_output twice (for onCopy and code); compute the
JSON once into a local constant (e.g., listModelsOutputJson =
JSON.stringify(log.list_models_output, null, 2)) in the component/render scope
before returning JSX and then pass that single constant to both the
CollapsibleBox onCopy and CodeEditor code props to avoid duplicate work when
rendering large payloads; update references to use listModelsOutputJson and keep
behavior (pretty JSON, lang="json", readonly) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@ui/app/workspace/logs/sheets/logDetailView.tsx`:
- Around line 1786-1806: The code serializes log.list_models_output twice (for
onCopy and code); compute the JSON once into a local constant (e.g.,
listModelsOutputJson = JSON.stringify(log.list_models_output, null, 2)) in the
component/render scope before returning JSX and then pass that single constant
to both the CollapsibleBox onCopy and CodeEditor code props to avoid duplicate
work when rendering large payloads; update references to use
listModelsOutputJson and keep behavior (pretty JSON, lang="json", readonly)
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 76b6a992-0e49-49d2-ae05-4357916ab96c

📥 Commits

Reviewing files that changed from the base of the PR and between 11db74d and e1baf67.

📒 Files selected for processing (1)
  • ui/app/workspace/logs/sheets/logDetailView.tsx

coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 27, 2026
Copy link
Copy Markdown
Contributor

akshaydeo commented Apr 28, 2026

Merge activity

@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 04-27-fix_list_models_log_sheet_ui_fixes branch from e1baf67 to 930c72d Compare April 28, 2026 07:07
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 04-27-fix_routing_rule_chain_no_longer_halts_when_a_chain_rule_resolves_itself branch from 11db74d to 201f9f6 Compare April 28, 2026 07:07
@akshaydeo akshaydeo changed the base branch from 04-27-fix_routing_rule_chain_no_longer_halts_when_a_chain_rule_resolves_itself to graphite-base/3087 April 28, 2026 07:24
@akshaydeo akshaydeo changed the base branch from graphite-base/3087 to main April 28, 2026 07:26
@akshaydeo akshaydeo dismissed coderabbitai[bot]’s stale review April 28, 2026 07:26

The base branch was changed.

@akshaydeo akshaydeo merged commit 3d625db into main Apr 28, 2026
16 of 18 checks passed
@akshaydeo akshaydeo deleted the 04-27-fix_list_models_log_sheet_ui_fixes branch April 28, 2026 07:27
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