Skip to content

feat: Sandbox environments - #918

Merged
govindavashishtha merged 26 commits into
mainfrom
feature/hv/environments-frontend-2
Oct 5, 2026
Merged

govindavashishtha merged 26 commits into
mainfrom
feature/hv/environments-frontend-2

Conversation

@harshil-2096

@harshil-2096 harshil-2096 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes AGE-2396

Changes

How was this tested?

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, python/trueforge_sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Medium Risk
Touches sandbox networking, secrets, and agent runtime config; misconfiguration could affect sandbox isolation, though changes are UI-side behind an optional server port.

Overview
Adds sandbox environment management behind an optional sandboxEnvironments server port: list/create/update/delete via a new /environments overlay (sidebar Environments nav), wired through shell state, routing, and share query params (envQ, envIsNew).

The Environments surface includes a paginated table (build status, resources, networking), create/edit in a drawer with UI form or YAML manifest editing (new yaml dependency), pending-status polling, and a guard when no sandbox provider is configured.

Agent configuration now binds sandbox environment_name: runtime settings get an environment dropdown plus Manage Environments, and the draft Tools picker gains an Environment tab (radio selection). Only ready environments are offered; SandboxEnvironmentStatus uses ready instead of active, and pickers refresh after CRUD or when pending builds finish via environmentsListEpoch / useReadySandboxEnvironments (full list drain up to limit 1000).

The TrueForge adapter implements createSandboxEnvironmentServer against the SDK. Smaller UI plumbing: shared Badge, PopoverSelect.onOpenChange, CodeEditor.defaultShowLineNumbers, and tests for the new flows.

Reviewed by Cursor Bugbot for commit 4e9ff9e. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4e9ff9e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@truefoundry/trueforge-assistant-ui-runtime Patch
@truefoundry/trueforge-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@harshil-2096 harshil-2096 changed the title feat feat: Sandbox environments Sep 29, 2026
Base automatically changed from feat/crud-sandbox-envs to main September 29, 2026 11:18
@harshil-2096
harshil-2096 force-pushed the feature/hv/environments-frontend-2 branch from 0a4db0e to b1211d0 Compare September 29, 2026 12:55

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge-ui/src/atoms/environments/useReadySandboxEnvironments.ts Outdated
Comment thread packages/trueforge-ui/src/atoms/environments/environmentYaml.ts
Still-mounted draft pickers only loaded ready envs on mount. Invalidate a
shell catalog epoch on create/delete/activation and refetch when the picker
opens or Manage Environments closes so new active envs appear without remount.

Co-authored-by: Cursor <cursoragent@cursor.com>
harshil-2096 and others added 5 commits September 30, 2026 15:14
Assert updated environment names inside waitFor so the second list
response is applied before the expectation runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…dling in UI components. This includes removing static default environment injection from draft selectors and ensuring the UI reflects the new status. Tests have been updated accordingly to reflect these changes.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge-ui/src/atoms/environments/EnvironmentsPage.tsx Outdated
… update import statements in defaultSlots. The new description clarifies that secrets are synced immediately with existing sandboxes, improving user understanding.
…in EnvironmentsPage, and improve error handling in provider listing. Tests added to verify error display when provider fetching fails.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge-ui/src/atoms/environments/EnvironmentsPage.tsx Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

…nt fetching by draining multiple pages with a limit of 1000, and improve readiness checks in EnvironmentsPage. Tests added to verify the new pagination logic and environment retrieval.
…oundry/trueforge into feature/hv/environments-frontend-2
@govindavashishtha
govindavashishtha enabled auto-merge (squash) October 4, 2026 18:05

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge-ui/src/atoms/environments/EnvironmentsPage.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1d41cd6. Configure here.

Comment thread .changeset/environments-page-ui.md Outdated
Comment thread packages/trueforge-ui/src/atoms/primitives/Badge.tsx
… component styles for better theming consistency.
@govindavashishtha
govindavashishtha merged commit 2b76ce3 into main Oct 5, 2026
15 checks passed
@govindavashishtha
govindavashishtha deleted the feature/hv/environments-frontend-2 branch October 5, 2026 04:26
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