Gate workspace headline polling

This commit is contained in:
xli-oai
2026-05-05 11:24:53 -07:00
parent 894ee74002
commit 30237b317e
5 changed files with 13 additions and 7 deletions

1
codex-rs/Cargo.lock generated
View File

@@ -2104,7 +2104,6 @@ name = "codex-backend-client"
version = "0.0.0"
dependencies = [
"anyhow",
"chrono",
"codex-api",
"codex-backend-openapi-models",
"codex-client",

View File

@@ -13,7 +13,6 @@ workspace = true
[dependencies]
anyhow = "1"
chrono = { workspace = true, features = ["serde"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }

View File

@@ -8,8 +8,6 @@ pub use codex_backend_openapi_models::models::RateLimitStatusPayload;
pub use codex_backend_openapi_models::models::RateLimitWindowSnapshot;
pub use codex_backend_openapi_models::models::TaskListItem;
use chrono::DateTime;
use chrono::Utc;
use serde::Deserialize;
use serde::de::Deserializer;
use serde_json::Value;
@@ -26,8 +24,7 @@ pub struct CodexWorkspaceMessage {
pub message_id: String,
pub message_type: CodexWorkspaceMessageType,
pub message_body: String,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub created_at: String,
}
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Eq)]

View File

@@ -223,6 +223,8 @@ pub enum Feature {
PreventIdleSleep,
/// Enable workspace-specific owner nudge copy and prompts in the TUI.
WorkspaceOwnerUsageNudge,
/// Enable workspace headline and announcement message polling.
WorkspaceMessages,
/// Legacy rollout flag for Responses API WebSocket transport experiments.
ResponsesWebsockets,
/// Legacy rollout flag for Responses API WebSocket transport v2 experiments.
@@ -1111,6 +1113,12 @@ pub const FEATURES: &[FeatureSpec] = &[
stage: Stage::UnderDevelopment,
default_enabled: false,
},
FeatureSpec {
id: Feature::WorkspaceMessages,
key: "workspace_messages",
stage: Stage::UnderDevelopment,
default_enabled: false,
},
FeatureSpec {
id: Feature::ResponsesWebsockets,
key: "responses_websockets",

View File

@@ -42,6 +42,7 @@ use codex_config::format_config_error_with_source;
use codex_exec_server::EnvironmentManager;
use codex_exec_server::EnvironmentManagerArgs;
use codex_exec_server::ExecServerRuntimePaths;
use codex_features::Feature;
use codex_login::AuthConfig;
use codex_login::default_client::set_default_client_residency_requirement;
use codex_login::enforce_login_restrictions;
@@ -1105,7 +1106,9 @@ async fn run_ratatui_app(
color_eyre::install()?;
tooltips::announcement::prewarm();
workspace_messages::prewarm_headline(&initial_config);
if initial_config.features.enabled(Feature::WorkspaceMessages) {
workspace_messages::prewarm_headline(&initial_config);
}
// Forward panic reports through tracing so they appear in the UI status
// line, but do not swallow the default/color-eyre panic handler.