mirror of
https://github.com/openai/codex.git
synced 2026-11-20 23:08:21 +00:00
Delay the startup composer until first-login onboarding (#38643)
## Why On a pristine default installation, the provisional composer can appear before first-login onboarding takes over the terminal. ## What changed - Detect pristine local installations conservatively, accounting for existing Codex state, custom homes, access tokens, system configuration, and managed configuration sources, including macOS managed preferences. - Keep the composer hidden and ignore draft input until onboarding completes, while still allowing startup cancellation with `Ctrl-C` or `Ctrl-D`. - Reveal the configured composer after onboarding for normal new-session launches; resume and fork pickers retain their existing startup flow. ## Testing - Cover pristine and existing home layouts, environment credentials, system and managed configuration, inaccessible state, onboarding input suppression, cancellation, and the transition to the composer. GitOrigin-RevId: c1a47ea3ba7c1ff1dd229895c0362b6dd9bfd713
This commit is contained in:
1 parent
a0bed4be21
commit
6d97d4c102
9 files changed
+436
-12
No files matched your search
@@ -730,6 +730,25 @@ fn system_requirements_toml_file_with_overrides(
|
||||
}
|
||||
}
|
||||
|
||||
/// Check local managed configuration sources without loading or parsing configuration.
|
||||
///
|
||||
/// Filesystem or managed-preference errors are returned so callers can conservatively avoid
|
||||
/// assuming that administrator-controlled configuration is absent.
|
||||
pub fn has_local_managed_configuration(codex_home: &Path) -> io::Result<bool> {
|
||||
if layer_io::managed_config_default_path(codex_home).try_exists()?
|
||||
|| system_requirements_toml_file()?.as_path().try_exists()?
|
||||
{
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
if macos::has_managed_preferences()? {
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
pub fn system_config_toml_file() -> io::Result<AbsolutePathBuf> {
|
||||
AbsolutePathBuf::from_absolute_path(Path::new(SYSTEM_CONFIG_TOML_FILE_UNIX))
|
||||
|
||||
Reference in new issue
Block a user