Skip to content

feat(studio): agent-eval logs ui, add collapsible panel - #611

Merged
nv-odrulea merged 2 commits into
mainfrom
od/agent-eval-logs-ui
Jul 9, 2026
Merged

feat(studio): agent-eval logs ui, add collapsible panel#611
nv-odrulea merged 2 commits into
mainfrom
od/agent-eval-logs-ui

Conversation

@nv-odrulea

@nv-odrulea nv-odrulea commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-07-08 at 11 42 46 AM

Summary by CodeRabbit

  • New Features
    • Added a new collapsible panel component for interactive, richer UI sections.
    • Added a “Logs” accordion section to job/evaluation detail pages so log output is available directly in the page.
  • Bug Fixes
    • Improved log refreshing after jobs near completion, helping ensure late-arriving log lines are captured once polling slows/stops.

Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
@nv-odrulea
nv-odrulea requested review from a team as code owners July 8, 2026 18:43
@github-actions github-actions Bot added the feat label Jul 8, 2026
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7715fe2f-74ac-4519-a858-a8309fcfc7cf

📥 Commits

Reviewing files that changed from the base of the PR and between 136dca6 and e9adf5a.

📒 Files selected for processing (1)
  • web/packages/common/src/hooks/useJobLogs/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/packages/common/src/hooks/useJobLogs/index.ts

📝 Walkthrough

Walkthrough

Adds a new AccordionPanel, threads job status into log polling, adds post-terminal settle refetches, and renders a Logs accordion in the agent evaluation detail route.

Changes

Logs Accordion and Job Status Refetch

Layer / File(s) Summary
AccordionPanel component
web/packages/common/src/components/AccordionPanel/index.tsx
New collapsible panel composing Foundations Panel primitives, with open state, keyboard toggling, and conditional unmounting of content.
useJobLogs terminal-status settle refetch
web/packages/common/src/hooks/useJobLogs/index.ts
Adds LOG_SETTLE_DELAYS_MS and a useEffect that refetches logs after terminal status with timer cleanup.
StatusLogsContent jobStatus prop
web/packages/studio/src/components/evaluation/Jobs/StatusLogsContent.tsx
Adds optional jobStatus prop typed PlatformJobStatus, forwarded into useJobLogs.
Logs accordion wiring
web/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationDetailRoute.tsx
Imports PlatformJobStatus, StatusLogsContent, ScrollText; renders new Logs accordion passing workspace, jobName, and job.status.

Sequence Diagram(s)

sequenceDiagram
  participant Route as AgentEvaluationDetailRoute
  participant Logs as StatusLogsContent
  participant Hook as useJobLogs
  participant API as Log API

  Route->>Logs: render(workspace, jobName, job.status)
  Logs->>Hook: useJobLogs(workspace, name, jobStatus)
  Hook->>API: refetch() on interval
  API-->>Hook: log lines
  Note over Hook: jobStatus becomes terminal
  loop LOG_SETTLE_DELAYS_MS
    Hook->>API: scheduled refetch()
    API-->>Hook: late log lines
  end
  Hook-->>Logs: updated logs
Loading

Suggested reviewers: dmariali, htolentino-nvidia, nakolean

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding agent evaluation logs UI and a collapsible panel.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 od/agent-eval-logs-ui

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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationDetailRoute.tsx (1)

47-58: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Align agent-eval logs with the shared terminal set AgentEvalJob.status is a plain string, but this route treats succeeded/success/failed as terminal while useJobLogs only stops on completed/error/cancelled. The job.status as PlatformJobStatus cast lets those aliases keep polling forever.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@web/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationDetailRoute.tsx`
around lines 47 - 58, The terminal-status check in AgentEvaluationDetailRoute is
using a broader local set than the shared log polling logic, so alias statuses
like succeeded/success/failed can keep polling forever. Update the status
handling in AgentEvaluationDetailRoute (including isTerminal and the
AgentEvalJob.status cast) to use the same shared terminal set as useJobLogs, or
normalize aliases to the canonical PlatformJobStatus values before passing
status through. Make sure the route stops polling for all terminal agent-eval
states via the shared status helper instead of relying on a separate local list.
🧹 Nitpick comments (1)
web/packages/common/src/components/AccordionPanel/index.tsx (1)

60-75: 📐 Maintainability & Code Quality | 🔵 Trivial

Missing aria-controls linkage between header and content.

Header toggles content via role="button" but there's no id/aria-controls pairing so assistive tech can associate them.
[optional_low_effort]

♿ Add id/aria-controls
+  const contentId = useId();
   return (
     <PanelRoot elevation={elevation} density={density} className={className}>
       <PanelHeader
         role="button"
         tabIndex={0}
         aria-expanded={open}
+        aria-controls={contentId}
         onClick={toggle}
         onKeyDown={onKeyDown}
         className="cursor-pointer"
       >
         {slotIcon && <PanelIcon>{slotIcon}</PanelIcon>}
         <PanelHeading>{slotHeading}</PanelHeading>
         <PanelIcon className="ml-auto">{open ? <ChevronUp /> : <ChevronDown />}</PanelIcon>
       </PanelHeader>
-      {open && <PanelContent className={contentClassName}>{children}</PanelContent>}
+      {open && <PanelContent id={contentId} className={contentClassName}>{children}</PanelContent>}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/common/src/components/AccordionPanel/index.tsx` around lines 60
- 75, The AccordionPanel header is missing the accessibility linkage to its
content. Update the AccordionPanel component so the PanelHeader in
AccordionPanel/index.tsx gets a stable id and an aria-controls value that points
to the PanelContent, and give PanelContent the matching id; keep the existing
toggle behavior in sync with the open state so assistive tech can associate the
two.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/packages/common/src/hooks/useJobLogs/index.ts`:
- Around line 113-119: The settle burst in useJobLogs is re-triggering on every
remount when the job is already terminal, because the effect only tracks local
hook state. Update useJobLogs to persist whether the burst has already run for a
given job outside the hook instance (for example via a job-scoped cache or
shared state keyed by job identity), and gate the existing isTerminal/refetch
timeout scheduling so the LOG_SETTLE_DELAYS_MS burst only happens once per job.

---

Outside diff comments:
In
`@web/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationDetailRoute.tsx`:
- Around line 47-58: The terminal-status check in AgentEvaluationDetailRoute is
using a broader local set than the shared log polling logic, so alias statuses
like succeeded/success/failed can keep polling forever. Update the status
handling in AgentEvaluationDetailRoute (including isTerminal and the
AgentEvalJob.status cast) to use the same shared terminal set as useJobLogs, or
normalize aliases to the canonical PlatformJobStatus values before passing
status through. Make sure the route stops polling for all terminal agent-eval
states via the shared status helper instead of relying on a separate local list.

---

Nitpick comments:
In `@web/packages/common/src/components/AccordionPanel/index.tsx`:
- Around line 60-75: The AccordionPanel header is missing the accessibility
linkage to its content. Update the AccordionPanel component so the PanelHeader
in AccordionPanel/index.tsx gets a stable id and an aria-controls value that
points to the PanelContent, and give PanelContent the matching id; keep the
existing toggle behavior in sync with the open state so assistive tech can
associate the two.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3bd19712-cf69-430a-b43d-906d264412a3

📥 Commits

Reviewing files that changed from the base of the PR and between e18f1a4 and 136dca6.

📒 Files selected for processing (4)
  • web/packages/common/src/components/AccordionPanel/index.tsx
  • web/packages/common/src/hooks/useJobLogs/index.ts
  • web/packages/studio/src/components/evaluation/Jobs/StatusLogsContent.tsx
  • web/packages/studio/src/routes/agents/AgentEvaluationsRoute/AgentEvaluationDetailRoute.tsx

Comment thread web/packages/common/src/hooks/useJobLogs/index.ts Outdated
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 23324/30499 76.5% 61.3%
Integration Tests 13630/29179 46.7% 19.9%

Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
@nv-odrulea
nv-odrulea added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit 58d0041 Jul 9, 2026
55 checks passed
@nv-odrulea
nv-odrulea deleted the od/agent-eval-logs-ui branch July 9, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants