Skip to content

feat(frontend): agent commit modal redesign + config-panel change indicators#5035

Merged
ardaerzin merged 5 commits into
big-agentsfrom
fe-feat/agent-commit-modal-redesign
Jul 2, 2026
Merged

feat(frontend): agent commit modal redesign + config-panel change indicators#5035
ardaerzin merged 5 commits into
big-agentsfrom
fe-feat/agent-commit-modal-redesign

Conversation

@ardaerzin

Copy link
Copy Markdown
Contributor

What

Two related frontend features for the agent playground, both driven by a new semantic commit-diff classifier.

Commit modal redesign (agent workflows)

The commit modal for agent-type workflows is reworked for non-technical users while keeping full JSON access:

  • Two-pane, summary-first layout — a plain-language "What's changing" summary on the left, controls on the right.
  • Save-mode rail (SectionRail) to pick New version vs New variant; the variant name/slug form renders inside the rail's content.
  • Editable auto-generated commit message derived from the detected changes.
  • Multi-environment deploy fan-out from the footer (checkbox multi-select + deploy message), replacing the single-env dropdown.
  • Semantic change summary grouped into the agent template's control sections (Model & harness, Instructions, Tools, MCP servers, Skills, Advanced), with per-section drill-in and a "View as JSON" escape hatch.

Non-agent (testset / evaluator / create) modals are gated out and unchanged.

Config-panel change indicators

The agent template panel now flags what's changed or incomplete:

  • Section headers — soft icon tint + status dot + explanatory tooltip (draft / invalid / incomplete).
  • Line items (tool / MCP / skill / instruction rows) — border tint + status tag.
  • Draft state reuses the classifier against the committed server config (serverConfiguration); validity reuses each item kind's draftInvalid guard.
  • Adds the missing colorInfo / *Border semantic theme tokens (the theme previously neutralized colorInfo to grey).

Key implementation notes

  • New classifier: @agenta/entities/workflow/commitDiff — pure, dependency-light; buckets a config diff to mirror the panel's control sections. Note the "Advanced" grouping is artificial: it pulls auth/connection out of llm (everything except llm.model), plus runner / sandbox / harness (non-kind).
  • Shared components extended via props (not rebuilt): ConfigAccordionSection (indicator), ItemRow (status), CommitMessageInput (fill).

Testing

  • 24 unit tests for the classifier (agent-commit-diff.test.ts) covering all schema shapes and change categories.
  • tsc --noEmit clean across @agenta/ui, @agenta/entities, @agenta/entity-ui; eslint + prettier clean (pre-commit + pre-push turbo-lint passed).

…icators

Commit modal (agent workflows): summary-first two-pane layout with a save-mode rail (new version / new variant), a plain-language change summary that drills into per-section detail, an editable auto-generated message, and multi-environment deploy fan-out. Backed by a new semantic commit-diff classifier (@agenta/entities/workflow/commitDiff) that groups a config diff into the agent template's control sections (Model & harness, Instructions, Tools, MCP servers, Skills, Advanced). Non-agent testset/evaluator/create modals are unchanged.

Config panel: flag sections and line items that have unsaved edits or invalid/missing fields. Section headers get a soft icon tint + status dot + explanatory tooltip; tool/MCP/skill/instruction rows get a border tint + tag. Draft state reuses the classifier against the committed server config; validity reuses each item kind's draftInvalid guard. Adds the missing colorInfo / *Border theme tokens.
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jul 2, 2026
@vercel

vercel Bot commented Jul 2, 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 2, 2026 2:16pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a868063-9f8b-4f5c-a09b-e919ca8f4412

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds commit-diff normalization and classification utilities, wires semantic change sections into commit context and commit modals, introduces split commit-and-deploy behavior, updates Playground variant deployment to publish per environment, and adds draft/validation indicators to agent template controls.

Changes

Commit-diff workflow and UI

Layer / File(s) Summary
commitDiff normalization and types
web/packages/agenta-entities/src/workflow/commitDiff/*
Defines normalized agent-config, change-section, item identity, gateway name, and commit-summary helpers for commit-diff handling.
Change classification and package surface
web/packages/agenta-entities/src/workflow/commitDiff/classify.ts, index.ts, package.json, tests/unit/agent-commit-diff.test.ts, vitest.config.ts
Builds sectioned agent change classification, exposes the workflow export surface, and adds unit coverage plus test alias wiring.
Commit context and diff utilities
web/packages/agenta-entity-ui/src/adapters/variantAdapters.ts, modals/types.ts, modals/index.ts, src/index.ts, web/packages/agenta-ui/src/Editor/*, web/packages/agenta-ui/package.json, web/packages/agenta-ui/src/components/presentational/*
Carries semantic diff sections and deploy fields through commit context, exports diff utilities and section indicator helpers, and adds the shared commit-message fill control.
Agent change summary UI
web/packages/agenta-entity-ui/src/modals/commit/components/changes/AgentChangesSummary.tsx
Renders section-grouped commit diffs with summary, instructions, tool, and JSON views.
Commit modal deploy flow and agent layout
web/packages/agenta-entity-ui/src/modals/commit/components/EntityCommitContent.tsx, EntityCommitFooter.tsx, EntityCommitModal.tsx
Adds semantic diff display, agent two-pane layout, commit-message suggestion, and split commit-and-deploy submission handling.
Playground variant deployRevision flow
web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/index.tsx
Replaces local deploy UI state with derived deploy options and per-environment publish fan-out after commit.
Agent template draft and validation indicators
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/AgentTemplateControl.tsx, ConfigItemList.tsx, ItemRow.tsx, ToolManagementList.tsx, web/packages/agenta-ui/src/components/presentational/section/ConfigAccordionSection.tsx, web/packages/agenta-ui/src/components/presentational/index.ts, web/packages/agenta-ui/src/components/presentational/section/index.tsx, web/packages/agenta-entity-ui/src/drawers/shared/SectionRail.tsx, web/oss/src/styles/theme-variables.css
Computes live-vs-committed draft status and propagates section/item indicators through shared template controls, with supporting rail and theme styling updates.

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

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant EntityCommitFooter
  participant EntityCommitModal
  participant onSubmit

  User->>EntityCommitFooter: Click "Commit & deploy"
  EntityCommitFooter->>EntityCommitFooter: Select environments/message
  EntityCommitFooter->>EntityCommitModal: onConfirm(deployEnvironments, deployMessage)
  EntityCommitModal->>onSubmit: submit payload with deployEnvironments/deployMessage
  onSubmit-->>EntityCommitModal: success/error
Loading
sequenceDiagram
  participant CommitVariantChangesModal
  participant deployRevision
  participant publish

  CommitVariantChangesModal->>deployRevision: revisionId, environments, message
  loop each environment
    deployRevision->>publish: publish(revisionRef, environment)
    publish-->>deployRevision: success/failure
  end
  deployRevision-->>CommitVariantChangesModal: aggregated success/error message
Loading

Possibly related PRs

  • Agenta-AI/agenta#4923: Both PRs modify the agent-template drill-in UI to propagate per-item draft/validation indicators through AgentTemplateControl, ConfigItemList, and ItemRow.
  • Agenta-AI/agenta#4994: Both PRs touch SectionRail, which is part of the agent commit two-pane layout used in this change.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main frontend changes: the agent commit modal redesign and config-panel change indicators.
Description check ✅ Passed The description accurately describes the implemented agent commit modal, semantic diff classifier, and config-panel indicator changes.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fe-feat/agent-commit-modal-redesign

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.

@dosubot dosubot Bot added Feature Request New feature or request Frontend javascript Pull requests that update javascript code typescript labels Jul 2, 2026
@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@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: 2

🧹 Nitpick comments (4)
web/packages/agenta-entity-ui/src/adapters/variantAdapters.ts (1)

78-97: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

Fallback classification against the raw wrapper object may rarely misfire.

When parameters-based classification returns [] but hasDiff is true (e.g. a non-parameters field changed), the fallback calls classifyAgentChanges(localSide, remoteSide) on the whole wrapper object (which itself contains a parameters key alongside other top-level fields like id/name). readAgentConfig won't recognize this shape as any of the three supported schemas, so this fallback likely still yields [] in most cases — functionally harmless (falls through to the coarse "Configuration modified" summary) but slightly redundant computation on every commit-context recompute.

web/packages/agenta-entity-ui/src/modals/commit/components/EntityCommitContent.tsx (1)

358-366: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Inline style for a static height value — use a Tailwind arbitrary-value class instead.

style={isAgentTwoPane ? {height: "min(450px, 72vh)"} : undefined} is a plain layout div, not an Ant Design internals override, and the value doesn't vary per render beyond the boolean toggle. As per coding guidelines, "Prefer Tailwind utility classes over CSS-in-JS, inline style={{...}}, ... use CSS-in-JS only for complex Ant Design overrides, JS-calculated dynamic theme styles, or legacy components."

-            style={isAgentTwoPane ? {height: "min(450px, 72vh)"} : undefined}
+            className={cn(..., isAgentTwoPane && "h-[min(450px,72vh)]")}

Source: Coding guidelines

web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/index.tsx (1)

95-104: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Sequential per-environment deploy — parallelize with Promise.allSettled.

Deploying to N environments one at a time adds N× latency versus a concurrent fan-out. Promise.allSettled would also remove the manual try/catch bookkeeping.

-            const succeeded: string[] = []
-            const failed: string[] = []
-            for (const environmentSlug of deployEnvironments) {
-                try {
-                    await publish({...refs, environmentSlug})
-                    succeeded.push(environmentSlug)
-                } catch {
-                    failed.push(environmentSlug)
-                }
-            }
+            const results = await Promise.allSettled(
+                deployEnvironments.map((environmentSlug) =>
+                    publish({...refs, environmentSlug}).then(() => environmentSlug),
+                ),
+            )
+            const succeeded = results
+                .filter((r): r is PromiseFulfilledResult<string> => r.status === "fulfilled")
+                .map((r) => r.value)
+            const failed = deployEnvironments.filter((e) => !succeeded.includes(e))
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/AgentTemplateControl.tsx (1)

386-392: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate indicatorColor logic.

This tone→color mapping duplicates the identical ternary already defined inside ConfigAccordionSection (web/packages/agenta-ui/src/components/presentational/section/ConfigAccordionSection.tsx, lines 125-131). Consider exporting one shared helper (e.g. from ConfigAccordionSection.tsx or a small shared util) and importing it in both places to avoid drift if the tone→token mapping changes.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f420d56c-70b5-40ea-9b4c-d6c4e3d88d7f

📥 Commits

Reviewing files that changed from the base of the PR and between 27413cf and f07afe9.

📒 Files selected for processing (29)
  • web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/index.tsx
  • web/oss/src/styles/theme-variables.css
  • web/packages/agenta-entities/package.json
  • web/packages/agenta-entities/src/workflow/commitDiff/accessors.ts
  • web/packages/agenta-entities/src/workflow/commitDiff/classify.ts
  • web/packages/agenta-entities/src/workflow/commitDiff/gatewayName.ts
  • web/packages/agenta-entities/src/workflow/commitDiff/index.ts
  • web/packages/agenta-entities/src/workflow/commitDiff/summaryMessage.ts
  • web/packages/agenta-entities/src/workflow/commitDiff/types.ts
  • web/packages/agenta-entities/tests/unit/agent-commit-diff.test.ts
  • web/packages/agenta-entities/vitest.config.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/AgentTemplateControl.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ConfigItemList.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ItemRow.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ToolManagementList.tsx
  • web/packages/agenta-entity-ui/src/adapters/variantAdapters.ts
  • web/packages/agenta-entity-ui/src/drawers/shared/SectionRail.tsx
  • web/packages/agenta-entity-ui/src/index.ts
  • web/packages/agenta-entity-ui/src/modals/commit/components/EntityCommitContent.tsx
  • web/packages/agenta-entity-ui/src/modals/commit/components/EntityCommitFooter.tsx
  • web/packages/agenta-entity-ui/src/modals/commit/components/EntityCommitModal.tsx
  • web/packages/agenta-entity-ui/src/modals/commit/components/changes/AgentChangesSummary.tsx
  • web/packages/agenta-entity-ui/src/modals/index.ts
  • web/packages/agenta-entity-ui/src/modals/types.ts
  • web/packages/agenta-ui/package.json
  • web/packages/agenta-ui/src/Editor/index.ts
  • web/packages/agenta-ui/src/Editor/utils/diffUtils.ts
  • web/packages/agenta-ui/src/components/presentational/inputs/CommitMessageInput.tsx
  • web/packages/agenta-ui/src/components/presentational/section/ConfigAccordionSection.tsx

Comment thread web/packages/agenta-entities/src/workflow/commitDiff/classify.ts
…edback

Root cause: per-item draft detection matched live vs committed items by a name-only identity that returned an empty string for builtin/reference tools and 'item' for unnamed mcps/skills, so distinct items collapsed onto one Map key and got wrong new/edited/unchanged indicators (and off-by-one summary counts). Add a canonical, collision-free agentItemIdentity (reference slug / function name / platform op / name / embed slug, with a positional fallback) in @agenta/entities/workflow/commitDiff, shared by both the classifier's mcp/skill diff and the config panel's per-row status.

Also: extract a shared sectionIndicatorColor (single source for the tone->token mapping, was duplicated in ConfigAccordionSection and AgentTemplateControl); drop the dead classify fallback on the wrapper object in variantAdapters; move the static two-pane height from an inline style to a Tailwind class; and fan out per-environment deploy with Promise.allSettled instead of a sequential loop.
@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 2, 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.

QA repro: adding then removing a tool/skill/MCP before committing leaves e.g. `skills: []` where the committed baseline had no `skills` key. The raw comparisons (workflow isDirty and the commit modal's hasDiff) saw `[] != absent`, so (1) the unsaved-changes badge never cleared and (2) the semantic classifier normalized both sides to empty, returned no sections, and the modal fell back to the old generic JSON-diff layout instead of the new two-pane one.

Root cause: the raw diffs were more sensitive than the semantic classifier (which already treats empty as absent). Add a shared stripEmptyCollectionsDeep that drops present-but-empty arrays/objects, applied symmetrically to both sides of isDirty (normalizeForComparison) and the commit-context buildSide. Symmetric application only removes false-positive dirtiness — a non-empty side is never stripped, so real changes still register. Array elements/order are untouched (only object keys are dropped).
@ardaerzin ardaerzin merged commit f0e8b58 into big-agents Jul 2, 2026
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Request New feature or request Frontend javascript Pull requests that update javascript code size:XXL This PR changes 1000+ lines, ignoring generated files. typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants