Skip to content

Conversation

@Shironex
Copy link
Collaborator

@Shironex Shironex commented Jan 10, 2026

  • update @modelcontextprotocol/sdk to latest version to adress high security vulnerability

Summary by CodeRabbit

  • New Features

    • Added dynamic Codex model loading with metadata display (thinking capability, vision support, tier badges, default model indicator).
  • Removed Features

    • Removed AI Profiles feature, including profile management UI, settings, and related keyboard shortcuts.
    • Removed profile-related options from model selection dialogs and feature editing.
  • Chores

    • Updated dependency versions and internal service architecture.
    • Removed Codex credits snapshot from usage data.

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

Shironex and others added 9 commits January 10, 2026 00:11
…SON-RPC API

- Implemented a new method to retrieve usage data from the Codex app-server, providing real-time data and improving reliability.
- Updated the fetchUsageData method to prioritize app-server data over fallback methods.
- Added detailed logging for better traceability and debugging.
- Removed unused methods related to OpenAI API usage and Codex CLI requests, streamlining the service.

These changes enhance the functionality and robustness of the CodexUsageService, ensuring accurate usage statistics retrieval.
- Deleted the AI profile management feature, including all associated views, hooks, and types.
- Updated settings and navigation components to remove references to AI profiles.
- Adjusted local storage and settings synchronization logic to reflect the removal of AI profiles.
- Cleaned up tests and utility functions that were dependent on the AI profile feature.

These changes streamline the application by eliminating unused functionality, improving maintainability and reducing complexity.
refactor: remove AI profile functionality and related components
…gement

- Bumped version numbers for @automaker/server and @automaker/ui to 0.9.0 in package-lock.json.
- Introduced CodexAppServerService and CodexModelCacheService to manage communication with the Codex CLI's app-server and cache model data.
- Updated CodexUsageService to utilize app-server for fetching usage data.
- Enhanced Codex routes to support fetching available models and integrated model caching.
- Improved UI components to dynamically load and display Codex models, including error handling and loading states.
- Added new API methods for fetching Codex models and integrated them into the app store for state management.

These changes improve the overall functionality and user experience of the Codex integration, ensuring efficient model management and data retrieval.
- Eliminated CodexCreditsSnapshot interface and related logic from CodexUsageService and UI components.
- Updated CodexUsageSection to display only plan type, removing credits information for a cleaner interface.
- Streamlined Codex usage formatting functions by removing unused credit formatting logic.

These changes simplify the Codex usage management by focusing on plan types, enhancing clarity and maintainability.
Move .codex/config.toml to .gitignore to prevent accidental commits of
API keys. The file will remain local to each user's setup.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add error logging to CodexProvider auth check instead of silent failure
- Fix cachedAt timestamp to return actual cache time instead of request time
- Replace misleading hardcoded rate limit values (100) with sentinel value (-1)
- Fix unused parameter warning in codex routes

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
feat: improve codex plan and usage detection
@coderabbitai
Copy link

coderabbitai bot commented Jan 10, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR introduces Codex model caching and retrieval infrastructure while comprehensively removing the AI Profiles feature. New services handle app-server communication via JSON-RPC and disk-based model caching. Simultaneously, all AI profile UI components, settings, store management, and related keyboard shortcuts are eliminated across the codebase.

Changes

Cohort / File(s) Summary
Codex App-Server Communication
apps/server/src/services/codex-app-server-service.ts
New service implementing JSON-RPC communication with Codex CLI app-server. Provides methods to fetch models, account info, and rate limits with process spawning, initialization handshake, and timeout handling (10s per request).
Codex Model Caching
apps/server/src/services/codex-model-cache-service.ts
New service caching Codex models fetched from app-server with TTL-based invalidation and disk persistence. Includes model transformation, tier inference, concurrent refresh deduplication, and atomic file-based cache storage.
Server Initialization & Routing
apps/server/src/index.ts, apps/server/src/routes/codex/index.ts
Wire-up of new CodexAppServerService and CodexModelCacheService during server startup. Background model cache bootstrap. Extended Codex routes to accept modelCacheService and added new /models endpoint.
Codex Usage Service Updates
apps/server/src/services/codex-usage-service.ts
Refactored to accept optional CodexAppServerService dependency. Prioritizes app-server data for usage info with auth-file fallback. Removed credits snapshot from response structure.
Authentication & Logging
apps/server/src/lib/codex-auth.ts, apps/server/src/providers/codex-provider.ts
Replaced console logging with logger instances. Removed auth-file inspection code. Enhanced process spawning with explicit environment variables.
Codex Types & API
libs/types/src/codex-app-server.ts, libs/types/src/index.ts
New module defining JSON-RPC types for app-server communication (models, accounts, rate limits, generic request/response structures). Re-exported from main types index.
Server Dependencies
apps/server/package.json
Bumped @modelcontextprotocol/sdk from 1.25.1 to 1.25.2.
Electron & HTTP API Layers
apps/ui/src/lib/electron.ts, apps/ui/src/lib/http-api-client.ts
Added getModels(refresh?) method to Codex API surface. Removed AI profile-related properties (showProfilesOnly, defaultAIProfileId, aiProfiles) from settings shape.
Root & Model Selector Setup
apps/ui/src/routes/__root.tsx, apps/ui/src/components/views/board-view/shared/model-selector.tsx
Added Codex model bootstrap on app startup. Extended ModelSelector with dynamic Codex model fetching, loading states, and error retry UI.
AI Profiles Removal - Store & Types
apps/ui/src/store/app-store.ts, libs/types/src/settings.ts, libs/types/src/index.ts, apps/server/src/services/settings-service.ts, apps/server/src/types/settings.ts
Removed AIProfile type, profile management actions (addAIProfile, updateAIProfile, etc.), and related global settings (aiProfiles, defaultAIProfileId, showProfilesOnly) from store and type definitions. Added codexModels state to store.
AI Profiles Removal - UI Components
apps/ui/src/components/views/profiles-view.tsx, apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx, apps/ui/src/components/views/board-view/dialogs/edit-feature-dialog.tsx, apps/ui/src/components/views/board-view/dialogs/mass-edit-dialog.tsx
Deleted ProfilesView and all profile management dialogs. Removed ProfileTypeahead, ProfileSelect, and ProfileQuickSelect components from feature dialogs. Simplified model selection UI to use only PhaseModelSelector without profile mapping.
AI Profiles Removal - Profile Components
apps/ui/src/components/views/profiles-view/components/*, apps/ui/src/components/views/board-view/shared/profile-*.tsx
Removed all profile-related components: ProfileForm, ProfilesHeader, SortableProfileCard, ProfileTypeahead, ProfileSelect, ProfileQuickSelect, and associated constants/utilities.
AI Profiles Removal - Settings & Navigation
apps/ui/src/components/views/settings-view/feature-defaults/feature-defaults-section.tsx, apps/ui/src/components/views/settings-view/codex/codex-usage-section.tsx, apps/ui/src/components/layout/sidebar/hooks/use-navigation.ts, apps/ui/src/components/layout/sidebar/constants.ts, apps/ui/src/components/ui/keyboard-map.tsx
Removed Default AI Profile section from feature defaults. Removed profiles navigation item. Removed profiles keyboard shortcut. Removed credits display from Codex usage section. Removed hideAiProfiles feature flag.
AI Profiles Removal - Views & Documentation
apps/ui/src/components/views/github-issues-view.tsx, apps/ui/src/components/views/wiki-view.tsx, apps/ui/src/routes/profiles.tsx, docs/settings-api-migration.md
Removed profile defaults from feature creation. Removed AI Profiles from feature documentation. Deleted profiles route. Updated settings migration docs to reference projects instead of aiProfiles.
AI Profiles Removal - Test Utilities & Fixtures
apps/ui/tests/profiles/profiles-crud.spec.ts, apps/ui/tests/utils/views/profiles.ts, apps/ui/tests/utils/core/constants.ts, apps/ui/tests/utils/project/setup.ts, apps/ui/tests/utils/index.ts, apps/ui/tests/utils/git/worktree.ts, apps/ui/scripts/setup-e2e-fixtures.mjs
Removed profiles-related test files, test utility functions, test selectors, mock profile setup helpers, and E2E fixture properties (showProfilesOnly, defaultAIProfileId, aiProfiles).
Settings Synchronization
apps/ui/src/hooks/use-settings-sync.ts, apps/ui/src/hooks/use-settings-migration.ts
Excluded AI profile-related fields (showProfilesOnly, defaultAIProfileId, aiProfiles) from settings sync and migration flows.
Configuration
.gitignore
Added .codex/config.toml exclusion with comment noting API keys.

Sequence Diagram(s)

sequenceDiagram
    participant UI as UI / App
    participant Server as Automaker Server
    participant Cache as Model Cache
    participant AppServer as Codex App-Server
    
    UI->>Server: GET /codex/models
    activate Server
    Server->>Cache: getModels()
    activate Cache
    alt Cache is fresh
        Cache-->>Server: return cached models
    else Cache expired/missing
        Cache->>AppServer: spawn process & send JSON-RPC
        activate AppServer
        AppServer-->>Cache: models data
        deactivate AppServer
        Cache->>Cache: transform & persist to disk
        Cache-->>Server: return fresh models
    end
    deactivate Cache
    Server-->>UI: models with metadata
    deactivate Server
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

backend, ui, refactor, feature-removal

Poem

🐰 Away with profiles, old and worn,
Codex models dawn this morn!
Cache persists through thick and thin,
App-server speaks—let models in!
Logs now flow, no console cry,
Cleaner code beneath the sky! ✨

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f27074 and 543aa7a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (56)
  • .gitignore
  • apps/server/package.json
  • apps/server/src/index.ts
  • apps/server/src/lib/codex-auth.ts
  • apps/server/src/providers/codex-provider.ts
  • apps/server/src/routes/codex/index.ts
  • apps/server/src/services/codex-app-server-service.ts
  • apps/server/src/services/codex-model-cache-service.ts
  • apps/server/src/services/codex-usage-service.ts
  • apps/server/src/services/settings-service.ts
  • apps/server/src/types/settings.ts
  • apps/ui/scripts/setup-e2e-fixtures.mjs
  • apps/ui/src/components/layout/sidebar.tsx
  • apps/ui/src/components/layout/sidebar/constants.ts
  • apps/ui/src/components/layout/sidebar/hooks/use-navigation.ts
  • apps/ui/src/components/ui/keyboard-map.tsx
  • apps/ui/src/components/views/board-view.tsx
  • apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx
  • apps/ui/src/components/views/board-view/dialogs/edit-feature-dialog.tsx
  • apps/ui/src/components/views/board-view/dialogs/mass-edit-dialog.tsx
  • apps/ui/src/components/views/board-view/shared/index.ts
  • apps/ui/src/components/views/board-view/shared/model-selector.tsx
  • apps/ui/src/components/views/board-view/shared/profile-quick-select.tsx
  • apps/ui/src/components/views/board-view/shared/profile-select.tsx
  • apps/ui/src/components/views/board-view/shared/profile-typeahead.tsx
  • apps/ui/src/components/views/github-issues-view.tsx
  • apps/ui/src/components/views/profiles-view.tsx
  • apps/ui/src/components/views/profiles-view/components/index.ts
  • apps/ui/src/components/views/profiles-view/components/profile-form.tsx
  • apps/ui/src/components/views/profiles-view/components/profiles-header.tsx
  • apps/ui/src/components/views/profiles-view/components/sortable-profile-card.tsx
  • apps/ui/src/components/views/profiles-view/constants.ts
  • apps/ui/src/components/views/profiles-view/utils.ts
  • apps/ui/src/components/views/settings-view.tsx
  • apps/ui/src/components/views/settings-view/codex/codex-usage-section.tsx
  • apps/ui/src/components/views/settings-view/feature-defaults/feature-defaults-section.tsx
  • apps/ui/src/components/views/settings-view/model-defaults/phase-model-selector.tsx
  • apps/ui/src/components/views/wiki-view.tsx
  • apps/ui/src/hooks/use-settings-migration.ts
  • apps/ui/src/hooks/use-settings-sync.ts
  • apps/ui/src/lib/codex-usage-format.ts
  • apps/ui/src/lib/electron.ts
  • apps/ui/src/lib/http-api-client.ts
  • apps/ui/src/routes/__root.tsx
  • apps/ui/src/routes/profiles.tsx
  • apps/ui/src/store/app-store.ts
  • apps/ui/tests/profiles/profiles-crud.spec.ts
  • apps/ui/tests/utils/core/constants.ts
  • apps/ui/tests/utils/git/worktree.ts
  • apps/ui/tests/utils/index.ts
  • apps/ui/tests/utils/project/setup.ts
  • apps/ui/tests/utils/views/profiles.ts
  • docs/settings-api-migration.md
  • libs/types/src/codex-app-server.ts
  • libs/types/src/index.ts
  • libs/types/src/settings.ts

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.

@Shironex Shironex closed this Jan 10, 2026
@Shironex Shironex deleted the fix/security-vulnerability-in-dep branch January 10, 2026 15:45
@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 delivers a critical security update by upgrading a core SDK dependency, addressing a high-severity vulnerability. Concurrently, it introduces a significant architectural overhaul to the Codex CLI integration, transitioning to a more robust and reliable JSON-RPC app-server communication layer for model and usage data. This refactoring enhances stability and enables dynamic model fetching. A major functional change is the complete removal of the 'AI Profiles' feature, simplifying the application's model management approach.

Highlights

  • Security Vulnerability Fix: The @modelcontextprotocol/sdk dependency has been updated to version 1.25.2 to resolve a high-severity security vulnerability in the server.
  • Codex Integration Refactor: The server's interaction with the Codex CLI has been completely re-engineered to utilize a new JSON-RPC based codex app-server for model fetching and usage data, replacing previous direct CLI parsing methods.
  • New Codex Services Introduced: Two new services, CodexAppServerService and CodexModelCacheService, have been added to manage JSON-RPC communication and provide robust caching for Codex models with TTL-based invalidation and disk persistence.
  • Removal of AI Profiles Feature: The 'AI Profiles' feature, including all its UI components, settings, and underlying logic, has been entirely removed from the application to streamline model configuration.
  • Enhanced Logging and Debugging: Extensive console.log statements in Codex-related services have been replaced with structured logging using createLogger for improved debuggability and clarity.
  • Sensitive File Exclusion: The .codex/config.toml file, which may contain API keys, has been added to .gitignore to prevent accidental exposure of sensitive information.

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

@Shironex Shironex restored the fix/security-vulnerability-in-dep branch January 10, 2026 15:46
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 is a significant refactoring that improves the architecture for Codex integration by using the app-server JSON-RPC API. The new services for handling the app server and caching models are well-designed. However, the PR description is misleading as it omits the complete removal of the "AI Profiles" feature, a major change. My review focuses on a functional regression where a hardcoded model is used instead of user-configured defaults, and a point of brittleness in the new model tier inference logic. Despite these issues, the overall direction is a solid improvement.

Comment on lines +103 to +104
model: 'opus',
thinkingLevel: 'none' as const,
Copy link
Contributor

Choose a reason for hiding this comment

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

high

When creating a feature from a GitHub issue, the model is now hardcoded to 'opus' and thinkingLevel to 'none'. This is a regression in functionality, as it previously used the user's default AI profile. To restore flexibility, consider using the default model configured for the featureGenerationModel phase from the application settings (phaseModels). This would respect the user's model preferences for feature generation tasks. You'll need to pull phaseModels from the useAppStore hook to implement this.

Comment on lines +195 to +203
private inferTier(modelId: string): 'premium' | 'standard' | 'basic' {
if (modelId.includes('max') || modelId.includes('gpt-5.2-codex')) {
return 'premium';
}
if (modelId.includes('mini')) {
return 'basic';
}
return 'standard';
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The inferTier method relies on string matching (.includes()) on the model ID to determine the tier. This approach is brittle and may break if Codex model naming conventions change in the future. If the API doesn't provide this information directly, consider adding a comment to highlight this dependency on naming conventions for future maintenance.

@Shironex Shironex deleted the fix/security-vulnerability-in-dep branch January 10, 2026 15:52
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.

3 participants