Skip to content

feat: updated automations UI#1450

Merged
MODSetter merged 3 commits into
devfrom
dev_mod
May 30, 2026
Merged

feat: updated automations UI#1450
MODSetter merged 3 commits into
devfrom
dev_mod

Conversation

@MODSetter
Copy link
Copy Markdown
Owner

@MODSetter MODSetter commented May 30, 2026

Description

Motivation and Context

FIX #

Screenshots

API Changes

  • This PR includes API changes

Change Type

  • Bug fix
  • New feature
  • Performance improvement
  • Refactoring
  • Documentation
  • Dependency/Build system
  • Breaking change
  • Other (specify):

Testing Performed

  • Tested locally
  • Manual/QA verification

Checklist

  • Follows project coding standards and conventions
  • Documentation updated as needed
  • Dependencies updated as needed
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR refactors the automations model selection architecture to move from a search-space-level eligibility gate to per-automation model pickers. Previously, users needed premium or BYOK models configured at the search-space level before creating any automation. Now, users select models (agent LLM, image, vision) directly when creating or editing automations through new UI pickers that only show eligible options. The backend validation logic shifts from upfront search-space checks to per-automation model validation at create/update time, with the selected models captured in definition.models to insulate runs from future chat model changes. The UI also gets significant run details improvements, rendering step results as readable cards with markdown messages instead of raw JSON, and removing all the old model eligibility warning banners.

⏱️ Estimated Review Time: 1-3 hours

💡 Review Order Suggestion
Order File Path
1 surfsense_backend/app/automations/services/model_policy.py
2 surfsense_backend/app/automations/services/automation.py
3 surfsense_backend/app/agents/multi_agent_chat/main_agent/tools/automation/create.py
4 surfsense_backend/tests/unit/automations/services/test_automation_service_policy.py
5 surfsense_web/hooks/use-automation-eligible-models.ts
6 surfsense_web/lib/automations/builder-schema.ts
7 surfsense_web/contracts/types/automation.types.ts
8 surfsense_web/app/dashboard/[search_space_id]/automations/components/builder/automation-model-fields.tsx
9 surfsense_web/app/dashboard/[search_space_id]/automations/components/builder/automation-builder-form.tsx
10 surfsense_web/components/tool-ui/automation/create-automation.tsx
11 surfsense_web/app/dashboard/[search_space_id]/automations/automations-content.tsx
12 surfsense_web/app/dashboard/[search_space_id]/automations/components/automations-empty-state.tsx
13 surfsense_web/app/dashboard/[search_space_id]/automations/components/automations-header.tsx
14 surfsense_web/app/dashboard/[search_space_id]/automations/components/automation-model-gate-alert.tsx
15 surfsense_web/app/dashboard/[search_space_id]/automations/new/automation-new-content.tsx
16 surfsense_web/lib/automations/run-duration.ts
17 surfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-step-result-card.tsx
18 surfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-details-panel.tsx
19 surfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-row.tsx

Need help? Join our Discord

MODSetter added 3 commits May 29, 2026 13:43
- Improved the layout and readability of the run details panel by restructuring sections and adding collapsible error views.
- Introduced a new `RunErrorSection` component to present run-level errors more clearly, allowing users to toggle raw error details.
- Updated the handling of run outputs, step results, and artifacts for better user experience.
- Refactored duration calculation in `RunRow` to utilize a dedicated `formatDuration` function for consistency.
- Added a new `RunStepResult` interface to improve type safety and clarity in handling step results.
…ation creation

- Removed the eligibility gate for model selection in the automation creation process, allowing users to choose models directly in the builder.
- Updated the `AutomationBuilderForm` to incorporate model selection logic, ensuring that selected models are validated and preserved during automation creation and editing.
- Simplified the `AutomationsContent` and `AutomationNewContent` components by eliminating unnecessary eligibility checks and alerts.
- Enhanced the user experience by integrating model selection directly into the automation approval process, ensuring that only billable models are used.
- Refactored related tests to cover new model selection behavior and ensure proper validation of user-selected models.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
surf-sense-frontend Ready Ready Preview, Comment May 30, 2026 3:35am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 15ef1a63-9792-4de8-adb8-f59b1fe7b8a2

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 dev_mod

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 and usage tips.

@MODSetter MODSetter merged commit b1b51ad into dev May 30, 2026
6 of 11 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.

1 participant