chore(studio): move AgentPanel components to AgentDetailRoute; remove dead panel UI - #1061
Conversation
595d8eb to
449c9b0
Compare
263a551 to
cb96e3b
Compare
a0e5b98 to
eda2644
Compare
cb96e3b to
f8f8673
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (20)
💤 Files with no reviewable changes (5)
🚧 Files skipped from review as they are similar to previous changes (15)
📝 WalkthroughWalkthroughThe agent detail UI moves from deleted side-panel components to route-local components. The route adds streamed deployment logs, evaluator-job data, and walkthrough coachmarks with session storage. ChangesAgent detail route migration
Sequence Diagram(s)sequenceDiagram
participant AgentDetailRoute
participant DeploymentLogsView
participant DeploymentLogsAPI
participant LogViewer
AgentDetailRoute->>DeploymentLogsView: render selected deployment
DeploymentLogsView->>DeploymentLogsAPI: fetch recent logs
DeploymentLogsAPI-->>DeploymentLogsView: return log entries
DeploymentLogsView->>DeploymentLogsAPI: open authenticated SSE stream
DeploymentLogsAPI-->>DeploymentLogsView: stream log events
DeploymentLogsView->>LogViewer: render composed logs
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
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/AgentDetailRoute/useAgentDetails.ts (1)
24-28: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winAdd an explicit result interface.
useAgentDetailsis an exported complex API. DeclareUseAgentDetailsResultand annotate the hook return type.As per coding guidelines, “use explicit return types for public APIs and complex functions.”
🤖 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/AgentDetailRoute/useAgentDetails.ts` around lines 24 - 28, Define an exported UseAgentDetailsResult interface describing the value returned by useAgentDetails, then annotate the hook’s return type with it. Update the useAgentDetails declaration while preserving its existing returned shape and behavior.Source: Coding guidelines
🤖 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/studio/src/routes/agents/AgentDetailRoute/DeploymentLogsView.tsx`:
- Around line 119-166: Reset streamedLines when tailOffset changes, in addition
to deploymentName, so stale-query results are not appended to existing streamed
entries. Update the relevant clearing useEffect before the stream-opening
effect; preserve the existing stream initialization and cleanup behavior.
- Around line 53-61: Update the deployment-selection effect to reconcile stale
controlled selections: when isControlled is true and selectedDeploymentName is
not present in sortedDeployments, call onSelectDeployment with the newest
available deployment (sortedDeployments[0]?.name). Preserve the existing
internalName synchronization for uncontrolled mode and avoid invoking the
callback when the controlled selection remains valid.
In `@web/packages/studio/src/routes/agents/AgentDetailRoute/useAgentDetails.ts`:
- Around line 66-71: Update the evaluator-job query around fetchEvaluatorJobs so
it requests only the current agent’s recent evaluations through a server-side
agent filter or bounded endpoint, rather than fetching every workspace page and
filtering locally. Preserve the RECENT_EVAL_LIMIT behavior for the rendered
results and use the existing agentName/workspace query context.
In `@web/packages/studio/src/routes/agents/AgentDetailRoute/walkthrough.ts`:
- Line 18: Update the walkthrough label returned by the selectedTab check in the
walkthrough logic from “Chat Playground” to “Chat”, while preserving the
existing chat-tab targeting behavior.
---
Outside diff comments:
In `@web/packages/studio/src/routes/agents/AgentDetailRoute/useAgentDetails.ts`:
- Around line 24-28: Define an exported UseAgentDetailsResult interface
describing the value returned by useAgentDetails, then annotate the hook’s
return type with it. Update the useAgentDetails declaration while preserving its
existing returned shape and behavior.
🪄 Autofix
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: 8551dac2-5498-447b-9b87-68caca422a1a
📒 Files selected for processing (20)
web/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/AgentDetailsContent.tsxweb/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/index.test.tsxweb/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/index.tsxweb/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/types.tsweb/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/walkthrough.test.tsweb/packages/studio/src/routes/agents/AgentDetailRoute/ChatPlaygroundContent.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/Coachmark.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/DeploymentLogsView.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/DeploymentsTab.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/EvaluationsTab.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/NoHealthyDeploymentsBanner.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/WalkthroughCoachmarks.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/constants.tsweb/packages/studio/src/routes/agents/AgentDetailRoute/helpers.tsweb/packages/studio/src/routes/agents/AgentDetailRoute/index.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/useAgentDetails.tsweb/packages/studio/src/routes/agents/AgentDetailRoute/walkthrough.tsweb/packages/studio/src/routes/agents/AgentDetailRoute/walkthroughStorage.test.tsweb/packages/studio/src/routes/agents/AgentDetailRoute/walkthroughStorage.tsweb/packages/studio/src/routes/agents/AgentsListRoute/CreateExampleAgentModal/index.tsx
💤 Files with no reviewable changes (5)
- web/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/walkthrough.test.ts
- web/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/types.ts
- web/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/AgentDetailsContent.tsx
- web/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/index.test.tsx
- web/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/index.tsx
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 4
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/AgentDetailRoute/useAgentDetails.ts (1)
24-28: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winAdd an explicit result interface.
useAgentDetailsis an exported complex API. DeclareUseAgentDetailsResultand annotate the hook return type.As per coding guidelines, “use explicit return types for public APIs and complex functions.”
🤖 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/AgentDetailRoute/useAgentDetails.ts` around lines 24 - 28, Define an exported UseAgentDetailsResult interface describing the value returned by useAgentDetails, then annotate the hook’s return type with it. Update the useAgentDetails declaration while preserving its existing returned shape and behavior.Source: Coding guidelines
🤖 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/studio/src/routes/agents/AgentDetailRoute/DeploymentLogsView.tsx`:
- Around line 119-166: Reset streamedLines when tailOffset changes, in addition
to deploymentName, so stale-query results are not appended to existing streamed
entries. Update the relevant clearing useEffect before the stream-opening
effect; preserve the existing stream initialization and cleanup behavior.
- Around line 53-61: Update the deployment-selection effect to reconcile stale
controlled selections: when isControlled is true and selectedDeploymentName is
not present in sortedDeployments, call onSelectDeployment with the newest
available deployment (sortedDeployments[0]?.name). Preserve the existing
internalName synchronization for uncontrolled mode and avoid invoking the
callback when the controlled selection remains valid.
In `@web/packages/studio/src/routes/agents/AgentDetailRoute/useAgentDetails.ts`:
- Around line 66-71: Update the evaluator-job query around fetchEvaluatorJobs so
it requests only the current agent’s recent evaluations through a server-side
agent filter or bounded endpoint, rather than fetching every workspace page and
filtering locally. Preserve the RECENT_EVAL_LIMIT behavior for the rendered
results and use the existing agentName/workspace query context.
In `@web/packages/studio/src/routes/agents/AgentDetailRoute/walkthrough.ts`:
- Line 18: Update the walkthrough label returned by the selectedTab check in the
walkthrough logic from “Chat Playground” to “Chat”, while preserving the
existing chat-tab targeting behavior.
---
Outside diff comments:
In `@web/packages/studio/src/routes/agents/AgentDetailRoute/useAgentDetails.ts`:
- Around line 24-28: Define an exported UseAgentDetailsResult interface
describing the value returned by useAgentDetails, then annotate the hook’s
return type with it. Update the useAgentDetails declaration while preserving its
existing returned shape and behavior.
🪄 Autofix
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: 8551dac2-5498-447b-9b87-68caca422a1a
📒 Files selected for processing (20)
web/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/AgentDetailsContent.tsxweb/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/index.test.tsxweb/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/index.tsxweb/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/types.tsweb/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/walkthrough.test.tsweb/packages/studio/src/routes/agents/AgentDetailRoute/ChatPlaygroundContent.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/Coachmark.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/DeploymentLogsView.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/DeploymentsTab.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/EvaluationsTab.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/NoHealthyDeploymentsBanner.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/WalkthroughCoachmarks.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/constants.tsweb/packages/studio/src/routes/agents/AgentDetailRoute/helpers.tsweb/packages/studio/src/routes/agents/AgentDetailRoute/index.tsxweb/packages/studio/src/routes/agents/AgentDetailRoute/useAgentDetails.tsweb/packages/studio/src/routes/agents/AgentDetailRoute/walkthrough.tsweb/packages/studio/src/routes/agents/AgentDetailRoute/walkthroughStorage.test.tsweb/packages/studio/src/routes/agents/AgentDetailRoute/walkthroughStorage.tsweb/packages/studio/src/routes/agents/AgentsListRoute/CreateExampleAgentModal/index.tsx
💤 Files with no reviewable changes (5)
- web/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/walkthrough.test.ts
- web/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/types.ts
- web/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/AgentDetailsContent.tsx
- web/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/index.test.tsx
- web/packages/studio/src/components/sidePanels/AgentPanels/AgentPanel/index.tsx
🛑 Comments failed to post (2)
web/packages/studio/src/routes/agents/AgentDetailRoute/DeploymentLogsView.tsx (2)
53-61: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Reconcile invalid controlled selections.
When the selected deployment is deleted,
selectedDeploymentNameremains controlled and stale. The view then requests logs for the deleted deployment until the user selects another item.If the controlled name is absent from
sortedDeployments, callonSelectDeploymentwith the newest available deployment.🤖 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/AgentDetailRoute/DeploymentLogsView.tsx` around lines 53 - 61, Update the deployment-selection effect to reconcile stale controlled selections: when isControlled is true and selectedDeploymentName is not present in sortedDeployments, call onSelectDeployment with the newest available deployment (sortedDeployments[0]?.name). Preserve the existing internalName synchronization for uncontrolled mode and avoid invoking the callback when the controlled selection remains valid.
119-166: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Clear streamed lines when the tail query advances.
A stale-query refetch can return entries already present in
streamedLines. Lines 165 then append those entries again, so the viewer and download contain duplicates.Reset
streamedLineswhentailOffsetchanges, before opening the replacement stream.🤖 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/AgentDetailRoute/DeploymentLogsView.tsx` around lines 119 - 166, Reset streamedLines when tailOffset changes, in addition to deploymentName, so stale-query results are not appended to existing streamed entries. Update the relevant clearing useEffect before the stream-opening effect; preserve the existing stream initialization and cleanup behavior.
|
… dead panel UI The AgentPanel side-panel UI was superseded by the tabbed AgentDetailRoute. This cleans up the leftovers: - Moves live components (ChatPlaygroundContent, DeploymentLogsView, Coachmark, WalkthroughCoachmarks, walkthrough, walkthroughStorage, helpers, NoHealthyDeploymentsBanner, constants) from sidePanels/AgentPanels/AgentPanel/ to routes/agents/AgentDetailRoute/ where they actually belong - Renames useAgentPanel -> useAgentDetails; wires walkthrough coachmarks into AgentDetailRoute (tab names updated: agent-details->deployments, chat-playground->chat) - Removes dead panel UI: AgentPanel index, AgentDetailsContent, types, test files - EvaluationsTab: shows eval kind in parens next to job name; moves date under status chip; adds "Eval Config:" prefix Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
walkthrough.ts was moved to AgentDetailRoute/ with updated tab names; delete the stale copy which imported the deleted types.ts. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
…location WalkthroughCoachmarks was moved to AgentDetailRoute/; delete the copy that remained at sidePanels/AgentPanels/AgentPanel/. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
The move commit copied nine files to routes/agents/AgentDetailRoute/ without removing the originals, leaving both copies compiling. Deletes the stale components/sidePanels/AgentPanels/ tree and repoints CreateExampleAgentModal at the new walkthroughStorage location. Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
Signed-off-by: Octavian Drulea <odrulea@nvidia.com>
1a21276 to
75bd4c0
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Summary
The AgentPanel side-panel UI was superseded by the tabbed AgentDetailRoute. This cleans up the leftovers:
sidePanels/AgentPanels/AgentPanel/toroutes/agents/AgentDetailRoute/:ChatPlaygroundContent,DeploymentLogsView,Coachmark,WalkthroughCoachmarks,walkthrough,walkthroughStorage,helpers,NoHealthyDeploymentsBanner,constantsuseAgentPanel→useAgentDetails; wires walkthrough coachmarks intoAgentDetailRoutewith updated tab names (agent-details→deployments,chat-playground→chat)AgentPanelindex,AgentDetailsContent,types.ts, test filesSummary by CodeRabbit
New Features
Improvements