-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat(workflow): add 'Pinned in Navbar' setting to manual trigger #13392
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
base: main
Are you sure you want to change the base?
Conversation
Welcome!
Hello there, congrats on your first PR! We're excited to have you contributing to this project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR implements a "Pinned in Navbar" feature for manual workflow triggers, allowing users to mark frequently-used workflows for easier access. The implementation follows a comprehensive approach across multiple layers:
Schema and Type System Changes: The workflowSchema.ts
adds an optional isPinned
boolean field to the Zod validation schema for manual triggers, ensuring type safety and validation. The Workflow.ts
type definitions are extended using TypeScript intersection types to include the new isPinned
property while maintaining backward compatibility.
Default Settings and UI Integration: The getManualTriggerDefaultSettings.ts
utility is updated to initialize isPinned: false
for both availability modes (EVERYWHERE and WHEN_RECORD_SELECTED). The main UI component WorkflowEditTriggerManualForm.tsx
receives a new Switch toggle positioned at the top of the form per Figma specifications, with proper readonly state handling and immutable state updates.
Action System Integration: The useRunWorkflowRecordActions.tsx
hook propagates the isPinned
setting to the action configuration using optional chaining, enabling downstream components to differentiate between pinned and regular workflow actions.
The feature integrates seamlessly with the existing workflow architecture, following established patterns for form handling, state management, and type safety. All changes are backward-compatible since isPinned
is optional and defaults to false
, ensuring existing workflows continue to function without modification.
Confidence score: 4/5
• This PR is safe to merge with minor formatting concerns that don't affect functionality
• The implementation is solid and follows established patterns, but there are some indentation inconsistencies in the default settings file
• The getManualTriggerDefaultSettings.ts
file needs attention for formatting consistency
5 files reviewed, 1 comment
import { | ||
WorkflowManualTriggerAvailability, | ||
WorkflowManualTriggerSettings, | ||
WorkflowManualTriggerAvailability, | ||
WorkflowManualTriggerSettings, | ||
} from '@/workflow/types/Workflow'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Inconsistent indentation - imports should use 2 spaces, not 4 spaces to match the project's formatting standards.
import { | |
WorkflowManualTriggerAvailability, | |
WorkflowManualTriggerSettings, | |
WorkflowManualTriggerAvailability, | |
WorkflowManualTriggerSettings, | |
} from '@/workflow/types/Workflow'; | |
import { | |
WorkflowManualTriggerAvailability, | |
WorkflowManualTriggerSettings, | |
} from '@/workflow/types/Workflow'; |
7119405
to
b4c5bde
Compare
Summary
This PR adds support for pinning a manual workflow trigger in the navbar, as requested in issue #13333. Users can now enable the "Pinned in Navbar" setting from the workflow manual trigger settings UI.
What’s Changed
isPinned
(optionalboolean
) to the Zod validation schema inworkflowSchema.ts
.WorkflowManualTriggerSettings
TypeScript type to includeisPinned
.getManualTriggerDefaultSettings.ts
to defaultisPinned: false
.Switch
toggle for "Pinned in Navbar" to the form UI (WorkflowEditTriggerManualForm.tsx
) and updated field order per Figma spec.useRunWorkflowRecordActions.tsx
to propagateisPinned
to the action config.Screenshots
N/A – Feature affects configuration and navbar logic; toggle appears in form.
Notes
isPinned
is optional and defaults tofalse
.✅ Ready for review.