Discover TUI experimental features from the server (#42425)

## What changed

- Load the `/experimental` catalog from the running server for the active thread, with loading, empty, and failure states in the popup.
- Show beta features in server order and preserve server-reported names, descriptions, and configured values. Mark features as read-only when the local config writer cannot safely update them.
- Persist only changed, writable feature flags. Bound discovery with page-size and page-count limits, repeated-cursor detection, deduplication, cancellation, and a timeout.

## Testing

- Cover paginated discovery, malformed or unresponsive servers, popup cancellation, read-only controls, selective writes, and the new popup states.

GitOrigin-RevId: 1f49eb961c8ab220a466e15f032c1dc61ed86d38
This commit is contained in:
Eric Traut authored and copyberry committed 2026-09-03 02:49:36 +00:00
1 parent 38ba8cdceb
commit cac96cd7b1
20 files changed
+630 -71

No files matched your search

+14 -15
View File
@@ -87,22 +87,21 @@ impl ChatWidget {
}
pub(crate) fn open_experimental_popup(&mut self) {
let features: Vec<ExperimentalFeatureItem> = FEATURES
.iter()
.filter_map(|spec| {
let name = spec.stage.experimental_menu_name()?;
let description = spec.stage.experimental_menu_description()?;
Some(ExperimentalFeatureItem {
feature: spec.id,
name: name.to_string(),
description: description.to_string(),
enabled: self.config.features.enabled(spec.id),
})
})
.collect();
let Some(thread_id) = self.thread_id() else {
self.add_info_message(
"Experimental features are unavailable until startup completes.".to_string(),
/*hint*/ None,
);
return;
};
let (response_tx, response_rx) = tokio::sync::oneshot::channel();
self.app_event_tx.send(AppEvent::FetchExperimentalFeatures {
thread_id,
response_tx,
});
let view = ExperimentalFeaturesView::new(
features,
Vec::new(),
Some(response_rx),
self.app_event_tx.clone(),
self.bottom_pane.list_keymap(),
);