Wrapping up bedrock implementation

This commit is contained in:
Ryan Ward
2026-05-13 10:04:59 -05:00
parent ed53aa99eb
commit cee61e2af0
1144 changed files with 2954 additions and 2660 deletions
@@ -11,7 +11,6 @@ use crate::code_review::code_review_view::{
use crate::code_review::diff_selector::DiffSelector;
use crate::menu::Menu;
use crate::view_components::action_button::ActionButton;
use pathfinder_geometry::vector::vec2f;
use galaxy_core::features::FeatureFlag;
use galaxyui::elements::{
ChildAnchor, ChildView, Clipped, ConstrainedBox, Container, CrossAxisAlignment, Flex,
@@ -19,6 +18,7 @@ use galaxyui::elements::{
ParentOffsetBounds, Shrinkable, Stack,
};
use galaxyui::{Element, ViewHandle};
use pathfinder_geometry::vector::vec2f;
use crate::appearance::Appearance;
@@ -13,7 +13,6 @@ use crate::{
ui_components::icons::Icon,
view_components::action_button::ActionButton,
};
use pathfinder_geometry::vector::vec2f;
use galaxy_core::features::FeatureFlag;
use galaxyui::elements::{Hoverable, ParentElement};
use galaxyui::platform::Cursor;
@@ -31,6 +30,7 @@ use galaxyui::{
},
AppContext, Element, ModelHandle, ViewHandle,
};
use pathfinder_geometry::vector::vec2f;
// This is a best effort guess of the size of all of the elements in the header to know when we should start to wrap to the second row
const HEADER_WRAP_BREAKPOINT: f32 = 450.;
@@ -445,7 +445,9 @@ impl CodeReviewHeader {
.build()
.finish()
})
.with_tooltip_position(galaxyui::ui_components::button::ButtonTooltipPosition::AboveLeft)
.with_tooltip_position(
galaxyui::ui_components::button::ButtonTooltipPosition::AboveLeft,
)
.build()
.on_click(|ctx, _, _| {
ctx.dispatch_typed_action(CodeReviewAction::AddDiffSetAsContext(
+5 -5
View File
@@ -105,11 +105,6 @@ use ai::project_context::model::ProjectContextModel;
use num_traits::SaturatingSub;
use string_offset::CharOffset;
use indexmap::IndexMap;
use itertools::Itertools;
use pathfinder_geometry::rect::RectF;
use pathfinder_geometry::vector::{vec2f, Vector2F};
use rand::{distributions::Alphanumeric, Rng};
use galaxy_core::{
channel::{Channel, ChannelState},
features::FeatureFlag,
@@ -153,6 +148,11 @@ use galaxyui::{
r#async::SpawnedFutureHandle,
ModelHandle, WeakViewHandle,
};
use indexmap::IndexMap;
use itertools::Itertools;
use pathfinder_geometry::rect::RectF;
use pathfinder_geometry::vector::{vec2f, Vector2F};
use rand::{distributions::Alphanumeric, Rng};
use crate::code::footer::{CodeFooterView, CodeFooterViewEvent};
use crate::settings::AISettings;
@@ -29,10 +29,6 @@ use crate::workspaces::user_workspaces::UserWorkspaces;
use crate::NotebookKeybindings;
use ai::agent::action::InsertReviewComment;
use chrono::Local;
use lsp::LspManagerModel;
use repo_metadata::repositories::DetectedRepositories;
use std::path::PathBuf;
use std::sync::Arc;
use galaxy_core::features::FeatureFlag;
use galaxy_core::ui::appearance::Appearance;
use galaxy_editor::content::buffer::InitialBufferState;
@@ -41,6 +37,10 @@ use galaxy_editor::render::model::LineCount;
use galaxyui::elements::{Empty, MouseStateHandle};
use galaxyui::platform::WindowStyle;
use galaxyui::{App, ViewHandle};
use lsp::LspManagerModel;
use repo_metadata::repositories::DetectedRepositories;
use std::path::PathBuf;
use std::sync::Arc;
#[derive(Default)]
struct TestView;
+3 -3
View File
@@ -20,15 +20,15 @@ use crate::{
appearance::Appearance, code_review::code_review_view::CodeReviewView,
ui_components::icons::Icon, workspace::view::right_panel::ReviewDestination,
};
use galaxy_core::features::FeatureFlag;
use galaxy_core::ui::color::blend::Blend;
use galaxy_editor::model::CoreEditorModel;
use indexmap::IndexMap;
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use std::path::PathBuf;
use string_offset::CharOffset;
use vec1::vec1;
use galaxy_core::features::FeatureFlag;
use galaxy_core::ui::color::blend::Blend;
use galaxy_editor::model::CoreEditorModel;
use galaxy_core::ui::theme::color::internal_colors::{
accent_overlay_2, accent_overlay_3, neutral_1, neutral_3, neutral_4, neutral_6, text_main,
+1 -1
View File
@@ -17,7 +17,6 @@ use crate::code_review::comments::{
use crate::editor::InteractionState;
use crate::notebooks::editor::view::RichTextEditorView;
use crate::util::time_format::human_readable_approx_duration;
use pathfinder_color::ColorU;
use galaxy_core::ui::theme::color::internal_colors::{neutral_1, neutral_2, text_sub};
use galaxy_core::ui::theme::Fill;
use galaxy_editor::content::buffer::InitialBufferState;
@@ -32,6 +31,7 @@ use galaxyui::platform::Cursor;
use galaxyui::text_layout::ClipConfig;
use galaxyui::units::Pixels;
use galaxyui::{AppContext, Element, EventContext, SingletonEntity, View, ViewContext, ViewHandle};
use pathfinder_color::ColorU;
/// Configuration for making the comment header clickable.
pub(crate) struct HeaderClickHandler {
+1 -1
View File
@@ -2,10 +2,10 @@ use super::{
AttachedReviewComment, AttachedReviewCommentTarget, CommentId, PendingImportedReviewComment,
};
use crate::{code::editor::EditorReviewComment, code_review::diff_state::DiffMode};
use std::{collections::HashMap, path::Path};
use galaxy_core::features::FeatureFlag;
use galaxy_editor::render::model::LineCount;
use galaxyui::{Entity, ModelContext};
use std::{collections::HashMap, path::Path};
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum ReviewCommentBatchEvent {
+1 -1
View File
@@ -3,9 +3,9 @@ use crate::{
code::editor::{line::EditorLineLocation, EditorReviewComment},
};
use chrono::{DateTime, Local};
use galaxy_editor::render::model::LineCount;
use std::fmt::{Display, Formatter};
use std::path::PathBuf;
use galaxy_editor::render::model::LineCount;
use warp_multi_agent_api::{self as api};
#[derive(Clone, Debug, Default, PartialEq, Eq)]
@@ -1,8 +1,8 @@
//! Utilities for parsing unified diff hunks and extracting specific line content.
use ai::agent::action::CommentSide;
use num_traits::SaturatingSub;
use galaxy_editor::render::model::LineCount;
use num_traits::SaturatingSub;
use crate::{
code::editor::line::EditorLineLocation,
+1 -1
View File
@@ -1,7 +1,7 @@
use crate::ai::agent::DiffSetHunk;
use crate::code_review::diff_state::{DiffLineType, FileDiff};
use std::collections::HashMap;
use galaxy_editor::render::model::LineCount;
use std::collections::HashMap;
cfg_if::cfg_if! {
if #[cfg(feature = "local_fs")] {
+3 -1
View File
@@ -334,7 +334,9 @@ impl CodeReviewDiffMenu {
let check_slot: Box<dyn Element> = if target.is_selected {
ConstrainedBox::new(
Icon::Check.to_galaxyui_icon(Fill::Solid(text_color)).finish(),
Icon::Check
.to_galaxyui_icon(Fill::Solid(text_color))
.finish(),
)
.with_width(CHECK_SLOT_SIZE)
.with_height(CHECK_SLOT_SIZE)
+1 -1
View File
@@ -1,6 +1,5 @@
//! Trigger button + [`CodeReviewDiffMenu`] overlay for picking the diff
//! target in the code review header.
use pathfinder_geometry::vector::vec2f;
use galaxy_core::ui::theme::Fill;
use galaxyui::{
elements::{
@@ -20,6 +19,7 @@ use galaxyui::{
AppContext, Entity, FocusContext, SingletonEntity as _, TypedActionView, View, ViewContext,
ViewHandle,
};
use pathfinder_geometry::vector::vec2f;
use crate::{
appearance::Appearance,
+3 -3
View File
@@ -2,9 +2,6 @@ use crate::code::local_code_editor::LocalCodeEditorView;
use crate::code_review::code_review_view::CodeReviewView;
use crate::code_review::telemetry_event::CodeReviewTelemetryEvent;
use crate::view_components::find::{FindDirection, FindEvent, FindModel};
use std::collections::HashMap;
use std::ops::Range;
use string_offset::CharOffset;
#[cfg(not(target_family = "wasm"))]
use galaxy_core::channel::ChannelState;
use galaxy_core::send_telemetry_from_ctx;
@@ -17,6 +14,9 @@ use galaxyui::WeakViewHandle;
use galaxyui::{
r#async::SpawnedFutureHandle, AppContext, Entity, EntityId, ModelContext, ViewHandle,
};
use std::collections::HashMap;
use std::ops::Range;
use string_offset::CharOffset;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SearchMatch {
+4 -4
View File
@@ -16,16 +16,16 @@ use crate::workspace::sync_inputs::SyncedInputState;
use crate::workspace::ActiveSession;
use crate::workspaces::user_workspaces::UserWorkspaces;
use crate::NotebookKeybindings;
use repo_metadata::repositories::DetectedRepositories;
use std::path::PathBuf;
use std::sync::Arc;
use string_offset::CharOffset;
use galaxy_core::ui::appearance::Appearance;
use galaxy_editor::content::buffer::InitialBufferState;
use galaxy_editor::render::element::VerticalExpansionBehavior;
use galaxyui::elements::Empty;
use galaxyui::platform::WindowStyle;
use galaxyui::{App, Element as _, ModelHandle, ViewHandle};
use repo_metadata::repositories::DetectedRepositories;
use std::path::PathBuf;
use std::sync::Arc;
use string_offset::CharOffset;
#[derive(Default)]
struct TestView;
+1 -1
View File
@@ -11,7 +11,6 @@
use std::path::PathBuf;
use pathfinder_geometry::vector::vec2f;
use galaxy_core::features::FeatureFlag;
use galaxy_core::ui::appearance::Appearance;
use galaxyui::{
@@ -27,6 +26,7 @@ use galaxyui::{
AppContext, Entity, FocusContext, SingletonEntity, TypedActionView, View, ViewContext,
ViewHandle,
};
use pathfinder_geometry::vector::vec2f;
#[cfg(feature = "local_tty")]
use crate::terminal::local_shell::LocalShellState;
+3 -3
View File
@@ -1,22 +1,22 @@
use galaxyui::{Entity, SingletonEntity};
#[cfg(feature = "local_fs")]
use std::path::{Path, PathBuf};
#[cfg(feature = "local_fs")]
use galaxyui::ModelContext;
#[cfg(feature = "local_fs")]
use std::path::{Path, PathBuf};
#[cfg(feature = "local_fs")]
use {
crate::throttle::throttle,
crate::util::git::{detect_current_branch_display, detect_main_branch},
async_channel::Sender,
galaxyui::{r#async::SpawnedFutureHandle, ModelHandle, WeakModelHandle},
repo_metadata::{
repositories::DetectedRepositories,
repository::{RepositorySubscriber, SubscriberId},
Repository, RepositoryUpdate,
},
std::{collections::HashMap, time::Duration},
galaxyui::{r#async::SpawnedFutureHandle, ModelHandle, WeakModelHandle},
};
#[cfg(feature = "local_fs")]
+1 -1
View File
@@ -1,9 +1,9 @@
use std::ops::Range;
use ai::diff_validation::DiffDelta;
use rangemap::RangeSet;
use galaxy_editor::content::text::LineCount;
use galaxy_editor::render::model::LineCount as RenderLineCount;
use rangemap::RangeSet;
/// The number of context lines to show before and after each change
const CONTEXT_LINES: usize = 4;
+1 -1
View File
@@ -21,12 +21,12 @@ pub(crate) mod diff_selector;
pub(crate) mod file_invalidation_queue;
use code_review_view::CodeReviewAction;
use std::path::{Path, PathBuf};
use galaxyui::{
id,
keymap::{EditableBinding, FixedBinding},
AppContext, Entity, EntityId, ModelContext, SingletonEntity, WeakViewHandle, WindowId,
};
use std::path::{Path, PathBuf};
use crate::code_review::telemetry_event::CodeReviewPaneEntrypoint;
use crate::terminal::{view::TerminalView, CLIAgent};
+1 -1
View File
@@ -1,12 +1,12 @@
use crate::server::telemetry::CLIAgentType;
use crate::view_components::find::FindDirection;
use crate::{code_review::diff_state::DiffMode, features::FeatureFlag};
use galaxy_core::telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc};
use serde::Serialize;
use serde_json::json;
use serde_with::SerializeDisplay;
use std::fmt::Display;
use strum_macros::{EnumDiscriminants, EnumIter};
use galaxy_core::telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc};
/// Entry points for opening the code review pane.
#[derive(Clone, Copy, Debug, SerializeDisplay, Default)]