!dev && e.preventDefault()}>
+
!dev && e.preventDefault()}
+>
{#if platformName === 'macos' && !$settingsStore?.featureFlags.v3}
{/if}
+
+
+
{@render children()}
diff --git a/apps/desktop/src/routes/[projectId]/+layout.svelte b/apps/desktop/src/routes/[projectId]/+layout.svelte
index f82ed37c3a..e5edacba4e 100644
--- a/apps/desktop/src/routes/[projectId]/+layout.svelte
+++ b/apps/desktop/src/routes/[projectId]/+layout.svelte
@@ -126,11 +126,22 @@
setContext(StackingReorderDropzoneManagerFactory, stackingReorderDropzoneManagerFactory);
});
+ const focusManager = new FocusManager();
+ setContext(FocusManager, focusManager);
+
+ // Set the Project context immediately so child components can access it
+ // Even if project is undefined, we set the context to prevent "no instance" errors
+ setContext(Project, data.project);
+
+ // Debug logging to help diagnose the issue
+ if (!data.project) {
+ console.warn('Project is undefined in [projectId] layout, projectId:', data.projectId);
+ }
+
$effect.pre(() => {
setContext(HistoryService, data.historyService);
setContext(TemplateService, data.templateService);
setContext(BaseBranch, baseBranch);
- setContext(Project, project);
setContext(GitBranchService, data.gitBranchService);
setContext(UncommitedFilesWatcher, data.uncommitedFileWatcher);
setContext(ProjectService, data.projectService);
@@ -141,9 +152,6 @@
setContext(StackPublishingService, data.stackPublishingService);
});
- const focusManager = new FocusManager();
- setContext(FocusManager, focusManager);
-
let intervalId: any;
const forgeFactory = getContext(DefaultForgeFactory);
diff --git a/apps/desktop/static/icons/128x128.png b/apps/desktop/static/icons/128x128.png
new file mode 100644
index 0000000000..2a6955a943
Binary files /dev/null and b/apps/desktop/static/icons/128x128.png differ
diff --git a/apps/desktop/static/icons/dev/128x128.png b/apps/desktop/static/icons/dev/128x128.png
new file mode 100644
index 0000000000..958d0c65d7
Binary files /dev/null and b/apps/desktop/static/icons/dev/128x128.png differ
diff --git a/apps/desktop/static/icons/nightly/128x128.png b/apps/desktop/static/icons/nightly/128x128.png
new file mode 100644
index 0000000000..266e75898f
Binary files /dev/null and b/apps/desktop/static/icons/nightly/128x128.png differ
diff --git a/crates/gitbutler-tauri/capabilities/main.json b/crates/gitbutler-tauri/capabilities/main.json
index 6a633d04b6..49bde9102c 100644
--- a/crates/gitbutler-tauri/capabilities/main.json
+++ b/crates/gitbutler-tauri/capabilities/main.json
@@ -7,6 +7,12 @@
"permissions": [
"core:default",
"core:window:allow-start-dragging",
+ "core:window:allow-close",
+ "core:window:allow-minimize",
+ "core:window:allow-maximize",
+ "core:window:allow-unmaximize",
+ "core:window:allow-is-maximized",
+ "core:window:allow-set-decorations",
"core:window:default",
"dialog:allow-open",
"fs:allow-read-file",
diff --git a/crates/gitbutler-tauri/src/window.rs b/crates/gitbutler-tauri/src/window.rs
index af2a9783d8..72c77d1d54 100644
--- a/crates/gitbutler-tauri/src/window.rs
+++ b/crates/gitbutler-tauri/src/window.rs
@@ -255,6 +255,22 @@ pub fn create(
window_relative_url: String,
) -> tauri::Result
{
tracing::info!("creating window '{label}' created at '{window_relative_url}'");
+
+ #[cfg(target_os = "windows")]
+ let window = tauri::WebviewWindowBuilder::new(
+ handle,
+ label,
+ tauri::WebviewUrl::App(window_relative_url.into()),
+ )
+ .resizable(true)
+ .title(handle.package_info().name.clone())
+ .disable_drag_drop_handler()
+ .min_inner_size(1000.0, 600.0)
+ .inner_size(1160.0, 720.0)
+ .decorations(true) // Start with decorations enabled, frontend will disable if user has custom title bar enabled
+ .build()?;
+
+ #[cfg(not(any(target_os = "windows", target_os = "macos")))]
let window = tauri::WebviewWindowBuilder::new(
handle,
label,
@@ -265,6 +281,7 @@ pub fn create(
.disable_drag_drop_handler()
.min_inner_size(1000.0, 600.0)
.inner_size(1160.0, 720.0)
+ .decorations(true) // Start with decorations enabled, frontend will disable if user has custom title bar enabled
.build()?;
Ok(window)
}
diff --git a/packages/ui/src/styles/core/variables.css b/packages/ui/src/styles/core/variables.css
index 59607f346f..5fec265dfe 100644
--- a/packages/ui/src/styles/core/variables.css
+++ b/packages/ui/src/styles/core/variables.css
@@ -20,4 +20,7 @@
--lexical-input-client-padding: 12px;
--lexical-input-client-toolbar-height: 48px;
--lexical-input-font-size: 13px;
+
+ /* OS related */
+ --windows-title-bar-height: 30px;
}
diff --git a/turbo.json b/turbo.json
index f5ee383f13..799ae363e2 100644
--- a/turbo.json
+++ b/turbo.json
@@ -20,7 +20,8 @@
"dev": {
"dependsOn": ["package"],
"cache": false,
- "persistent": true
+ "persistent": true,
+ "interruptible": true
},
"check": {
"dependsOn": ["package"]