Repository navigation
Conversation
…return to The ChatGPT browser sign-in pages told the user to return to "rig", which is wrong for any app built on rig-core or rig-harness. They now name the app in CHATGPT_SIGN_IN_APP_NAME, as CHATGPT_ORIGINATOR names the caller to the backend, and still say rig when it is unset.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The ChatGPT browser sign-in serves a page from its local callback listener, and every page tells the user to return to "rig": "You can close this tab and return to rig.", "Return to rig.", "Start it again from rig." An app built on
rig-coreorrig-harness(and its/login chatgptcommand) has no way to change that, because the pages live in the privatebrowsermodule.This reads the app's name from
CHATGPT_SIGN_IN_APP_NAME, besideCHATGPT_ORIGINATORandCHATGPT_USER_AGENT, which already let the caller name itself to the backend. When it is unset or empty the pages say "rig", exactly as today. The name is resolved once insign_in_with_browserand handed to the listener, so the pages and their tests take it as an argument and never read the environment. It is HTML-escaped like the rest of the page.An environment variable rather than a builder on
Authenticator, becauseLoginPluginbuilds its own authenticator and is loaded byDefault, so a harness app has no other way to reach it without new settings plumbing inrig-basics. Happy to addAuthenticator::with_sign_in_app_nameas well, or instead, if you prefer that shape.Changelog
CHATGPT_SIGN_IN_APP_NAMEinstead of always saying "rig".Migration
None. Unset, the pages are unchanged.
Type of change
Testing
cargo test --locked -p rig-core --lib providers::chatgpt::auth: 20 passed, including the newevery_page_names_the_app_it_was_given(stale-link and failed pages, with an&in the name to check escaping) and an added assertion that the default success page still says "return to rig."cargo clippy --locked -p rig-core --lib --tests: no warnings.cargo fmt -p rig-core -- --check: clean.rig-harness, running a real/login chatgptwith the browser opener stubbed: with the variable set, the stale-link andaccess_deniedcallbacks returned pages naming the app; unset, they said "rig".Checklist:
sign_in_with_browser's docs name the variable)CHANGELOG.mdorMIGRATING.md🤖 Generated with Claude Code