Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -7,8 +7,8 @@ use repo_metadata::repositories::DetectedRepositories;
|
||||
use repo_metadata::watcher::DirectoryWatcher;
|
||||
use repo_metadata::RepoMetadataModel;
|
||||
use virtual_fs::{Stub, VirtualFS};
|
||||
use warp_core::ui::appearance::Appearance;
|
||||
use warpui::{platform::WindowStyle, App, ModelHandle};
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxyui::{platform::WindowStyle, App, ModelHandle};
|
||||
|
||||
use crate::auth::AuthStateProvider;
|
||||
use crate::server::server_api::{team::MockTeamClient, workspace::MockWorkspaceClient};
|
||||
@@ -21,8 +21,8 @@ use crate::workspaces::user_workspaces::UserWorkspaces;
|
||||
|
||||
use super::FileTreeView;
|
||||
|
||||
fn std_path(path: &std::path::Path) -> warp_util::standardized_path::StandardizedPath {
|
||||
warp_util::standardized_path::StandardizedPath::try_from_local(path).unwrap()
|
||||
fn std_path(path: &std::path::Path) -> galaxy_util::standardized_path::StandardizedPath {
|
||||
galaxy_util::standardized_path::StandardizedPath::try_from_local(path).unwrap()
|
||||
}
|
||||
|
||||
fn initialize_app(
|
||||
@@ -58,7 +58,7 @@ fn build_repo_state(repo_root: &std::path::Path) -> FileTreeState {
|
||||
false,
|
||||
));
|
||||
let src_dir = Entry::Directory(DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&repo_root.join("packages/app/src"),
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -67,7 +67,7 @@ fn build_repo_state(repo_root: &std::path::Path) -> FileTreeState {
|
||||
loaded: true,
|
||||
});
|
||||
let app_dir = Entry::Directory(DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&repo_root.join("packages/app"),
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -76,7 +76,7 @@ fn build_repo_state(repo_root: &std::path::Path) -> FileTreeState {
|
||||
loaded: true,
|
||||
});
|
||||
let packages_dir = Entry::Directory(DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&repo_root.join("packages"),
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -95,7 +95,7 @@ fn build_repo_state(repo_root: &std::path::Path) -> FileTreeState {
|
||||
|
||||
fn build_repo_state_with_unloaded_directory(repo_root: &std::path::Path) -> FileTreeState {
|
||||
let unloaded_src_dir = Entry::Directory(DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&repo_root.join("src"),
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -126,7 +126,7 @@ fn repo_transition_unregisters_lazy_loaded_path() {
|
||||
let repo_root = dirs.tests().join("repo");
|
||||
let displayed_root = repo_root.join("packages/app");
|
||||
let canonical_repo_root =
|
||||
warp_util::standardized_path::StandardizedPath::from_local_canonicalized(&repo_root)
|
||||
galaxy_util::standardized_path::StandardizedPath::from_local_canonicalized(&repo_root)
|
||||
.unwrap();
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
@@ -145,13 +145,13 @@ fn repo_transition_unregisters_lazy_loaded_path() {
|
||||
|
||||
file_tree_view.read(&app, |view, _ctx| {
|
||||
assert!(view.registered_lazy_loaded_paths.contains(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&displayed_root
|
||||
)
|
||||
.unwrap()
|
||||
));
|
||||
let displayed_std =
|
||||
warp_util::standardized_path::StandardizedPath::try_from_local(&displayed_root)
|
||||
galaxy_util::standardized_path::StandardizedPath::try_from_local(&displayed_root)
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
view.root_directories
|
||||
@@ -162,7 +162,7 @@ fn repo_transition_unregisters_lazy_loaded_path() {
|
||||
});
|
||||
repository_metadata_model.read(&app, |model, ctx| {
|
||||
assert!(model.is_lazy_loaded_path(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&displayed_root
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -180,10 +180,10 @@ fn repo_transition_unregisters_lazy_loaded_path() {
|
||||
|
||||
file_tree_view.read(&app, |view, _ctx| {
|
||||
let displayed_std =
|
||||
warp_util::standardized_path::StandardizedPath::try_from_local(&displayed_root)
|
||||
galaxy_util::standardized_path::StandardizedPath::try_from_local(&displayed_root)
|
||||
.unwrap();
|
||||
let repo_std =
|
||||
warp_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap();
|
||||
assert!(!view.registered_lazy_loaded_paths.contains(&displayed_std));
|
||||
assert_eq!(view.root_for_path(&displayed_std), Some(repo_std.clone()));
|
||||
@@ -196,7 +196,7 @@ fn repo_transition_unregisters_lazy_loaded_path() {
|
||||
});
|
||||
repository_metadata_model.read(&app, |model, ctx| {
|
||||
assert!(!model.is_lazy_loaded_path(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&displayed_root
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -231,7 +231,7 @@ fn repo_backed_unloaded_directory_loads_through_model() {
|
||||
let nested_dir = repo_root.join("src/nested");
|
||||
let source_file = repo_root.join("src/nested/main.rs");
|
||||
let canonical_repo_root =
|
||||
warp_util::standardized_path::StandardizedPath::from_local_canonicalized(&repo_root)
|
||||
galaxy_util::standardized_path::StandardizedPath::from_local_canonicalized(&repo_root)
|
||||
.unwrap();
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
@@ -259,11 +259,11 @@ fn repo_backed_unloaded_directory_loads_through_model() {
|
||||
assert!(!view
|
||||
.root_directories
|
||||
.get(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap()
|
||||
)
|
||||
.is_some_and(|root_dir| root_dir.entry.contains(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&source_file
|
||||
)
|
||||
.unwrap()
|
||||
@@ -272,9 +272,9 @@ fn repo_backed_unloaded_directory_loads_through_model() {
|
||||
|
||||
file_tree_view.update(&mut app, |view, ctx| {
|
||||
view.ensure_loaded_path(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap(),
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(&src_dir)
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&src_dir)
|
||||
.unwrap(),
|
||||
ctx,
|
||||
);
|
||||
@@ -284,11 +284,11 @@ fn repo_backed_unloaded_directory_loads_through_model() {
|
||||
assert!(view
|
||||
.root_directories
|
||||
.get(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap()
|
||||
)
|
||||
.is_some_and(|root_dir| root_dir.entry.contains(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&nested_dir
|
||||
)
|
||||
.unwrap()
|
||||
@@ -297,9 +297,9 @@ fn repo_backed_unloaded_directory_loads_through_model() {
|
||||
|
||||
file_tree_view.update(&mut app, |view, ctx| {
|
||||
view.ensure_loaded_path(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap(),
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(&nested_dir)
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&nested_dir)
|
||||
.unwrap(),
|
||||
ctx,
|
||||
);
|
||||
@@ -309,11 +309,11 @@ fn repo_backed_unloaded_directory_loads_through_model() {
|
||||
assert!(view
|
||||
.root_directories
|
||||
.get(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap()
|
||||
)
|
||||
.is_some_and(|root_dir| root_dir.entry.contains(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&source_file
|
||||
)
|
||||
.unwrap()
|
||||
@@ -321,17 +321,17 @@ fn repo_backed_unloaded_directory_loads_through_model() {
|
||||
});
|
||||
repository_metadata_model.read(&app, |model, ctx| {
|
||||
assert!(!model.is_lazy_loaded_path(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap(),
|
||||
ctx
|
||||
));
|
||||
let id = repo_metadata::RepositoryIdentifier::local(
|
||||
warp_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap(),
|
||||
);
|
||||
assert!(model.get_repository(&id, ctx).is_some_and(|state| {
|
||||
state.entry.contains(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&source_file,
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -352,7 +352,7 @@ fn pending_repository_root_does_not_register_lazy_loaded_path() {
|
||||
|
||||
let repo_root = dirs.tests().join("repo");
|
||||
let canonical_repo_root =
|
||||
warp_util::standardized_path::StandardizedPath::from_local_canonicalized(&repo_root)
|
||||
galaxy_util::standardized_path::StandardizedPath::from_local_canonicalized(&repo_root)
|
||||
.unwrap();
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
@@ -374,7 +374,7 @@ fn pending_repository_root_does_not_register_lazy_loaded_path() {
|
||||
});
|
||||
repository_metadata_model.read(&app, |model, ctx| {
|
||||
let id = repo_metadata::RepositoryIdentifier::local(
|
||||
warp_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap(),
|
||||
);
|
||||
assert!(matches!(
|
||||
@@ -390,18 +390,18 @@ fn pending_repository_root_does_not_register_lazy_loaded_path() {
|
||||
|
||||
file_tree_view.read(&app, |view, _ctx| {
|
||||
assert!(!view.registered_lazy_loaded_paths.contains(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap()
|
||||
));
|
||||
});
|
||||
repository_metadata_model.read(&app, |model, ctx| {
|
||||
assert!(!model.is_lazy_loaded_path(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap(),
|
||||
ctx
|
||||
));
|
||||
let id = repo_metadata::RepositoryIdentifier::local(
|
||||
warp_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
galaxy_util::standardized_path::StandardizedPath::try_from_local(&repo_root)
|
||||
.unwrap(),
|
||||
);
|
||||
assert!(matches!(
|
||||
@@ -430,7 +430,7 @@ fn failed_lazy_loaded_path_registration_is_retried() {
|
||||
|
||||
file_tree_view.read(&app, |view, _ctx| {
|
||||
assert!(!view.registered_lazy_loaded_paths.contains(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&displayed_root
|
||||
)
|
||||
.unwrap()
|
||||
@@ -438,7 +438,7 @@ fn failed_lazy_loaded_path_registration_is_retried() {
|
||||
});
|
||||
repository_metadata_model.read(&app, |model, ctx| {
|
||||
assert!(!model.is_lazy_loaded_path(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&displayed_root
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -463,7 +463,7 @@ fn failed_lazy_loaded_path_registration_is_retried() {
|
||||
});
|
||||
repository_metadata_model.read(&app, |model, ctx| {
|
||||
assert!(model.is_lazy_loaded_path(
|
||||
&warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&displayed_root
|
||||
)
|
||||
.unwrap(),
|
||||
|
||||
Reference in New Issue
Block a user