Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(editor): Add workflow evaluation edit and list views (no-changelog) #11719

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

OlegIvaniv
Copy link
Contributor

This PR introduces a new Workflow Evaluation feature that allows users to create, list, and edit test definitions for workflows. The feature is currently behind the 025_workflow_evaluation feature flag as it's still in development.

Key Features

  • New Evaluation tab in workflow view (visible when feature flag is enabled)
  • Test definition management:
    • List view showing all tests with mocked metrics and status
    • Create new tests with name, description, and metrics configuration
      • Metrics and description not stored by BE yet
    • Edit existing tests including name, tags, and evaluation workflow selection

Implementation Details

  • Added new API front-end client
  • Created new components for test management:
    • EvaluationListView: Main view for listing and managing tests
    • EvaluationEditView: Form for creating/editing test definitions
    • Various form components (MetricsInput, TagsInput, etc.)
  • Integrated with existing tag management store
  • Added new evaluations store for state management
  • Implemented auto-save functionality for test edits

Note

  • Feature is disabled by default, enable with: window.featureFlags.override('025_workflow_evaluation', true)
  • New routes added for test management:
    • /workflow/:name/evaluation
    • /workflow/:name/evaluation/new
    • /workflow/:name/evaluation/:testId
CleanShot.2024-11-13.at.13.11.20.mp4

Related Linear tickets, Github issues, and Community forum posts

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

burivuhster and others added 22 commits November 12, 2024 11:50
- Created evaluations API endpoints
- Implemented evaluations store
- Updated NewWorkflowEvaluationView
- RenamedRun Test to Save Test
- Update GlobalExecutionsList.vue
- Update PageViewLayout.vue
- Define --content-container-width
- Update ProjectSettings.vue
- Update TemplatesView.vue
• Move components to dedicated files
• Create new EvaluationEditView component
• Update router configuration
• Relocate useEvaluationForm composable
• Add new types for evaluations
• Split EmptyState into separate component
• Create TestItem and TestsList components
• Update EvaluationListView with new components
• Add WORKFLOW_EVALUATION_EDIT to constants
• Improve styles and layout of test items
- Add feature flag check
- Update UI to show/hide evaluation tab
- Fetch tags for test definitions
- Handle routing when feature is disabled
- Cleanup console logs
• Adjust padding and cursor for TestItem
• Update button sizes and spacing
• Modify TestItem title styling
• Remove size and type from TestsList button
• Make createTag prop optional
• Add eventBus prop to TagsDropdown
• Update TagsInput to use TagsDropdown
• Remove unnecessary class in TagsInput
• Adjust prop types and imports
…ents

• Add localization for UI text
• Improve styling and layout consistency
• Refactor component props and structure
• Update button labels and placeholders
- Update MainHeader tab logic
- Enhance EmptyState component styling
- Add localization for test list texts
- Adjust TestsList component
- Update locale file
…ation

• Remove dependency on tagsStore
• Add field-specific error handling
• Simplify loadTestData and saveTest methods
• Update EvaluationEditView component
• Improve UI feedback for form errors
- Add data-test-id to input components
- Update TagsInput to use useI18n composable
- Fix typo in TestsList component
- Add test ID to "Run Test" button
- Remove unused locale references
- Add MetricsInput component tests
- Add TagsInput component tests
- Add EvaluationEditView tests
- Include snapshot test
- Update test utilities and mocks
- Add auto-save functionality
- Improve error handling in saveTest
- Update URL after creating new test
…test-definition' into ai-426-frontend-test-viewedit-screen_rebased
@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Nov 13, 2024
• Add description to test definition interface
• Include description in create/update params
• Update UI to handle description field
• Refactor types for better consistency
• Add data-test-id for E2E testing
@OlegIvaniv OlegIvaniv force-pushed the ai-426-frontend-test-viewedit-screen_rebased branch from 732e417 to 9b5be7a Compare November 13, 2024 15:05
@OlegIvaniv OlegIvaniv requested a review from a team as a code owner November 13, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants