Skip to content

Conversation

@Shironex
Copy link
Collaborator

@Shironex Shironex commented Jan 22, 2026

  • Updated the /start-dev route to accept a custom development command from project settings, allowing for greater flexibility in starting dev servers.
  • Implemented a new parseCustomCommand method in the DevServerService to handle custom command parsing, including support for quoted strings.
  • Added a new DevServerSection component in the UI for configuring the dev server command, featuring quick presets and auto-detection options.
  • Updated project settings interface to include a devCommand property for storing custom commands.

This update improves the user experience by allowing users to specify custom commands for their development servers, enhancing the overall development workflow.

Summary by CodeRabbit

Release Notes

  • New Features
    • Configure custom development and test commands on a per-project basis with automatic command detection as fallback option
    • Manage development and test commands through new "Commands" section in project settings
    • Improved input validation with explicit error messages for missing or invalid configuration parameters
    • Integrated logging shows whether custom commands or auto-detection are being used

✏️ Tip: You can customize this high-level summary in your review settings.

- Updated the `/start-dev` route to accept a custom development command from project settings, allowing for greater flexibility in starting dev servers.
- Implemented a new `parseCustomCommand` method in the `DevServerService` to handle custom command parsing, including support for quoted strings.
- Added a new `DevServerSection` component in the UI for configuring the dev server command, featuring quick presets and auto-detection options.
- Updated project settings interface to include a `devCommand` property for storing custom commands.

This update improves the user experience by allowing users to specify custom commands for their development servers, enhancing the overall development workflow.
@Shironex Shironex self-assigned this Jan 22, 2026
@Shironex Shironex added the Enhancement Improvements to existing functionality or UI. label Jan 22, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Shironex, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant enhancement to the development server management by allowing users to define custom commands for starting their dev servers. This change provides more control and adaptability for projects with non-standard development setups, improving the overall developer experience by integrating this configuration directly into the project settings.

Highlights

  • Custom Dev Server Command: Users can now configure a custom command to start the development server within project settings, offering greater flexibility beyond auto-detection.
  • Backend API Update: The /start-dev API route has been updated to accept and utilize the custom development command from project settings.
  • Command Parsing Logic: A new parseCustomCommand method has been implemented in the DevServerService to correctly handle complex command strings, including those with quoted arguments.
  • New UI Section: A dedicated 'Dev Server' section has been added to the project settings UI, allowing users to easily input custom commands, utilize quick presets, and see auto-detection information.
  • Project Settings Schema: The ProjectSettings interface now includes a devCommand property to store the user-defined development server command.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

This pull request introduces per-project development server command configuration. It adds an optional devCommand field to project settings, updates the route handler and service layer to accept and parse custom commands, replaces the Testing settings section with a Commands section in the UI, and implements command validation and normalization throughout the stack.

Changes

Cohort / File(s) Summary
Server Route Handlers
apps/server/src/routes/worktree/index.ts, apps/server/src/routes/worktree/routes/start-dev.ts
Updated route handler to accept settingsService parameter; added input validation for projectPath and worktreePath; fetches custom dev command from project settings and passes it downstream.
Server Services
apps/server/src/services/dev-server-service.ts
Added parseCustomCommand() helper method; updated startDevServer() signature to accept optional customCommand parameter; implemented conditional logic to prefer custom command over auto-detection; added logging for command source.
Settings Service
apps/server/src/services/settings-service.ts
Enhanced updateProjectSettings() to normalize devCommand and testCommand by removing null values (interpreted as auto-detection).
Type Definitions
libs/types/src/settings.ts
Added optional devCommand?: string field to ProjectSettings interface with documentation; updated phaseModelOverrides comment.
UI Navigation & Hooks
apps/ui/src/components/views/project-settings-view/config/navigation.ts, apps/ui/src/components/views/project-settings-view/hooks/use-project-settings-view.ts
Replaced "Testing" navigation item with "Commands"; updated icon from FlaskConical to Terminal; updated ProjectSettingsViewId type to include 'commands' instead of 'testing'.
UI Views & Components
apps/ui/src/components/views/project-settings-view/project-settings-view.tsx, apps/ui/src/components/views/project-settings-view/index.ts
Replaced TestingSection import and rendering with CommandsSection.
New Commands Section Component
apps/ui/src/components/views/project-settings-view/commands-section.tsx
New 316-line React component for configuring dev and test commands; includes local state management, preset suggestions, unsaved change detection, loading/error handling, and Enter-to-save functionality.
Removed Testing Section
apps/ui/src/components/views/project-settings-view/testing-section.tsx
Entire 223-line TestingSection component removed.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI as CommandsSection<br/>(UI Component)
    participant Settings as SettingsService<br/>(Backend)
    participant Routes as Start-Dev Route
    participant DevService as DevServerService

    User->>UI: Enter custom dev command & click Save
    UI->>Settings: updateProjectSettings(projectPath, {devCommand})
    Settings->>Settings: Normalize (remove null values)
    Settings-->>UI: Save confirmation
    
    User->>Routes: POST /start-dev (with projectPath, worktreePath)
    Routes->>Settings: Get project settings for devCommand
    Settings-->>Routes: Return ProjectSettings with optional devCommand
    
    alt Custom Command Provided
        Routes->>DevService: startDevServer(projectPath, worktreePath, customCommand)
        DevService->>DevService: parseCustomCommand(customCommand)
        DevService->>DevService: Validate & log custom command usage
    else No Custom Command
        Routes->>DevService: startDevServer(projectPath, worktreePath, undefined)
        DevService->>DevService: Auto-detect via package.json
        DevService->>DevService: Log auto-detection
    end
    
    DevService-->>Routes: Start dev server with command
    Routes-->>User: Success/Error response
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

type: feature

Poem

🐰 A clever rabbit hops with glee,
Commands now dance where tests used to be!
Per-project dev flows, custom and spry,
With settings that parse and auto-detect nigh,
No more one-size-fits—each project flies free!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title contains a typo: 'abillity' should be 'ability'. While the content correctly describes the main change (adding dev server command configuration), the spelling error reduces professionalism. Correct the typo to: 'feat: ability to configure "Start Dev Server" command in project settings'
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the ability to configure a custom "Start Dev Server" command within project settings, significantly enhancing flexibility for users. The changes span across the server-side logic to parse and execute custom commands, and the UI to provide a user-friendly interface for configuration, including quick presets and auto-detection. The implementation is generally well-structured, with clear separation of concerns and good use of React hooks in the new UI component. The addition of logging for custom command usage is also a good practice for debugging and monitoring.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@apps/ui/src/components/views/project-settings-view/dev-server-section.tsx`:
- Around line 166-186: The clear icon Button next to the dev-command Input lacks
an accessible name (title is unreliable); update the Button rendered when
devCommand is truthy to include a proper accessible label such as
aria-label="Clear dev command" (or aria-labelledby pointing to the related
Input) so screen readers announce its purpose; ensure the Button (the one using
handleClear and rendering <X />) keeps existing props (onClick={handleClear},
className, size/variant) but adds the aria-label attribute to provide an
explicit accessible name.
- Around line 27-71: When loading project settings in DevServerSection
(loadProjectSettings inside the useEffect), reset the local state at the start
of the load (call setDevCommand(''), setOriginalDevCommand(''),
setIsLoading(true)) to avoid showing stale values from a previous project; add
an isLoadError state (e.g., const [isLoadError, setIsLoadError] =
useState(false)) and clear it on successful load (setIsLoadError(false)), set it
to true in the catch block (setIsLoadError(true)) and surface a user-visible
error (use the app's toast/error display) and/or prevent saving when isLoadError
is true (ensure the save handler or UI disables the save button when isLoadError
is true); update references to DevServerSection, loadProjectSettings,
setDevCommand and setOriginalDevCommand accordingly.
🧹 Nitpick comments (3)
apps/server/src/routes/worktree/routes/start-dev.ts (1)

46-47: Consider empty string handling after trim.

When devCommand is an empty string (e.g., user cleared the field), trim() returns '' which is falsy and correctly falls through. However, this relies on the falsy check on line 48. The logic is correct, but you might want to add a brief inline comment clarifying that empty strings intentionally fall back to auto-detection.

apps/ui/src/components/views/project-settings-view/dev-server-section.tsx (1)

1-10: Use the UI components barrel for intra‑app imports.
Direct paths like @/components/ui/* are brittle in this app; prefer the components index barrel for UI elements.

♻️ Suggested change
-import { Label } from '@/components/ui/label';
-import { Input } from '@/components/ui/input';
-import { Button } from '@/components/ui/button';
-import { Spinner } from '@/components/ui/spinner';
+import { Button, Input, Label, Spinner } from '@/components';

Based on learnings, prefer the components index barrel for app-local UI imports.

apps/server/src/services/dev-server-service.ts (1)

358-390: Normalize customCommand before parsing.
Whitespace‑only or padded commands currently error; trimming and treating empty as undefined makes the service more robust for non‑UI callers and matches the UI’s normalization.

♻️ Suggested change
-    if (customCommand) {
+    const normalizedCustomCommand = customCommand?.trim();
+    if (normalizedCustomCommand) {
       // Use the provided custom command
-      devCommand = this.parseCustomCommand(customCommand);
+      devCommand = this.parseCustomCommand(normalizedCustomCommand);
       if (!devCommand.cmd) {
         return {
           success: false,
           error: 'Invalid custom command: command cannot be empty',
         };
       }
       logger.debug(`Using custom command: ${customCommand}`);
     } else {

…oading

- Updated the `DevServerService` to normalize custom commands by trimming whitespace and treating empty strings as undefined.
- Refactored the `DevServerSection` component to utilize TanStack Query for fetching project settings, improving data handling and error management.
- Enhanced the save functionality to use mutation hooks for updating project settings, streamlining the save process and ensuring better state management.

These changes enhance the reliability and user experience when configuring development server commands.
@Shironex
Copy link
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…ommandsSection

- Introduced a new `CommandsSection` component to manage both development and test commands, replacing the previous `DevServerSection` and `TestingSection`.
- Updated the `SettingsService` to handle special cases for `devCommand` and `testCommand`, allowing for null values to delete commands.
- Removed deprecated sections and streamlined the project settings view to enhance user experience and maintainability.

This refactor simplifies command management and improves the overall structure of the project settings interface.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@apps/ui/src/components/views/project-settings-view/commands-section.tsx`:
- Around line 175-185: The command input fields currently rely on placeholders
for accessible names; add explicit <Label htmlFor="dev-command"> and a matching
label for the other command input (use the input id present in that block) and
associate them with their respective Input components (e.g., the Input with
id="dev-command" and the other input referenced around the same file) — the
labels can be visually hidden (sr-only) if you don't want them visible. Ensure
the label text clearly identifies the field (e.g., "Development command" and
"Build command") and keep the htmlFor value identical to the Input id so screen
readers receive proper accessible names. Keep the existing props
(value={devCommand}, onChange, onKeyDown={handleKeyDown}, data-testid)
unchanged.

Comment on lines +175 to +185
<div className="space-y-3 pl-6">
<div className="relative">
<Input
id="dev-command"
value={devCommand}
onChange={(e) => setDevCommand(e.target.value)}
onKeyDown={handleKeyDown}
placeholder="e.g., npm run dev, yarn dev, cargo watch"
className="font-mono text-sm pr-8"
data-testid="dev-command-input"
/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add explicit labels for command inputs (a11y).

Placeholders alone aren’t reliable accessible names. Add <Label htmlFor=...> (can be visually hidden) for both inputs.

🧩 Suggested fix
                 <div className="relative">
+                  <Label htmlFor="dev-command" className="sr-only">
+                    Dev server command
+                  </Label>
                   <Input
                     id="dev-command"
                     value={devCommand}
                     onChange={(e) => setDevCommand(e.target.value)}
@@
                 <div className="relative">
+                  <Label htmlFor="test-command" className="sr-only">
+                    Test runner command
+                  </Label>
                   <Input
                     id="test-command"
                     value={testCommand}
                     onChange={(e) => setTestCommand(e.target.value)}

Also applies to: 232-241

🤖 Prompt for AI Agents
In `@apps/ui/src/components/views/project-settings-view/commands-section.tsx`
around lines 175 - 185, The command input fields currently rely on placeholders
for accessible names; add explicit <Label htmlFor="dev-command"> and a matching
label for the other command input (use the input id present in that block) and
associate them with their respective Input components (e.g., the Input with
id="dev-command" and the other input referenced around the same file) — the
labels can be visually hidden (sr-only) if you don't want them visible. Ensure
the label text clearly identifies the field (e.g., "Development command" and
"Build command") and keep the htmlFor value identical to the Input id so screen
readers receive proper accessible names. Keep the existing props
(value={devCommand}, onChange, onKeyDown={handleKeyDown}, data-testid)
unchanged.

@Shironex Shironex merged commit 655f254 into v0.14.0rc Jan 22, 2026
8 of 9 checks passed
@Shironex Shironex deleted the feature/v0.14.0rc-1769075904343-i0uw branch January 22, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Improvements to existing functionality or UI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants