Skip to content

feat(frontend): redesign agent-playground tool + workflow-reference selection - #4994

Merged
ardaerzin merged 7 commits into
big-agentsfrom
fe-feat/agent-tool-picker-redesign-onbig
Jul 1, 2026
Merged

feat(frontend): redesign agent-playground tool + workflow-reference selection#4994
ardaerzin merged 7 commits into
big-agentsfrom
fe-feat/agent-tool-picker-redesign-onbig

Conversation

@ardaerzin

Copy link
Copy Markdown
Contributor

What

Redesigns agent-playground tool / workflow-reference selection (agent-playground scoped — never the legacy prompt playground). Split into three review-oriented commits, in dependency order.

1. Shared drawer primitives (refactor)

Moves the trigger-drawer building blocks up to drawers/shared so the agent drawers reuse them instead of duplicating:

  • DrawerFooter, MasterDetailRail, useDraftMasterDetail moved out of gatewayTrigger/.
  • New: SectionRail ([rail | content]), RailField, CatalogChooser + CatalogAppCard (2-col app grid), AddItemMenu, GatewayCatalogDrawer.
  • Trigger drawers refactored onto them (SourceChooserCatalogChooser; RunVersionFieldSectionRail), so every drawer rail looks the same.

2. Workflow-reference drawer detail (feat)

Rebuilds the "reference a workflow" detail into a ConfigAccordionSection stack (Exposed as / Schema / Configuration / Reference by):

  • New SchemaTree (read-only recursive schema viewer).
  • Bridge gains resolveOutputSchema, resolveConfigPayload, useWorkflowTypes; WorkflowConfigPart/Message + an evaluator reference type.
  • Inputs derive via the molecule's inputPorts (declared schema → prompt template variables) with local recovery for curly/jinja JSONPath inputs the shared extractor drops; output from response_format; Configuration from the full prompt (grouped Messages, model, tools, response_format).
  • Type badges classify via the molecule's workflowType on a hydrated revision (agents get a tag); evaluators labelled by their template kind.

3. Tool selection: definition form + catalog + add-menu (feat)

  • Tool definition form split into ParameterTree + ParameterNodeEditor over pure, unit-tested schemaPaths helpers. Per-parameter Allowed values (enum) + Default (scalar-only, type-coerced) and a tool-level additionalProperties toggle; JSON stays the lossless escape hatch.
  • AddItemMenu-based picker (Add existing / Create new): AgentToolSelectorPopover, AgentIntegrationDrawer (third-party via CatalogChooser), ReferenceToolFormView, ToolManagementList.

Notes

  • Dark-safe throughout (antd semantic --ag-color* tokens).
  • One pre-existing baseline tsc error remains in useModelHarness.tsx (predates this branch).
  • Known follow-up: curly/jinja {{$.inputs.x}} inputs are recovered locally here; the underlying shared extractor gap is a separate playground ticket.

ardaerzin added 3 commits July 1, 2026 13:18
…er drawers

Move the trigger-drawer building blocks up to drawers/shared so the agent
drawers can reuse them (no duplication):

- DrawerFooter, MasterDetailRail, useDraftMasterDetail moved out of
  gatewayTrigger/drawers/shared.
- New shared primitives: SectionRail ([rail | content]), RailField, CatalogChooser
  + CatalogAppCard (the 2-col app grid), AddItemMenu (grouped add popover),
  GatewayCatalogDrawer.
- TriggerSubscriptionDrawer's SourceChooser reduced to CatalogChooser; RunVersionField
  now renders through SectionRail so every drawer rail looks the same.
Rebuild the "reference a workflow" drawer's detail into a ConfigAccordionSection
stack (Exposed as / Schema / Configuration / Reference by), reusing SectionRail
and the trigger-drawer section shell.

- New SchemaTree: read-only recursive JSON-schema viewer (nesting + descriptions).
- Bridge (WorkflowReferenceBridge) gains resolveOutputSchema, resolveConfigPayload
  and useWorkflowTypes; WorkflowConfigPart/Message + an "evaluator" reference type.
- OSS provider: inputs resolve via the molecule's inputPorts (declared schema →
  prompt template variables), plus local recovery for curly/jinja JSONPath inputs
  the shared extractor drops; output from response_format; Configuration built from
  the full prompt (grouped Messages, model, tools, response_format).
- Workflow type badges classify via the molecule's workflowType on a hydrated
  revision (agents get a tag); evaluators are labelled by their template kind.
…menu

Redesign the agent-playground "+ Tool" selection (no built-in tools in agent
context):

- Tool definition form: split into ParameterTree + ParameterNodeEditor over pure,
  tested schemaPaths helpers. Per-parameter Allowed values (enum) + Default
  (scalar-only, type-coerced) and a tool-level additionalProperties toggle; JSON
  stays the lossless escape hatch.
- AddItemMenu-based tool picker (Add existing / Create new): AgentToolSelectorPopover,
  AgentIntegrationDrawer (third-party via CatalogChooser), ReferenceToolFormView,
  ToolManagementList, sectionGroups.
- Wire-up: AgentTemplateControl, ConfigItemDrawer, ToolSelectorPopover, useAgentTools,
  ItemRow, item descriptors/kinds, TriggerManagementSection.
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jul 1, 2026
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jul 1, 2026 2:38pm

Request Review

@dosubot dosubot Bot added enhancement New feature or request Frontend refactoring A code change that neither fixes a bug nor adds a feature labels Jul 1, 2026
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added a richer workflow and tool editor with split-panel navigation, searchable lists, schema trees, and per-field editing.
    • Workflow references now show clearer type badges, descriptions, and input/output/config details.
    • Agent tools and integrations now support a more guided add-and-configure flow, including connected-app selection and tool setup.
  • Bug Fixes

    • Improved handling of schema display when declared inputs or outputs are incomplete.
    • Better support for workflow references, including revision- and environment-based binding.

Walkthrough

This PR expands workflow-reference tooling, adds a schema-tree/parameter-editor flow for agent tools, and refactors trigger drawers onto shared catalog, rail, menu, and footer primitives.

Changes

Workflow Reference & Tool Editor Feature

Layer / File(s) Summary
Type contracts and bridges
web/packages/agenta-ui/src/drill-in/context/DrillInUIContext.tsx, context.ts, context/index.ts, index.ts, web/packages/agenta-entity-ui/src/DrillInView/index.ts
Adds workflow reference classification and workflow config payload types, plus bridge resolver and re-export updates across drill-in packages.
Workflow schema and config resolution
web/oss/src/components/DrillInView/OSSdrillInUIProvider.tsx
Hydrates workflow revisions to derive reference types, merged input schemas, fallback output schemas, config parts, and workflow port schemas in the OSS drill-in provider.
Schema path utilities and tests
.../agentTemplate/schemaPaths.ts, tests/unit/schemaPaths.test.ts
Adds immutable schema path helpers for nested property editing, plus unit coverage for path traversal and mutations.
SchemaTree viewer
.../SchemaControls/SchemaTree.tsx
Adds a recursive read-only schema tree component with property types, required markers, descriptions, and nested object or array rendering.
Reference tool binding UI
.../SchemaControls/ReferenceToolFormView.tsx, WorkflowReferenceSelector.tsx
Adds a reference tool form with editable binding mode selection, read-only schema display, and workflow/environment binding rendering.
Master/detail parameter editor
.../SchemaControls/ToolFormView.tsx, agentTemplate/ParameterTree.tsx, ParameterNodeEditor.tsx, itemKinds.tsx, itemDescriptors.tsx, useAgentTools.ts, ToolSelectorPopover.tsx, ConfigItemDrawer.tsx
Replaces JSON schema editing for function tools with a parameter tree and node editor, and updates tool kinds, selection metadata, and drawer layout to match the new flow.
Agent integration drawer and tool picker
agentTemplate/AgentIntegrationDrawer.tsx, AgentToolSelectorPopover.tsx, ToolManagementList.tsx, ItemRow.tsx, sectionGroups.tsx, AddItemMenu.tsx, CatalogAppCard.tsx, DrawerFooter.tsx, RailField.tsx, SectionRail.tsx, MasterDetailRail.tsx, useDraftMasterDetail.ts
Adds gateway tool catalog selection, async action schema loading, grouped tool popover/menu UI, and agent tool list rendering with connection groups.
AgentTemplateControl wiring
AgentTemplateControl.tsx
Wires the agent template control to the new tool picker, integration drawer, and flushable config drawer layout.

Trigger Management and Shared Catalog/Drawer Refactor

Layer / File(s) Summary
Shared drawer primitives
drawers/shared/AddItemMenu.tsx, CatalogAppCard.tsx, DrawerFooter.tsx, MasterDetailRail.tsx, RailField.tsx, SectionRail.tsx, useDraftMasterDetail.ts
Adds grouped menu, catalog card, footer, rail, and section components, plus the master-detail rail rename and draft prefix import update.
Generic catalog chooser & gateway drawer
drawers/shared/CatalogChooser.tsx, GatewayCatalogDrawer.tsx
Adds generic adapter-driven catalog chooser and gateway catalog drawer components for browsing integrations, connections, and items with connect flows.
TriggerManagementSection grouped UI
SchemaControls/TriggerManagementSection.tsx
Replaces provider headers and dropdown add-menu markup with shared section headers, collapsible provider groups, and grouped add-item menus.
TriggerCatalogDrawer refactor
gatewayTrigger/drawers/TriggerCatalogDrawer.tsx
Replaces the bespoke trigger catalog drawer with a thin wrapper around the shared gateway catalog drawer.
TriggerSubscriptionDrawer refactor
gatewayTrigger/drawers/TriggerSubscriptionDrawer.tsx
Migrates the subscription drawer to the shared master-detail rail, footer, catalog chooser, and shared app logo components.
TriggerScheduleDrawer and RunVersionField
gatewayTrigger/drawers/TriggerScheduleDrawer.tsx, shared/RunVersionField.tsx
Updates the schedule drawer and version field to use the shared master-detail rail, footer, and section rail components.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant WorkflowReferenceSelector
  participant OSSdrillInUIProvider
  participant WorkflowMolecule

  WorkflowReferenceSelector->>OSSdrillInUIProvider: useWorkflowReferenceTypes(slugs)
  OSSdrillInUIProvider->>WorkflowMolecule: hydrate revision, read workflowType
  OSSdrillInUIProvider-->>WorkflowReferenceSelector: typeBySlug, labelBySlug
  WorkflowReferenceSelector->>OSSdrillInUIProvider: resolveInputSchema(workflow)
  OSSdrillInUIProvider->>WorkflowMolecule: derive ports schema if no declared schema
  OSSdrillInUIProvider-->>WorkflowReferenceSelector: merged input schema
Loading
sequenceDiagram
  participant User
  participant GatewayCatalogDrawer
  participant IntegrationsView
  participant ItemsView
  participant CatalogAdapter

  User->>GatewayCatalogDrawer: open drawer
  GatewayCatalogDrawer->>IntegrationsView: render integrations and connections
  User->>IntegrationsView: select integration
  IntegrationsView->>ItemsView: show items for integration
  ItemsView->>CatalogAdapter: useItems(integration)
  User->>ItemsView: pick item
  ItemsView->>CatalogAdapter: config.onPickItem(connection, item, integration)
Loading

Possibly related PRs

  • Agenta-AI/agenta#4877: Continues the workflow-as-tool type: "reference" flow through the drill-in provider and reference selector.
  • Agenta-AI/agenta#4883: Also reworks TriggerManagementSection.tsx and the trigger add/menu flow.
  • Agenta-AI/agenta#4923: Overlaps with the agent-template tool editor refactor around ToolFormView.tsx and related wiring.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 54.76% which is insufficient. The required threshold is 60.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 matches the main change: redesigning agent-playground tool and workflow-reference selection.
Description check ✅ Passed The description is directly related to the PR and accurately outlines the shared drawer, workflow-reference, and tool-selection redesign.
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 fe-feat/agent-tool-picker-redesign-onbig

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


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.

@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 13

Caution

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

⚠️ Outside diff range comments (2)
web/packages/agenta-ui/src/drill-in/index.ts (1)

77-89: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Re-export WorkflowConfigMessage from the public barrel.

WorkflowConfigPart.messages now exposes a nested message type, but this entrypoint still only exports the wrapper types. That leaves @agenta/ui/drill-in — and the @agenta/entity-ui mirror that re-exports it — with an incomplete workflow-config contract.

Suggested fix
 export type {
     DrillInUIComponents,
     DrillInUIProviderProps,
     GatewayToolsBridge,
     WorkflowReferenceBridge,
     WorkflowReferenceUI,
     WorkflowReferenceType,
     WorkflowRevisionUI,
     WorkflowEnvironmentUI,
     WorkflowReferencePayload,
+    WorkflowConfigMessage,
     WorkflowConfigPart,
     WorkflowConfigPayload,
 } from "./context"
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useAgentTools.ts (1)

42-68: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Append from configRef.current, not the captured tools array.

This callback is now reached from the async gateway-action flow, but Line 66 still appends with the render-time tools snapshot. If the user adds/removes anything while the schema fetch is in flight, this write can clobber those newer edits.

Suggested fix
     const handleAddTool = useCallback(
         (tool: ToolObj, meta?: ToolSelectionMeta) => {
             // `needsConfig` is a transient routing flag — never persist it in the tool metadata.
             const {needsConfig, ...toolMeta} = meta ?? ({} as ToolSelectionMeta)
             const hasMeta = Object.keys(toolMeta).length > 0
@@
             if (toolMeta.source === "custom" || needsConfig) {
                 openCreate("tool", next as Record<string, unknown>, "form")
                 return
             }
-            setTools([...tools, next])
+            const latest = configRef.current
+            const latestTools = Array.isArray(latest.tools) ? (latest.tools as unknown[]) : []
+            onChange({...latest, tools: [...latestTools, next]})
         },
-        [tools, setTools, openCreate],
+        [configRef, onChange, openCreate],
     )
🧹 Nitpick comments (6)
web/packages/agenta-entity-ui/src/drawers/shared/GatewayCatalogDrawer.tsx (1)

207-213: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Debounce server-backed catalog searches.

These setters drive paginated catalog queries; firing them on every keystroke can over-fetch compared with the debounced CatalogChooser path. As per coding guidelines, optimize React performance by “debouncing or throttling heavy handlers.”

Also applies to: 404-410

Source: Coding guidelines

web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ItemRow.tsx (1)

94-99: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Trim this docblock to the repo’s one-line comment style.

This reads like PR context rather than in-code guidance. Please collapse it to a short one-liner or move the extra rationale to the PR description. As per coding guidelines, "Keep in-code comments to one short line maximum unless a genuinely surprising constraint requires a brief exception."

Source: Coding guidelines

web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ToolManagementList.tsx (1)

1-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Trim the new long-form comments to the repo’s one-line style.

These blocks are much more verbose than the repo convention allows. Please shorten them or move the extra rationale into the PR description. As per coding guidelines, "Keep in-code comments to one short line maximum unless a genuinely surprising constraint requires a brief exception."

Also applies to: 56-62, 103-106, 214-215

Source: Coding guidelines

web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/sectionGroups.tsx (2)

1-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Trim these docblocks to the repo’s one-line comment style.

They are much more detailed than the local convention for in-code comments. Please keep only the surprising bit inline and move the rest to the PR description. As per coding guidelines, "Keep in-code comments to one short line maximum unless a genuinely surprising constraint requires a brief exception."

Also applies to: 48-51

Source: Coding guidelines


58-71: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Require addLabel whenever onAdd is provided.

This shared component can currently render an icon-only add button with an undefined tooltip and aria-label. Tightening the prop type here will prevent future unlabeled usages outside the current callers.

Also applies to: 103-114

web/packages/agenta-entity-ui/src/drawers/shared/AddItemMenu.tsx (1)

83-86: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Narrow trigger to a single element.

Dropdown is rendered around trigger, but this prop is typed as ReactNode, which also allows strings, fragments, and arrays. Tightening it to a single ReactElement will prevent shared-component misuse from turning into a runtime failure later.

Proposed fix
-import {memo, useCallback, useState, type ReactNode} from "react"
+import {memo, useCallback, useState, type ReactElement, type ReactNode} from "react"
...
-    trigger?: ReactNode
+    trigger?: ReactElement

Also applies to: 131-139


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ceab18b-24ad-48a1-a53f-6a1c17584252

📥 Commits

Reviewing files that changed from the base of the PR and between caa4072 and cc3748d.

📒 Files selected for processing (39)
  • web/oss/src/components/DrillInView/OSSdrillInUIProvider.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/AgentTemplateControl.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ConfigItemDrawer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ReferenceToolFormView.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/SchemaTree.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ToolFormView.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ToolSelectorPopover.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/TriggerManagementSection.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/WorkflowReferenceSelector.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/AgentIntegrationDrawer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/AgentToolSelectorPopover.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ItemRow.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ParameterNodeEditor.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ParameterTree.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ToolManagementList.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/itemDescriptors.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/itemKinds.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/schemaPaths.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useAgentTools.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/sectionGroups.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/index.ts
  • web/packages/agenta-entity-ui/src/drawers/shared/AddItemMenu.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/CatalogAppCard.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/CatalogChooser.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/DrawerFooter.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/GatewayCatalogDrawer.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/MasterDetailRail.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/RailField.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/SectionRail.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/useDraftMasterDetail.ts
  • web/packages/agenta-entity-ui/src/gatewayTrigger/drawers/TriggerCatalogDrawer.tsx
  • web/packages/agenta-entity-ui/src/gatewayTrigger/drawers/TriggerScheduleDrawer.tsx
  • web/packages/agenta-entity-ui/src/gatewayTrigger/drawers/TriggerSubscriptionDrawer.tsx
  • web/packages/agenta-entity-ui/src/gatewayTrigger/drawers/shared/RunVersionField.tsx
  • web/packages/agenta-entity-ui/tests/unit/schemaPaths.test.ts
  • web/packages/agenta-ui/src/drill-in/context.ts
  • web/packages/agenta-ui/src/drill-in/context/DrillInUIContext.tsx
  • web/packages/agenta-ui/src/drill-in/context/index.ts
  • web/packages/agenta-ui/src/drill-in/index.ts

Comment thread web/oss/src/components/DrillInView/OSSdrillInUIProvider.tsx
Comment thread web/oss/src/components/DrillInView/OSSdrillInUIProvider.tsx Outdated
Comment thread web/packages/agenta-entity-ui/src/drawers/shared/AddItemMenu.tsx
Comment thread web/packages/agenta-entity-ui/src/drawers/shared/CatalogChooser.tsx
- ReferenceToolFormView: group exposed-name/description under a Details section, make the description editable, and make Reference-by a collapsible section with a binding summary
- WorkflowReferenceSelector: add an editable Description to the create flow, threaded through WorkflowReferencePayload
- RailField: cap content at max-w-prose so section-panel inputs keep a readable width
- Agent workflow references now render a structured Configuration rail: recognize
  agent-shaped configs (`instructions: {agents_md}`, flat `tools`/`skills`, `llm`),
  not just string instructions, so they no longer collapse to the raw JSON blob.
- Fold recovered `{{$.inputs.*}}` JSONPath keys into a non-empty declared input
  schema too (mixed templates no longer publish an incomplete schema).
- Tool param `integer` enum/default rejects fractional values instead of silently
  truncating; `buildObjectSchema` preserves a declared `additionalProperties`
  (boolean OR schema object) instead of normalizing to `false`.
- Drawer polish: tooltip on a disabled add-menu row (span wrapper), clear the shared
  catalog searches on unmount / external close, drop the double `p-4` in the JSON
  view, and don't persist tool-group expand state under a shared `null:*` key.
- Catalog item cards: block the pick when a connection is pending or missing
  (only the rail path guarded it before; the full items view called handlePick
  unconditionally and silently no-oped without a connection).
- Trigger connect: resolve the full catalog integration (with auth_schemes) by
  key before opening TriggerConnectDrawer, so connecting from a
  connection-derived (synthetic) integration no longer opens with empty auth modes.
- Workflow reference: persist the selected variant id on the payload/tool
  (`variant_id`), so "follow a variant's latest" (no pinned version) keeps a
  variant identity instead of collapsing to a bare-slug reference. Threaded
  through the selector, useAgentTools, and the editable ReferenceToolFormView.
@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useAgentTools.ts (2)

93-101: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider consolidating the duplicated refBy === "variant" checks.

payload.refBy === "variant" is checked twice back-to-back for variant_id and version. Could be combined into a single conditional block to reduce duplication.

♻️ Proposed consolidation
-                ...(payload.refBy === "variant" && payload.variant
-                    ? {variant_id: payload.variant}
-                    : {}),
-                ...(payload.refBy === "variant" && payload.version
-                    ? {version: payload.version}
-                    : {}),
+                ...(payload.refBy === "variant"
+                    ? {
+                          ...(payload.variant ? {variant_id: payload.variant} : {}),
+                          ...(payload.version ? {version: payload.version} : {}),
+                      }
+                    : {}),

31-32: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

A few comments span multiple lines.

Lines 31-32, 59-61, and 71-73 each use 2-3 line comments. Per guidelines, comments should be one short line unless a genuinely surprising constraint justifies an exception; the 59-61 and 71-73 blocks arguably qualify (explaining non-obvious routing/dedup behavior), but worth trimming where possible. As per coding guidelines, "Keep in-code comments to one short line maximum unless a genuinely surprising constraint requires a brief exception."

Also applies to: 59-61, 71-73

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f8e3b84f-92fc-408b-a53e-f927a48b07c1

📥 Commits

Reviewing files that changed from the base of the PR and between cc3748d and 1b5a669.

📒 Files selected for processing (15)
  • web/oss/src/components/DrillInView/OSSdrillInUIProvider.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ConfigItemDrawer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ReferenceToolFormView.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/WorkflowReferenceSelector.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ItemRow.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ParameterNodeEditor.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ToolManagementList.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/schemaPaths.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useAgentTools.ts
  • web/packages/agenta-entity-ui/src/drawers/shared/AddItemMenu.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/CatalogChooser.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/GatewayCatalogDrawer.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/RailField.tsx
  • web/packages/agenta-entity-ui/src/gatewayTrigger/drawers/TriggerCatalogDrawer.tsx
  • web/packages/agenta-ui/src/drill-in/context/DrillInUIContext.tsx
🚧 Files skipped from review as they are similar to previous changes (14)
  • web/packages/agenta-entity-ui/src/drawers/shared/RailField.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/AddItemMenu.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ConfigItemDrawer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ToolManagementList.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ItemRow.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/GatewayCatalogDrawer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ReferenceToolFormView.tsx
  • web/packages/agenta-entity-ui/src/gatewayTrigger/drawers/TriggerCatalogDrawer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/WorkflowReferenceSelector.tsx
  • web/packages/agenta-ui/src/drill-in/context/DrillInUIContext.tsx
  • web/packages/agenta-entity-ui/src/drawers/shared/CatalogChooser.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ParameterNodeEditor.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/schemaPaths.ts
  • web/oss/src/components/DrillInView/OSSdrillInUIProvider.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Frontend refactoring A code change that neither fixes a bug nor adds a feature size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant