Skip to content

revert: remove ABv1 user-based edit gating from agent builder [ACTION-5731] - #1293

Merged
neelasha-writer merged 1 commit into
devfrom
chore-ACTION-5731-remove-abv1-edit-block
Jul 16, 2026
Merged

revert: remove ABv1 user-based edit gating from agent builder [ACTION-5731]#1293
neelasha-writer merged 1 commit into
devfrom
chore-ACTION-5731-remove-abv1-edit-block

Conversation

@neelasha-writer

@neelasha-writer neelasha-writer commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

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-agent headers. Those headers are not reliably produced on the builder route (the Envoy ext-authz-agent policy 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-app on 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 by be.agent-storage.

Removed (edit-block only)

  • canEditAgent / isAbv1EditGatingEnabled in core/index.ts (+ export)
  • BuilderEditBlockedState.vue overlay and .mainGrid.blocked styling
  • canEditAgent guards in the builder event handlers
  • x-can-edit-agent header reader + canEdit field (app_runner.py, ss_types.py)
  • canEditAgent.spec.ts and the mock

Kept (deprecation UX)

  • BuilderDeprecationBanner (flag-gated: beforeDeprecationCutoffAbv2 / afterDeprecationCutoffAbv2)
  • BuilderRemigrationWarningDialog (dropped only its now-defunct canEditAgent precondition)
  • x-is-org-admin reader (used by the banner)

Related

Test plan

  • npm run lint.ci (ui) passes
  • vitest run — 350 tests pass
  • Verify banner + remigration dialog still render when a deprecation flag is on
  • Verify builder is fully editable again for all users (no read-only overlay)

Made with Cursor

Summary by CodeRabbit

  • New Features

    • Editing tools and builder interactions are now available without permission-based blocking.
    • Instance trackers appear in all non-preview builder modes.
    • Notes trackers appear throughout UI builder mode.
    • Double-clicking an element automatically expands the settings bar.
  • Bug Fixes

    • Removed the blocked editor state and dimmed, non-interactive layout behavior.
    • Dragging, dropping, clicking, and keyboard interactions now work consistently outside preview mode.

…-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>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6f038acd-fb4a-417d-8bd3-db860de425df

📥 Commits

Reviewing files that changed from the base of the PR and between 2a908cb and 574d7f2.

📒 Files selected for processing (7)
  • src/ui/src/builder/BuilderApp.vue
  • src/ui/src/builder/BuilderEditBlockedState.vue
  • src/ui/src/core/index.ts
  • src/ui/src/tests/canEditAgent.spec.ts
  • src/ui/src/tests/mocks.ts
  • src/writer/app_runner.py
  • src/writer/ss_types.py
💤 Files with no reviewable changes (6)
  • src/ui/src/builder/BuilderEditBlockedState.vue
  • src/ui/src/tests/canEditAgent.spec.ts
  • src/writer/ss_types.py
  • src/ui/src/core/index.ts
  • src/writer/app_runner.py
  • src/ui/src/tests/mocks.ts

📝 Walkthrough

Walkthrough

The 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.

Changes

Edit capability removal

Layer / File(s) Summary
Remove server-side edit capability
src/writer/ss_types.py, src/writer/app_runner.py
The application information model and session initialization payload no longer include canEdit.
Remove frontend capability wiring
src/ui/src/core/index.ts, src/ui/src/tests/mocks.ts, src/ui/src/tests/canEditAgent.spec.ts
generateCore() and test mocks no longer derive or expose canEditAgent; the related gating test suite is removed.
Remove builder interaction blocking
src/ui/src/builder/BuilderApp.vue, src/ui/src/builder/BuilderEditBlockedState.vue
Builder templates and interaction handlers no longer gate behavior on canEditAgent, blocked styling and the blocked-state component are removed, and double-click expands the settings bar.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing ABv1 user-based edit gating from the agent builder.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore-ACTION-5731-remove-abv1-edit-block

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@neelasha-writer
neelasha-writer merged commit 7b1970e into dev Jul 16, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants