Skip to content

fix(web): honest sandbox picker + hide local-only permission options - #5302

Merged
mmabrouk merged 1 commit into
big-agentsfrom
fix/web-sandbox-picker
Jul 14, 2026
Merged

fix(web): honest sandbox picker + hide local-only permission options#5302
mmabrouk merged 1 commit into
big-agentsfrom
fix/web-sandbox-picker

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

Problem

The playground's "Execution environment" advanced panel was dishonest about what a deployment actually supports:

  1. The sandbox picker showed providers the deployment never enabled. The only gate was a single boolean (isSandboxLocalEnabled) that could drop local, but nothing restricted the picker to the enabled set. If the schema enum listed daytona, the picker offered it even when the deployment enabled only local (or vice-versa). The runtime already knew the full provider list from AGENTA_RUNNER_ENABLED_SANDBOX_PROVIDERS; it just collapsed it to a boolean.
  2. The provider-specific permission knobs showed for every provider. The four SandboxPermissionControl knobs (network egress, allowlist, filesystem, enforcement) rendered whenever the schema exposed sandbox.permissions, regardless of the selected provider. Those boundaries are only meaningful for a real isolating provider (daytona); the local sandbox is the runner host and does not enforce them, so showing them for local is misleading.

Change

Honest picker (concern #1). Expose the full enabled-provider set to the frontend and filter the picker to it.

  • web/entrypoint.sh derives and injects NEXT_PUBLIC_AGENTA_ENABLED_SANDBOX_PROVIDERS (normalized lowercase, whitespace-free comma list) alongside the existing boolean derivation.
  • Registered the new key in both processEnv maps (dynamicEnv.ts, agenta-shared/api/env.ts).
  • New getEnabledSandboxProviders() helper next to isSandboxLocalEnabled(): splits the var, trims/lowercases, drops empties, and defaults to ["local"] when unset/empty so the picker never hides every option.
  • useModelHarness.tsx filters the picker options to the enabled set: getEnumOptions(...).filter(o => enabled.has(o.value)).

Hide local-only permission options (concern #2). Gate the SandboxPermissionControl block on the selected sandbox.kind !== "local". For local the egress/permission block is hidden; for daytona it still shows.

Before / After

  • Before: picker offers local + daytona regardless of what the deployment enabled; permission knobs show for local even though they are not enforced there.
  • After: picker offers only the enabled providers (safe ["local"] fallback if the var is unset); permission knobs are hidden when the selected provider is local.

Verification

  • pnpm --filter @agenta/shared types:check and pnpm --filter @agenta/entity-ui types:check — clean.
  • ESLint on the changed files — clean.
  • Prettier — formatted.

Note: web/{oss,ee}/public/__env.js are gitignored local dev artifacts, so they are not part of this diff; the tracked source of truth is the two processEnv maps plus entrypoint.sh.

https://claude.ai/code/session_01XhENr63WL9npkKrJGnzDc1

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 14, 2026
@vercel

vercel Bot commented Jul 14, 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 14, 2026 2:35am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

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: a63155f6-955a-4501-be00-04d817beda29

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/web-sandbox-picker

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.

@mmabrouk

Copy link
Copy Markdown
Member Author

🌙 Overnight — ready for review + live-QA'd. Makes the sandbox picker honest: it shows only the providers the deployment enabled (new NEXT_PUBLIC_AGENTA_ENABLED_SANDBOX_PROVIDERS, derived in entrypoint.sh from the runner's AGENTA_RUNNER_ENABLED_SANDBOX_PROVIDERS), and hides the permission/egress options when the selected sandbox is local. Live-QA'd on 8280: picker showed both with local,daytona and only daytona when narrowed; egress knobs hidden for local, shown for daytona. types + lint clean. Base big-agents, independently mergeable now. What I need: a quick UX confirm.

@mmabrouk mmabrouk added the needs-review Agent updated; awaiting Mahmoud's review label Jul 14, 2026

@mmabrouk mmabrouk left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mmabrouk
mmabrouk merged commit a2a79fd into big-agents Jul 14, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend needs-review Agent updated; awaiting Mahmoud's review size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant