fix(tui): clarify /logout credential scope#2714
Conversation
|
Thanks @xyuai for taking the time to contribute. This repository is currently observing a maintainer-managed contribution gate in dry-run mode, so this pull request is staying open. When enforcement is enabled, pull requests from contributors who are not listed in Please read |
There was a problem hiding this comment.
Code Review
This pull request updates the /logout command's success message and localized descriptions across multiple languages to clarify that it clears all saved config API keys rather than a single provider-scoped key, providing CLI commands to clear/set individual provider keys instead. The feedback suggests adding explicit newlines to the logout message to prevent awkward line wrapping in standard terminal widths.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| CommandResult::message( | ||
| "Cleared saved config API keys and returned to setup.\n\ | ||
| `/logout` is not provider-scoped. To replace one provider key, run \ | ||
| `codewhale auth clear --provider <id>` then \ | ||
| `codewhale auth set --provider <id>`.", | ||
| ) |
There was a problem hiding this comment.
The current multiline string concatenation results in a single continuous line of 141 characters for the second line of the message. In standard terminal windows (often 80 or 120 columns wide), this long line will wrap awkwardly, potentially splitting the commands across lines and making them difficult to read or copy-paste.
Consider adding explicit newlines (\n) to place the commands on their own lines for better readability and usability.
CommandResult::message(
"Cleared saved config API keys and returned to setup.\n\
`/logout` is not provider-scoped. To replace one provider key, run:\n\
`codewhale auth clear --provider <id>`\n\
`codewhale auth set --provider <id>`",
)| `codewhale auth set --provider <id>`.", | ||
| ) | ||
| } | ||
| Err(e) => CommandResult::error(format!("Failed to clear API key: {e}")), |
There was a problem hiding this comment.
The error message still uses singular "API key" while the success message and all updated descriptions now use plural "API keys". These should be consistent so users get the same framing regardless of whether the operation succeeds or fails.
| Err(e) => CommandResult::error(format!("Failed to clear API key: {e}")), | |
| Err(e) => CommandResult::error(format!("Failed to clear saved config API keys: {e}")), |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Ported to codex/v0.8.53 in 5719301. /logout message now names the active provider. |
Summary
/logoutcommand description so it no longer reads like a single-provider logout flow/logoutclears saved config API keys and is not provider-scopedcodewhale auth clear --provider <id>andcodewhale auth set --provider <id>for one-provider key replacementFixes #2660.
Greptile Summary
This PR clarifies that
/logoutclears all saved config API keys rather than a single provider's key, and guides users tocodewhale auth clear/set --provider <id>for per-provider replacement. The change updates the command description in 6 locales and tightens the test to assert on the new message content.config.rs: Doc comment, success message, and test updated to use "saved config API keys" wording and include the provider-scoped CLI guidance.localization.rs:CmdLogoutDescriptionupdated consistently across all supported locales (English, Vietnamese, Japanese, Chinese Simplified, Portuguese Brazil, Spanish Latin America)."Failed to clear API key: {e}") retains the old singular phrasing, which is now inconsistent with the success path.Confidence Score: 4/5
Safe to merge; changes are limited to user-facing strings and a test assertion — no logic is altered.
The success message, doc comment, localization strings, and test are all updated correctly. The only rough edge is that the error-path message still says "API key" (singular) while everything else now says "API keys" (plural), leaving a small inconsistency visible to users on failure.
No files require special attention; the minor wording inconsistency is in the Err branch of logout in config.rs.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[User runs /logout] --> B[clear_api_key called] B --> C{Result} C -- Ok --> D["Success message:\n'Cleared saved config API keys\nand returned to setup.\n/logout is not provider-scoped.\nUse codewhale auth clear/set\n--provider id for one provider.'"] D --> E[app.onboarding = ApiKey\nonboarding_needs_api_key = true\napi_key_input cleared] C -- Err --> F["Error: 'Failed to clear API key: e'\n(singular — inconsistent with success path)"]Reviews (1): Last reviewed commit: "fix(tui): clarify /logout credential sco..." | Re-trigger Greptile