Skip to content

Conversation

@Monoquark
Copy link

@Monoquark Monoquark commented Jan 24, 2026

  • Add settings popover to the ideation view (right of the "Generate" button)
  • Migrate previous context to popover toggles (memory, context, features, ideas)
  • Add app specifications as new context option, reusing the existing app specs
image

Summary by CodeRabbit

  • New Features
    • Per-project Ideation settings panel to toggle which context sources are used (context files, memory, existing features/ideas, app spec) with persisted overrides.
    • App spec integration can enrich generated suggestions with project overview, capabilities and implemented features.
  • Bug Fixes
    • Missing app spec files no longer cause errors.
    • Suggestion generation now consistently respects and caps the requested suggestion count.

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

- Add settings popover to the ideation view
- Migrate previous context to toggles (memory, context, features, ideas)
- Add app specifications as new context option
@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 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 toggles for ideation context sources and threads an optional contextSources parameter from UI store through API to server; server conditionally loads context files, memory, existing work, and app_spec content when generating suggestions and enforces suggestion count caps.

Changes

Cohort / File(s) Summary
Server route
apps/server/src/routes/ideation/routes/suggestions-generate.ts
Accepts contextSources from request body and forwards it to IdeationService.generateSuggestions.
Backend service
apps/server/src/services/ideation-service.ts
generateSuggestions signature extended with optional contextSources; merges with defaults; gates loading of context files, memory, existing features/ideas, and app_spec; adds app_spec parsing helpers; enforces suggestion count bounds and caps parsed results.
Server tests
apps/server/tests/unit/services/ideation-service.test.ts
Added tests for app_spec inclusion/exclusion, ENOENT handling, and updated chat options mocking to assert systemPrompt content.
Frontend UI
apps/ui/src/components/views/ideation-view/components/ideation-settings-popover.tsx, apps/ui/src/components/views/ideation-view/index.tsx
New IdeationSettingsPopover component with per-project toggles; integrated into ideation header; IdeationHeader now accepts projectPath prop.
Frontend state
apps/ui/src/store/ideation-store.ts
Added contextSourcesByProject, getContextSources, setContextSource; merges with DEFAULT_IDEATION_CONTEXT_SOURCES; bumped persist version and migration.
Frontend mutations
apps/ui/src/hooks/mutations/use-ideation-mutations.ts
Reads contextSources from store and passes it to api.ideation.generateSuggestions(...).
IPC / API clients
apps/ui/src/lib/electron.ts, apps/ui/src/lib/http-api-client.ts
generateSuggestions signatures extended to accept optional contextSources; HTTP client includes contextSources in request body.
Types
libs/types/src/ideation.ts, libs/types/src/index.ts
New exported IdeationContextSources interface and DEFAULT_IDEATION_CONTEXT_SOURCES constant (five boolean flags).
Utils
libs/utils/src/context-loader.ts
loadContextFiles gains includeContextFiles option to gate context file loading while leaving memory loading unchanged.

Sequence Diagram

sequenceDiagram
    participant User as User (UI)
    participant Popover as IdeationSettingsPopover
    participant Store as Zustand Store
    participant Mutation as useIdeationMutations
    participant HTTPClient as HttpApiClient
    participant Server as IdeationService (Server)
    participant FS as FileSystem
    participant Provider as LLM Provider

    User->>Popover: Toggle context source
    Popover->>Store: setContextSource(projectPath, key, value)
    Store->>Store: persist contextSourcesByProject

    User->>Mutation: Click "Generate Ideas"
    Mutation->>Store: getContextSources(projectPath)
    Store-->>Mutation: merged IdeationContextSources
    Mutation->>HTTPClient: generateSuggestions(..., contextSources)
    HTTPClient->>Server: POST /api/ideation/suggestions/generate {..., contextSources}

    Server->>Server: merge with DEFAULT_IDEATION_CONTEXT_SOURCES
    alt useAppSpec enabled
        Server->>FS: getAppSpecPath & read app_spec.txt
        FS-->>Server: app_spec content
        Server->>Server: buildAppSpecContext()
    end
    alt useContextFiles enabled
        Server->>FS: loadContextFiles()
        FS-->>Server: context files
    end
    alt useExistingFeatures/useExistingIdeas enabled
        Server->>Server: gatherExistingWorkContext(options)
    end
    Server->>Server: assemble systemPrompt & call Provider
    Server->>Provider: provider.chat(...)
    Provider-->>Server: response
    Server-->>HTTPClient: suggestions[]
    HTTPClient-->>Mutation: {success, suggestions}
    Mutation-->>User: render suggestions
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

Enhancement, type: feature

Poem

🐰 I nibble toggles, small and bright,

I stitch app specs into the night,
From store to server, hops in flight,
Ideas bloom under moonlight—hooray! 🌱✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: Add ideation context settings' accurately describes the main change: introducing a new settings popover with toggleable context source options for the ideation view.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Monoquark, 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 enhances the ideation feature by providing users with granular control over the context used for generating suggestions. By introducing a dedicated settings popover and integrating 'App Specification' as a new context source, the system can now produce more relevant and focused ideas based on user preferences, improving the overall quality and utility of the ideation process.

Highlights

  • Configurable Ideation Context: Introduced a new settings popover in the ideation view, allowing users to explicitly select which context sources (e.g., memory files, context files, existing features/ideas, and app specifications) are used for generating ideas.
  • App Specification as Context Source: Added 'App Specification' as a new context option, enabling the AI to leverage project overview, capabilities, and implemented features from app_spec.txt during idea generation.
  • Backend Support for Context Toggles: The backend ideation service (IdeationService) has been updated to accept and apply the user-defined context source preferences, ensuring that only selected information is fed to the AI model.
  • UI Integration and Persistence: The new settings popover is integrated into the ideation view, and the chosen context preferences are persisted per project using the ideation-store.

🧠 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 a new settings popover for ideation, allowing users to configure which context sources are used for generating ideas. The changes are well-implemented across the frontend, state management, and backend services. A new context source from app_spec.txt has also been added. The code is of high quality, with good test coverage for the new backend logic. I've pointed out a minor area for improvement regarding redundant code in the ideation-service to enhance maintainability.

- Removed the suggestionCount variable that was re-clamping the count parameter
- Removed default values from function parameters (count: number = 10 → count: number)
@Shironex Shironex added Enhancement Improvements to existing functionality or UI. Testers-Requested Request for others to test an enhancement or bug fix/etc. Do Not Merge Use this label if something should not be merged. labels Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do Not Merge Use this label if something should not be merged. Enhancement Improvements to existing functionality or UI. Testers-Requested Request for others to test an enhancement or bug fix/etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants