Skip to content

feat(agent): switches for the ChatGPT and Claude app sources - #204

Open
IgorMGitHub wants to merge 1 commit into
mainfrom
new-source-switches
Open

IgorMGitHub wants to merge 1 commit into
mainfrom
new-source-switches

Conversation

@IgorMGitHub

Copy link
Copy Markdown
Collaborator

What changes

The two app sources get what the other tools have: a switch of their own, "not installed" in Status, and a test that "Delete everything" removes them.

  • collection.chatgpt and collection.claude_app are new switches, on by default. A settings file without chatgpt reads it as its codex value, so a person who turned Codex off does not start collecting ChatGPT chats; a file without claude_app reads it as on. A switch that is not a boolean (null too) makes the file unreadable, which turns collection off, as for the other switches.
  • settings-get answers both switches, settings-set takes both, and tools_off names each source whose switch is off.
  • Status shows not_installed for the ChatGPT app when ~/Library/Application Support/Codex is not there (the app keeps its data under the name of Codex Desktop, which it is built on). The Claude app already does.
  • The erasure test now covers both apps: no record and no progress is left, and switching collection on collects them again.

For the Settings page: the field names are collection.chatgpt and collection.claude_app, in settings-get and settings-set; a source without its app has "not_installed": true in status.

Known limits

  • Until the Settings page shows the new switches, the app's Codex switch no longer stops the ChatGPT chats, and the app cannot switch either new source off on its own; collection as a whole still stops both.
  • Codex and ChatGPT share one sessions folder. After an erasure, a restart while one of them waits for its switch also re-reads the other one's files from the start; the store drops what it has already, so nothing is stored twice.

Verification

  • cargo fmt --check, cargo clippy --workspace --all-targets --locked -- -D warnings, pre-commit on the changed files: clean.
  • cargo test --workspace --locked --no-fail-fast (short TMPDIR): all suites pass.
  • Each rule has a test that fails when the rule is broken: the migration of chatgpt from codex, the default of claude_app, each switch on its own, both switches saved and answered, null read as unreadable, not_installed for a tool, the erasure of both apps.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f7177da0-7b37-4334-848a-cbcf06ec7d37
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@IgorMGitHub IgorMGitHub self-assigned this Nov 26, 2026
Comment thread connectors/src/chatgpt.rs

/// The app keeps its own data under the name of Codex Desktop, which it is built on; the
/// Codex command line tool has no such folder.
fn installed(&self, home: &Path) -> bool {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Question: The "installed" check looks for ~/Library/Application Support/Codex, which the comment says is the Codex Desktop folder. If someone has only the Codex desktop app and not the ChatGPT app, Status would not show "not installed" for ChatGPT. Was this folder checked on a Mac that has the ChatGPT app and one that has only Codex Desktop, and is it the right marker for ChatGPT alone?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Checked on this Mac: the only OpenAI app is /Applications/ChatGPT.app, bundle id com.openai.codex. It keeps its data in ~/Library/Application Support/Codex and writes the sessions with originator: "Codex Desktop". So ChatGPT and Codex Desktop are one app, and the folder marks the app that writes the files this source reads. I could not check a Mac with the older ChatGPT app (com.openai.chat) or an older Codex Desktop build. The doc comment now names the bundle (3910a2d).


#[test]
fn the_erase_command_takes_the_claude_app_sessions_and_a_switch_on_collects_them_again() {
fn the_erase_command_takes_the_sessions_of_both_apps_and_a_switch_on_collects_them_again() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Question: Codex and ChatGPT read one folder, and the new switches let one be on while the other is off. Is there a test where the follower stores Codex chats while the ChatGPT switch is off (and the reverse), and where chatgpt off drops the sources from a backfill count? The settings tests check collects per tool and the erase test only turns off collection as a whole, so a wrong switch name in the real follower setup would not turn a test red.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

There was no such test. Added two (3910a2d). codex_and_chatgpt_each_follow_their_own_switch_although_they_share_a_folder runs the real Codex and ChatGPT readers over one folder, with the follower switched by settings.collects as in main.rs. With ChatGPT off, Codex is stored and ChatGPT is not, and Status shows ChatGPT off. Then the reverse. The backfill test now has a ChatGPT prompt: codex:false keeps it in the count, and chatgpt:false takes it out. Swapping chatgpt and codex in collects, or making the follower ask for codex for every file or tool, turns these tests red.

The two app sources get a switch of their own, on by default. A settings file written before reads the ChatGPT switch as its Codex value, so a person who turned Codex off does not start collecting ChatGPT chats, and the Claude app switch as on. Status shows the ChatGPT app as not installed when its data folder is missing, and the erasure test covers both apps.

Signed-off-by: Igor Makarov <igor.makarov@constructor.tech>

This branch has not been deployed

No deployments
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