Skip to content

[feat] Present agent revisions as a single history and hide deployment for agents - #5273

Closed
ashrafchowdury wants to merge 10 commits into
release/v0.112.2from
reframe-variant-as-history-and-hide-deoloyment
Closed

ashrafchowdury wants to merge 10 commits into
release/v0.112.2from
reframe-variant-as-history-and-hide-deoloyment

Conversation

@ashrafchowdury

@ashrafchowdury ashrafchowdury commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Context

Agents use one linear revision history, but the playground exposed the branching variant and deployment UI used by prompt applications. This let users create variants, view environment badges, and access deployment actions that do not belong in the agent workflow.

Changes

Agent playgrounds now present revisions through a compact History picker. The picker removes the variant grouping, search field, deployment badges, and unused tree indentation while keeping the standard branching selector unchanged for other workflow types.

Before:

  • Revisions appeared under a persisted variant.
  • The commit modal allowed saving as a new variant.
  • Deployment actions appeared in the header and commit flow.
  • Registry appeared in the agent navigation.

After:

  • Revisions appear as one flat v1, v2, v3 timeline.
  • Agent commits always append a new version, including when a stale branching mode is supplied.
  • Agent commit and header actions no longer expose deployment.
  • Registry remains available for prompt applications but is hidden for agents.

The shared selector defaults to branching behavior, so prompt applications and evaluators keep their existing revision and deployment flows.

What to QA

  • Open an agent playground with multiple revisions. The header shows History, and the dropdown displays a compact flat revision list without variant names, search, environment badges, or excessive side spacing.
  • Edit an agent and commit the change. The modal identifies the agent, offers only a new version, and does not show deployment options.
  • Confirm the agent configuration header has no Deploy action and the agent navigation has no Registry entry.
  • Regression: open a prompt application playground. Variant grouping, search, deployment badges, deployment actions, and Registry navigation should behave as before.

Previews

Featuring the default variant as history
image

No deployment options as it has no use for now
image.png

No create as new variant option
image.png

Note: The word history was my creative choice for the product, we can change it

- reframe default variant as history, nothing else changed
- hide the deployment option for the agent
@dosubot dosubot Bot added enhancement New feature or request frontend labels Jul 13, 2026
@vercel

vercel Bot commented Jul 13, 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 Aug 19, 2026 12:25pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added linear version history mode for agent revisions, with clearer History labeling and streamlined selection.
    • Revision entries now show version details, current/latest indicators, timestamps, and commit messages with overflow tooltips.
    • Tree selectors can display a single parent’s children directly for easier navigation.
  • Bug Fixes

    • Agent commits now consistently use version-based commit behavior and avoid inappropriate deployment actions.
    • Improved selection and keyboard navigation when browsing flattened revision trees.

Walkthrough

The change adds linear revision history presentation for agent workflows. It updates revision selection, flattened tree rendering, revision metadata display, and agent-specific commit and deployment behavior.

Changes

Agent and linear revision workflows

Layer / File(s) Summary
Agent workflow state and commit controls
web/oss/src/state/workflow/hooks.ts, web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/index.tsx
useWorkflowsData() exposes isAgent. Agent commits use the workflow name, force version mode, restrict commit options, and skip deployment fan-out.
Flattened revision popup data
web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/TreeSelectPopupContent.tsx
The popup can hide a single root and render its children as selectable top-level rows. Loading, empty, keyboard, scrolling, and rendering logic use the displayed data.
Linear revision selector presentation
web/oss/src/components/Playground/Components/AgentRevisionSelector/index.tsx, web/oss/src/components/Playground/Components/Menus/SelectVariant/...
SelectVariant accepts linear versioning and presents History labels, current indicators, revision metadata, and overflow-aware commit messages. Linear mode hides badges, preserves child selection, and configures the flattened popup.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: 🟡 Moderate · up to f9583

The PR changes shared revision-picker behavior, but the current code reportedly has formatting/lint failures and can hide horizontal scrolling for some multi-parent configurations, potentially clipping revision labels. These bounded issues should be fixed or explicitly accepted before merge.

Sequence Diagram(s)

sequenceDiagram
  participant AgentRevisionSelector
  participant SelectVariant
  participant TreeSelectPopupContent
  participant RevisionChildTitle
  AgentRevisionSelector->>SelectVariant: configure linear versioning
  SelectVariant->>TreeSelectPopupContent: request flattened history rows
  TreeSelectPopupContent->>RevisionChildTitle: render revision metadata
Loading

Possibly related PRs

  • Agenta-AI/agenta#4881: Both changes modify SelectVariant and its versioning behavior.
  • Agenta-AI/agenta#5035: Both changes modify agent-specific commit and deployment handling.
  • Agenta-AI/agenta#5251: Both changes update the linear agent revision flow across the selector, commit modal, workflow hooks, and tree popup.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: linear agent revision history and hidden deployment actions.
Description check ✅ Passed The description directly explains the agent history, commit, deployment, Registry, regression, and QA changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 60.00%.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch reframe-variant-as-history-and-hide-deoloyment

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 the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 13, 2026
@ashrafchowdury

Copy link
Copy Markdown
Contributor Author

I think we can show the commit message in a tooltip, or somehow; it would be nice to have it

@ardaerzin

Copy link
Copy Markdown
Contributor

@ashrafchowdury we can make list items 2 line, and leave the bottom line for a more meaningful commit message. other than that 👍

@ashrafchowdury

Copy link
Copy Markdown
Contributor Author

fixed

image

@ashrafchowdury

Copy link
Copy Markdown
Contributor Author

@mmabrouk, if this chagnes make sense to you, let's ship this

It makes sense to me, not having variants and showing the base variant as linear type history

@mmabrouk
mmabrouk changed the base branch from big-agents to main July 18, 2026 15:54
@mmabrouk

Copy link
Copy Markdown
Member

@ashrafchowdury the idea make sense, but we need to think about it holistically, this fixes the playground while keeping the registry view the same. This is not consistent. We need a solution that is consistent.

@ashrafchowdury
ashrafchowdury marked this pull request as draft July 20, 2026 13:05
@ashrafchowdury

Copy link
Copy Markdown
Contributor Author

Makes sense. I will wait until we redesign the overview page, and I guess at this point we don't have any usage for the registry page for agents workflow so can hide that page

@github-actions

github-actions Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-08-21T11:52:36.213Z

@ashrafchowdury
ashrafchowdury changed the base branch from main to release/v0.106.1 July 28, 2026 16:10
@bekossy
bekossy changed the base branch from release/v0.106.1 to release/v0.112.2 August 18, 2026 16:50
@bekossy

bekossy commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR @ashrafchowdury Please resolve merge conflicts here

@bekossy

bekossy commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai please resolve merge conflict here

@coderabbitai

coderabbitai Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merge conflicts resolved successfully!

Resolved 3 conflict file(s). Commit: 71aa58d33d8b446b7cdbe18b3f1cc79d14a48751 pushed to reframe-variant-as-history-and-hide-deoloyment.

The resolved commit is ready for your repository's normal checks and review.

7 file operation(s)
  • web/oss/src/components/Playground/Components/AgentRevisionSelector/index.tsx (update)
  • web/oss/src/components/Playground/Components/Menus/SelectVariant/components/RevisionChildTitle.tsx (update)
  • web/oss/src/components/Playground/Components/Menus/SelectVariant/index.tsx (update)
  • web/oss/src/components/Playground/Components/Menus/SelectVariant/types.d.ts (update)
  • web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/index.tsx (update)
  • web/oss/src/state/workflow/hooks.ts (update)
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/TreeSelectPopupContent.tsx (update)
View agent analysis

Resolved conflicts in:
- web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/PlaygroundVariantConfigHeader.tsx (content)
- web/oss/src/components/Sidebar/hooks/useSidebarConfig/index.tsx (content)
- web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/TreeSelectPopupContent.tsx (content)

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@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 all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ ashrafchowdury
✅ bekossy
❌ coderabbitai[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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.

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

🧹 Nitpick comments (1)
web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/TreeSelectPopupContent.tsx (1)

388-425: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider extracting the leaf row into one shared component.

The flat branch (lines 392-423) and the child branch (lines 473-510) render the same row markup. Only the pl-6 indent differs. One LeafRow component with an indented prop would remove the duplication and keep the selection, focus, and disabled styling in sync.

Also applies to: 426-517


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: ec10c7be-c913-42f1-ac2d-50891b14a86a

📥 Commits

Reviewing files that changed from the base of the PR and between 0fc8300 and f958337.

📒 Files selected for processing (7)
  • web/oss/src/components/Playground/Components/AgentRevisionSelector/index.tsx
  • web/oss/src/components/Playground/Components/Menus/SelectVariant/components/RevisionChildTitle.tsx
  • web/oss/src/components/Playground/Components/Menus/SelectVariant/index.tsx
  • web/oss/src/components/Playground/Components/Menus/SelectVariant/types.d.ts
  • web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/index.tsx
  • web/oss/src/state/workflow/hooks.ts
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/TreeSelectPopupContent.tsx
🚧 Files skipped from review as they are similar to previous changes (6)
  • web/oss/src/components/Playground/Components/AgentRevisionSelector/index.tsx
  • web/oss/src/state/workflow/hooks.ts
  • web/oss/src/components/Playground/Components/Menus/SelectVariant/types.d.ts
  • web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/index.tsx
  • web/oss/src/components/Playground/Components/Menus/SelectVariant/components/RevisionChildTitle.tsx
  • web/oss/src/components/Playground/Components/Menus/SelectVariant/index.tsx

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Comment on lines +161 to +169
hit.scrollIntoView({block: "center", inline: "nearest"})
if (flattenSingleParent) el.scrollLeft = 0
return
}
if (++scrollRetryRef.current < 5) rafId = requestAnimationFrame(attempt)
}
rafId = requestAnimationFrame(attempt)
return () => cancelAnimationFrame(rafId)
}, [selectedValueProp, treeData])
}, [flattenSingleParent, selectedValueProp, treeData])

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Gate the overflow and scroll behavior on isFlatMode, not on the raw prop.

isFlatMode requires treeData.length === 1. Lines 162 and 379 use flattenSingleParent directly. If a consumer sets flattenSingleParent and more than one parent is returned, the component renders the hierarchical tree but still hides horizontal overflow and resets scrollLeft. Long child labels are then clipped with no way to scroll.

♻️ Proposed fix
-                if (flattenSingleParent) el.scrollLeft = 0
+                if (isFlatMode) el.scrollLeft = 0
-                        overflowX: flattenSingleParent ? "hidden" : "auto",
+                        overflowX: isFlatMode ? "hidden" : "auto",

Move the isFlatMode computation above the scroll effect and add it to the effect dependency array in place of flattenSingleParent.

Also applies to: 374-382

Comment on lines +416 to +418
!isSelected &&
!node.disabled &&
"hover:bg-muted",

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the formatting failures reported by the TypeScript lint check.

The pipeline reports Prettier differences at lines 416 and 487. Run pnpm lint-fix from the web directory before committing.

As per coding guidelines: "Run pnpm lint-fix from the web directory before committing."

Also applies to: 487-487

🧰 Tools
🪛 GitHub Actions: 11 - check code styling / 3_TypeScript lint.txt

[error] 416-416: Prettier formatting error: replace the multiline expression around '!node.disabled &&' with the formatted single-line version. Run Prettier to fix this issue.

🪛 GitHub Actions: 11 - check code styling / TypeScript lint

[error] 416-416: ESLint Prettier formatting error (prettier/prettier): replace the unnecessary line breaks around !node.disabled && with inline formatting.

🪛 GitHub Check: TypeScript lint

[failure] 416-416:
Replace ⏎······················································!node.disabled·&&⏎····················································· with ·!node.disabled·&&

Sources: Coding guidelines, Linters/SAST tools

@bekossy bekossy 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.

Thanks for the update. The direction looks right to me, but I think we need one functional fix before approval: in linear/history mode, TreeSelectPopupContent flattens treeData[0].children, while the tree hook only fetches children for expanded/default-expanded parents. Since the linear picker passes flattenSingleParent without expanding/fetching the parent, the History list can render empty instead of showing revisions.

Could you make the linear picker fetch the sole parent’s children, e.g. by passing defaultExpandAll/initial expansion for linear mode or by handling this inside flattenSingleParent?

Also please fix the failing TS format/lint checks; there is a duplicate width={280} prop in SelectVariant.

This branch was successfully deployed

1 active deployment
Preview — f9583373 Deployed Aug 19, 2026 by vercel[bot]
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 size:L This PR changes 100-499 lines, ignoring generated files. ux

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants