-
Notifications
You must be signed in to change notification settings - Fork 476
feat: Separate Project Settings from Global Settings #525
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
feat: Separate Project Settings from Global Settings #525
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThis PR introduces a comprehensive prompt customization system, backlog plan feature for batch feature planning, project-level settings interface, event hooks for automation, enhanced graph visualization with dependency management, ideation dashboard improvements, and developer-facing logging/provider controls across server and UI. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant UI as Board View
participant Server as Server API
participant Claude as Claude API
participant Disk as Disk Storage
User->>UI: Open backlog plan dialog
UI->>UI: Load saved plan (if exists)
User->>UI: Enter plan description
User->>UI: Click "Generate Plan"
UI->>Server: POST /api/backlog-plan/generate
Server->>Server: Record running details
Server->>Claude: Stream plan generation
Claude-->>Server: Plan response
Server->>Disk: Save plan to disk
Server->>UI: Send backlog_plan_complete event
UI->>UI: Load saved plan
UI->>User: Display plan for review
User->>UI: Click "Apply Changes"
UI->>Server: POST /api/backlog-plan/apply
Server->>Server: Parse and apply changes
Server->>Disk: Clear saved plan
Server->>UI: Confirm success
UI->>User: Refresh board with changes
sequenceDiagram
participant System as System
participant Emitter as Event Emitter
participant EventHookService as Event Hook Service
participant Store as Settings Store
participant Shell as Shell/HTTP
participant User as User Webhook
System->>Emitter: Emit autoMode event (feature_success)
Emitter->>EventHookService: Event received
EventHookService->>Store: Load global settings
EventHookService->>Store: Filter enabled hooks by trigger
par Shell Hooks
EventHookService->>Shell: Execute shell command
Shell-->>EventHookService: Return stdout/stderr
EventHookService->>EventHookService: Log result
and HTTP Hooks
EventHookService->>User: POST with substituted variables
User-->>EventHookService: Response
EventHookService->>EventHookService: Log result
end
EventHookService->>EventHookService: Complete all hooks
sequenceDiagram
participant UI as Graph Canvas
participant Hook as useGraphLayout Hook
participant Dagre as Dagre Library
participant ReactFlow as React Flow
UI->>Hook: Mount with nodes & edges
Hook->>Hook: Compute structureKey from nodes+edges
Hook->>Dagre: Compute hierarchical layout
Dagre-->>Hook: Positioned nodes & edges
Hook->>Hook: Increment layoutVersion
Hook->>Hook: Cache positions by structureKey
Hook->>UI: Return layoutedNodes, layoutedEdges, layoutVersion
UI->>ReactFlow: Apply layout
ReactFlow->>ReactFlow: Render graph with positions
User->>UI: Update dependencies
UI->>Hook: Edges changed
Hook->>Hook: Detect structureKey change
Hook->>Dagre: Recompute layout
Hook->>UI: Return new layout + updated layoutVersion
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Suggested labels
Suggested reviewers
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. 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 |
Summary of ChangesHello @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 significantly refactors the application's settings architecture by introducing a dedicated Project Settings screen, thereby clearly distinguishing between global and project-specific configurations. This change aims to eliminate user confusion regarding the scope of various settings and provides a more intuitive customization experience. The new design supports a robust inheritance model, allowing projects to override global defaults for key functionalities like themes and Git worktree isolation, while also resolving critical bugs related to how these settings were previously handled. Additionally, the PR introduces a new event hook system for custom automation, an interactive TUI launcher for improved startup, and various UI/UX enhancements across the application, including the graph view and feature management workflows. Highlights
🧠 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 AssistThe 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
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 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
|
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.
Code Review
This pull request introduces significant updates across the application, primarily focusing on enhanced configuration, improved user experience, and expanded functionality. Key changes include updating the README.md with new Node.js requirements, simplified authentication instructions, and details for a new interactive TUI launcher script. The server-side code now supports runtime-configurable logging levels and HTTP request logging, and integrates a new EventHookService for custom actions on system events. Prompt customization has been greatly expanded, allowing users to modify a wider range of AI prompts for features like title generation, issue validation, ideation, app specification, context description, and task execution. The backlog planning feature now includes persistence, allowing plans to be saved, loaded, and cleared, and its status is reflected in the running agents view. Dependency management for features has been enhanced with a new UI component and logic to prevent circular dependencies. The UI introduces a dedicated 'Project Settings' view for per-project configuration of identity, theme, and worktree preferences, separating these from global settings. The graph view now includes search functionality and improved layout stability, along with a new 'Plan' button. The ideation dashboard received UI/UX improvements, including bulk discard functionality. Several internal refactorings were made, such as consolidating ptyProcess.kill logic into a helper function for cross-platform compatibility, and optimizing bulk feature operations with batch processing. Docker configurations were updated to reflect the new Node.js version and authentication changes. Overall, these changes aim to provide a more robust, customizable, and user-friendly development experience.
|
@coderabbitai review this please |
|
Tip For best results, initiate chat on the files or code changes.
🎯 Overall Architecture - Excellent DesignThe separation of global and project settings is well-architected. The Global → Project Override pattern for theme and worktree isolation is intuitive and follows common configuration paradigms. ✅ Strengths
🔍 Areas for Review1. Settings Migration & Backwards CompatibilityIn
2. Race Conditions in Settings LoadingIn // Multiple sequential API calls without proper loading states coordinationConsider consolidating settings load into a single endpoint or adding proper request queuing to avoid race conditions when rapidly switching between projects. 3. Error Handling in Project SettingsIn
4. Theme Override PersistenceThe bug fix mentioned in the PR summary is good, but verify:
5. Dependency ManagementNew dependencies added in
6. Settings Sync PerformanceIn // Multiple fields now trigger full settings sync
serverLogLevel, enableRequestLogging, disabledProviders, eventHooksConsider debouncing settings updates to reduce server load, especially for fields like 🐛 Potential IssuesHigh Priority:
Medium Priority:
🎨 Code Quality Suggestions
🧪 Testing Recommendations
📝 Documentation Suggestions
🎉 ConclusionThis is a well-executed feature with solid architecture. The separation of concerns is clean, and the UI is consistent with existing patterns. Address the security concerns around shell command execution and prompt injection, and consider the performance optimizations for settings sync. Great work overall! Priority: Address the shell injection vulnerability in event hooks service before merging. |
|
@coderabbitai Can you review ONLY the file changes from this PR and know that we moved existing code to other places (global settings to project settings). |
|
Tip For best results, initiate chat on the files or code changes.
🎯 Core Architecture Review: Project vs Global Settings Split✅ What Was Moved SuccessfullyFrom
From
🔍 Separation Architecture Review1. Override Mechanism (Global → Project Pattern) // In app-store.ts - NEW
useWorktreesByProject: Record<string, boolean | undefined>
getEffectiveUseWorktrees: (projectPath: string) => boolean✅ Well-designed: The override system properly falls back to global defaults when project override is Issue Found: In const USE_GLOBAL_THEME = '' as const;This is inconsistent with the worktree override pattern which uses 2. Settings Persistence
Issue Found: In // Loads project settings
await api.Settings.getProject(project.path)
// Then loads init script
await api.Worktree.getInitScript(project.path)Consider a single endpoint or proper loading coordination to avoid race conditions during rapid project switching. 🐛 Bugs in the Separation Logic1. Theme Override Persistence Bug (claimed as fixed)
2. Worktree Isolation Override Loading const effectiveUseWorktrees = projectSettings?.useWorktrees ?? globalSettings.useWorktrees ?? false;This logic duplicates 📦 New Project Settings StructureNavigation (
Routing: Issue: The sidebar now has TWO settings entries:
This could be confusing. Consider:
🔄 Migration & Backwards CompatibilityConcern: Existing projects upgrading to this version:
Recommendation: Add a one-time migration that:
🎨 UI/UX of the SeparationProject Settings View:
Global Settings View:
Minor UI Issue: In 🔐 Separation of ConcernsWhat stayed global (correct):
What moved to project (correct):
No concerns - the separation is logical and complete. 📊 Store Changes for Override SystemIn // NEW per-project tracking
useWorktreesByProject: Record<string, boolean | undefined>
setProjectUseWorktrees: (projectPath: string, useWorktrees: boolean | null) => void
getEffectiveUseWorktrees: (projectPath: string) => boolean✅ Well-implemented: The override map and effective value computation are clean. Minor optimization: Consider adding 🎯 Summary: Separation-Specific IssuesCritical:None - the separation logic is sound. Important:
Nice to Have:
✅ What Was Done Well
Overall: The separation is architecturally sound. The main issues are minor consistency problems (sentinel values, duplicate logic) that can be easily addressed. |
|
Tip For best results, initiate chat on the files or code changes.
🎯 Understanding the RefactoringI see the architectural split:
🆕 Actual New Features to Review1. Per-Project Settings Storage (
|
|
It seems CodeRabbit did take existing code or other code from the target branch into account for the review. I fixed the reviews that where valid based upon the changes in the file. |
This PR introduces a new dedicated Project Settings screen accessible from the sidebar, clearly separating project-specific settings from global application settings. - Added new route `/project-settings` with dedicated view - Sidebar navigation item "Settings" in Tools section (Shift+S shortcut) - Sidebar-based navigation matching global Settings pattern - Sections: Identity, Worktrees, Theme, Danger Zone **Moved to Project Settings:** - Project name and icon customization - Project-specific theme override - Worktree isolation enable/disable (per-project override) - Init script indicator visibility and auto-dismiss - Delete branch by default preference - Initialization script editor - Delete project (Danger Zone) **Remains in Global Settings:** - Global theme (default for all projects) - Global worktree isolation (default for new projects) - Feature Defaults, Model Defaults - API Keys, AI Providers, MCP Servers - Terminal, Keyboard Shortcuts, Audio - Account, Security, Developer settings Both Theme and Worktree Isolation now follow a consistent override pattern: 1. Global Settings defines the default value 2. New projects inherit the global value 3. Project Settings can override for that specific project 4. Changing global setting doesn't affect projects with overrides - Fixed: Changing global theme was incorrectly overwriting project themes - Fixed: Project worktree setting not persisting across sessions - Project settings now properly load from server on component mount - Shell syntax editor: improved background contrast (bg-background) - Shell syntax editor: removed distracting active line highlight - Project Settings header matches Context/Memory views pattern - `apps/ui/src/routes/project-settings.tsx` - `apps/ui/src/components/views/project-settings-view/` (9 files) - Global settings simplified (removed project-specific options) - Sidebar navigation updated with project settings link - App store: added project-specific useWorktrees state/actions - Types: added projectSettings keyboard shortcut - HTTP client: added missing project settings response fields
- Fix race conditions when rapidly switching projects - Added cancellation logic to prevent stale responses from updating state - Both project settings and init script loading now properly cancelled on unmount - Improve error handling in custom icon upload - Added toast notifications for validation errors (file type, file size) - Added toast notifications for upload success/failure - Handle network errors gracefully with user feedback - Handle file reader errors
8399bbb to
6a23e6c
Compare
Response to CodeRabbit ReviewThanks for the detailed review! After careful analysis, I've identified which feedback applies to our actual changes vs. code we didn't modify. ❌ Not in This PR (Should Be Addressed Separately)The following concerns are about files/features not modified in this PR:
These are valid concerns but should be addressed in separate PRs by the respective feature authors. ✅ Verified Working in This PR
|
…tings - Move "Settings" from Tools section to Project section in sidebar - Rename bottom settings link from "Settings" to "Global Settings" - Update keyboard shortcut description accordingly
- Remove Project Settings from Project section - Add Project Settings as standalone section below Tools/GitHub - Use empty label for visual separation without header - Add horizontal separator line above sections without labels - Rename to "Project Settings" for clarity - Keep "Global Settings" at bottom of sidebar
Summary
This PR introduces a new dedicated Project Settings screen accessible from the sidebar, clearly separating project-specific settings from global application settings. This improves UX by making it clear which settings affect all projects vs. the current project only.
Key Highlights
Motivation
Previously, global settings and project-specific settings were mixed together in a single Settings screen, causing confusion about:
This PR addresses these issues by:
New Project Settings Screen
Access
Shift+S/project-settingsSections
Sidebar Changes
The sidebar now has a clear separation between project-specific and global settings:
Settings Separation
Moved to Project Settings (per-project)
These settings now live in Project Settings and are stored in
.automaker/settings.json:.automaker/worktree-init.sh)Remains in Global Settings (app-wide)
These settings remain in Global Settings as they affect all projects:
Global → Project Override Pattern
Both Theme and Worktree Isolation now follow a consistent inheritance pattern:
How It Works
Example: Theme
Bug Fixes
1. Global theme change was overwriting project themes
Before: Changing theme in Global Settings would also set the project's theme, overwriting any override.
After: Global Settings only changes the global theme. Projects with overrides are not affected.
2. Project worktree setting not persisting
Before: Project-specific worktree isolation setting was lost on page refresh.
After: Settings are loaded from server when Project Settings opens, properly restoring overrides.
UI Improvements
Shell Syntax Editor (Init Script)
bg-muted/30tobg-backgroundfor better contrast in all themesProject Settings Header
bg-glass backdrop-blur-mdstylingSidebar
Files Changed
New Files (9)
Modified Files (13)
Test Plan
Shift+S→ Opens Project Settings/project-settingswithout a project → Shows "No Project Selected" messageScreenshots