Skip to content

Conversation

@Shironex
Copy link
Collaborator

@Shironex Shironex commented Dec 20, 2025

  • Introduced default AI profile management in the settings view, allowing users to select a default profile for new features.
  • Updated the Add Feature dialog to utilize the selected AI profile, setting default model and thinking level based on the chosen profile.
  • Enhanced the Feature Defaults section to display and manage the default AI profile, including a dropdown for selection and relevant information display.

Resolved

Preview

image

Summary by CodeRabbit

  • New Features
    • Added the ability to set and persist a default AI profile in application settings.
    • When creating new features, the default AI profile's model and thinking level are now automatically applied if configured.

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

- Introduced default AI profile management in the settings view, allowing users to select a default profile for new features.
- Updated the Add Feature dialog to utilize the selected AI profile, setting default model and thinking level based on the chosen profile.
- Enhanced the Feature Defaults section to display and manage the default AI profile, including a dropdown for selection and relevant information display.
@Shironex Shironex self-assigned this Dec 20, 2025
@Shironex Shironex added the Enhancement Improvements to existing functionality or UI. label Dec 20, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2025

Walkthrough

Adds a per-user persisted default AI profile setting, exposes it in Settings UI, and applies the chosen profile’s model and thinking level when opening the Add Feature dialog (falling back to existing defaults when none is set).

Changes

Cohort / File(s) Change Summary
State management
apps/ui/src/store/app-store.ts
Add `defaultAIProfileId: string
Settings UI
apps/ui/src/components/views/settings-view.tsx, apps/ui/src/components/views/settings-view/feature-defaults/feature-defaults-section.tsx
Thread new props defaultAIProfileId, aiProfiles, and onDefaultAIProfileIdChange into defaults view; add a Select control to choose "None" or an AI profile and preview the selected profile.
Add Feature dialog
apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx
Add defaultAIProfileId prop; on dialog open look up matching AI profile and initialize new feature’s model and thinkingLevel from it (fallback to "opus" and "none"); include defaultAIProfileId and aiProfiles in effect dependencies.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User
  participant SettingsView
  participant AppStore
  participant AddFeatureDialog

  Note over User,SettingsView: User selects default AI profile
  User->>SettingsView: choose profile (id or "None")
  SettingsView->>AppStore: setDefaultAIProfileId(profileId)
  AppStore-->>SettingsView: persisted state updated

  Note over User,AddFeatureDialog: Later, user opens Add Feature dialog
  User->>AddFeatureDialog: open dialog
  AddFeatureDialog->>AppStore: read defaultAIProfileId, aiProfiles
  AppStore-->>AddFeatureDialog: return defaultAIProfileId, aiProfiles
  AddFeatureDialog->>AddFeatureDialog: lookup profile by id
  alt profile found
    AddFeatureDialog->>AddFeatureDialog: init newFeature.model & thinkingLevel from profile
  else none found
    AddFeatureDialog->>AddFeatureDialog: init defaults (model="opus", thinkingLevel="none")
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review persistence and migration/partialize changes in apps/ui/src/store/app-store.ts
  • Verify prop propagation and null/"None" handling in feature-defaults-section.tsx and settings-view.tsx
  • Check effect dependency correctness and profile-lookup/fallback logic in add-feature-dialog.tsx
  • Confirm delete-profile flow correctly clears default when needed

Poem

🐇 In burrows of code I nibbled a tweak,
A default profile found for the meek.
One pick, many features — no more repeat,
Hopping through settings with soft little feet. 🎩✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: add default AI profile selection to settings view' accurately and clearly describes the main change: adding functionality to select a default AI profile in the settings view.
Linked Issues check ✅ Passed The PR successfully implements the requirements from issue #126: it enables users to set a default AI profile in settings, applies this profile to new features (Add Feature dialog), and eliminates per-feature profile configuration needs.
Out of Scope Changes check ✅ Passed All changes are within scope: app store updates for state management, settings view enhancements for profile selection, feature defaults section UI updates, and Add Feature dialog integration with default profiles.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/defatul-ai-profile

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 80cf932 and 3ca1daf.

📒 Files selected for processing (1)
  • apps/ui/src/store/app-store.ts (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/ui/src/store/app-store.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: e2e

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

@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 quality-of-life improvement by allowing users to define a default AI profile in the application settings. This enhancement ensures that when new features are created, they automatically inherit the pre-selected AI model and thinking level, reducing manual configuration and accelerating the workflow for users who frequently use specific AI settings.

Highlights

  • Default AI Profile Selection: Users can now select a default AI profile within the settings view, which will pre-configure AI model and thinking level for new features.
  • Add Feature Dialog Integration: The 'Add Feature' dialog has been updated to automatically utilize the globally selected default AI profile, streamlining the feature creation process.
  • Enhanced Feature Defaults Section: A new UI component has been added to the Feature Defaults section in settings, allowing users to easily view and manage their preferred default AI profile.

🧠 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.

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 set a default AI profile for new features. It adds a defaultAIProfileId to the application's global state, making it persistent across sessions. A new UI section is implemented in the FeatureDefaultsSection within the settings view, allowing users to select a preferred AI profile or 'None' from a dropdown. This selection is then used in the AddFeatureDialog to automatically pre-populate the AI model and thinking level for newly created features based on the chosen default profile.

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

🧹 Nitpick comments (1)
apps/ui/src/store/app-store.ts (1)

746-746: Consider clearing defaultAIProfileId when the selected profile is deleted.

The setter doesn't validate that the profileId exists in aiProfiles. When a profile is deleted via removeAIProfile (line 1512), consider adding logic to clear defaultAIProfileId if it matches the deleted profile:

 removeAIProfile: (id) => {
   const profile = get().aiProfiles.find((p) => p.id === id);
   if (profile && !profile.isBuiltIn) {
+    // Clear default if this profile was selected
+    if (get().defaultAIProfileId === id) {
+      set({ defaultAIProfileId: null });
+    }
     set({ aiProfiles: get().aiProfiles.filter((p) => p.id !== id) });
   }
 },

This prevents dangling references. The current code in AddFeatureDialog (lines 137-139) gracefully handles missing profiles with optional chaining, but proactive cleanup is cleaner.

Also applies to: 2271-2271

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d104a24 and 80cf932.

📒 Files selected for processing (4)
  • apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx (2 hunks)
  • apps/ui/src/components/views/settings-view.tsx (2 hunks)
  • apps/ui/src/components/views/settings-view/feature-defaults/feature-defaults-section.tsx (5 hunks)
  • apps/ui/src/store/app-store.ts (5 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/ui/src/components/views/settings-view/feature-defaults/feature-defaults-section.tsx (1)
apps/ui/src/store/app-store.ts (2)
  • AIProfile (270-279)
  • PlanningMode (267-267)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: e2e
🔇 Additional comments (6)
apps/ui/src/store/app-store.ts (1)

497-497: LGTM! State field added correctly.

The defaultAIProfileId field is properly typed as string | null to represent optional profile selection.

apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx (1)

136-147: LGTM! Profile lookup and defaults initialization implemented correctly.

The code defensively looks up the default profile and applies its settings with appropriate fallbacks. The effect correctly re-runs when defaultAIProfileId or aiProfiles change while the dialog is open, ensuring fresh defaults.

apps/ui/src/components/views/settings-view.tsx (1)

46-48: LGTM! Store state and actions correctly wired to FeatureDefaultsSection.

All necessary props (defaultAIProfileId, aiProfiles, onDefaultAIProfileIdChange) are properly passed down to enable AI profile selection in the settings UI.

Also applies to: 133-134, 141-141

apps/ui/src/components/views/settings-view/feature-defaults/feature-defaults-section.tsx (3)

54-57: LGTM! Defensive profile lookup.

The selectedProfile computation correctly handles the case where defaultAIProfileId might not match any existing profile (e.g., if a profile was deleted).


193-213: LGTM! Select component correctly handles null value.

The value conversion logic (defaultAIProfileId ?? "none" and v === "none" ? null : v) properly represents the absence of a selection and converts between null and the "none" sentinel value.


215-219: LGTM! Clear and informative user feedback.

The descriptive text appropriately shows either the selected profile's configuration or explains the "None" option's behavior.

- Added logic to clear the default AI profile ID if the selected profile is being removed from the AI profiles list. This ensures that the application maintains a valid state when profiles are deleted.
@Shironex Shironex added the Ready-To-Merge A feature or bug has been improved/fixed and a final review is requested before merging. label Dec 20, 2025
@webdevcody webdevcody merged commit cf7a737 into main Dec 20, 2025
4 checks passed
@webdevcody webdevcody deleted the feat/defatul-ai-profile branch December 20, 2025 02:21
This was referenced Jan 10, 2026
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. Ready-To-Merge A feature or bug has been improved/fixed and a final review is requested before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to select a default AI profile

3 participants