Skip to content

Conversation

@stefandevo
Copy link
Collaborator

@stefandevo stefandevo commented Jan 21, 2026

Summary

  • Adds defaultFeatureModel setting that can be overridden at the project level
  • New features inherit their model from the project override if set, otherwise fall back to the global default
  • Default Feature Model is now displayed in the Model Defaults section alongside phase models
  • Included in both global and project-level Bulk Replace dialogs

Changes

  • Types: Added defaultFeatureModel to ProjectSettings interface
  • UI Store: Added setDefaultFeatureModel, setProjectDefaultFeatureModel actions, updated reset/clear functions
  • Settings Service: Added __CLEAR__ handler for project-level override deletion
  • Model Defaults Section: New FeatureDefaultModelSection component
  • Project Models Section: New FeatureDefaultModelOverrideSection component
  • Bulk Replace Dialogs: Both global and project dialogs now include Default Feature Model
  • Add Feature Dialog: Uses project override when available

Test plan

  • Create a new feature without project override - should use global default
  • Set project-level default model override
  • Create a new feature - should use project override
  • Clear project override - new features should fall back to global
  • Test Bulk Replace in both global and project settings
  • Test Reset to Defaults - should reset Default Feature Model

Summary by CodeRabbit

  • New Features
    • Global default model for new feature cards with project-scoped overrides.
    • Project settings UI to view, set, or clear a project-specific default model (project override supersedes global).
    • Bulk replace tools updated to include the Default Feature Model with preview and apply flows.
    • Reset and clear actions now handle default feature model overrides, and UI shows badges/labels indicating Global vs Project defaults.

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

claude and others added 4 commits January 21, 2026 00:56
- Add defaultFeatureModel to ProjectSettings type for project-level override
- Add defaultFeatureModel to Project interface for UI state
- Display Default Feature Model in Model Defaults section alongside phase models
- Include Default Feature Model in global Bulk Replace dialog
- Add Default Feature Model override section to Project Settings
- Add setProjectDefaultFeatureModel store action for project-level overrides
- Update clearAllProjectPhaseModelOverrides to also clear defaultFeatureModel
- Update add-feature-dialog to use project override when available
- Include Default Feature Model in Project Bulk Replace dialog

This allows projects with different complexity levels to use different
default models (e.g., Haiku for simple tasks, Opus for complex projects).
- Add handler in settings-service.ts to properly delete defaultFeatureModel
  when '__CLEAR__' marker is sent from the UI
- Fix bulk-replace-dialog.tsx to correctly return claude-opus when resetting
  default feature model to Anthropic Direct (was incorrectly using
  enhancementModel's settings which default to sonnet)

These fixes ensure:
1. Clearing project default model override properly removes the setting
   instead of storing literal '__CLEAR__' string
2. Global bulk replace correctly resets default feature model to opus
- Updated resetPhaseModels to also reset defaultFeatureModel to claude-opus
- Fixed initial state to use canonical 'claude-opus' instead of 'opus'
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @stefandevo, 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 enhances the application's flexibility by introducing a new configuration option that allows users to define a default model for new features on a per-project basis. This provides finer-grained control over AI model usage, ensuring that new features within a specific project can consistently use a preferred model without manual selection, while still respecting a global default. The changes span across UI components for display and interaction, state management for data handling, and backend services for persistence, ensuring a cohesive and robust implementation.

Highlights

  • Per-Project Default Model Override: Introduced a new defaultFeatureModel setting that can be overridden at the project level, allowing new features to inherit their model from a project-specific setting or fall back to the global default.
  • UI Integration: The Default Feature Model is now displayed in both the global Model Defaults section and a new Project Models section, providing clear visibility and control. It has also been integrated into both global and project-level Bulk Replace dialogs for mass updates.
  • Feature Creation Logic: The 'Add Feature Dialog' now intelligently uses the project-level default feature model if set, otherwise it defaults to the global configuration.
  • Backend and State Management Updates: The SettingsService on the server now handles a __CLEAR__ marker for defaultFeatureModel to facilitate project-level override deletion. The UI store (app-store.ts) includes new actions (setDefaultFeatureModel, setProjectDefaultFeatureModel) and updated reset/clear functions to manage this new setting.
  • Type Definitions: The ProjectSettings interface in libs/types and apps/ui/src/lib/electron.ts has been extended to include the defaultFeatureModel property.

🧠 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 21, 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

Adds per-project defaultFeatureModel support: new ProjectSettings field, server handling for a "CLEAR" sentinel, store actions to set/clear project defaults, and UI surfaces (model defaults, project models, bulk-replace, add-feature dialog) that respect project-level overrides with global fallback.

Changes

Cohort / File(s) Summary
Type Definitions
libs/types/src/settings.ts
Added optional defaultFeatureModel?: PhaseModelEntry to ProjectSettings.
Backend Settings
apps/server/src/services/settings-service.ts
Handle "__CLEAR__" sentinel in updateProjectSettings to delete per-project defaultFeatureModel overrides.
Store & Project Interface
apps/ui/src/store/app-store.ts,
apps/ui/src/lib/electron.ts
Added setProjectDefaultFeatureModel action; persisted project defaultFeatureModel (including 'CLEAR' on clear); extended Project type with optional defaultFeatureModel.
Global Model Defaults UI
apps/ui/src/components/views/settings-view/model-defaults/*
.../bulk-replace-dialog.tsx, .../model-defaults-section.tsx
Introduced Feature Default UI section, added DEFAULT_FEATURE_MODEL_KEY and ExtendedPhaseKey, unified preview generator, and applied logic to set global defaultFeatureModel.
Project Model Overrides UI
apps/ui/src/components/views/project-settings-view/*
.../project-models-section.tsx, .../project-bulk-replace-dialog.tsx
Added per-project Feature Default override section, integrated defaultFeatureModel into bulk-replace preview/apply flows, updated override counting and row rendering (badge/styling).
Feature Dialog
apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx
Compute effectiveDefaultFeatureModel (project override ?? global default) and use it for initialization, effects, and reset logic.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant UI as "Project Settings / Dialog"
    participant Store as "App Store"
    participant Server as "Settings Service"

    User->>UI: Set or clear project defaultFeatureModel
    UI->>Store: setProjectDefaultFeatureModel(projectId, entry|null)
    Store->>Server: updateProject({ defaultFeatureModel: entry || "__CLEAR__" })
    Server-->>Store: Persist confirmation
    Store->>Store: update project.defaultFeatureModel

    User->>UI: Open Add Feature dialog
    UI->>Store: read currentProject.defaultFeatureModel & global default
    Store-->>UI: effectiveDefaultFeatureModel (project ?? global)
    UI->>UI: initialize dialog with effectiveDefaultFeatureModel
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Suggested labels

Enhancement, Ready-To-Merge

Poem

🐰 I hopped through settings, soft and light,

A default model now set just right,
Per-project whispers, global song,
Cards inherit where they belong—
Hooray! New defaults take flight!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the primary change: adding a per-project default model override for new features, which is the core focus of all modifications across the codebase.

✏️ 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 a per-project override for the default feature model, which is a great enhancement for flexibility. The changes are comprehensive, touching the settings service, UI components for settings, the new feature dialog, and the state management store. The implementation is solid, with consistent use of patterns like the __CLEAR__ marker for resetting settings.

I have a couple of suggestions to improve maintainability:

  1. Refactor duplicated logic: A function to get a model's display name is implemented in a few different places. Consolidating this into a shared utility would reduce code duplication.
  2. Avoid hardcoded defaults: The default feature model (claude-opus) is hardcoded in several places as a fallback. Using a shared constant would make it easier to manage this default value in the future.

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: 3

🤖 Fix all issues with AI agents
In `@apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx`:
- Around line 197-203: Run Prettier to fix formatting: break the long
destructuring from useAppStore() across multiple lines so it fits the project's
formatter rules and reformat the file; update the block that defines const {
defaultPlanningMode, defaultRequirePlanApproval, useWorktrees,
defaultFeatureModel, currentProject } = useAppStore() into a multi-line
destructure and ensure the subsequent effectiveDefaultFeatureModel calculation
(using currentProject?.defaultFeatureModel ?? defaultFeatureModel) remains
unchanged, then save and re-run the formatter to satisfy the lint/format check.

In
`@apps/ui/src/components/views/project-settings-view/project-bulk-replace-dialog.tsx`:
- Around line 69-75: The long destructuring from useAppStore is triggering
Prettier; split the single-line const into multiple lines so each identifier is
on its own line (or grouped sensibly) to satisfy line-length rules — update the
declaration where useAppStore() is destructured (the const that assigns
phaseModels, setProjectPhaseModelOverride, claudeCompatibleProviders,
defaultFeatureModel, setProjectDefaultFeatureModel) to a multi-line destructure
and ensure proper trailing commas and spacing to pass formatting.

In
`@apps/ui/src/components/views/settings-view/model-defaults/model-defaults-section.tsx`:
- Around line 116-152: The new FeatureDefaultModelSection contains an overlong
JSX line with the PhaseModelSelector that Prettier couldn't format; open the
FeatureDefaultModelSection function and break the JSX props for
PhaseModelSelector onto multiple lines (e.g., place <PhaseModelSelector on its
own line and put compact, value={defaultValue},
onChange={setDefaultFeatureModel}, align="end" each on their own indented lines)
so the formatter can wrap it, then run Prettier (or your repo format script) to
reformat the file; target the PhaseModelSelector element inside
FeatureDefaultModelSection to fix this.
🧹 Nitpick comments (1)
apps/ui/src/components/views/project-settings-view/project-models-section.tsx (1)

91-209: Consider extracting a shared getModelDisplayName helper.
The new section duplicates logic already present in PhaseOverrideItem; a shared utility would avoid drift.

Address PR review feedback:
- Replace hardcoded { model: 'claude-opus' } with DEFAULT_GLOBAL_SETTINGS.defaultFeatureModel
- Fix Prettier formatting for long destructuring lines
- Import DEFAULT_GLOBAL_SETTINGS from @automaker/types where needed

This improves maintainability by centralizing the default value.
@stefandevo stefandevo merged commit 5ab53af into AutoMaker-Org:v0.14.0rc Jan 21, 2026
6 checks passed
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.

2 participants