Repository navigation
[feat] Present agent revisions as a single history and hide deployment for agents - #5273
ashrafchowdury wants to merge 10 commits into
Conversation
- reframe default variant as history, nothing else changed - hide the deployment option for the agent
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe 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. ChangesAgent and linear revision workflows
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: 🟡 Moderate · up to 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
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
I think we can show the commit message in a tooltip, or somehow; it would be nice to have it |
… for linear versioning support
|
@ashrafchowdury we can make list items 2 line, and leave the bottom line for a more meaningful commit message. other than that 👍 |
…flat tree structure
|
@mmabrouk, if this chagnes make sense to you, let's ship this
|
|
@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. |
|
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 |
Railway Preview Environment
Updated at 2026-08-21T11:52:36.213Z |
|
Thanks for the PR @ashrafchowdury Please resolve merge conflicts here |
|
@coderabbitai please resolve merge conflict here |
|
✅ Merge conflicts resolved successfully! Resolved 3 conflict file(s). Commit: The resolved commit is ready for your repository's normal checks and review. 7 file operation(s)
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>
|
|
|
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. |
There was a problem hiding this comment.
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 winConsider 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-6indent differs. OneLeafRowcomponent with anindentedprop 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
📒 Files selected for processing (7)
web/oss/src/components/Playground/Components/AgentRevisionSelector/index.tsxweb/oss/src/components/Playground/Components/Menus/SelectVariant/components/RevisionChildTitle.tsxweb/oss/src/components/Playground/Components/Menus/SelectVariant/index.tsxweb/oss/src/components/Playground/Components/Menus/SelectVariant/types.d.tsweb/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/index.tsxweb/oss/src/state/workflow/hooks.tsweb/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.
| 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]) |
There was a problem hiding this comment.
🎯 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
| !isSelected && | ||
| !node.disabled && | ||
| "hover:bg-muted", |
There was a problem hiding this comment.
📐 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
left a comment
There was a problem hiding this comment.
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.

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
Historypicker. 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:
After:
v1,v2,v3timeline.The shared selector defaults to branching behavior, so prompt applications and evaluators keep their existing revision and deployment flows.
What to QA
History, and the dropdown displays a compact flat revision list without variant names, search, environment badges, or excessive side spacing.Previews
Featuring the default variant as history

No deployment options as it has no use for now

No create as new variant option
