feat(launcher): add Native Test Mode for profile/command preview

Enables testing the LaunchProfile system from any device (no Mac/Electron
needed). When active, the Open button simulates the full native flow and
shows a debug popup with everything that WOULD be sent to Electron.

- ae_events_stores__launcher_defaults.ts: add native_test_mode boolean
  (persisted, default false) to LauncherLocState and launcher_loc_defaults.

- launcher_cfg_app_modes.svelte: add Native Test Mode checkbox toggle in
  the Advanced Toggles (Edit Mode Only) section with active-state warning.

- launcher_file_cont.svelte:
  - Add test_mode_popup_open/test_mode_popup_data state vars.
  - Add branch 0 in handle_open_file(): when native_test_mode + app_mode=native,
    skip all Electron calls; resolve the real LaunchProfile, build a data
    snapshot, open the debug popup.
  - Debug popup shows: file info, simulated temp path, cache/copy pass,
    resolved LaunchProfile fields, set_display_layout call, open command
    (run_cmd or open_local_file_v2 fallback), sleep delay, post-script
    (AppleScript or shell: prefix). Click backdrop or Close to dismiss.
This commit is contained in:
Scott Idem
2026-05-12 12:33:24 -04:00
parent 422c9c341c
commit ff824ebbe5
3 changed files with 194 additions and 1 deletions

View File

@@ -78,6 +78,13 @@ export interface LauncherLocState {
controller: string;
controller_group_code: string;
controller_client_id: string | null;
/**
* Native test mode: simulates the full native-branch open flow without Electron.
* Shows a debug popup with the resolved profile, commands, and AppleScript instead
* of actually launching files. Useful for testing LaunchProfile config from any
* device/OS without deploying to the Mac laptop.
*/
native_test_mode: boolean;
}
export interface LauncherSessState {
@@ -198,7 +205,8 @@ export const launcher_loc_defaults: LauncherLocState = {
controller: 'local',
controller_group_code: 'launcher-00',
controller_client_id: null
controller_client_id: null,
native_test_mode: false
// controller_cmd: null,
// controller_trigger_send: null,
};