feat(desktop): add parallel execution mode for terminal presets#855
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds an optional executionMode to terminal presets, per-preset UI to edit it, persistence via the settings TRPC router, multi-pane tab creation for parallel presets, a balanced multi-pane layout builder, and tests for the layout utility. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant SettingsUI as "Settings UI"
participant PresetRow as "PresetRow"
participant TRPC as "Settings TRPC"
participant Workspace as "GroupStrip"
participant TabsStore as "Tabs Store"
User->>SettingsUI: change execution mode for preset
SettingsUI->>PresetRow: onExecutionModeChange(rowIndex, mode)
PresetRow-->>SettingsUI: new mode selected
SettingsUI->>TRPC: updatePreset.mutate({ id, patch: { executionMode } })
TRPC->>TRPC: persist executionMode
User->>Workspace: click preset (parallel, multiple commands)
Workspace->>TabsStore: addTabWithMultiplePanes(workspaceId, { commands, initialCwd })
TabsStore->>TabsStore: create pane per command
TabsStore->>TabsStore: buildMultiPaneLayout(paneIds)
TabsStore-->>Workspace: return { tabId, paneIds }
Workspace->>Workspace: render multi-pane tab
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
|
I'm adding a few mods such as remote branch and from PR link. and handling if pr branch exists already. will clean up and push to the PR and merge |
imagine this was intended for the other PR haha |
|
It was. it was late haha |
Add an executionMode field to terminal presets allowing commands to run in separate split panes (parallel) instead of sequentially in one terminal. - Add EXECUTION_MODES constant and executionMode field to preset schema - Add buildMultiPaneLayout utility for balanced multi-pane layouts - Add addTabWithMultiplePanes store action - Update GroupStrip to handle parallel preset selection - Add execution mode dropdown to preset settings UI - Update tRPC mutations to support executionMode
Add w-full to SelectTrigger so the mode dropdown fills its container instead of auto-sizing to content, ensuring Sequential and Parallel have the same width.
- Add EXECUTION_MODES validation in PresetRow to guard type assertion - Refactor duplicated tab renaming logic in GroupStrip - Add unit tests for buildMultiPaneLayout utility - Add tooltip to Mode column header explaining execution modes
b6b19e8 to
e758b6f
Compare
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on February 14. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
Summary
Add an
executionModefield to terminal presets allowing commands to run in separate split panes (parallel) instead of sequentially in one terminal.Problem
Currently, terminal presets run all commands sequentially in a single terminal (joined with
&&). For development workflows that require multiple concurrent processes (e.g.,npm run dev,npm run watch,npm test), users have to manually create separate terminals for each command.Solution
executionModefield to preset schema (sequential|parallel)Type of Change
Test plan
npm run dev,npm run watch,npm test)&&as beforeSummary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.