-
Notifications
You must be signed in to change notification settings - Fork 72
feat(ui): SlugInput, RadioGroup components + TaskModal Dialog refactor #544
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
- Create SlugInput component that auto-normalizes values to valid slugs: - Converts spaces to hyphens as user types - Blocks invalid characters (only a-z, 0-9, - allowed) - Shows toast notification when invalid characters are attempted - Handles paste with normalization - Update TaskModal: - Use SlugInput for task name - Remove redundant branch name preview section (saves vertical space) - Update NewProjectModal: - Use SlugInput for repository name - Auto-normalize input instead of disabling button on invalid chars
|
@moritzWa is attempting to deploy a commit to the General Action Team on Vercel. A member of the Team first needs to authorize it. |
Use lenient normalization while typing (preserves trailing hyphens). Full normalization only applied on submission. - normalizeForTyping: used during input, allows trailing hyphens - normalizeToSlug: full normalization for final values
- Add shadcn RadioGroup component (uses @radix-ui/react-radio-group) - Replace raw radio inputs with RadioGroup in NewProjectModal - Removes hardcoded border-gray-300 styling
Major refactor of TaskModal: - Replace manual Card+createPortal+motion with shadcn Dialog - Remove pr-12 hack and absolute X button (Dialog handles this) - Extract TaskAdvancedSettings into separate component (~300 lines) TaskModal.tsx: 828 → 426 lines TaskAdvancedSettings.tsx: new file, 487 lines Benefits: - Consistent modal implementation with NewProjectModal - Better separation of concerns - Proper Dialog accessibility (focus trap, escape key, etc.) - Expandable advanced section works correctly within Dialog
…index - Extract Linear/GitHub/Jira connection logic to useIntegrationStatus hook - Reduces TaskModal from ~430 to ~315 lines - Fix z-index for Popover, Select, AlertDialog (z-50 → z-[1000]/z-[999]) - Dropdowns now render above Dialog overlays
- Revert z-index changes to shadcn components (popover, select, alert-dialog)
- Use modal={false} on Dialog to allow Popover to render correctly
- Radix Dialog in modal mode blocks portal content outside dialog
- Replace native checkboxes with Checkbox in: - TaskAdvancedSettings (2) - ProjectDeleteButton - TaskDeleteButton - BrowserPreviewSettingsCard - Replace native textareas with Textarea in: - TaskAdvancedSettings - FeedbackModal - RunLauncher - Replace native inputs with Input in: - FeedbackModal - BaseBranchControls - BrowserPane - RunLauncher - Replace native radio buttons with RadioGroup in: - RunLauncher
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.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on February 7
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| } | ||
| }, | ||
| [] | ||
| ); |
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.
Jira credential property name mismatch breaks connection
The handleJiraConnect function passes credentials with site property, but the API at jiraSaveCredentials expects siteUrl. Looking at src/main/ipc/jiraIpc.ts, the handler reads args.siteUrl, so the site URL will always be empty, causing Jira connection to fail with a validation error. The old code in TaskModal.tsx correctly mapped the field to siteUrl.
Additional Locations (1)
| setIsCreating(false); | ||
| } | ||
| }, [hasAutoApproveSupport, autoApprove]); | ||
| }; |
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.
Debate mode toggle has no effect on task creation
The debateMode state is used to change the button text from "Create" to "Start Debate", but the value is never passed to onCreateTask. When a user enables debate mode and clicks "Start Debate", the modal simply creates a normal task. The HeadlessAgentService for debate functionality exists but isn't wired up to this flow.
Additional Locations (1)
| elapsedMs, | ||
| error: code !== 0 ? `Process exited with code ${code}` : undefined, | ||
| }); | ||
| }); |
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.
Timeout causes spurious 'complete' progress event after resolution
When a timeout occurs, the promise is resolved with an error, then kill() terminates the process. However, the exit handler still fires afterward and emits a progress event with type: 'complete'. There's no flag to track that the promise was already resolved by timeout, so consumers receive a misleading 'complete' progress event after the timeout error was already reported. This would cause inconsistent state in the DebateProgressCard UI when debate mode is used.
Additional Locations (1)
| return () => { | ||
| cancel = true; | ||
| }; | ||
| }, [isOpen]); |
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.
Jira connection check throws TypeError if API missing
The Jira connection check calls api?.jiraCheckConnection?.() which returns undefined if the API is missing, then immediately chains .then() on the result. This throws a TypeError when undefined.then() is called. The Linear connection check correctly guards against this with if (!api?.linearCheckConnection) { return; } before calling the API, but the Jira check is missing this guard.
| <AnimatePresence> | ||
| {linearSetupOpen ? ( | ||
| <motion.div | ||
| className="fixed inset-0 z-[130] flex items-center justify-center px-3" |
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.
Nested modals hidden behind Dialog due to z-index
The Linear and Jira setup modals use z-[130] but the refactored parent Dialog uses z-[998] for its overlay (in dialog.tsx). This is a regression from the old createPortal implementation which used z-[100] for the parent. The nested modals will render behind the Dialog overlay and be invisible/unreachable, preventing users from connecting Linear or Jira integrations from within the Task Modal.
Summary
This PR improves form inputs and modal consistency across the app:
SlugInput Component
SlugInputcomponent that auto-normalizes values to valid slugs (branch names, repo names)RadioGroup Component
RadioGroupcomponent (uses @radix-ui/react-radio-group)TaskModal Refactor
The original TaskModal.tsx was 828 lines with a manual Card+createPortal implementation. This PR:
TaskAdvancedSettingsinto separate component (487 lines)DialogHeader,DialogFooterproperlypr-12hack and absolute X button positioningNewProjectModal Updates
SlugInputfor repository name (auto-normalizes)RadioGroupfor visibility selector (proper design system)border-gray-300stylingChanges Summary
slug-input.tsx- New componentradio-group.tsx- New shadcn componentTaskModal.tsx- Refactored to Dialog (828 → 426 lines)TaskAdvancedSettings.tsx- New extracted component (487 lines)NewProjectModal.tsx- Uses SlugInput and RadioGroupTest plan
Note
src/main/services/HeadlessAgentService.tsto run Claude headless agents with streaming progress, timeouts, parallelrunHeadlessAgents,getWorktreeDiff, andrunJudgefor A/B solution comparison.DebateProgressCardandDebateResultsViewto visualize parallel agent runs and judging outcomes.TaskModalrewritten toDialog, with advanced options extracted toTaskAdvancedSettingsand integration logic tohooks/useIntegrationStatus; adds experimental "debate mode" toggle for Claude.ui/slug-input(auto-normalized slugs) andui/radio-group(Radix-based).NewProjectModal,RunLauncher, and several components (FeedbackModal,BrowserPane,BaseBranchControls, delete buttons) updated to use design-systemInput/Textarea/Checkbox/RadioGroupand minor z-index fixes.@radix-ui/react-radio-group(and peer internals).Written by Cursor Bugbot for commit 966a8eb. This will update automatically on new commits. Configure here.