[OPIK-5682] [FE] Wire agent config to sandbox run via mask_id#6082
[OPIK-5682] [FE] Wire agent config to sandbox run via mask_id#6082
Conversation
|
🔄 Test environment deployment process has started Phase 1: Deploying base version You can monitor the progress here. |
apps/opik-frontend/src/v2/pages/AgentRunnerPage/AgentRunnerConnectedState.tsx
Show resolved
Hide resolved
apps/opik-frontend/src/v2/pages-shared/agent-configuration/useAgentConfigurationSave.ts
Show resolved
Hide resolved
|
✅ Test environment is now available! To configure additional Environment variables for your environment, run [Deploy Opik AdHoc Environment workflow] (https://github.com/comet-ml/comet-deployment/actions/workflows/deploy_opik_adhoc_env.yaml) Access Information
The deployment has completed successfully and the version has been verified. |
apps/opik-frontend/src/v2/pages/AgentRunnerPage/AgentRunnerConnectedState.tsx
Show resolved
Hide resolved
|
🌙 Nightly cleanup: The test environment for this PR ( |
|
🔄 Test environment deployment process has started Phase 1: Deploying base version You can monitor the progress here. |
|
✅ Test environment is now available! To configure additional Environment variables for your environment, run [Deploy Opik AdHoc Environment workflow] (https://github.com/comet-ml/comet-deployment/actions/workflows/deploy_opik_adhoc_env.yaml) Access Information
The deployment has completed successfully and the version has been verified. |
When the user edits configuration in the sandbox and clicks Run, a MASK is created with the changed values and its ID is passed to the job request. "Save as new version" continues to create BLUEPRINTs.
The hook at AgentConfigurationPage/AgentConfigurationTab/ was an unused copy — the shared version at pages-shared/ is the only one imported by AgentConfigurationEditView.
Show a spinner in the Input tab instead of "No input fields" while the agent is registering. Disable the Run button until agents are available.
Ensures the Run button is disabled when connected but agent name is not yet available, keeping isReady and handleRun guard in sync.
73335d6 to
37be29b
Compare
Details
Wire up agent configuration changes to the sandbox Run flow using the mask_id mechanism.
Previously, clicking Run in the Agent Sandbox ignored any configuration edits — the job was created without config context. Now, when the user edits configuration values and clicks Run, the system:
PATCH /blueprints/withtype: "mask"mask_idto the job creation requestThis keeps the version history clean — masks are internal-only and don't appear in the blueprint history. The existing "Save as new version" flow continues to create permanent BLUEPRINTs.
Key changes:
useAgentConfigurationSave— extracted shared validation/payload logic intovalidateAndBuildPayload(), addedbuildMaskPayload()andhasChanges()AgentConfigurationEditView— converted toforwardRefwith imperative handle exposinghasChanges+buildMaskPayloadAgentRunnerConnectedState—handleRunchecks for config changes, creates mask if needed, blocks run if validation failsData flow: Edit config → click Run →
hasChanges()→buildMaskPayload()(validates + returns payload) → parent calls mutation → getsmask_id→ passes to job creationChange checklist
Issues
Testing
npx tsc --noEmit— passesnpx eslinton all changed files — passesManual verification:
mask_idin job payload ✓mask_id✓Documentation
N/A