mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Remove terminal resize reflow flag gates (#27794)
## Why `terminal_resize_reflow` is now stable and should behave as always on. Keeping the disabled runtime paths around made the feature look configurable even though the rollout is complete, and old config could still suggest there was a supported off mode. ## What Changed - Marked `terminal_resize_reflow` as `Stage::Removed` while keeping it default-enabled for compatibility. - Ignored `[features].terminal_resize_reflow` config entries so stale `false` settings no longer affect the effective feature set. - Removed TUI branches that depended on the flag being disabled, so draw, replay buffering, stream finalization, and resize scheduling all assume resize reflow is active. - Simplified resize smoke coverage to exercise the always-on behavior only. ## Verification - `just test -p codex-features` - `just test -p codex-tui resize_reflow` - `just test -p codex-tui initial_replay_buffer thread_switch_replay_buffer`
This commit is contained in:
@@ -99,7 +99,7 @@ pub enum Feature {
|
||||
/// on either `unified_exec` or `shell_zsh_fork` because those features have
|
||||
/// separate rollout and enterprise controls.
|
||||
UnifiedExecZshFork,
|
||||
/// Reflow transcript scrollback when the terminal is resized.
|
||||
/// Removed compatibility flag. Transcript scrollback reflow on terminal resize is always on.
|
||||
TerminalResizeReflow,
|
||||
/// Add terminal-specific visualization guidance to TUI developer instructions.
|
||||
TerminalVisualizationInstructions,
|
||||
@@ -461,6 +461,9 @@ impl Features {
|
||||
"skill_env_var_dependency_prompt" => {
|
||||
continue;
|
||||
}
|
||||
"terminal_resize_reflow" => {
|
||||
continue;
|
||||
}
|
||||
"use_legacy_landlock" => {
|
||||
self.record_legacy_usage_force(
|
||||
"features.use_legacy_landlock",
|
||||
@@ -807,11 +810,7 @@ pub const FEATURES: &[FeatureSpec] = &[
|
||||
FeatureSpec {
|
||||
id: Feature::TerminalResizeReflow,
|
||||
key: "terminal_resize_reflow",
|
||||
stage: Stage::Experimental {
|
||||
name: "Terminal resize reflow",
|
||||
menu_description: "Rebuild Codex-owned transcript scrollback when the terminal width changes.",
|
||||
announcement: "",
|
||||
},
|
||||
stage: Stage::Removed,
|
||||
default_enabled: true,
|
||||
},
|
||||
FeatureSpec {
|
||||
|
||||
@@ -32,8 +32,7 @@ fn default_enabled_features_are_stable() {
|
||||
for spec in crate::FEATURES {
|
||||
if spec.default_enabled {
|
||||
assert!(
|
||||
matches!(spec.stage, Stage::Stable | Stage::Removed)
|
||||
|| spec.id == Feature::TerminalResizeReflow,
|
||||
matches!(spec.stage, Stage::Stable | Stage::Removed),
|
||||
"feature `{}` is enabled by default but is not stable/removed ({:?})",
|
||||
spec.key,
|
||||
spec.stage
|
||||
@@ -151,18 +150,35 @@ fn request_permissions_tool_is_under_development() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn terminal_resize_reflow_is_experimental_and_enabled_by_default() {
|
||||
fn terminal_resize_reflow_is_removed_and_enabled_by_default() {
|
||||
assert_eq!(
|
||||
feature_for_key("terminal_resize_reflow"),
|
||||
Some(Feature::TerminalResizeReflow)
|
||||
);
|
||||
assert!(matches!(
|
||||
Feature::TerminalResizeReflow.stage(),
|
||||
Stage::Experimental { .. }
|
||||
));
|
||||
assert_eq!(Feature::TerminalResizeReflow.stage(), Stage::Removed);
|
||||
assert_eq!(Feature::TerminalResizeReflow.default_enabled(), true);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn from_sources_ignores_removed_terminal_resize_reflow_feature_key() {
|
||||
let features_toml = FeaturesToml::from(BTreeMap::from([(
|
||||
"terminal_resize_reflow".to_string(),
|
||||
false,
|
||||
)]));
|
||||
|
||||
let features = Features::from_sources(
|
||||
FeatureConfigSource {
|
||||
features: Some(&features_toml),
|
||||
..Default::default()
|
||||
},
|
||||
FeatureConfigSource::default(),
|
||||
FeatureOverrides::default(),
|
||||
);
|
||||
|
||||
assert_eq!(features, Features::with_defaults());
|
||||
assert_eq!(features.enabled(Feature::TerminalResizeReflow), true);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tool_suggest_is_stable_and_enabled_by_default() {
|
||||
assert_eq!(Feature::ToolSuggest.stage(), Stage::Stable);
|
||||
|
||||
Reference in New Issue
Block a user