Compare commits

..

1 Commits

Author SHA1 Message Date
NimBold 765451f221 test(startup): isolate Windows focusability transition (#37)
- Issue #37: keep the failing startup path hidden and focused-out while removing the post-Ready focusability transition.\n- Use the packaged workflow to distinguish native focusability from other startup causes.\n\nRefs #37.
2026-08-27 19:32:57 +03:30
2 changed files with 7 additions and 19 deletions
+6 -11
View File
@@ -23,21 +23,16 @@ const stabilityMsValue = Number.parseInt(argValue('--stability-ms') || '5000', 1
const stabilityMs = Number.isFinite(stabilityMsValue) && stabilityMsValue >= 0
? Math.min(stabilityMsValue, MAX_STABILITY_MS)
: 5000;
const childEnv = {
...process.env,
FIRELINK_SMOKE_TEST: '1',
FIRELINK_DISABLE_ARIA2_POLLER: '1',
WEBKIT_DISABLE_COMPOSITING_MODE: '1',
GDK_BACKEND: 'x11',
};
if (process.argv.includes('--disable-aria2-poller')) {
childEnv.FIRELINK_DISABLE_ARIA2_POLLER = '1';
}
const READY_PORT_TIMEOUT_MS = 500;
const child = spawn(executable, [], {
cwd: process.env.RUNNER_TEMP || process.env.TMPDIR || process.cwd(),
detached: process.platform !== 'win32',
env: childEnv,
env: {
...process.env,
FIRELINK_SMOKE_TEST: '1',
WEBKIT_DISABLE_COMPOSITING_MODE: '1',
GDK_BACKEND: 'x11',
},
stdio: ['ignore', 'pipe', 'pipe'],
});
+1 -8
View File
@@ -3996,9 +3996,6 @@ fn mark_main_window_startup_complete(app_handle: &tauri::AppHandle) {
#[cfg(target_os = "windows")]
fn reveal_main_window(app_handle: &tauri::AppHandle) {
if let Some(window) = app_handle.get_webview_window("main") {
if let Err(error) = window.set_focusable(true) {
log::warn!("Could not make the main window focusable: {error}");
}
if let Err(error) = window.show() {
eprintln!("Failed to reveal the main window: {error}");
}
@@ -18558,8 +18555,7 @@ pub fn run() {
// re-enter that handler during native construction.
main_window_builder = main_window_builder
.visible(false)
.focused(false)
.focusable(false);
.focused(false);
}
main_window_builder
.build()
@@ -19007,9 +19003,6 @@ pub fn run() {
let poll_secret = aria2_secret.clone();
let poll_mgr = Arc::clone(&queue_manager_poll);
tauri::async_runtime::spawn(async move {
if std::env::var_os("FIRELINK_DISABLE_ARIA2_POLLER").is_some() {
return;
}
let mut interval = tokio::time::interval(std::time::Duration::from_millis(1000));
let mut observations: HashMap<String, Aria2ConnectionObservation> = HashMap::new();
let mut missing_gid_recovery_at: HashMap<String, Instant> = HashMap::new();