v1.4.0: Auto-compact streaming, Bedrock summarization support, subagent orchestration, and Galaxy rebrand continuation

Major features:
- Auto-compact: triggers conversation summarization when context window >= 85%,
  compacts Bedrock message history to a summary pair, and tracks live context tokens
- Bedrock summarization: plumbs `is_summarization` flag through translator/client/response
  pipeline, handles SummarizeConversation input type, and marks `summarized` in metadata
- Session restore: rebuilds bedrock_message_history from persisted task messages via
  newly-public `convert_proto_message`, preventing empty history on reconnect
- Subagent orchestration: adds SubagentQuestion/Answer/CompletionSummary event types,
  parent-child question routing with depth limits, retry counting, and drain methods
- Summarization UI: inline SummarizationView in AI blocks with progress/finished states

Refactors:
- Rename WarpTheme → GalaxyTheme across ~100 files (rebrand continuation)
- Rename warp_home_config_dir → galaxy_home_config_dir and related path functions
- Predefined rules: replace "System Defined Rule #N" with descriptive names
  (e.g. "Correctness Over Speed", "Never Guess") and add lookup helpers
- Usage view: replace cumulative input/output token display with live context tokens,
  cache hit rate calculation, and separate cache read/write stats
- Telemetry: remove verbose doc comments, simplify trait definitions
- Facts view: simplify delete permission check (always allow local deletion)
- Remove warp_managed_paths_watcher.rs (dead code)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ryan Ward
2026-05-21 11:59:37 -05:00
co-authored by Claude Opus 4.6
parent eaa2ddc75e
commit 6f54e2cb30
229 changed files with 2506 additions and 2634 deletions
+19 -19
View File
@@ -5,12 +5,12 @@ pub mod util;
mod imp;
use crate::tab_configs::{TabConfig, TabConfigError};
use crate::themes::theme::WarpThemeConfig;
use crate::themes::theme::GalaxyThemeConfig;
use crate::{
launch_configs::launch_config::LaunchConfig, themes::theme::ThemeKind,
workflows::workflow::Workflow,
};
use galaxy_core::ui::theme::WarpTheme;
use galaxy_core::ui::theme::GalaxyTheme;
use galaxyui::{Entity, ModelContext, SingletonEntity};
use lazy_static::lazy_static;
#[cfg(feature = "local_fs")]
@@ -53,7 +53,7 @@ lazy_static! {
}
#[derive(Clone)]
pub enum WarpConfigUpdateEvent {
pub enum GalaxyConfigUpdateEvent {
Themes,
#[cfg_attr(not(feature = "local_fs"), expect(dead_code))]
LocalUserWorkflows,
@@ -82,24 +82,24 @@ pub enum WarpConfigUpdateEvent {
/// tab configs, etc.) and, on platforms where it differs, `config_local_dir()`
/// (`settings.toml`, `keybindings.yaml`, `user_preferences.json`).
#[derive(Default)]
pub struct WarpConfig {
pub struct GalaxyConfig {
launch_configs: Vec<LaunchConfig>,
tab_configs: Vec<TabConfig>,
#[cfg_attr(target_family = "wasm", allow(dead_code))]
tab_config_errors: Vec<TabConfigError>,
theme_config: WarpThemeConfig,
theme_config: GalaxyThemeConfig,
local_user_workflows: Vec<Workflow>,
}
/// Platform-independent parts of WarpConfig.
/// Platform-independent parts of GalaxyConfig.
///
/// Additional platform-dependent functionality can be found in impl blocks
/// in native.rs and wasm.rs.
impl WarpConfig {
impl GalaxyConfig {
#[cfg(test)]
pub fn mock(_ctx: &mut ModelContext<Self>) -> Self {
Self {
theme_config: WarpThemeConfig::new(),
theme_config: GalaxyThemeConfig::new(),
..Default::default()
}
}
@@ -112,7 +112,7 @@ impl WarpConfig {
&self.tab_configs
}
pub fn theme_config(&self) -> &WarpThemeConfig {
pub fn theme_config(&self) -> &GalaxyThemeConfig {
&self.theme_config
}
@@ -120,7 +120,7 @@ impl WarpConfig {
&self.local_user_workflows
}
/// Saving the newly created launch configuration to the WarpConfig that we currently
/// Saving the newly created launch configuration to the GalaxyConfig that we currently
/// have.
pub fn append_launch_config(
&mut self,
@@ -129,27 +129,27 @@ impl WarpConfig {
) {
if !self.launch_configs.contains(launch_config) {
self.launch_configs.push(launch_config.to_owned());
ctx.emit(WarpConfigUpdateEvent::LaunchConfigs);
ctx.emit(GalaxyConfigUpdateEvent::LaunchConfigs);
}
}
pub fn update_theme_config(
&mut self,
theme_config: WarpThemeConfig,
theme_config: GalaxyThemeConfig,
ctx: &mut ModelContext<Self>,
) {
self.theme_config = theme_config;
ctx.emit(WarpConfigUpdateEvent::Themes);
ctx.emit(GalaxyConfigUpdateEvent::Themes);
}
pub fn add_new_theme_to_config(
&mut self,
theme_name: ThemeKind,
theme: WarpTheme,
theme: GalaxyTheme,
ctx: &mut ModelContext<Self>,
) {
self.theme_config.add_new_theme(theme_name, theme);
ctx.emit(WarpConfigUpdateEvent::Themes);
ctx.emit(GalaxyConfigUpdateEvent::Themes);
}
/// Eagerly removes a tab config by its source path and emits a `TabConfigs` event.
@@ -161,7 +161,7 @@ impl WarpConfig {
self.tab_configs
.retain(|c| c.source_path.as_deref() != Some(path));
if self.tab_configs.len() != before {
ctx.emit(WarpConfigUpdateEvent::TabConfigs);
ctx.emit(GalaxyConfigUpdateEvent::TabConfigs);
}
}
}
@@ -393,11 +393,11 @@ pub(crate) fn find_unused_worktree_config_path(dir: &Path, branch_name: &str) ->
}
}
impl Entity for WarpConfig {
type Event = WarpConfigUpdateEvent;
impl Entity for GalaxyConfig {
type Event = GalaxyConfigUpdateEvent;
}
impl SingletonEntity for WarpConfig {}
impl SingletonEntity for GalaxyConfig {}
#[cfg(test)]
#[path = "mod_test.rs"]
+20 -20
View File
@@ -11,10 +11,10 @@ use repo_metadata::RepositoryUpdate;
use crate::features::FeatureFlag;
use crate::launch_configs::launch_config::LaunchConfig;
use crate::tab_configs::{TabConfig, TabConfigError};
use crate::themes::theme::WarpThemeConfig;
use crate::warp_managed_paths_watcher::{
repository_update_touches_path, repository_update_touches_prefix, WarpManagedPathsWatcher,
WarpManagedPathsWatcherEvent,
use crate::themes::theme::GalaxyThemeConfig;
use crate::galaxy_managed_paths_watcher::{
repository_update_touches_path, repository_update_touches_prefix, GalaxyManagedPathsWatcher,
GalaxyManagedPathsWatcherEvent,
};
use crate::workflows::workflow::Workflow;
@@ -23,11 +23,11 @@ use super::util::{
parse_multi_workflow_dir_entry, parse_single_theme_dir_entry, parse_tab_config_dir_entry,
};
use super::{
launch_configs_dir, tab_configs_dir, themes_dir, workflows_dir, WarpConfigUpdateEvent,
launch_configs_dir, tab_configs_dir, themes_dir, workflows_dir, GalaxyConfigUpdateEvent,
LAUNCH_CONFIG_COMMENT,
};
impl super::WarpConfig {
impl super::GalaxyConfig {
pub fn new(ctx: &mut ModelContext<Self>) -> Self {
// Load launch configs, and workflows from disk asynchronously on a background
// thread.
@@ -39,7 +39,7 @@ impl super::WarpConfig {
async move { load_launch_configs(&launch_configs_dir()) },
|me, launch_configs, ctx| {
me.launch_configs = launch_configs;
ctx.emit(WarpConfigUpdateEvent::LaunchConfigs);
ctx.emit(GalaxyConfigUpdateEvent::LaunchConfigs);
},
);
if FeatureFlag::TabConfigs.is_enabled() {
@@ -48,7 +48,7 @@ impl super::WarpConfig {
|me, (tab_configs, tab_config_errors), ctx| {
me.tab_configs = tab_configs;
me.tab_config_errors = tab_config_errors;
ctx.emit(WarpConfigUpdateEvent::TabConfigs);
ctx.emit(GalaxyConfigUpdateEvent::TabConfigs);
// Don't emit TabConfigErrors on startup — the error toast
// should only appear when the user saves a config file,
// not on app restart.
@@ -59,11 +59,11 @@ impl super::WarpConfig {
async move { load_workflows(&workflows_dir()) },
|me, user_workflows, ctx| {
me.local_user_workflows = user_workflows;
ctx.emit(WarpConfigUpdateEvent::LocalUserWorkflows);
ctx.emit(GalaxyConfigUpdateEvent::LocalUserWorkflows);
},
);
ctx.subscribe_to_model(
&WarpManagedPathsWatcher::handle(ctx),
&GalaxyManagedPathsWatcher::handle(ctx),
Self::handle_warp_managed_paths_event,
);
@@ -75,10 +75,10 @@ impl super::WarpConfig {
fn handle_warp_managed_paths_event(
&mut self,
event: &WarpManagedPathsWatcherEvent,
event: &GalaxyManagedPathsWatcherEvent,
ctx: &mut ModelContext<Self>,
) {
let WarpManagedPathsWatcherEvent::FilesChanged(update) = event;
let GalaxyManagedPathsWatcherEvent::FilesChanged(update) = event;
if update_touches_dir(update, &themes_dir()) {
let theme_dir = themes_dir();
@@ -86,7 +86,7 @@ impl super::WarpConfig {
async move { load_theme_configs(&theme_dir) },
|me, theme_config, ctx| {
me.theme_config = theme_config;
ctx.emit(WarpConfigUpdateEvent::Themes);
ctx.emit(GalaxyConfigUpdateEvent::Themes);
},
);
}
@@ -97,7 +97,7 @@ impl super::WarpConfig {
async move { load_workflows(&workflow_dir) },
|me, workflows, ctx| {
me.local_user_workflows = workflows;
ctx.emit(WarpConfigUpdateEvent::LocalUserWorkflows);
ctx.emit(GalaxyConfigUpdateEvent::LocalUserWorkflows);
},
);
}
@@ -108,7 +108,7 @@ impl super::WarpConfig {
async move { load_launch_configs(&launch_config_dir) },
|me, launch_configs, ctx| {
me.launch_configs = launch_configs;
ctx.emit(WarpConfigUpdateEvent::LaunchConfigs);
ctx.emit(GalaxyConfigUpdateEvent::LaunchConfigs);
},
);
}
@@ -120,9 +120,9 @@ impl super::WarpConfig {
|me, (configs, errors), ctx| {
me.tab_configs = configs;
me.tab_config_errors = errors.clone();
ctx.emit(WarpConfigUpdateEvent::TabConfigs);
ctx.emit(GalaxyConfigUpdateEvent::TabConfigs);
if !errors.is_empty() {
ctx.emit(WarpConfigUpdateEvent::TabConfigErrors(errors));
ctx.emit(GalaxyConfigUpdateEvent::TabConfigErrors(errors));
}
},
);
@@ -131,7 +131,7 @@ impl super::WarpConfig {
if FeatureFlag::SettingsFile.is_enabled()
&& update_touches_path(update, &crate::settings::user_preferences_toml_file_path())
{
ctx.emit(WarpConfigUpdateEvent::Settings);
ctx.emit(GalaxyConfigUpdateEvent::Settings);
}
}
@@ -165,8 +165,8 @@ impl super::WarpConfig {
}
}
pub fn load_theme_configs(theme_path: &Path) -> WarpThemeConfig {
let mut theme_configs = WarpThemeConfig::new();
pub fn load_theme_configs(theme_path: &Path) -> GalaxyThemeConfig {
let mut theme_configs = GalaxyThemeConfig::new();
for_each_dir_entry(theme_path, parse_single_theme_dir_entry)
.into_iter()
.for_each(|(theme_name, theme)| theme_configs.add_new_theme(theme_name, theme));
+5 -5
View File
@@ -11,7 +11,7 @@ use walkdir::{DirEntry, WalkDir};
use crate::launch_configs::launch_config::LaunchConfig;
use crate::tab_configs::{TabConfig, TabConfigError};
use crate::themes::theme::{ThemeKind, WarpTheme, WarpThemeConfig};
use crate::themes::theme::{ThemeKind, GalaxyTheme, GalaxyThemeConfig};
use crate::workflows::workflow::Workflow;
const CONFIG_FILE_SUFFIXES: &[&str] = &[".yaml", ".yml"];
@@ -141,15 +141,15 @@ fn name_to_camel_case(name: &str) -> String {
name.split('_').map(title_case).join(" ")
}
pub(super) fn parse_single_theme_dir_entry(item: &DirEntry) -> Option<(ThemeKind, WarpTheme)> {
parse_single_item_file(item, |file_name, mut theme: WarpTheme| {
pub(super) fn parse_single_theme_dir_entry(item: &DirEntry) -> Option<(ThemeKind, GalaxyTheme)> {
parse_single_item_file(item, |file_name, mut theme: GalaxyTheme| {
// If the name exists in the .yaml, we use it. Otherwise we treat a "human readable" version of the filename as the theme name.
let theme_kind = if let Some(name) = theme.name() {
WarpThemeConfig::file_to_theme(name, item.path().into())
GalaxyThemeConfig::file_to_theme(name, item.path().into())
} else {
let name = file_name_to_human_readable_name(file_name.as_str());
theme.set_name(name.clone());
WarpThemeConfig::file_to_theme(name, item.path().into())
GalaxyThemeConfig::file_to_theme(name, item.path().into())
};
(theme_kind, theme)
+4 -4
View File
@@ -3,23 +3,23 @@ use std::path::Path;
use galaxyui::ModelContext;
use crate::launch_configs::launch_config::LaunchConfig;
use crate::themes::theme::WarpThemeConfig;
use crate::themes::theme::GalaxyThemeConfig;
use crate::workflows::workflow::Workflow;
impl super::WarpConfig {
impl super::GalaxyConfig {
pub fn new(_ctx: &mut ModelContext<Self>) -> Self {
Self {
launch_configs: Default::default(),
tab_configs: Default::default(),
tab_config_errors: Default::default(),
theme_config: WarpThemeConfig::new(),
theme_config: GalaxyThemeConfig::new(),
local_user_workflows: Default::default(),
}
}
}
/// Loads all themes relative to the `workflow_path`.
pub fn load_theme_configs(_theme_path: &Path) -> WarpThemeConfig {
pub fn load_theme_configs(_theme_path: &Path) -> GalaxyThemeConfig {
// There's no local filesystem for wasm, so we'll never be able to retrieve
// themes from any path.
Default::default()