Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/actions/setup-project-bun/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ description: >-
runtime (default), or testRunnerBun for test-runner.

# Runtime 1.4.2 fixes #6684's Windows Bun.fetch stream truncation. The test runner
# stays on 1.4.0: #4821 reverted #4064 after 1.4.2's multi-file --isolate preload
# segfault; #6713 run 37631558263 reproduces it on Linux 1/4, macOS 2/2, Windows 9/9.
# skipped 1.4.2: #4821 reverted #4064 after its multi-file --isolate preload segfault
# (#6713 run 37631558263: Linux 1/4, macOS 2/2, Windows 9/9). It moved from 1.4.0 to
# 1.4.3 for oven-sh/bun#44581: 1.4.0's Bun.spawnSync could lose a child's exit after
# finalizers ran inside an earlier call and spin past its own timeout (#4956).
# Rejoin only after the upstream runner crash is fixed and a green lane=all
# dispatch proves the unified version; then delete testRunnerBun and this role input.
inputs:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,9 @@ jobs:
printf 'scheduled run tests dev at %s (workflow %s)\n' "$sha" "$GITHUB_SHA"

# Bun roles (#6713): runtime 1.4.2 fixes #6684's Windows Bun.fetch streaming;
# test-runner 1.4.0 avoids 1.4.2's multi-file --isolate preload segfault (#4821
# reverted #4064; run 37631558263: Linux 1/4, macOS 2/2, Windows 9/9).
# the test runner skipped 1.4.2's multi-file --isolate preload segfault (#4821
# reverted #4064; run 37631558263: Linux 1/4, macOS 2/2, Windows 9/9) and runs
# 1.4.3, whose oven-sh/bun#44581 stops Bun.spawnSync losing a child's exit (#4956).
# Rejoin after the upstream runner crash is fixed and a green lane=all dispatch
# proves the unified version, then delete testRunnerBun and the action's role input.
# The suite, split by file across four Linux runners.
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ A ready-for-review PR is the author's claim that the change is complete, underst

## Local validation and hooks

The suite uses Bun 1.4.0 (`testRunnerBun`) while the shipped runtime is 1.4.2.
`scripts/test.ts` finds a 1.4.0 binary on PATH or in `~/.bun/bin`, or uses
The suite uses Bun 1.4.3 (`testRunnerBun`) while the shipped runtime is 1.4.2.
`scripts/test.ts` finds a 1.4.3 binary on PATH or in `~/.bun/bin`, or uses
`OCX_TEST_RUNNER_BUN`; install that version locally if it is missing.

Run `bun run test` before review readiness. If the full local suite is too costly
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# syntax=docker/dockerfile:1

# Keep the runtime aligned with package.json and pin the multi-platform image index.
# Runtime 1.4.2 fixes #6684's Windows Bun.fetch streaming; CI tests stay on 1.4.0
# Runtime 1.4.2 fixes #6684's Windows Bun.fetch streaming; CI tests run on 1.4.3
# because 1.4.2 segfaults reloading preloads in multi-file --isolate (#4821;
# #6713 run 37631558263: Linux 1/4, macOS 2/2, Windows 9/9). Rejoin after the
# #6713 run 37631558263: Linux 1/4, macOS 2/2, Windows 9/9) and 1.4.0's spawnSync
# can lose a child's exit (#4956, oven-sh/bun#44581). Rejoin after the
# upstream crash fix passes a unified-version lane=all dispatch, then delete
# package.json's testRunnerBun pin and setup-project-bun's role input.
ARG BUN_IMAGE=oven/bun:1.4.2@sha256:9114c058aeae42162ee16dd5084b95fe9473970bb6bcb5b232ab1630f0546895
Expand Down
22 changes: 22 additions & 0 deletions desktop/src-tauri/src/first_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ pub fn apply_start_at_login_default(app: &AppHandle) -> StartAtLogin {
/// It runs once, behind its own marker, and only where autostart is already on. It never turns the
/// setting on and never turns it off; the worst case is an entry that keeps its old arguments and a
/// login launch that shows its window, which is the visible failure rather than the silent one.
///
/// On macOS the marker lives in a config directory every copy of the app shares, while the plugin
/// rewrites whatever plist exists. The rewrite is therefore limited to this copy's own entry in the
/// exact shape the plugin writes; another or a missing copy, or any key the rewrite would drop, is
/// left untouched and unmarked (#6972).
pub fn adopt_launch_origin_argument(app: &AppHandle) {
let Ok(dir) = app.path().app_config_dir() else {
return;
Expand All @@ -102,6 +107,23 @@ pub fn adopt_launch_origin_argument(app: &AppHandle) {
// that is already enabled, so retrying after a transient registry, LaunchAgent or desktop-file
// error is free — and claiming the marker first would suppress the migration permanently and
// leave a login launch showing its window forever.
#[cfg(target_os = "macos")]
{
use crate::login_registration::Migration;
let Ok(home) = app.path().home_dir() else {
return;
};
match crate::login_registration::judge_migration(&home) {
Migration::Rewrite => {
if crate::login_autostart::enable(app).is_err() {
return;
}
}
Migration::Absent => {}
Migration::Leave => return,
}
}
#[cfg(not(target_os = "macos"))]
match app.autolaunch().is_enabled() {
Ok(true) => {
if crate::login_autostart::enable(app).is_err() {
Expand Down
5 changes: 5 additions & 0 deletions desktop/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ mod formatting;
mod identity;
mod logging;
mod login_autostart;
// The judgment is portable so Linux CI runs its fixture parity tests; only macOS reads launchd.
#[cfg(any(target_os = "macos", test))]
mod login_registration;
#[cfg(any(target_os = "windows", test))]
mod windows_autostart_command;
// macOS only: it exists to replace one item in a menu no other platform installs. Compiling it
Expand All @@ -35,6 +38,8 @@ mod popup;
mod popup;
#[cfg(target_os = "macos")]
mod provider_icons;
#[cfg(target_os = "macos")]
mod tray_login;
// The macOS build selects native_tray.rs as the popup module; compile the portable popup
// module's tests on macOS too so its navigation rules run on the maintainers' platform.
#[cfg(all(test, target_os = "macos"))]
Expand Down
Loading
Loading