Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Sudharsan-T
Copy link

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

  • ✅ Added isPinned (optional boolean) to the Zod validation schema in workflowSchema.ts.
  • ✅ Extended the WorkflowManualTriggerSettings TypeScript type to include isPinned.
  • ✅ Updated getManualTriggerDefaultSettings.ts to default isPinned: false.
  • ✅ Added a Switch toggle for "Pinned in Navbar" to the form UI (WorkflowEditTriggerManualForm.tsx) and updated field order per Figma spec.
  • ✅ Modified useRunWorkflowRecordActions.tsx to propagate isPinned to the action config.

Screenshots

N/A – Feature affects configuration and navbar logic; toggle appears in form.


Notes

  • This change is backward-compatible: isPinned is optional and defaults to false.
  • Future UI/command menu components can now use this flag to display pinned workflows appropriately.

✅ Ready for review.

Copy link
Contributor

github-actions bot commented Jul 23, 2025

Welcome!

Hello there, congrats on your first PR! We're excited to have you contributing to this project.
By submitting your Pull Request, you acknowledge that you agree with the terms of our Contributor License Agreement.

Generated by 🚫 dangerJS against b4c5bde

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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

Edit Code Review Bot Settings | Greptile

Comment on lines 2 to 5
import {
WorkflowManualTriggerAvailability,
WorkflowManualTriggerSettings,
WorkflowManualTriggerAvailability,
WorkflowManualTriggerSettings,
} from '@/workflow/types/Workflow';
Copy link
Contributor

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.

Suggested change
import {
WorkflowManualTriggerAvailability,
WorkflowManualTriggerSettings,
WorkflowManualTriggerAvailability,
WorkflowManualTriggerSettings,
} from '@/workflow/types/Workflow';
import {
WorkflowManualTriggerAvailability,
WorkflowManualTriggerSettings,
} from '@/workflow/types/Workflow';

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