fix(windows): hide engine consoles

Disable the native Windows frame at startup and render in-app window controls so packaged builds use Firelink's own titlebar placement instead of the default OS chrome.

Apply CREATE_NO_WINDOW to raw child processes used by the aria2 daemon and shared engine version checks. Route ffmpeg and deno checks through the same hidden version-check helper so Settings > Engine does not flash console windows.

Normalize Windows extended-length paths before returning approved download roots to the UI, while keeping canonicalization for backend safety checks. Detect yt-dlp's embedded runtime per platform so Windows onedir builds look for python*.dll instead of macOS Python.framework.

Verification: npm run build; cargo check --manifest-path src-tauri/Cargo.toml; cargo test --manifest-path src-tauri/Cargo.toml --lib; node --check scripts/smoke-packaged-app.js; Ruby YAML parse for .github/workflows/release.yml; git diff --check.
This commit is contained in:
NimBold
2026-06-30 15:47:02 +03:30
parent 1d9b898e9c
commit 35ccd5659e
5 changed files with 207 additions and 54 deletions
+2
View File
@@ -16,6 +16,7 @@ import SchedulerView from "./components/SchedulerView";
import SpeedLimiterView from "./components/SpeedLimiterView";
import LogsView from "./components/LogsView";
import { KeychainPermissionModal } from "./components/KeychainPermissionModal";
import { WindowControls } from "./components/WindowControls";
import { useToast } from "./contexts/ToastContext";
import { openUrl } from '@tauri-apps/plugin-opener';
import { usePlatformInfo } from './utils/platform';
@@ -576,6 +577,7 @@ function App() {
return (
<div className="app-shell flex h-screen w-screen overflow-hidden text-text-primary">
{platform.os === 'windows' && <WindowControls />}
<div
className={`app-sidebar-shell relative z-20 shrink-0 transition-all duration-300 ease-[cubic-bezier(0.2,0.8,0.2,1)] ${
isSidebarVisible ? 'opacity-100' : 'opacity-0 pointer-events-none'
+38
View File
@@ -0,0 +1,38 @@
import { getCurrentWindow } from '@tauri-apps/api/window';
import { Minus, Square, X } from 'lucide-react';
const appWindow = getCurrentWindow();
export function WindowControls() {
return (
<div className="window-controls" aria-label="Window controls">
<button
type="button"
className="window-control"
title="Minimize"
aria-label="Minimize"
onClick={() => void appWindow.minimize()}
>
<Minus size={13} strokeWidth={2.25} />
</button>
<button
type="button"
className="window-control"
title="Maximize"
aria-label="Maximize"
onClick={() => void appWindow.toggleMaximize()}
>
<Square size={11} strokeWidth={2.25} />
</button>
<button
type="button"
className="window-control close"
title="Close"
aria-label="Close"
onClick={() => void appWindow.close()}
>
<X size={14} strokeWidth={2.25} />
</button>
</div>
);
}
+36 -6
View File
@@ -1279,13 +1279,43 @@
.mac-switch:checked::after {
transform: translateX(16px);
}
.downloads-view {
background: hsl(var(--main-bg));
}
.downloads-view {
background: hsl(var(--main-bg));
}
.main-titlebar {
height: 52px;
display: flex;
.window-controls {
position: fixed;
top: 10px;
left: 12px;
z-index: 60;
display: inline-flex;
align-items: center;
gap: 7px;
}
.window-control {
width: 22px;
height: 22px;
display: inline-flex;
align-items: center;
justify-content: center;
color: hsl(var(--text-muted));
border-radius: 999px;
}
.window-control:hover {
color: hsl(var(--text-primary));
background: hsl(var(--item-hover));
}
.window-control.close:hover {
color: white;
background: #c42b1c;
}
.main-titlebar {
height: 52px;
display: flex;
align-items: center;
padding: 0 18px;
border-bottom: 1px solid hsl(var(--border-color));