revert: remove ABv1 user-based edit gating from agent builder [ACTION-5731] - #1293
Conversation
…-5731] Removes the permission-header-based edit block (canEditAgent) that made the builder read-only for non-admin/non-editor cloud users. This gating depended on x-is-org-admin / x-can-edit-agent headers that are not reliably produced on the builder route, causing legitimate editors (incl. org admins) to be blocked. Edit gating for deprecated ABv1 agents now lives in fe.web-app on the Edit CTA. Kept: the deprecation banner and remigration warning dialog (flag-gated). Removed: canEditAgent/isAbv1EditGatingEnabled, BuilderEditBlockedState overlay, the read-only handler guards, and the x-can-edit-agent header reader. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (6)
📝 WalkthroughWalkthroughThe edit capability is removed from the server application model, frontend core wiring, builder permission checks, blocked-state UI, and related tests and mocks. Builder interactions now rely on builder mode and existing selection logic. ChangesEdit capability removal
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. 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 |
Summary
Removes the permission-header-based edit block from the agent builder. The block made the builder read-only for non-admin / non-editor cloud users based on
x-is-org-admin/x-can-edit-agentheaders. Those headers are not reliably produced on the builder route (the Envoyext-authz-agentpolicy does not forward user identity to the backend), so legitimate editors — including org admins — were being falsely blocked.Edit gating for deprecated ABv1 agents will instead live in
fe.web-appon the Edit CTA that opens the builder, using the app's existing client-side permission model. This is a UI affordance only — real writes remain enforced server-side bybe.agent-storage.Removed (edit-block only)
canEditAgent/isAbv1EditGatingEnabledincore/index.ts(+ export)BuilderEditBlockedState.vueoverlay and.mainGrid.blockedstylingcanEditAgentguards in the builder event handlersx-can-edit-agentheader reader +canEditfield (app_runner.py,ss_types.py)canEditAgent.spec.tsand the mockKept (deprecation UX)
BuilderDeprecationBanner(flag-gated:beforeDeprecationCutoffAbv2/afterDeprecationCutoffAbv2)BuilderRemigrationWarningDialog(dropped only its now-defunctcanEditAgentprecondition)x-is-org-adminreader (used by the banner)Related
be.agent-manager: revert of the header producer (File input component doesn't show the name of the uploaded files #299)fe.web-app: new Edit-button gate + tooltipTest plan
npm run lint.ci(ui) passesvitest run— 350 tests passMade with Cursor
Summary by CodeRabbit
New Features
Bug Fixes