feat(autolaunch): cross-platform auto-launch at user login#205
Draft
kdroidFilter wants to merge 1 commit intomainfrom
Draft
feat(autolaunch): cross-platform auto-launch at user login#205kdroidFilter wants to merge 1 commit intomainfrom
kdroidFilter wants to merge 1 commit intomainfrom
Conversation
New autolaunch module with unified API across MSIX and Win32 packaging. MSIX uses WinRT StartupTask; Win32 uses HKCU\Run + StartupApproved parity rule. Detects auto-launched starts via CLI marker (Win32) and parent-process walk to sihost.exe (MSIX). Plugin auto-injects StartupTask TaskId into app metadata when addAutoLaunchExtension is enabled. Example gains an Auto-Launch tab and home banner when started at login.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
autolaunchruntime module: unified API (AutoLaunch.state/enable/disable/wasStartedAtLogin/openSystemSettings) across packaging types.StartupTaskAPI via WRL on a dedicated MTA thread (AWT EDT is STA, avoids message-pump-dependent async completion issues). TaskId auto-injected by the Gradle plugin whenappx { addAutoLaunchExtension = true }(exposed viaNucleusApp.startupTaskId).HKCU\...\Run+StartupApproved\Runparity rule (flag & 1 == 1⇒DISABLED_BY_USER). Injects--nucleus-autostartCLI marker.AutoLaunch.wasStartedAtLogin(args)):sihost.exeas external parent (empirical finding on Win11 — MSIX startup activations are routed through Shell Infrastructure Host, nottaskhostw.exeas some docs suggest). Deterministic, no heuristics, no WinAppSDK / PSF dependency.nucleus_autolaunch.dll. GraalVM reachability metadata included.AppXSettings.startupTaskIdoverride, writes the resolved TaskId intonucleus-app.properties.runtime/autolaunch.mdpage wired into mkdocs nav.build-natives.yaml; download + EXPECTED entries added to all 6 consumer workflows.Test plan
state()reportsDISABLED_BY_USER→enable()returnsBLOCKED_BY_USER→openSystemSettings()opensms-settings:startupapps.isLaunchedByTaskSchedulerdiagnostic showsexternal parent = sihost.exe→ banner visible.external parent = explorer.exe→ no banner.StartupTaskState.DisabledByUserafter user toggled via Task Manager →enable()returnsBLOCKED_BY_USER(no re-enable attempt).StartupApprovedDISABLED_BY_USERnot overwritten../gradlew :autolaunch:test(Windows only).UNSUPPORTED/false, no crashes.